Skip to content

Commit

Permalink
bsp/mpc55xx: Add SMSC9218I_ENABLE_LED_OUTPUTS
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhub committed Jul 18, 2012
1 parent 86c5b1c commit dec7231
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ RTEMS_BSPOPTS_SET([SMSC9218I_BIG_ENDIAN_SUPPORT],[mpc5674f_ecu508*],[1])
RTEMS_BSPOPTS_HELP([SMSC9218I_BIG_ENDIAN_SUPPORT],
[enable big endian support for SMSC9218I network interface])

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([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 @@ -124,3 +124,6 @@

/* transmit eDMA channel for SMSC9218I network interface */
#undef SMSC9218I_EDMA_TX_CHANNEL

/* enable LED outputs for SMSC9218I network interface */
#undef SMSC9218I_ENABLE_LED_OUTPUTS
3 changes: 3 additions & 0 deletions c/src/lib/libbsp/powerpc/mpc55xxevb/include/smsc9218i.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ typedef struct {
* @{
*/

#define SMSC9218I_HW_CFG_LED_3 SMSC9218I_FLAG(30)
#define SMSC9218I_HW_CFG_LED_2 SMSC9218I_FLAG(29)
#define SMSC9218I_HW_CFG_LED_1 SMSC9218I_FLAG(28)
#define SMSC9218I_HW_CFG_AMDIX SMSC9218I_FLAG(24)
#define SMSC9218I_HW_CFG_MBO SMSC9218I_FLAG(20)
#define SMSC9218I_HW_CFG_TX_FIF_SZ(val) SMSC9218I_FIELD_8(val, 16)
Expand Down
6 changes: 6 additions & 0 deletions c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,12 @@ static void smsc9218i_interface_init(void *arg)
ANAR_TX_FD | ANAR_TX | ANAR_10_FD | ANAR_10 | ANAR_CSMA
);

#ifdef SMSC9218I_ENABLE_LED_OUTPUTS
regs->gpio_cfg = SMSC9218I_HW_CFG_LED_1
| SMSC9218I_HW_CFG_LED_2
| SMSC9218I_HW_CFG_LED_3;
#endif

/* Initialize interrupts */
smsc9218i_interrupt_init(e, regs);

Expand Down

0 comments on commit dec7231

Please sign in to comment.