summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/edb7312
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2010-04-09 20:24:57 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2010-04-09 20:24:57 +0000
commitc193baadaf4ba825374104b150eceaed203800b0 (patch)
tree6933fe6b62789da022c05b5400f36cd2d7b80a57 /c/src/lib/libbsp/arm/edb7312
parentremoved over-paranoid warning switches (diff)
downloadrtems-c193baadaf4ba825374104b150eceaed203800b0.tar.bz2
unify irq data types and code, merge s3c2400/s3c2410 support
Diffstat (limited to 'c/src/lib/libbsp/arm/edb7312')
-rw-r--r--c/src/lib/libbsp/arm/edb7312/ChangeLog6
-rw-r--r--c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c5
-rw-r--r--c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c2
-rw-r--r--c/src/lib/libbsp/arm/edb7312/irq/irq.h106
-rw-r--r--c/src/lib/libbsp/arm/edb7312/network/network.c17
-rw-r--r--c/src/lib/libbsp/arm/edb7312/startup/bspstart.c1
6 files changed, 19 insertions, 118 deletions
diff --git a/c/src/lib/libbsp/arm/edb7312/ChangeLog b/c/src/lib/libbsp/arm/edb7312/ChangeLog
index 06bc90a53f..5c7e32ed1c 100644
--- a/c/src/lib/libbsp/arm/edb7312/ChangeLog
+++ b/c/src/lib/libbsp/arm/edb7312/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-09 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
+
+ * clock/clockdrv.c, irq/bsp_irq_init.c, irq/irq.h
+ startup/bspstart.c, network/network.c: make irq data types
+ consistent
+
2010-04-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* start/start.S: Verify boot_card() is passed a NULL.
diff --git a/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c b/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
index c081e8c31c..32d185501d 100644
--- a/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
+++ b/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
@@ -27,11 +27,10 @@ static int clock_isr_is_on(const rtems_irq_connect_data *irq);
rtems_irq_connect_data clock_isr_data = {BSP_TC1OI,
(rtems_irq_hdl)Clock_isr,
+ NULL,
clock_isr_on,
clock_isr_off,
- clock_isr_is_on,
- 3,
- 0 };
+ clock_isr_is_on};
#define CLOCK_VECTOR 0
diff --git a/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c b/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c
index 228e5c6f77..a9cc5f2171 100644
--- a/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c
+++ b/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c
@@ -17,8 +17,6 @@
#include <bsp.h>
#include <ep7312.h>
-extern void default_int_handler(void);
-
void BSP_rtems_irq_mngt_init(void)
{
long int_stat;
diff --git a/c/src/lib/libbsp/arm/edb7312/irq/irq.h b/c/src/lib/libbsp/arm/edb7312/irq/irq.h
index c96479e8d2..8debeaee74 100644
--- a/c/src/lib/libbsp/arm/edb7312/irq/irq.h
+++ b/c/src/lib/libbsp/arm/edb7312/irq/irq.h
@@ -30,9 +30,10 @@ extern "C" {
* Include some preprocessor value also used by assember code
*/
+#include <rtems/irq.h>
#include <rtems.h>
-extern void default_int_handler();
+extern void default_int_handler(rtems_irq_hdl_param unused);
/*-------------------------------------------------------------------------+
| Constants
+--------------------------------------------------------------------------*/
@@ -66,62 +67,6 @@ typedef unsigned int rtems_irq_number;
#define BSP_DAIINT 21
#define BSP_MAX_INT 22
-/*
- * Type definition for RTEMS managed interrupts
- */
-typedef unsigned char rtems_irq_level;
-typedef unsigned char rtems_irq_trigger;
-
-struct __rtems_irq_connect_data__; /* forward declaratiuon */
-
-typedef void (*rtems_irq_hdl) (void);
-typedef void (*rtems_irq_enable) (const struct __rtems_irq_connect_data__*);
-typedef void (*rtems_irq_disable) (const struct __rtems_irq_connect_data__*);
-typedef int (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
-
-typedef struct __rtems_irq_connect_data__ {
- /*
- * IRQ line
- */
- rtems_irq_number name;
- /*
- * handler. See comment on handler properties below in function prototype.
- */
- rtems_irq_hdl hdl;
- /*
- * function for enabling interrupts at device level (ONLY!).
- * The BSP code will automatically enable it at i8259s level.
- * RATIONALE : anyway such code has to exist in current driver code.
- * It is usually called immediately AFTER connecting the interrupt handler.
- * RTEMS may well need such a function when restoring normal interrupt
- * processing after a debug session.
- *
- */
- rtems_irq_enable on;
- /*
- * function for disabling interrupts at device level (ONLY!).
- * The code will disable it at i8259s level. RATIONALE : anyway
- * such code has to exist for clean shutdown. It is usually called
- * BEFORE disconnecting the interrupt. RTEMS may well need such
- * a function when disabling normal interrupt processing for
- * a debug session. May well be a NOP function.
- */
- rtems_irq_disable off;
- /*
- * function enabling to know what interrupt may currently occur
- * if someone manipulates the i8259s interrupt mask without care...
- */
- rtems_irq_is_enabled isOn;
- /*
- * priority level at the vplus level
- */
- rtems_irq_level irqLevel;
- /*
- * Trigger way : Rising or falling edge or High or low level
- */
- rtems_irq_trigger irqTrigger;
-} rtems_irq_connect_data;
-
/*-------------------------------------------------------------------------+
| Function Prototypes.
+--------------------------------------------------------------------------*/
@@ -134,53 +79,6 @@ typedef struct __rtems_irq_connect_data__ {
*/
void BSP_rtems_irq_mngt_init();
-/*
- * function to connect a particular irq handler. This hanlder will NOT be called
- * directly as the result of the corresponding interrupt. Instead, a RTEMS
- * irq prologue will be called that will :
- *
- * 1) save the C scratch registers,
- * 2) switch to a interrupt stack if the interrupt is not nested,
- * 3) store the current i8259s' interrupt masks
- * 4) modify them to disable the current interrupt at 8259 level (and may
- * be others depending on software priorities)
- * 5) aknowledge the i8259s',
- * 6) demask the processor,
- * 7) call the application handler
- *
- * As a result the hdl function provided
- *
- * a) can perfectly be written is C,
- * b) may also well directly call the part of the RTEMS API that can be used
- * from interrupt level,
- * c) It only responsible for handling the jobs that need to be done at
- * the device level including (aknowledging/re-enabling the interrupt at device,
- * level, getting the data,...)
- *
- * When returning from the function, the following will be performed by
- * the RTEMS irq epilogue :
- *
- * 1) masks the interrupts again,
- * 2) restore the original i8259s' interrupt masks
- * 3) switch back on the orinal stack if needed,
- * 4) perform rescheduling when necessary,
- * 5) restore the C scratch registers...
- * 6) restore initial execution flow
- *
- */
-
-int BSP_install_rtems_irq_handler (const rtems_irq_connect_data*);
-/*
- * function to get the current RTEMS irq handler for ptr->name. It enables to
- * define hanlder chain...
- */
-int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* ptr);
-/*
- * function to get disconnect the RTEMS irq handler for ptr->name.
- * This function checks that the value given is the current one for safety reason.
- * The user can use the previous function to get it.
- */
-int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data*);
#endif /* __asm__ */
diff --git a/c/src/lib/libbsp/arm/edb7312/network/network.c b/c/src/lib/libbsp/arm/edb7312/network/network.c
index 236176f171..1ce1cae4ba 100644
--- a/c/src/lib/libbsp/arm/edb7312/network/network.c
+++ b/c/src/lib/libbsp/arm/edb7312/network/network.c
@@ -7,20 +7,19 @@
unsigned int bsp_cs8900_io_base = 0;
unsigned int bsp_cs8900_memory_base = 0;
cs8900_device *g_cs;
-rtems_isr cs8900_isr(rtems_vector_number v);
+void cs8900_isr(rtems_irq_hdl_param unused);
rtems_irq_connect_data cs8900_isr_data = {BSP_EINT3,
- (rtems_irq_hdl)cs8900_isr,
- NULL,
- NULL,
- NULL,
- 0,
- 0 };
+ cs8900_isr,
+ NULL,
+ NULL,
+ NULL,
+ NULL};
char g_enetbuf[1520];
-rtems_isr cs8900_isr(rtems_vector_number v)
+void cs8900_isr(rtems_irq_hdl_param unused)
{
- cs8900_interrupt(v, g_cs);
+ cs8900_interrupt(BSP_EINT3, g_cs);
}
/* cs8900_io_set_reg - set one of the I/O addressed registers */
diff --git a/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c b/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c
index cda42969a9..9189162d24 100644
--- a/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c
@@ -18,6 +18,7 @@
* Function prototypes
*/
extern void rtems_irq_mngt_init(void);
+extern void rtems_exception_init_mngt(void);
/*
* NAME: bsp_start_default - BSP initialization function