[rtems commit] bsp/lpc24xx: Add LPC24XX_PIN_ETHERNET_POWER_DOWN
Sebastian Huber
sebh at rtems.org
Fri Mar 14 07:55:25 UTC 2014
Module: rtems
Branch: master
Commit: 810815c4b78631f4733fe6a524c15e3a701ab723
Changeset: http://git.rtems.org/rtems/commit/?id=810815c4b78631f4733fe6a524c15e3a701ab723
Author: Pavel Pisa <ppisa at pikron.com>
Date: Fri Feb 21 14:05:01 2014 +0100
bsp/lpc24xx: Add LPC24XX_PIN_ETHERNET_POWER_DOWN
---
c/src/lib/libbsp/arm/lpc24xx/configure.ac | 3 +++
.../arm/lpc24xx/include/lpc-ethernet-config.h | 12 ++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/c/src/lib/libbsp/arm/lpc24xx/configure.ac b/c/src/lib/libbsp/arm/lpc24xx/configure.ac
index ed96563..8e884a4 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/configure.ac
+++ b/c/src/lib/libbsp/arm/lpc24xx/configure.ac
@@ -53,6 +53,9 @@ RTEMS_BSPOPTS_SET([LPC24XX_ETHERNET_RMII],[*_ea_*],[1])
RTEMS_BSPOPTS_SET([LPC24XX_ETHERNET_RMII],[*],[])
RTEMS_BSPOPTS_HELP([LPC24XX_ETHERNET_RMII],[enable RMII for Ethernet])
+RTEMS_BSPOPTS_SET([LPC24XX_PIN_ETHERNET_POWER_DOWN],[*],[])
+RTEMS_BSPOPTS_HELP([LPC24XX_PIN_ETHERNET_POWER_DOWN],[optional Ethernet power-down pin, output is set to high to enable power])
+
RTEMS_BSPOPTS_SET([LPC24XX_EMC_MT48LC4M16A2],[lpc24xx_ncs_rom_*],[1])
RTEMS_BSPOPTS_HELP([LPC24XX_EMC_MT48LC4M16A2],[enable Micron MT48LC4M16A2 configuration for EMC])
diff --git a/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h b/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
index 26482bf..0af7256 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
+++ b/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
@@ -69,6 +69,9 @@ extern "C" {
static void lpc_eth_config_module_enable(void)
{
static const lpc24xx_pin_range pins [] = {
+ #ifdef LPC24XX_PIN_ETHERNET_POWER_DOWN
+ LPC24XX_PIN_ETHERNET_POWER_DOWN,
+ #endif
LPC24XX_PIN_ETHERNET_RMII_0,
LPC24XX_PIN_ETHERNET_RMII_1,
LPC24XX_PIN_ETHERNET_RMII_2,
@@ -78,6 +81,15 @@ extern "C" {
lpc24xx_module_enable(LPC24XX_MODULE_ETHERNET, LPC24XX_MODULE_PCLK_DEFAULT);
lpc24xx_pin_config(&pins [0], LPC24XX_PIN_SET_FUNCTION);
+
+ #ifdef LPC24XX_PIN_ETHERNET_POWER_DOWN
+ {
+ unsigned pin = lpc24xx_pin_get_first_index(&pins[0]);
+
+ lpc24xx_gpio_config(pin, LPC24XX_GPIO_OUTPUT);
+ lpc24xx_gpio_set(pin);
+ }
+ #endif
}
#else
static void lpc_eth_config_module_enable(void)
More information about the vc
mailing list