summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-10-16 03:22:24 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-10-16 03:22:24 +0000
commit4be3a16c92e50578956884546c1458c9914e927e (patch)
treeeb51672599361b130552ad70123aab21c8a454a2
parente4edf83f0ac94f4705635e2af4917e2d0e7e2a7d (diff)
downloadpx4-nuttx-4be3a16c92e50578956884546c1458c9914e927e.tar.gz
px4-nuttx-4be3a16c92e50578956884546c1458c9914e927e.tar.bz2
px4-nuttx-4be3a16c92e50578956884546c1458c9914e927e.zip
No up_en/disable_irq's
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3022 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/arch/avr/src/at91uc3/at91uc3_irq.c42
-rw-r--r--nuttx/arch/avr/src/at91uc3/at91uc3_lowinit.c1
-rw-r--r--nuttx/arch/avr/src/at91uc3/at91uc3_serial.c16
-rw-r--r--nuttx/arch/avr/src/avr32/up_doirq.c8
-rw-r--r--nuttx/arch/avr/src/avr32/up_nommuhead.S4
-rw-r--r--nuttx/arch/avr/src/common/up_internal.h4
-rwxr-xr-xnuttx/configs/avr32dev1/ostest/defconfig4
-rw-r--r--nuttx/sched/irq_attach.c2
8 files changed, 11 insertions, 70 deletions
diff --git a/nuttx/arch/avr/src/at91uc3/at91uc3_irq.c b/nuttx/arch/avr/src/at91uc3/at91uc3_irq.c
index 7f38f4474..7e1204d25 100644
--- a/nuttx/arch/avr/src/at91uc3/at91uc3_irq.c
+++ b/nuttx/arch/avr/src/at91uc3/at91uc3_irq.c
@@ -178,9 +178,6 @@ void up_irqinitialize(void)
{
int group;
- /* Disable all interrupts */
-#warning "Missing logic"
-
/* Initialize the table that provides the value of the IPR register to
* use to assign a group to different interrupt priorities.
*/
@@ -219,45 +216,6 @@ void up_irqinitialize(void)
}
/****************************************************************************
- * Name: up_disable_irq
- *
- * Description:
- * Disable the IRQ specified by 'irq'
- *
- ****************************************************************************/
-
-void up_disable_irq(int irq)
-{
-#warning "Missing logic"
-}
-
-/****************************************************************************
- * Name: up_enable_irq
- *
- * Description:
- * Enable the IRQ specified by 'irq'
- *
- ****************************************************************************/
-
-void up_enable_irq(int irq)
-{
-#warning "Missing logic"
-}
-
-/****************************************************************************
- * Name: up_maskack_irq
- *
- * Description:
- * Mask the IRQ and acknowledge it
- *
- ****************************************************************************/
-
-void up_maskack_irq(int irq)
-{
- up_disable_irq(irq);
-}
-
-/****************************************************************************
* Name: up_prioritize_irq
*
* Description:
diff --git a/nuttx/arch/avr/src/at91uc3/at91uc3_lowinit.c b/nuttx/arch/avr/src/at91uc3/at91uc3_lowinit.c
index 071e86690..549d79b99 100644
--- a/nuttx/arch/avr/src/at91uc3/at91uc3_lowinit.c
+++ b/nuttx/arch/avr/src/at91uc3/at91uc3_lowinit.c
@@ -102,7 +102,6 @@ void up_lowinit(void)
/* Perform board-level initialization */
up_boardinitialize();
-
}
diff --git a/nuttx/arch/avr/src/at91uc3/at91uc3_serial.c b/nuttx/arch/avr/src/at91uc3/at91uc3_serial.c
index 80b9a8658..b80559979 100644
--- a/nuttx/arch/avr/src/at91uc3/at91uc3_serial.c
+++ b/nuttx/arch/avr/src/at91uc3/at91uc3_serial.c
@@ -403,20 +403,10 @@ static void up_shutdown(struct uart_dev_s *dev)
static int up_attach(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- int ret;
- /* Attach and enable the IRQ */
+ /* Attach the IRQ */
- ret = irq_attach(priv->irq, up_interrupt);
- if (ret == OK)
- {
- /* Enable the interrupt (RX and TX interrupts are still disabled
- * in the USART
- */
-
- up_enable_irq(priv->irq);
- }
- return ret;
+ return irq_attach(priv->irq, up_interrupt);
}
/****************************************************************************
@@ -432,7 +422,7 @@ static int up_attach(struct uart_dev_s *dev)
static void up_detach(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- up_disable_irq(priv->irq);
+ up_serialout(priv, AVR32_USART_IDR_OFFSET, 0xffffffff);
irq_detach(priv->irq);
}
diff --git a/nuttx/arch/avr/src/avr32/up_doirq.c b/nuttx/arch/avr/src/avr32/up_doirq.c
index da3f244d6..abc0cf54d 100644
--- a/nuttx/arch/avr/src/avr32/up_doirq.c
+++ b/nuttx/arch/avr/src/avr32/up_doirq.c
@@ -89,10 +89,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
DEBUGASSERT(current_regs == NULL);
current_regs = regs;
- /* Mask and acknowledge the interrupt */
-
- up_maskack_irq(irq);
-
/* Deliver the IRQ */
irq_dispatch(irq, regs);
@@ -108,10 +104,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
/* Indicate that we are no long in an interrupt handler */
current_regs = NULL;
-
- /* Unmask the last interrupt (global interrupts are still disabled) */
-
- up_enable_irq(irq);
#endif
up_ledoff(LED_INIRQ);
return regs;
diff --git a/nuttx/arch/avr/src/avr32/up_nommuhead.S b/nuttx/arch/avr/src/avr32/up_nommuhead.S
index 9ac92e217..1c747fa40 100644
--- a/nuttx/arch/avr/src/avr32/up_nommuhead.S
+++ b/nuttx/arch/avr/src/avr32/up_nommuhead.S
@@ -134,12 +134,14 @@ __start:
/* Then jump to OS entry (will not return) */
- rjmp os_start
+ lddpc pc, .Los_start
.Lstackbase:
.word _ebss+CONFIG_IDLETHREAD_STACKSIZE-4
.Lvectortab:
.word vectortab
+.Los_start:
+ .word os_start
.size __start, .-__start
/* This global variable is unsigned long g_heapbase and is
diff --git a/nuttx/arch/avr/src/common/up_internal.h b/nuttx/arch/avr/src/common/up_internal.h
index 591c2b9a9..ad5fc30f3 100644
--- a/nuttx/arch/avr/src/common/up_internal.h
+++ b/nuttx/arch/avr/src/common/up_internal.h
@@ -194,10 +194,6 @@ extern void lowconsole_init(void);
extern void up_timerinit(void);
-/* Defined in chip/xxx_irq.c */
-
-extern void up_maskack_irq(int irq);
-
/* Defined in configs/<board-name>/src/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig
index 8ea951d19..0068dae6e 100755
--- a/nuttx/configs/avr32dev1/ostest/defconfig
+++ b/nuttx/configs/avr32dev1/ostest/defconfig
@@ -52,6 +52,9 @@
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
+# CONFIG_ARCH_NOINTC - define if the architecture does not
+# support an interrupt controller or otherwise cannot support
+# APIs like up_enable_irq() and up_disable_irq().
# CONFIG_ARCH_IRQPRIO - Define if MCU supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
@@ -80,6 +83,7 @@ CONFIG_BOARD_LOOPSPERMSEC=7982
CONFIG_DRAM_SIZE=(32*1024)
CONFIG_DRAM_START=0x10000000
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
+CONFIG_ARCH_NOINTC=y
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_STACKDUMP=y
diff --git a/nuttx/sched/irq_attach.c b/nuttx/sched/irq_attach.c
index 5ccb77ce1..85f6b93ed 100644
--- a/nuttx/sched/irq_attach.c
+++ b/nuttx/sched/irq_attach.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/irq_attach.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without