summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-02-23 11:56:16 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-02-23 11:56:16 -0600
commit39c38f83821fafa8edd52474d9c0dd8a3624d743 (patch)
tree7447f15e17a112f407b6a6768ed9c1c9be0d9f1b
parent8742d748821f917885b11e9bceb5ef54320f32e5 (diff)
downloadnuttx-39c38f83821fafa8edd52474d9c0dd8a3624d743.tar.gz
nuttx-39c38f83821fafa8edd52474d9c0dd8a3624d743.tar.bz2
nuttx-39c38f83821fafa8edd52474d9c0dd8a3624d743.zip
PIC32MZ: Resolve a PIC32 dependency in the generic MIPS32 code
-rw-r--r--nuttx/arch/mips/src/mips32/up_swint0.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nuttx/arch/mips/src/mips32/up_swint0.c b/nuttx/arch/mips/src/mips32/up_swint0.c
index 4cfc74b5b..51b8afc75 100644
--- a/nuttx/arch/mips/src/mips32/up_swint0.c
+++ b/nuttx/arch/mips/src/mips32/up_swint0.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/mips32/up_swint0.c
*
- * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -309,9 +309,15 @@ int up_swint0(int irq, FAR void *context)
}
#endif
- /* Clear the pending software interrupt 0 in the PIC32 interrupt block */
+ /* Clear the pending software interrupt 0 in the PIC32 interrupt block.
+ * REVISIT: Does this PIC32 logic really have to be in the MIPS32 code?
+ */
+#if defined(CONFIG_ARCH_CHIP_PIC32MX)
up_clrpend_irq(PIC32MX_IRQSRC_CS0);
+#elif defined(CONFIG_ARCH_CHIP_PIC32MZ)
+ up_clrpend_irq(PIC32MZ_IRQ_CS0);
+#endif
/* And reset the software interrupt bit in the MIPS CAUSE register */