forked from Imagelibrary/rtems
2005-04-15 Jennifer Averett <jennifer.averett@oarcorp.com>
PR 779/bsp * irq/irq.c, irq/irq.h, irq/irq_init.c, network/GT64260eth.c: add parameter to new exception interrupt handlers in powerpc bsps
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2005-04-15 Jennifer Averett <jennifer.averett@oarcorp.com>
|
||||
|
||||
PR 779/bsp
|
||||
* irq/irq.c, irq/irq.h, irq/irq_init.c, network/GT64260eth.c: add
|
||||
parameter to new exception interrupt handlers in powerpc bsps
|
||||
|
||||
2005-04-15 Jennifer Averett <jennifer.averett@oarcorp.com>
|
||||
|
||||
* startup/linkcmds: add missing section to link cmds
|
||||
|
||||
@@ -112,7 +112,7 @@ void GT_GPP_IntHandler0()
|
||||
irqNum = bitNum+BSP_GPP_IRQ_LOWEST_OFFSET;
|
||||
/* call the necessary interrupt handlers */
|
||||
if (rtems_hdl_tbl[irqNum].hdl != default_rtems_entry.hdl)
|
||||
rtems_hdl_tbl[irqNum].hdl();
|
||||
rtems_hdl_tbl[irqNum].hdl(rtems_hdl_tbl[irqNum].handle);
|
||||
else
|
||||
gpp_int_error= bitNum; /*GPP interrupt bitNum not connected */
|
||||
}
|
||||
@@ -136,7 +136,7 @@ void GT_GPP_IntHandler1()
|
||||
irqNum = bitNum+BSP_GPP8_IRQ_OFFSET;
|
||||
/* call the necessary interrupt handlers */
|
||||
if (rtems_hdl_tbl[irqNum].hdl != default_rtems_entry.hdl)
|
||||
rtems_hdl_tbl[irqNum].hdl();
|
||||
rtems_hdl_tbl[irqNum].hdl(rtems_hdl_tbl[irqNum].handle);
|
||||
else
|
||||
gpp_int_error= bitNum+8; /*GPP interrupt bitNum not connected */
|
||||
}
|
||||
@@ -159,7 +159,7 @@ void GT_GPP_IntHandler2()
|
||||
irqNum = bitNum+BSP_GPP16_IRQ_OFFSET;
|
||||
/* call the necessary interrupt handlers */
|
||||
if (rtems_hdl_tbl[irqNum].hdl != default_rtems_entry.hdl)
|
||||
rtems_hdl_tbl[irqNum].hdl();
|
||||
rtems_hdl_tbl[irqNum].hdl(rtems_hdl_tbl[irqNum].handle);
|
||||
else
|
||||
gpp_int_error= bitNum+16; /*GPP interrupt bitNum not connected */
|
||||
}
|
||||
@@ -183,7 +183,7 @@ void GT_GPP_IntHandler3()
|
||||
irqNum = bitNum+BSP_GPP24_IRQ_OFFSET;
|
||||
/* call the necessary interrupt handlers */
|
||||
if (rtems_hdl_tbl[irqNum].hdl != default_rtems_entry.hdl)
|
||||
rtems_hdl_tbl[irqNum].hdl();
|
||||
rtems_hdl_tbl[irqNum].hdl(rtems_hdl_tbl[irqNum].handle);
|
||||
else
|
||||
gpp_int_error= bitNum+24; /*GPP interrupt bitNum not connected */
|
||||
}
|
||||
@@ -455,7 +455,7 @@ void C_dispatch_irq_handler (CPU_Interrupt_frame *frame, unsigned int excNum)
|
||||
new_msr = msr | MSR_EE;
|
||||
_CPU_MSR_SET(new_msr);
|
||||
|
||||
rtems_hdl_tbl[BSP_DECREMENTER].hdl();
|
||||
rtems_hdl_tbl[BSP_DECREMENTER].hdl(rtems_hdl_tbl[BSP_DECREMENTER].handle);
|
||||
|
||||
_CPU_MSR_SET(msr);
|
||||
return;
|
||||
@@ -506,7 +506,7 @@ void C_dispatch_irq_handler (CPU_Interrupt_frame *frame, unsigned int excNum)
|
||||
_CPU_MSR_GET(msr);
|
||||
new_msr = msr | MSR_EE;
|
||||
_CPU_MSR_SET(new_msr);
|
||||
rtems_hdl_tbl[irq].hdl();
|
||||
rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle);
|
||||
_CPU_MSR_SET(msr);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,8 @@ extern rtems_GTirq_masks GT_MAINirqLO_cache, GT_MAINirqHI_cache;
|
||||
|
||||
struct __rtems_irq_connect_data__; /* forward declaratiuon */
|
||||
|
||||
typedef void (*rtems_irq_hdl) (void);
|
||||
typedef void *rtems_irq_hdl_param;
|
||||
typedef void (*rtems_irq_hdl) (rtems_irq_hdl_param);
|
||||
typedef void (*rtems_irq_ack) (void);
|
||||
typedef void (*rtems_irq_enable) (const struct __rtems_irq_connect_data__*);
|
||||
typedef void (*rtems_irq_disable) (const struct __rtems_irq_connect_data__*);
|
||||
@@ -169,6 +170,10 @@ typedef struct __rtems_irq_connect_data__ {
|
||||
* handler. See comment on handler properties below in function prototype.
|
||||
*/
|
||||
rtems_irq_hdl hdl;
|
||||
/*
|
||||
* Handler handle to store private data
|
||||
*/
|
||||
rtems_irq_hdl_param handle;
|
||||
/*
|
||||
* function for enabling interrupts at device level (ONLY!).
|
||||
* The BSP code will automatically enable it at i8259s level and openpic level.
|
||||
|
||||
@@ -47,8 +47,8 @@ static int connected() {return 1;}
|
||||
static rtems_irq_connect_data rtemsIrq[BSP_IRQ_NUMBER];
|
||||
static rtems_irq_global_settings initial_config;
|
||||
static rtems_irq_connect_data defaultIrq = {
|
||||
/* vectorIdex, hdl , on , off , isOn */
|
||||
0, nop_func , nop_func , nop_func , not_connected
|
||||
/* vectorIdex, hdl , handle , on , off , isOn */
|
||||
0, nop_func , NULL , nop_func , nop_func , not_connected
|
||||
};
|
||||
|
||||
rtems_irq_prio BSPirqPrioTable[BSP_MAIN_IRQ_NUMBER]={
|
||||
|
||||
@@ -222,6 +222,7 @@ static void GT64260eth_isr()
|
||||
static rtems_irq_connect_data GT64260ethIrqData={
|
||||
BSP_MAIN_ETH0_IRQ,
|
||||
(rtems_irq_hdl) GT64260eth_isr,
|
||||
NULL,
|
||||
(rtems_irq_enable) GT64260eth_irq_on,
|
||||
(rtems_irq_disable) GT64260eth_irq_off,
|
||||
(rtems_irq_is_enabled) GT64260eth_irq_is_on,
|
||||
|
||||
Reference in New Issue
Block a user