summaryrefslogtreecommitdiff
path: root/nuttx/arch/z16/src/z16f/z16f_irq.c
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/src/z16f/z16f_irq.c
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/src/z16f/z16f_irq.c')
-rw-r--r--nuttx/arch/z16/src/z16f/z16f_irq.c14
1 files changed, 5 insertions, 9 deletions
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);
}
}