diff options
author | Daniel Cederman <cederman@gaisler.com> | 2014-10-01 13:53:03 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-10-02 07:29:05 +0200 |
commit | 93b000e6457c7b033a9e2826847a712e40e33ec0 (patch) | |
tree | 6fd279e6caec35e7f7a0426671c38bf9ae172959 /c/src/lib/libbsp/sparc/leon3/shmsupp | |
parent | pppd: Import change from NetBSD (diff) | |
download | rtems-93b000e6457c7b033a9e2826847a712e40e33ec0.tar.bz2 |
bsp/leon3: Replace the define LEON3_MP_IRQ with a weakly linked variable
The LEON3_MP_IRQ define is used to pick the IRQ to be used by the
shared memory driver and for inter-processor interrupts. On some LEON3
systems, for example the GR712RC, the default value of 14 is not suitable.
To make this value configurable from the application, it is replaced with
a weakly linked variable that can be overridden from the application.
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3/shmsupp')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/shmsupp/mpisr.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c b/c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c index 52bc0fdee6..e72eb64bb8 100644 --- a/c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c +++ b/c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c @@ -60,7 +60,7 @@ shm_config_table BSP_shm_cfgtbl __attribute__((weak)) = Shm_Cause_interrupt, { NULL, - 1 << LEON3_MP_IRQ, /* USER OVERRIDABLE */ + 0, /* USER OVERRIDABLE - Uses default MP-IRQ if 0 */ 4, }, }; @@ -93,7 +93,7 @@ void Shm_Get_configuration( BSP_shm_cfgtbl.Intr.address = (vol_u32 *) &(LEON3_IrqCtrl_Regs->force[LEON3_Cpu_Index]); if (BSP_shm_cfgtbl.Intr.value == 0) - BSP_shm_cfgtbl.Intr.value = 1 << LEON3_MP_IRQ; /* Use default MP-IRQ */ + BSP_shm_cfgtbl.Intr.value = 1 << LEON3_mp_irq; /* Use default MP-IRQ */ BSP_shm_cfgtbl.Intr.length = 4; if (LEON3_Cpu_Index == 0) { diff --git a/c/src/lib/libbsp/sparc/leon3/shmsupp/mpisr.c b/c/src/lib/libbsp/sparc/leon3/shmsupp/mpisr.c index 194720a395..cdf05293f1 100644 --- a/c/src/lib/libbsp/sparc/leon3/shmsupp/mpisr.c +++ b/c/src/lib/libbsp/sparc/leon3/shmsupp/mpisr.c @@ -45,6 +45,6 @@ void Shm_setvec( void ) * Interrupt driven mode is not currently supported. * This is thought to be the interrupt to use. */ - LEON_Unmask_interrupt(LEON3_MP_IRQ); - set_vector((rtems_isr_entry) Shm_isr, LEON_TRAP_TYPE(LEON3_MP_IRQ), 1); + LEON_Unmask_interrupt(LEON3_mp_irq); + set_vector((rtems_isr_entry) Shm_isr, LEON_TRAP_TYPE(LEON3_mp_irq), 1); } |