forked from Imagelibrary/rtems
bsps: PR2076: SMC91111 fixes for mpc55xxevb BSP
- A typo prevents if_smc.c from being built when configured; - The argument passed to the interrupt handler was incorrect and the addition of support for RTEMS_INTERRUPT_SHARED exposed it; - A "#ifdef DEBUG" is supposed to be "#if DEBUG" since 0 is supposed to make it quiet.
This commit is contained in:
committed by
Sebastian Huber
parent
245cad54f2
commit
967481a09a
@@ -1,6 +1,6 @@
|
||||
#include <bsp.h>
|
||||
|
||||
#ifdef HAS_SMC91111M
|
||||
#ifdef HAS_SMC91111
|
||||
|
||||
#include <mpc55xx/mpc55xx.h>
|
||||
#include <mpc55xx/regs.h>
|
||||
@@ -38,18 +38,17 @@
|
||||
#define SMC91111_BASE_IRQ MPC55XX_IRQ_SIU_EXTERNAL_2
|
||||
#define SMC91111_BASE_PIO 4
|
||||
|
||||
extern rtems_isr lan91cxx_interrupt_handler(rtems_vector_number v);
|
||||
extern void lan91cxx_interrupt_handler(void *arg);
|
||||
|
||||
static const union SIU_EISR_tag clear_eisr_2 = {.B.EIF2 = 1};
|
||||
|
||||
static void rtems_smc91111_interrupt_wrapper(rtems_vector_number v, void *arg)
|
||||
static void rtems_smc91111_interrupt_wrapper(void *arg)
|
||||
{
|
||||
/* Clear external interrupt status */
|
||||
|
||||
SIU.EISR = clear_eisr_2;
|
||||
|
||||
lan91cxx_interrupt_handler(v);
|
||||
|
||||
lan91cxx_interrupt_handler(arg);
|
||||
}
|
||||
|
||||
scmv91111_configuration_t mpc5554_scmv91111_configuration = {
|
||||
@@ -164,4 +163,4 @@ int rtems_smc91111_driver_attach_mpc5554(struct rtems_bsdnet_ifconfig *config)
|
||||
return _rtems_smc91111_driver_attach(config,&mpc5554_scmv91111_configuration);
|
||||
};
|
||||
|
||||
#endif /* HAS_SMC91111M */
|
||||
#endif /* HAS_SMC91111 */
|
||||
|
||||
@@ -962,7 +962,7 @@ int _rtems_smc91111_driver_attach (struct rtems_bsdnet_ifconfig *config,
|
||||
if_attach(ifp);
|
||||
ether_ifattach(ifp);
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
printf("SMC91111 : driver has been attached\n");
|
||||
#endif
|
||||
|
||||
@@ -1035,7 +1035,7 @@ int lan91cxx_hardware_init(struct lan91cxx_priv_data *cpd)
|
||||
cpd->config.info,
|
||||
cpd->config.options,
|
||||
cpd->config.interrupt_wrapper,
|
||||
cpd->config.arg
|
||||
cpd
|
||||
);
|
||||
if (sc != RTEMS_SUCCESSFUL) {
|
||||
printf("rtems_interrupt_handler_install returned %d.\n", sc);
|
||||
|
||||
Reference in New Issue
Block a user