[rtems commit] bsp/mpc55xx: Fix INTC initialization
Sebastian Huber
sebh at rtems.org
Mon Dec 3 12:14:53 UTC 2012
Module: rtems
Branch: master
Commit: bd75e589e1f50a9ebcd6afc6e9020522ddd7d131
Changeset: http://git.rtems.org/rtems/commit/?id=bd75e589e1f50a9ebcd6afc6e9020522ddd7d131
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Nov 13 12:20:59 2012 +0100
bsp/mpc55xx: Fix INTC initialization
---
c/src/lib/libcpu/powerpc/mpc55xx/irq/irq.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/irq/irq.c b/c/src/lib/libcpu/powerpc/mpc55xx/irq/irq.c
index 7863fb8..c60a301 100644
--- a/c/src/lib/libcpu/powerpc/mpc55xx/irq/irq.c
+++ b/c/src/lib/libcpu/powerpc/mpc55xx/irq/irq.c
@@ -135,8 +135,10 @@ static int mpc55xx_external_exception_handler( BSP_Exception_frame *frame, unsig
return 0;
}
-rtems_status_code bsp_interrupt_facility_initialize()
+rtems_status_code bsp_interrupt_facility_initialize(void)
{
+ rtems_vector_number vector;
+
/* Install exception handler */
if (ppc_exc_set_handler( ASM_EXT_VECTOR, mpc55xx_external_exception_handler)) {
return RTEMS_IO_ERROR;
@@ -144,6 +146,11 @@ rtems_status_code bsp_interrupt_facility_initialize()
/* Initialize interrupt controller */
+ /* Disable all interrupts */
+ for (vector = MPC55XX_IRQ_MIN; vector <= MPC55XX_IRQ_MAX; ++vector) {
+ INTC.PSR [vector].B.PRI = MPC55XX_INTC_DISABLED_PRIORITY;
+ }
+
/* Software vector mode */
INTC.MCR.B.VTES = 0;
INTC.MCR.B.HVEN = 0;
More information about the vc
mailing list