summaryrefslogtreecommitdiff
path: root/nuttx/arch/z16
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-02-09 16:12:11 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-02-09 16:12:11 -0600
commit87b3ae4e294e547dbc9aab6134efbd693267a261 (patch)
tree37681559e481c01c22e8b61c596b74fd5d0eede6 /nuttx/arch/z16
parent90a63664425e57c628d18e4ea71ccc6138c23948 (diff)
downloadpx4-nuttx-87b3ae4e294e547dbc9aab6134efbd693267a261.tar.gz
px4-nuttx-87b3ae4e294e547dbc9aab6134efbd693267a261.tar.bz2
px4-nuttx-87b3ae4e294e547dbc9aab6134efbd693267a261.zip
Big, very risky change: Remove all occurrences of up_maskack_irq() that disable and enable interrupts with up_ack_irq() that only acknowledges the interrupts. This is only used in interrupt decoding logic. Also remove the logic that unconditionally re-enables interrupts with the interrupt exits. This interferes with the drivers ability to control the interrupt state. This is a necessary, sweeping, global change and unfortunately impossible to test.
Diffstat (limited to 'nuttx/arch/z16')
-rw-r--r--nuttx/arch/z16/src/common/up_doirq.c10
-rw-r--r--nuttx/arch/z16/src/common/up_internal.h2
-rw-r--r--nuttx/arch/z16/src/z16f/z16f_irq.c14
3 files changed, 8 insertions, 18 deletions
diff --git a/nuttx/arch/z16/src/common/up_doirq.c b/nuttx/arch/z16/src/common/up_doirq.c
index 7e9a3fd9f..38290a47a 100644
--- a/nuttx/arch/z16/src/common/up_doirq.c
+++ b/nuttx/arch/z16/src/common/up_doirq.c
@@ -106,9 +106,9 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
savestate = (FAR chipreg_t *)current_regs;
current_regs = regs;
- /* Mask and acknowledge the interrupt */
+ /* Acknowledge the interrupt */
- up_maskack_irq(irq);
+ up_ack_irq(irq);
/* Deliver the IRQ */
@@ -121,12 +121,6 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
ret = current_regs;
current_regs = savestate;
-
- /* Unmask the last interrupt (global interrupts are still
- * disabled.
- */
-
- up_enable_irq(irq);
}
board_led_off(LED_INIRQ);
diff --git a/nuttx/arch/z16/src/common/up_internal.h b/nuttx/arch/z16/src/common/up_internal.h
index f76b970e3..608ca296f 100644
--- a/nuttx/arch/z16/src/common/up_internal.h
+++ b/nuttx/arch/z16/src/common/up_internal.h
@@ -180,7 +180,7 @@ extern void up_timer_initialize(void);
/* Defined in up_irq.c */
-extern void up_maskack_irq(int irq);
+extern void up_ack_irq(int irq);
/* Defined in board/up_leds.c */
diff --git a/nuttx/arch/z16/src/z16f/z16f_irq.c b/nuttx/arch/z16/src/z16f/z16f_irq.c
index 317ec4a6f..e0f14d75d 100644
--- a/nuttx/arch/z16/src/z16f/z16f_irq.c
+++ b/nuttx/arch/z16/src/z16f/z16f_irq.c
@@ -164,37 +164,33 @@ void up_enable_irq(int irq)
}
/****************************************************************************
- * Name: up_maskack_irq
+ * Name: up_ack_irq
*
* Description:
- * Mask the IRQ and acknowledge it
+ * Acknowledge the interrupt
*
****************************************************************************/
-void up_maskack_irq(int irq)
+void up_ack_irq(int irq)
{
/* System exceptions cannot be disabled or acknowledged */
if (irq >= Z16F_IRQ_IRQ0)
{
- /* Disable the interrupt by clearing the corresponding bit in the
- * appropriate IRQ enable register and acknowledge it by setting the
- * corresponding bit in the IRQ status register.
+ /* Acknowledge the interrupt by setting the corresponding bit in the
+ * IRQ status register.
*/
if (irq < Z16F_IRQ_IRQ1)
{
- putreg8((getreg8(Z16F_IRQ0_ENH) & ~Z16F_IRQ0_BIT(irq)), Z16F_IRQ0_ENH);
putreg8(Z16F_IRQ0_BIT(irq), Z16F_IRQ0);
}
else if (irq < Z16F_IRQ_IRQ2)
{
- putreg8((getreg8(Z16F_IRQ1_ENH) & ~Z16F_IRQ1_BIT(irq)), Z16F_IRQ1_ENH);
putreg8(Z16F_IRQ1_BIT(irq), Z16F_IRQ2);
}
else if (irq < NR_IRQS)
{
- putreg8((getreg8(Z16F_IRQ2_ENH) & ~Z16F_IRQ2_BIT(irq)), Z16F_IRQ2_ENH);
putreg8(Z16F_IRQ2_BIT(irq), Z16F_IRQ2);
}
}