summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-07 16:59:36 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-07 16:59:36 +0000
commit2c9001b17ff62f61be1677ebd789f081324fe326 (patch)
tree9d7a5cc564361a837742534250d3527a06d62081 /nuttx/arch
parenta113aa53d96d039d28e3e54ba79b2aae6a524ca5 (diff)
downloadpx4-nuttx-2c9001b17ff62f61be1677ebd789f081324fe326.tar.gz
px4-nuttx-2c9001b17ff62f61be1677ebd789f081324fe326.tar.bz2
px4-nuttx-2c9001b17ff62f61be1677ebd789f081324fe326.zip
reconcile architectures w/o interrupt controllers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1153 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/arm/include/str71x/irq.h2
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_irq.c4
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_timerisr.c2
-rw-r--r--nuttx/arch/sh/src/common/up_doirq.c2
-rw-r--r--nuttx/arch/sh/src/common/up_internal.h6
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_head.S2
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_irq.c44
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_serial.c22
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_timerisr.c2
9 files changed, 20 insertions, 66 deletions
diff --git a/nuttx/arch/arm/include/str71x/irq.h b/nuttx/arch/arm/include/str71x/irq.h
index d68b3779f..ecb1dcc95 100644
--- a/nuttx/arch/arm/include/str71x/irq.h
+++ b/nuttx/arch/arm/include/str71x/irq.h
@@ -110,8 +110,6 @@ extern "C" {
* Public Functions
************************************************************************************/
-EXTERN int up_irqpriority(int irq, ubyte priority); /* Set interrupt priority (0-15) */
-
#undef EXTERN
#ifdef __cplusplus
}
diff --git a/nuttx/arch/arm/src/str71x/str71x_irq.c b/nuttx/arch/arm/src/str71x/str71x_irq.c
index 2093ecc7f..1c243f460 100644
--- a/nuttx/arch/arm/src/str71x/str71x_irq.c
+++ b/nuttx/arch/arm/src/str71x/str71x_irq.c
@@ -169,14 +169,14 @@ void up_maskack_irq(int irq)
}
/****************************************************************************
- * Name: up_irqpriority
+ * Name: up_prioritize_irq
*
* Description:
* set interrupt priority
*
****************************************************************************/
-int up_irqpriority(int irq, ubyte priority)
+int up_prioritize_irq(int irq, int priority)
{
uint32 addr;
uint32 reg32;
diff --git a/nuttx/arch/arm/src/str71x/str71x_timerisr.c b/nuttx/arch/arm/src/str71x/str71x_timerisr.c
index 571d67de2..f6b709e60 100644
--- a/nuttx/arch/arm/src/str71x/str71x_timerisr.c
+++ b/nuttx/arch/arm/src/str71x/str71x_timerisr.c
@@ -184,7 +184,7 @@ void up_timerinit(void)
/* Set the IRQ interrupt priority */
- up_irqpriority(STR71X_IRQ_SYSTIMER, 1);
+ up_prioritize_irq(STR71X_IRQ_SYSTIMER, 1);
/* Attach the timer interrupt vector */
diff --git a/nuttx/arch/sh/src/common/up_doirq.c b/nuttx/arch/sh/src/common/up_doirq.c
index 6b0d2c0fc..01aa21500 100644
--- a/nuttx/arch/sh/src/common/up_doirq.c
+++ b/nuttx/arch/sh/src/common/up_doirq.c
@@ -81,7 +81,7 @@ void up_doirq(int irq, uint32* regs)
current_regs = regs;
- /* Mask and acknowledge the interrupt */
+ /* Mask and acknowledge the interrupt (if supported by the chip) */
up_maskack_irq(irq);
diff --git a/nuttx/arch/sh/src/common/up_internal.h b/nuttx/arch/sh/src/common/up_internal.h
index 31f016074..8cb3ee2dd 100644
--- a/nuttx/arch/sh/src/common/up_internal.h
+++ b/nuttx/arch/sh/src/common/up_internal.h
@@ -171,9 +171,13 @@ extern void up_wdtinit(void);
extern void up_timerinit(void);
-/* Defined in up_irq.c */
+/* Defined in chip-specific logic if CONFIG_ARCH_NOINTC is not set */
+#ifndef CONFIG_ARCH_NOINTC
extern void up_maskack_irq(int irq);
+#else
+# define up_maskack_irq(irq)
+#endif
/* Defined in board/up_leds.c */
diff --git a/nuttx/arch/sh/src/sh1/sh1_head.S b/nuttx/arch/sh/src/sh1/sh1_head.S
index 6ff129493..82e8c7175 100644
--- a/nuttx/arch/sh/src/sh1/sh1_head.S
+++ b/nuttx/arch/sh/src/sh1/sh1_head.S
@@ -232,7 +232,7 @@ __start0:
add #4, r0 /* R0: Address of next byte to clear in BSS */
cmp/ge r0, r1 /* End of BSS? */
bt 3b /* Loop until the end of BSS */
- nop /* Delay slot
+ nop /* Delay slot */
/* Configure the uart so that we can get debug output as soon
* as possible.
diff --git a/nuttx/arch/sh/src/sh1/sh1_irq.c b/nuttx/arch/sh/src/sh1/sh1_irq.c
index f56f642d5..71a43f5f2 100644
--- a/nuttx/arch/sh/src/sh1/sh1_irq.c
+++ b/nuttx/arch/sh/src/sh1/sh1_irq.c
@@ -88,54 +88,14 @@ void up_irqinitialize(void)
}
/****************************************************************************
- * Name: up_disable_irq
- *
- * Description:
- * Disable the IRQ specified by 'irq'
- *
- ****************************************************************************/
-
-void up_disable_irq(int irq)
-{
-#warning "To be provided"
-}
-
-/****************************************************************************
- * Name: up_enable_irq
- *
- * Description:
- * Enable the IRQ specified by 'irq'
- *
- ****************************************************************************/
-
-void up_enable_irq(int irq)
-{
-#warning "To be provided"
-}
-
-/****************************************************************************
- * Name: up_maskack_irq
- *
- * Description:
- * Mask the IRQ and acknowledge it
- *
- ****************************************************************************/
-
-void up_maskack_irq(int irq)
-{
-#warning "To be provided"
-}
-
-/****************************************************************************
- * Name: up_irqpriority
+ * Name: up_prioritize_irq
*
* Description:
* set interrupt priority
*
****************************************************************************/
-#warning "Should this be supported?"
-void up_irqpriority(int irq, ubyte priority)
+void up_prioritize_irq(int irq, int priority)
{
#warning "To be provided"
}
diff --git a/nuttx/arch/sh/src/sh1/sh1_serial.c b/nuttx/arch/sh/src/sh1/sh1_serial.c
index cfdfbe349..7578132b2 100644
--- a/nuttx/arch/sh/src/sh1/sh1_serial.c
+++ b/nuttx/arch/sh/src/sh1/sh1_serial.c
@@ -425,24 +425,16 @@ static int up_attach(struct uart_dev_s *dev)
/* Attach the RDR full IRQ */
- ret = irq_attach(priv->irq + , up_interrupt);
+ ret = irq_attach(priv->irq + SH1_RXI_IRQ_OFFSET, up_interrupt);
if (ret == OK)
{
- /* Enable the interrupt
- */
+ /* Attach the TDR empty IRQ */
- up_enable_irq(priv->irq);
- }
-
- /* Enable the RDR full and TDR empty interrupts at the interupt controller
- * (RX and TX interrupts are still disabled in the SCI)
- */
-
- if (ret == OK)
- {
-
- up_enable_irq(priv->irq);
- up_enable_irq(priv->irq);
+ ret = irq_attach(priv->irq + SH1_TXI_IRQ_OFFSET, up_interrupt);
+ if (ret < 0)
+ {
+ (void)irq_detach(priv->irq + SH1_RXI_IRQ_OFFSET);
+ }
}
return ret;
diff --git a/nuttx/arch/sh/src/sh1/sh1_timerisr.c b/nuttx/arch/sh/src/sh1/sh1_timerisr.c
index d3bf495a1..874e25647 100644
--- a/nuttx/arch/sh/src/sh1/sh1_timerisr.c
+++ b/nuttx/arch/sh/src/sh1/sh1_timerisr.c
@@ -104,7 +104,7 @@ void up_timerinit(void)
/* Set the IRQ interrupt priority */
- up_irqpriority(STR71X_IRQ_SYSTIMER, 1);
+ up_prioritize_irq(STR71X_IRQ_SYSTIMER, 1);
/* Attach the timer interrupt vector */