git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6501 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2013-11-20 11:13:04 +00:00
parent 665640ba0a
commit 570949e7f4
3 changed files with 22 additions and 2 deletions

View File

@ -35,6 +35,10 @@
/* Module constants. */ /* Module constants. */
/*===========================================================================*/ /*===========================================================================*/
#define INTC_MCR *((volatile uint32_t *)0xfff48000)
#define INTC_CPR *((volatile uint32_t *)0xfff48008)
#define INTC_IACKR *((volatile uint32_t *)0xfff48010)
/*===========================================================================*/ /*===========================================================================*/
/* Module pre-compile time settings. */ /* Module pre-compile time settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -56,7 +60,7 @@
/*===========================================================================*/ /*===========================================================================*/
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
extern uint32_t _vectors[PPC_VECTORS_NUMBER]; extern uint32_t _vectors[PPC_NUM_VECTORS];
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
@ -67,6 +71,17 @@ extern "C" {
} }
#endif #endif
/*===========================================================================*/
/* Module inline functions. */
/*===========================================================================*/
static inline void intc_init(void) {
INTC_MCR = 0;
INTC_CPR = 0;
INTC_IACKR = (uint32_t)_vectors;
}
#endif /* _VECTORS_H_ */ #endif /* _VECTORS_H_ */
/** @} */ /** @} */

View File

@ -75,6 +75,7 @@
/* Inclusion of the PPC implementation specific parameters.*/ /* Inclusion of the PPC implementation specific parameters.*/
#include "ppcparams.h" #include "ppcparams.h"
#include "vectors.h"
/*===========================================================================*/ /*===========================================================================*/
/* Module pre-compile time settings. */ /* Module pre-compile time settings. */
@ -408,6 +409,9 @@ static inline void port_init(void) {
"li %%r3, _IVOR10@l \t\n" "li %%r3, _IVOR10@l \t\n"
"mtIVOR10 %%r3" : : : "r3", "memory"); "mtIVOR10 %%r3" : : : "r3", "memory");
#endif #endif
/* Interrupt controller initialization.*/
intc_init();
} }
/** /**

View File

@ -6,7 +6,8 @@ PORTASM = $(CHIBIOS)/os/common/ports/e200/devices/SPC56ELxx/boot.s \
$(CHIBIOS)/os/common/ports/e200/compilers/GCC/ivor.s \ $(CHIBIOS)/os/common/ports/e200/compilers/GCC/ivor.s \
$(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s $(CHIBIOS)/os/common/ports/e200/compilers/GCC/crt0.s
PORTINC = ${CHIBIOS}/os/common/ports/e200/devices/SPC56ELxx \ PORTINC = ${CHIBIOS}/os/common/ports/e200/compilers/GCC \
${CHIBIOS}/os/common/ports/e200/devices/SPC56ELxx \
${CHIBIOS}/os/rt/ports/e200 \ ${CHIBIOS}/os/rt/ports/e200 \
${CHIBIOS}/os/rt/ports/e200/compilers/GCC ${CHIBIOS}/os/rt/ports/e200/compilers/GCC