[rtems commit] bsp/mpc55xx: Add SMSC9218I_RESET_PIN

Sebastian Huber sebh at rtems.org
Wed Jul 18 07:44:03 UTC 2012


Module:    rtems
Branch:    master
Commit:    f024d4f741d85ec1199fe9d1a3ed9d24f01cf0ec
Changeset: http://git.rtems.org/rtems/commit/?id=f024d4f741d85ec1199fe9d1a3ed9d24f01cf0ec

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jul 17 17:40:53 2012 +0200

bsp/mpc55xx: Add SMSC9218I_RESET_PIN

---

 c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac   |    5 +++++
 .../libbsp/powerpc/mpc55xxevb/include/bspopts.h.in |    3 +++
 .../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 5ba2928..0492df7 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 687c2ac..e1aa5db 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 37a4d62..7820e64 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)




More information about the vc mailing list