summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Dufault <dufault@hda.com>2012-10-01 15:12:25 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-10-02 15:27:34 +0200
commit967481a09a2bc244ca1031f98eb4c44814aa3dc8 (patch)
tree29f153fbaf788267f1f964847c4b86c05df6cf79
parentbsp/mpc55xx: Fix bsp_idle_thread() (diff)
downloadrtems-967481a09a2bc244ca1031f98eb4c44814aa3dc8.tar.bz2
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.
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c11
-rw-r--r--c/src/libchip/network/smc91111.c4
2 files changed, 7 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c
index 05f512e78b..026a56c6d3 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c
@@ -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 */
diff --git a/c/src/libchip/network/smc91111.c b/c/src/libchip/network/smc91111.c
index 1216ba6197..3e87935e8f 100644
--- a/c/src/libchip/network/smc91111.c
+++ b/c/src/libchip/network/smc91111.c
@@ -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);