interrupt handler type change

This commit is contained in:
Thomas Doerfler
2009-10-21 13:24:35 +00:00
parent 2067679bb3
commit 60e5832e23
32 changed files with 159 additions and 247 deletions

View File

@@ -1,3 +1,7 @@
2009-10-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libchip/serial/ns16550.c: Update for interrupt handler type change.
2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/bsp-alias.m4: New.

View File

@@ -1,3 +1,8 @@
2009-10-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* i2c/i2c.c, misc/dma-copy.c, network/network.c, ssp/ssp.c: Update for
interrupt handler type change.
2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org>
* make/custom/lpc24xx.inc: Remove RTEMS_BSP_FAMILY.

View File

@@ -44,7 +44,7 @@ typedef struct {
uint8_t * volatile end;
} lpc24xx_i2c_bus_entry;
static void lpc24xx_i2c_handler( rtems_vector_number vector, void *arg)
static void lpc24xx_i2c_handler( void *arg)
{
lpc24xx_i2c_bus_entry *e = arg;
volatile lpc24xx_i2c *regs = e->regs;

View File

@@ -27,7 +27,7 @@ static rtems_id lpc24xx_dma_sema_table [GPDMA_CH_NUMBER];
static bool lpc24xx_dma_status_table [GPDMA_CH_NUMBER];
static void lpc24xx_dma_copy_handler(rtems_vector_number vector, void *arg)
static void lpc24xx_dma_copy_handler(void *arg)
{
/* Get interrupt status */
uint32_t tc = GPDMA_INT_TCSTAT;

View File

@@ -252,10 +252,7 @@ static void lpc24xx_eth_enable_promiscous_mode(bool enable)
}
}
static void lpc24xx_eth_interrupt_handler(
rtems_vector_number vector,
void *arg
)
static void lpc24xx_eth_interrupt_handler(void *arg)
{
lpc24xx_eth_driver_entry *e = (lpc24xx_eth_driver_entry *) arg;
rtems_event_set re = 0;

View File

@@ -80,7 +80,7 @@ static inline bool lpc24xx_ssp_is_busy(const lpc24xx_ssp_bus_entry *bus)
&& lpc24xx_ssp_dma_data.status != LPC24XX_SSP_DMA_AVAILABLE;
}
static void lpc24xx_ssp_handler(rtems_vector_number vector, void *arg)
static void lpc24xx_ssp_handler(void *arg)
{
lpc24xx_ssp_bus_entry *e = (lpc24xx_ssp_bus_entry *) arg;
volatile lpc24xx_ssp *regs = e->regs;
@@ -96,7 +96,7 @@ static void lpc24xx_ssp_handler(rtems_vector_number vector, void *arg)
regs->icr = icr;
}
static void lpc24xx_ssp_dma_handler(rtems_vector_number vector, void *arg)
static void lpc24xx_ssp_dma_handler(void *arg)
{
lpc24xx_ssp_dma_entry *e = (lpc24xx_ssp_dma_entry *) arg;
lpc24xx_ssp_dma_status status = e->status;

View File

@@ -1,3 +1,7 @@
2009-10-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* clock/clock.c: Update for interrupt handler type change.
2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org>
* make/custom/gen5200.inc: Remove RTEMS_BSP_FAMILY.

View File

@@ -123,7 +123,7 @@ volatile int ClockInitialized = 0;
/*
* ISR Handlers
*/
void mpc5200_gpt_clock_isr(rtems_vector_number vector, void *handle)
void mpc5200_gpt_clock_isr(void *handle)
{
uint32_t status;
struct mpc5200_gpt *gpt = (struct mpc5200_gpt *)handle;

View File

@@ -1,3 +1,8 @@
2009-10-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* network/smsc9218i.c, tests/tests.c: Update for interrupt handler
type change.
2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org>
* make/custom/mpc55xx.cfg: Remove RTEMS_BSP_FAMILY.

View File

@@ -1,19 +0,0 @@
/**
* @file
*
* @ingroup mpc55xx
*
* @brief Empty file.
*/
/*
* Copyright (c) 2008
* Embedded Brains GmbH
* Obere Lagerstr. 30
* D-82178 Puchheim
* Germany
* rtems@embedded-brains.de
*
* The license and distribution terms for this file may be found in the file
* LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
*/

View File

@@ -403,10 +403,7 @@ static void smsc9218i_register_dump(volatile smsc9218i_registers *regs)
printf("phy: physcsr: 0x%08" PRIx32 "\n", smsc9218i_phy_read(regs, SMSC9218I_PHY_PHYSCSR));
}
static void smsc9218i_interrupt_handler(
rtems_vector_number vector,
void *arg
)
static void smsc9218i_interrupt_handler(void *arg)
{
smsc9218i_driver_entry *e = (smsc9218i_driver_entry *) arg;
volatile smsc9218i_registers *const regs = smsc9218i;

View File

@@ -637,7 +637,7 @@ static inline void test_mpc55xx_intc_worker( void *data)
printk( "(%i): Done\n", i);
}
static void test_mpc55xx_intc_handler( rtems_vector_number vector, void *data)
static void test_mpc55xx_intc_handler( void *data)
{
test_mpc55xx_intc_worker( data);
}

View File

@@ -1,3 +1,7 @@
2009-10-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* clock/p_clock.c: Update for interrupt handler type change.
2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org>
* make/custom/tqm8xx.inc: Remove RTEMS_BSP_FAMILY.

View File

@@ -23,6 +23,7 @@ include_HEADERS += include/coverhd.h
include_bsp_HEADERS = include/tqm.h include/8xx_immap.h \
include/irq.h include/irq-config.h \
../../shared/include/irq-generic.h\
spi/spi.h\
../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/vectors.h \
../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/ppc_exc_bspsupp.h
@@ -53,6 +54,8 @@ libbsp_a_SOURCES += clock/p_clock.c
# console
libbsp_a_SOURCES += console/console.c
# spi
libbsp_a_SOURCES += spi/spi.c
# timer
libbsp_a_SOURCES += timer/timer.c
# startup

View File

@@ -22,8 +22,7 @@ extern void clockOff (void*);
extern int clockIsOn(void*);
extern void Clock_isr(void*);
void BSP_clock_hdl(rtems_vector_number vecnum,
void * arg)
void BSP_clock_hdl(void * arg)
{
Clock_isr(arg);
}

View File

@@ -54,31 +54,20 @@
#include <stdlib.h>
#include <bsp.h>
#include <mpc8xx.h>
#include <rtems/irq.h>
#include <bsp/irq.h>
#include <rtems/libio.h>
#include <termios.h>
#include <unistd.h>
#include <rtems/termiostypes.h>
#include <rtems/bspIo.h>
/*
* Declare clock speed -- may be overwritten by downloader or debugger
*/
int m8xx_clock_rate = 0;
/*
* Interrupt-driven input buffer
*/
#define RXBUFSIZE 256
#define M8xx_IVEC_SRC_MASK (0x1f)
#define M8xx_IVEC_SRC_SCC1 (0x1E)
#define M8xx_IVEC_SRC_SCC2 (0x1D)
#define M8xx_IVEC_SRC_SCC3 (0x1C)
#define M8xx_IVEC_SRC_SCC4 (0x1B)
#define M8xx_IVEC_SRC_SMC1 (0x04)
#define M8xx_IVEC_SRC_SMC2 (0x03)
#define M8xx_IREG_MASK(src) (1UL << src)
#define M8xx_SICR_BRG1 (0)
#define M8xx_SICR_BRG2 (1)
#define M8xx_SICR_BRG3 (2)
@@ -132,9 +121,8 @@ typedef struct m8xx_console_chan_desc_s {
volatile m8xxSMCRegisters_t *smcr;
} regs;
int ivec_src;
uint32_t ireg_mask;
int cr_chan_code;
int brg_used;
int cr_chan_code;
int brg_used;
} m8xx_console_chan_desc_t;
m8xx_console_chan_desc_t m8xx_console_chan_desc[CONS_CHN_CNT] = {
@@ -142,48 +130,42 @@ m8xx_console_chan_desc_t m8xx_console_chan_desc[CONS_CHN_CNT] = {
{TRUE,
{(m8xxSCCparms_t *)&(m8xx.scc1p),NULL},
{&(m8xx.scc1),NULL},
M8xx_IVEC_SRC_SCC1,
M8xx_IREG_MASK(M8xx_IVEC_SRC_SCC1),
BSP_CPM_IRQ_SCC1,
M8xx_CR_CHAN_SCC1,
-1},
/* SCC2 */
{TRUE,
{&(m8xx.scc2p),NULL},
{&(m8xx.scc2),NULL},
M8xx_IVEC_SRC_SCC2,
M8xx_IREG_MASK(M8xx_IVEC_SRC_SCC2),
BSP_CPM_IRQ_SCC2,
M8xx_CR_CHAN_SCC2,
-1},
/* SCC3 */
{TRUE,
{&(m8xx.scc3p),NULL},
{&(m8xx.scc3),NULL},
M8xx_IVEC_SRC_SCC3,
M8xx_IREG_MASK(M8xx_IVEC_SRC_SCC3),
BSP_CPM_IRQ_SCC3,
M8xx_CR_CHAN_SCC3,
-1},
/* SCC4 */
{TRUE,
{&(m8xx.scc4p),NULL},
{&(m8xx.scc4),NULL},
M8xx_IVEC_SRC_SCC4,
M8xx_IREG_MASK(M8xx_IVEC_SRC_SCC4),
BSP_CPM_IRQ_SCC4,
M8xx_CR_CHAN_SCC4,
-1},
/* SMC1 */
{FALSE,
{NULL,&(m8xx.smc1p)},
{NULL,&(m8xx.smc1)},
M8xx_IVEC_SRC_SMC1,
M8xx_IREG_MASK(M8xx_IVEC_SRC_SMC1),
BSP_CPM_IRQ_SMC1,
M8xx_CR_CHAN_SMC1,
-1},
/* SMC2 */
{FALSE,
{NULL,&(m8xx.smc2p)},
{NULL,&(m8xx.smc2)},
M8xx_IVEC_SRC_SMC2,
M8xx_IREG_MASK(M8xx_IVEC_SRC_SMC2),
BSP_CPM_IRQ_SMC2_OR_PIP,
M8xx_CR_CHAN_SMC2,
-1}};
@@ -249,7 +231,7 @@ sccBRGval (int baud)
int divisor;
int div16 = 0;
divisor = ((m8xx_clock_rate / 16) + (baud / 2)) / baud;
divisor = ((BSP_bus_frequency / 16) + (baud / 2)) / baud;
if (divisor > 4096) {
div16 = 1;
divisor = (divisor + 8) / 16;
@@ -283,6 +265,7 @@ static void sccBRGinit(void)
#endif
}
#if CONS_USE_EXT_CLK
/*
* input clock frq for CPM clock inputs
*/
@@ -295,6 +278,7 @@ static uint32_t clkin_frq[2][4] = {
{1843000,0,0,0}
#endif
};
#endif
/*
* allocate, set and connect baud rate generators
@@ -310,7 +294,7 @@ static int sccBRGalloc(int chan,int baud)
int old_brg;
int new_brg = -1;
int brg_idx;
#if 0 /* we do not support external clocked console */
#if CONS_USE_EXT_CLK
int clk_group;
int clk_sel;
#endif
@@ -319,7 +303,7 @@ static int sccBRGalloc(int chan,int baud)
/* compute brg register contents needed */
reg_val = sccBRGval(baud);
#if 0 /* we do not support external clocked console */
#if CONS_EXT_CLK
/* search for clock input with this frq */
clk_group = ((chan == CONS_CHN_SCC3) ||
(chan == CONS_CHN_SCC4) ||
@@ -438,32 +422,9 @@ sccSetAttributes (int minor, const struct termios *t)
* Interrupt handler
*/
static rtems_isr
sccInterruptHandler (rtems_vector_number v)
sccInterruptHandler (void *arg)
{
int chan = 0;
/*
* calculate channel from vector
*/
switch(v & M8xx_IVEC_SRC_MASK) {
case M8xx_IVEC_SRC_SCC1:
chan = CONS_CHN_SCC1;
break;
case M8xx_IVEC_SRC_SCC2:
chan = CONS_CHN_SCC2;
break;
case M8xx_IVEC_SRC_SCC3:
chan = CONS_CHN_SCC3;
break;
case M8xx_IVEC_SRC_SCC4:
chan = CONS_CHN_SCC4;
break;
case M8xx_IVEC_SRC_SMC1:
chan = CONS_CHN_SMC1;
break;
case M8xx_IVEC_SRC_SMC2:
chan = CONS_CHN_SMC2;
break;
}
int chan = (int)arg;
/*
* Buffer received?
@@ -533,8 +494,24 @@ sccInterruptHandler (rtems_vector_number v)
}
}
}
}
m8xx.cisr = m8xx_console_chan_desc[chan].ireg_mask;/* Clear interrupt-in-service bit */
static void
mpc8xx_console_irq_on(const rtems_irq_connect_data *irq)
{
CHN_MASK_SET(irq->name,3); /* Enable TX and RX interrupts */
}
static void
mpc8xx_console_irq_off(const rtems_irq_connect_data *irq)
{
CHN_MASK_SET(irq->name,0); /* Disable TX and RX interrupts */
}
static int
mpc8xx_console_irq_isOn(const rtems_irq_connect_data *irq)
{
return (0 != CHN_MASK_GET(irq->name)); /* Check TX and RX interrupts */
}
static void
@@ -730,19 +707,18 @@ sccInitialize (int chan)
}
if (m8xx_scc_mode[chan] != TERMIOS_POLLED) {
rtems_isr_entry old_handler;
rtems_status_code sc;
#if 0
sc = rtems_interrupt_catch (sccInterruptHandler,
m8xx_console_chan_desc[chan].ivec_src
| (m8xx.cicr & 0xE0),
&old_handler);
#endif
#warning "Redo interrupt installation"
printk( "Redo interrupt installation" );
CHN_MASK_SET(chan,3); /* Enable TX and RX interrupts */
m8xx.cimr |= m8xx_console_chan_desc[chan].ireg_mask; /* Enable interrupts */
rtems_irq_connect_data irq_conn_data = {
m8xx_console_chan_desc[chan].ivec_src,
sccInterruptHandler, /* rtems_irq_hdl */
(rtems_irq_hdl_param)chan, /* (rtems_irq_hdl_param) */
mpc8xx_console_irq_on, /* (rtems_irq_enable) */
mpc8xx_console_irq_off, /* (rtems_irq_disable) */
mpc8xx_console_irq_isOn /* (rtems_irq_is_enabled) */
};
if (!BSP_install_rtems_irq_handler (&irq_conn_data)) {
rtems_panic("console: cannot install IRQ handler");
}
}
}
@@ -899,13 +875,6 @@ rtems_device_driver console_initialize(rtems_device_major_number major,
int chan,entry,ttynum;
char tty_name[] = "/dev/tty00";
/*
* init base clock for BRGs
* (if not already set by debugger etc)
*/
if (m8xx_clock_rate == 0) {
m8xx_clock_rate = BSP_bus_frequency;
}
/*
* Set up TERMIOS
*/

View File

@@ -132,18 +132,9 @@ extern int rtems_scc_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
#undef RTEMS_BSP_HAS_IDE_DRIVER
/*
* our bus frequency
* our (internal) bus frequency
*/
extern unsigned int BSP_bus_frequency;
/* functions */
rtems_isr_entry set_vector( /* returns old vector */
rtems_isr_entry handler, /* isr routine */
rtems_vector_number vector, /* vector number */
int type /* RTEMS or RAW intr */
);
extern uint32_t BSP_bus_frequency;
#ifdef __cplusplus
}

View File

@@ -98,15 +98,15 @@ static int BSP_irq_handle_at_cpm(void)
{
int32_t cpvecnum;
uint32_t msr;
rtems_interrupt_level level;
/* Get vector number: write IACK=1, then read vectir */
m8xx.civr = 1;
cpvecnum = (m8xx.civr >> 11) + BSP_CPM_IRQ_LOWEST_OFFSET;
/*
* Check the vector number, mask lower priority interrupts, enable
* exceptions and dispatch the handler.
* Check the vector number,
* enable exceptions and dispatch the handler.
* NOTE: lower-prio interrupts are automatically masked in CPIC
*/
if (BSP_IS_CPM_IRQ(cpvecnum)) {
/* Enable all interrupts */
@@ -115,15 +115,16 @@ static int BSP_irq_handle_at_cpm(void)
bsp_interrupt_handler_dispatch(cpvecnum);
/* Restore machine state */
ppc_external_exceptions_disable(msr);
/*
* clear "in-service" bit
*/
m8xx.cisr = 1 << (cpvecnum - BSP_CPM_IRQ_LOWEST_OFFSET);
}
else {
/* not valid vector */
bsp_interrupt_handler_default(cpvecnum);
}
/*
* clear "in-service" bit
*/
m8xx.cisr = 1 << (cpvecnum - BSP_CPM_IRQ_LOWEST_OFFSET);
return 0;
}
@@ -131,7 +132,6 @@ static int BSP_irq_handle_at_siu( unsigned excNum)
{
int32_t sivecnum;
uint32_t msr;
rtems_interrupt_level level;
bool is_cpm_irq;
uint32_t simask_save;
/*

View File

@@ -77,6 +77,10 @@ $(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJE
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
$(PROJECT_INCLUDE)/bsp/spi.h: spi/spi.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/spi.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/spi.h
$(PROJECT_INCLUDE)/bsp/vectors.h: ../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/vectors.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/vectors.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/vectors.h

View File

@@ -21,13 +21,13 @@
*/
#include <rtems.h>
#include <stdlib.h>
#include <libcpu/powerpc-utility.h>
#include <bsp.h>
#include <bsp/bootcard.h>
/* #include <bsp/irq-generic.h>
#include <bsp/ppc_exc_bspsupp.h> */
#include <bsp/irq-generic.h>
#include <bsp/ppc_exc_bspsupp.h>
#ifdef BSP_HAS_TQMMON
/*
@@ -36,11 +36,10 @@
#endif /* BSP_HAS_TQMMON */
/* Configuration parameters for console driver, ... */
unsigned int BSP_bus_frequency;
uint32_t BSP_bus_frequency;
/* Configuration parameters for clock driver, ... */
uint32_t bsp_clicks_per_usec; /* for PIT driver: OSCCLK */
uint32_t bsp_clock_speed ; /* needed for PIT driver */
/* for timer: */
uint32_t bsp_timer_average_overhead; /* Average overhead of timer in ticks */
uint32_t bsp_timer_least_valid; /* Least valid number from timer */
@@ -94,7 +93,7 @@ const char *bsp_tqm_get_cib_string( const char *cib_id)
/*
* search for pattern in info block (CIB)
*/
fnd_str = strstr(TQM_CONF_INFO_BLOCK_ADDR,srch_pattern);
fnd_str = strstr((const char *)TQM_CONF_INFO_BLOCK_ADDR,srch_pattern);
if (fnd_str == NULL) {
return NULL;
@@ -111,7 +110,7 @@ rtems_status_code bsp_tqm_get_cib_uint32( const char *cib_id,
uint32_t *result)
{
const char *item_ptr;
const char *end_ptr;
char *end_ptr;
item_ptr = bsp_tqm_get_cib_string(cib_id);
if (item_ptr == NULL) {
return RTEMS_INVALID_ID;
@@ -174,7 +173,6 @@ void bsp_start( void)
bsp_clicks_per_usec = 0; /* force to zero to control
* PIT clock driver from EXTCLK
*/
bsp_clock_speed = BSP_bus_frequency;
bsp_timer_least_valid = 3;
bsp_timer_average_overhead = 3;

View File

@@ -24,11 +24,6 @@
#include <bsp.h>
#include <mpc8xx.h>
#warning Call to boot_card has changed and needs checking.
#warning The call is "void boot_card(const char* cmdline);"
#warning You need to pass a NULL.
#warning Please check and remove these warnings.
.extern boot_card
.section ".entry"
@@ -147,7 +142,7 @@ start_code_in_ram:
/* clear arguments and do further init. in C (common for RAM/ROM startup) */
/* Clear argc, argv and envp */
/* Clear cmdline */
xor r3, r3, r3
bl SYM (boot_card) /* Call the first C routine */

View File

@@ -1,3 +1,8 @@
2009-10-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* include/irq-generic.h, src/irq-generic.c, src/irq-legacy.c: Update
for interrupt handler type change.
2009-10-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
* bootcard: Update for heap API changes.

View File

@@ -226,7 +226,7 @@ static inline void bsp_interrupt_handler_dispatch(rtems_vector_number vector)
&bsp_interrupt_handler_table [bsp_interrupt_handler_index(vector)];
do {
(*e->handler)(vector, e->arg);
(*e->handler)(e->arg);
e = e->next;
} while (e != NULL);
} else {

View File

@@ -39,8 +39,10 @@ static uint8_t bsp_interrupt_handler_unique_table
static rtems_id bsp_interrupt_mutex = RTEMS_ID_NONE;
static void bsp_interrupt_handler_empty(rtems_vector_number vector, void *arg)
static void bsp_interrupt_handler_empty(void *arg)
{
rtems_vector_number vector = (rtems_vector_number) arg;
bsp_interrupt_handler_default(vector);
}
@@ -219,6 +221,7 @@ rtems_status_code bsp_interrupt_initialize(void)
/* Initialize handler table */
for (i = 0; i < BSP_INTERRUPT_HANDLER_TABLE_SIZE; ++i) {
bsp_interrupt_handler_table [i].handler = bsp_interrupt_handler_empty;
bsp_interrupt_handler_table [i].arg = (void *) i;
}
sc = bsp_interrupt_facility_initialize();

View File

@@ -19,62 +19,21 @@
* http://www.rtems.com/license/LICENSE.
*/
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#define BSP_SHARED_HANDLER_SUPPORT
#include <rtems.h>
#include <rtems/irq.h>
#include <bsp/irq-generic.h>
typedef struct {
rtems_irq_hdl handler;
void *arg;
} bsp_interrupt_legacy_entry;
typedef struct {
rtems_irq_hdl handler;
void *handler_arg;
bsp_interrupt_legacy_entry *legacy_handler_arg;
} bsp_interrupt_legacy_iterate_entry;
static void bsp_interrupt_legacy_dispatch(rtems_vector_number vector, void *arg)
{
bsp_interrupt_legacy_entry *e = (bsp_interrupt_legacy_entry *) arg;
e->handler(e->arg);
}
static void bsp_interrupt_legacy_per_handler_routine(
void *arg,
const char *info,
rtems_option options,
rtems_interrupt_handler handler,
void *handler_arg
)
{
bsp_interrupt_legacy_iterate_entry *ie =
(bsp_interrupt_legacy_iterate_entry *) arg;
bsp_interrupt_legacy_entry *e = NULL;
if (handler == bsp_interrupt_legacy_dispatch) {
e = (bsp_interrupt_legacy_entry *) handler_arg;
if (e->handler == ie->handler && e->arg == ie->handler_arg) {
ie->legacy_handler_arg = e;
}
}
}
/**
* @deprecated Obsolete.
*/
int BSP_get_current_rtems_irq_handler(rtems_irq_connect_data *cd)
{
cd->hdl = NULL;
cd->handle = NULL;
cd->on = NULL;
cd->off = NULL;
cd->isOn = NULL;
memset(cd, 0, sizeof(*cd));
return 1;
}
@@ -85,24 +44,15 @@ int BSP_get_current_rtems_irq_handler(rtems_irq_connect_data *cd)
int BSP_install_rtems_irq_handler(const rtems_irq_connect_data *cd)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bsp_interrupt_legacy_entry *e = malloc(sizeof(bsp_interrupt_legacy_entry));
if (e == NULL) {
return 0;
}
e->handler = cd->hdl;
e->arg = cd->handle;
sc = rtems_interrupt_handler_install(
cd->name,
"LEGACY INSTALLED",
RTEMS_INTERRUPT_UNIQUE,
bsp_interrupt_legacy_dispatch,
e
cd->hdl,
cd->handle
);
if (sc != RTEMS_SUCCESSFUL) {
free(e);
return 0;
}
@@ -119,29 +69,20 @@ int BSP_install_rtems_irq_handler(const rtems_irq_connect_data *cd)
int BSP_install_rtems_shared_irq_handler(const rtems_irq_connect_data *cd)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bsp_interrupt_legacy_entry *e = malloc(sizeof(bsp_interrupt_legacy_entry));
if (e == NULL) {
return 0;
}
e->handler = cd->hdl;
e->arg = cd->handle;
sc = rtems_interrupt_handler_install(
cd->name,
"LEGACY INSTALLED",
RTEMS_INTERRUPT_SHARED,
bsp_interrupt_legacy_dispatch,
e
cd->hdl,
cd->handle
);
if (sc != RTEMS_SUCCESSFUL) {
free(e);
return 0;
}
if (cd->on != NULL) {
cd->on(cd);
(*cd->on)(cd);
}
return 1;
@@ -153,31 +94,12 @@ int BSP_install_rtems_shared_irq_handler(const rtems_irq_connect_data *cd)
int BSP_remove_rtems_irq_handler(const rtems_irq_connect_data *cd)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bsp_interrupt_legacy_iterate_entry e = {
.handler = cd->hdl,
.handler_arg = cd->handle,
.legacy_handler_arg = NULL
};
sc = rtems_interrupt_handler_iterate(
cd->name, bsp_interrupt_legacy_per_handler_routine, &e);
if (sc != RTEMS_SUCCESSFUL) {
return 0;
}
if (e.legacy_handler_arg == NULL) {
return 0;
}
if (cd->off != NULL) {
cd->off(cd);
(*cd->off)(cd);
}
sc = rtems_interrupt_handler_remove(
cd->name, bsp_interrupt_legacy_dispatch, e.legacy_handler_arg);
free(e.legacy_handler_arg);
sc = rtems_interrupt_handler_remove(cd->name, cd->hdl, cd->handle);
if (sc != RTEMS_SUCCESSFUL) {
return 0;
}

View File

@@ -1,3 +1,8 @@
2009-10-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* mpc55xx/edma/edma.c, mpc55xx/esci/esci.c: Update for interrupt
handler type change.
2009-10-16 Jennifer Averett <jennifer.averett@OARcorp.com>
* mpc6xx/mmu/bat.c: Resolved bug: It is not an overlap if the batindex

View File

@@ -47,7 +47,7 @@ static uint64_t mpc55xx_edma_channel_occupation = 0;
static rtems_chain_control mpc55xx_edma_channel_chain;
static void mpc55xx_edma_interrupt_handler( rtems_vector_number vector, void *arg)
static void mpc55xx_edma_interrupt_handler( void *arg)
{
mpc55xx_edma_channel_entry *e = (mpc55xx_edma_channel_entry *) arg;
@@ -63,7 +63,7 @@ static void mpc55xx_edma_interrupt_handler( rtems_vector_number vector, void *ar
e->done( e, 0);
}
static void mpc55xx_edma_interrupt_error_handler( rtems_vector_number vector, void *arg)
static void mpc55xx_edma_interrupt_error_handler( void *arg)
{
rtems_chain_control *chain = &mpc55xx_edma_channel_chain;
rtems_chain_node *node = chain->first;

View File

@@ -410,7 +410,7 @@ static int mpc55xx_esci_termios_set_attributes( int minor, const struct termios
/**
* @brief Interrupt handler.
*/
static void mpc55xx_esci_termios_interrupt_handler( rtems_vector_number vector, void *arg)
static void mpc55xx_esci_termios_interrupt_handler( void *arg)
{
mpc55xx_esci_driver_entry *e = (mpc55xx_esci_driver_entry *) arg;
volatile union ESCI_SR_tag *status = &e->regs->SR;

View File

@@ -577,14 +577,7 @@ NS16550_STATIC void ns16550_enable_interrupts(
(*setReg)(pNS16550, NS16550_INTERRUPT_ENABLE, mask);
}
#ifdef BSP_FEATURE_IRQ_EXTENSION
NS16550_STATIC void ns16550_isr(rtems_vector_number vector, void *arg)
{
int minor = (int) arg;
ns16550_process( minor);
}
#elif defined BSP_FEATURE_IRQ_LEGACY
#if defined(BSP_FEATURE_IRQ_EXTENSION) || defined(BSP_FEATURE_IRQ_LEGACY)
NS16550_STATIC rtems_isr ns16550_isr(void *arg)
{
int minor = (int) arg;