Skip to content

Commit

Permalink
bsp/mpc55xx: Add SMSC9218I_RESET_PIN
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhub committed Jul 18, 2012
1 parent dec7231 commit f024d4f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
3 changes: 3 additions & 0 deletions c/src/lib/libbsp/powerpc/mpc55xxevb/include/bspopts.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit f024d4f

Please sign in to comment.