forked from Imagelibrary/rtems
2005-04-15 Jennifer Averett <jennifer.averett@oarcorp.com>
PR 779/bsp * clock/p_clock.c, console/console.c, console/uart.c, console/uart.h, irq/irq.c, irq/irq.h, irq/irq_init.c: powerpc: add parameter to new exception interrupt handlers
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
|
||||
clockIsr,
|
||||
NULL,
|
||||
(rtems_irq_enable)clockOn,
|
||||
(rtems_irq_disable)clockOff,
|
||||
(rtems_irq_is_enabled) clockIsOn};
|
||||
|
||||
@@ -54,9 +54,9 @@ int BSPBaseBaud = BSP_UART_BAUD_BASE;
|
||||
static int conSetAttr(int minor, const struct termios *);
|
||||
|
||||
typedef struct TtySTblRec_ {
|
||||
char *name;
|
||||
void (*isr)(void); /* STUPID API doesn't pass a parameter :-( */
|
||||
} TtySTblRec, *TtySTbl;
|
||||
char *name;
|
||||
rtems_irq_hdl isr;
|
||||
} TtySTblRec, *TtySTbl;
|
||||
|
||||
static TtySTblRec ttyS[]={
|
||||
{ "/dev/ttyS0",
|
||||
|
||||
@@ -692,14 +692,18 @@ BSP_uart_termios_isr_com(int uart)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX - Note that this can now be one isr with the uart
|
||||
* passed as the parameter.
|
||||
*/
|
||||
void
|
||||
BSP_uart_termios_isr_com1(void)
|
||||
BSP_uart_termios_isr_com1(void *unused)
|
||||
{
|
||||
BSP_uart_termios_isr_com(BSP_UART_COM1);
|
||||
}
|
||||
|
||||
void
|
||||
BSP_uart_termios_isr_com2(void)
|
||||
BSP_uart_termios_isr_com2(void *unused)
|
||||
{
|
||||
BSP_uart_termios_isr_com(BSP_UART_COM2);
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ void BSP_uart_polled_write(int uart, int val);
|
||||
int BSP_uart_polled_read(int uart);
|
||||
void BSP_uart_termios_set(int uart, void *ttyp);
|
||||
int BSP_uart_termios_write_com(int minor, const char *buf, int len);
|
||||
void BSP_uart_termios_isr_com1();
|
||||
void BSP_uart_termios_isr_com2();
|
||||
void BSP_uart_termios_isr_com1(void *unused);
|
||||
void BSP_uart_termios_isr_com2(void *unused);
|
||||
void BSP_uart_dbgisr_com1(void);
|
||||
void BSP_uart_dbgisr_com2(void);
|
||||
int BSP_uart_install_isr(int uart, rtems_irq_hdl handler);
|
||||
|
||||
@@ -518,7 +518,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;
|
||||
@@ -550,14 +550,14 @@ 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[irq].hdl(); */
|
||||
/* rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle); */
|
||||
{
|
||||
rtems_irq_connect_data* vchain;
|
||||
for( vchain = &rtems_hdl_tbl[irq];
|
||||
((int)vchain != -1 && vchain->hdl != default_rtems_entry.hdl);
|
||||
vchain = (rtems_irq_connect_data*)vchain->next_handler )
|
||||
{
|
||||
vchain->hdl();
|
||||
vchain->hdl(vchain->handle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,8 @@ extern volatile rtems_i8259_masks i8259s_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_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__*);
|
||||
@@ -161,6 +162,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.
|
||||
|
||||
@@ -59,8 +59,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
|
||||
};
|
||||
static rtems_irq_prio irqPrioTable[BSP_IRQ_NUMBER]={
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user