summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/raspberrypi
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2016-07-23 12:07:10 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2016-07-23 12:07:10 +0200
commitd5483181a851590c5900988cdf6e8773c194092a (patch)
tree49881c2b81a48e2334c7c108a377932b5e82c1f9 /c/src/lib/libbsp/arm/raspberrypi
parentAdded USB interrupt handler. And defined some macros regarding USB. (diff)
downloadrtems-d5483181a851590c5900988cdf6e8773c194092a.tar.bz2
arm/raspberrypi: remove duplicate setup of IRQ handler in the main ARM exception table.
Exception table setup is processed by common CPU architecture support. For ARM architecture, it can be found in the file rtems/c/src/lib/libbsp/arm/shared/start/start.S and ends by bsp_vector_table_copy_done label. The actual tabel content can be found at bsp_start_vector_table_begin For ARMv7-A and even other variant with hypervisor mode support, it is even not necessary to copy table to address 0 at all because CP15 register can be used to specify alternative table start address arm_cp15_set_vector_base_address(&)bsp_start_vector_table_begin; ARMv7-M have register to set exception table base as well.
Diffstat (limited to 'c/src/lib/libbsp/arm/raspberrypi')
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/include/irq.h4
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/irq/irq.c17
2 files changed, 0 insertions, 21 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/include/irq.h b/c/src/lib/libbsp/arm/raspberrypi/include/irq.h
index 85225efc95..9825097c5b 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/include/irq.h
+++ b/c/src/lib/libbsp/arm/raspberrypi/include/irq.h
@@ -63,9 +63,5 @@
#define BSP_IRQ_COUNT (BCM2835_INTC_TOTAL_IRQ)
-
-void raspberrypi_set_exception_handler(Arm_symbolic_exception_name exception,
- void (*handler)(void));
-
#endif /* ASM */
#endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */
diff --git a/c/src/lib/libbsp/arm/raspberrypi/irq/irq.c b/c/src/lib/libbsp/arm/raspberrypi/irq/irq.c
index f792c57ffc..86e2716e04 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/irq/irq.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/irq/irq.c
@@ -32,22 +32,6 @@
#include <rtems/bspIo.h>
/*
-** This sets the main exception vectors
-*/
-void raspberrypi_set_exception_handler(
- Arm_symbolic_exception_name exception,
- void (*handler)(void)
- )
-{
- if ((unsigned) exception < MAX_EXCEPTIONS)
- {
- uint32_t *table = (uint32_t *) bsp_section_vector_begin + MAX_EXCEPTIONS;
- table [exception] = (uint32_t) handler;
-
- }
-}
-
-/*
** Determine the source of the interrupt and dispatch the correct handler.
*/
void bsp_interrupt_dispatch(void)
@@ -222,7 +206,6 @@ void bsp_interrupt_handler_default(rtems_vector_number vector)
rtems_status_code bsp_interrupt_facility_initialize(void)
{
- raspberrypi_set_exception_handler(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt);
BCM2835_REG(BCM2835_IRQ_DISABLE1) = 0xffffffff;
BCM2835_REG(BCM2835_IRQ_DISABLE2) = 0xffffffff;
BCM2835_REG(BCM2835_IRQ_DISABLE_BASIC) = 0xffffffff;