[PATCH 7/7] pcm038: led testing. Not to be committed
Sascha Hauer
s.hauer at pengutronix.de
Sat Dec 18 10:15:09 EST 2010
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/boards/pcm038/pcm038.c | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index 1dbc6b6..cfca7d3 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -44,6 +44,7 @@
#include <mach/spi.h>
#include <mach/iomux-mx27.h>
#include <mach/devices-imx27.h>
+#include <led.h>
#include "pll.h"
@@ -192,11 +193,26 @@ static void pcm038_mmu_init(void)
}
#endif
+struct gpio_led led1 = {
+ .gpio = 10,
+};
+
+struct gpio_led led2 = {
+ .gpio = 11,
+ .active_low = 1,
+};
+
+struct gpio_rgb_led led3 = {
+ .gpio_r = 12,
+ .gpio_g = 13,
+ .gpio_b = 14,
+ .active_low = 1,
+};
+
static int pcm038_devices_init(void)
{
int i;
char *envdev;
-
unsigned int mode[] = {
PD0_AIN_FEC_TXD0,
PD1_AIN_FEC_TXD1,
@@ -270,6 +286,12 @@ static int pcm038_devices_init(void)
pcm038_mmu_init();
+ led_gpio_register(&led1);
+ led_gpio_register(&led2);
+ led_gpio_rgb_register(&led3);
+ led_set_trigger(led_trigger_net_tx, &led1.led);
+ led_set_trigger(led_trigger_net_rx, &led2.led);
+
/* configure 16 bit nor flash on cs0 */
CS0U = 0x0000CC03;
CS0L = 0xa0330D01;
--
1.7.2.3
More information about the barebox
mailing list