From f024d4f741d85ec1199fe9d1a3ed9d24f01cf0ec Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 17 Jul 2012 17:40:53 +0200 Subject: bsp/mpc55xx: Add SMSC9218I_RESET_PIN --- c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac | 5 +++++ c/src/lib/libbsp/powerpc/mpc55xxevb/include/bspopts.h.in | 3 +++ c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac b/c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac index 5ba2928963..0492df7f48 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac @@ -114,6 +114,11 @@ RTEMS_BSPOPTS_SET([SMSC9218I_ENABLE_LED_OUTPUTS],[mpc5674f_ecu508*],[1]) RTEMS_BSPOPTS_HELP([SMSC9218I_ENABLE_LED_OUTPUTS], [enable LED outputs for SMSC9218I network interface]) +RTEMS_BSPOPTS_SET([SMSC9218I_RESET_PIN],[mpc5674f_ecu508*],[433]) +RTEMS_BSPOPTS_SET([SMSC9218I_RESET_PIN],[*],[186]) +RTEMS_BSPOPTS_HELP([SMSC9218I_RESET_PIN], +[reset pin for SMSC9218I network interface]) + RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_EMIOS_CHANNEL],[mpc5643l*],[]) RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_EMIOS_CHANNEL],[mpc5674f*],[31]) RTEMS_BSPOPTS_SET([MPC55XX_CLOCK_EMIOS_CHANNEL],[*],[23]) diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bspopts.h.in b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bspopts.h.in index 687c2ac860..e1aa5db9a3 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bspopts.h.in +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bspopts.h.in @@ -127,3 +127,6 @@ /* enable LED outputs for SMSC9218I network interface */ #undef SMSC9218I_ENABLE_LED_OUTPUTS + +/* reset pin for SMSC9218I network interface */ +#undef SMSC9218I_RESET_PIN diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c index 37a4d621d8..7820e642da 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c @@ -1600,7 +1600,7 @@ static void smsc9218i_interrupt_init( static void smsc9218i_reset_signal(bool signal) { - SIU.GPDO [186].R = signal ? 1 : 0; + SIU.GPDO [SMSC9218I_RESET_PIN].R = signal ? 1 : 0; } static void smsc9218i_reset_signal_init(void) @@ -1617,11 +1617,11 @@ static void smsc9218i_reset_signal_init(void) #endif pcr.B.ODE = 0; pcr.B.HYS = 0; - pcr.B.SRC = 3; + pcr.B.SRC = 0; pcr.B.WPE = 1; pcr.B.WPS = 1; - SIU.PCR [186].R = pcr.R; + SIU.PCR [SMSC9218I_RESET_PIN].R = pcr.R; } static void smsc9218i_hardware_reset(volatile smsc9218i_registers *regs) -- cgit v1.2.3