summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/scb9328
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-12-19 16:06:34 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-10 14:48:31 +0100
commit006d8373cb29e573f545bae30ff5e8631df30222 (patch)
tree0993add7591d1cdfde160f52ccbc26e0ecf0d3b3 /arch/arm/boards/scb9328
parentb01ceef2e24829d46c8e703268ac3ddb782b7eac (diff)
downloadbarebox-006d8373cb29e573f545bae30ff5e8631df30222.tar.gz
barebox-006d8373cb29e573f545bae30ff5e8631df30222.tar.xz
ARM scb9328: Add gpio led support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/scb9328')
-rw-r--r--arch/arm/boards/scb9328/scb9328.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/arch/arm/boards/scb9328/scb9328.c b/arch/arm/boards/scb9328/scb9328.c
index 35c7fdf730..a98d9fe26e 100644
--- a/arch/arm/boards/scb9328/scb9328.c
+++ b/arch/arm/boards/scb9328/scb9328.c
@@ -31,6 +31,7 @@
#include <fs.h>
#include <fcntl.h>
#include <dm9000.h>
+#include <led.h>
static struct device_d cfi_dev = {
.id = -1,
@@ -68,9 +69,30 @@ static struct device_d dm9000_dev = {
.platform_data = &dm9000_data,
};
-static int scb9328_devices_init(void) {
+struct gpio_led leds[] = {
+ {
+ .gpio = 32 + 21,
+ }, {
+ .gpio = 32 + 22,
+ }, {
+ .gpio = 32 + 23,
+ }, {
+ .gpio = 32 + 24,
+ },
+};
+
+static int scb9328_devices_init(void)
+{
+ int i;
imx_gpio_mode(PA23_PF_CS5);
+ imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 21);
+ imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 22);
+ imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 23);
+ imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 24);
+
+ for (i = 0; i < ARRAY_SIZE(leds); i++)
+ led_gpio_register(&leds[i]);
/* CS3 becomes CS3 by clearing reset default bit 1 in FMCR */
FMCR = 0x1;