summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/panda/board.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-06-06 14:11:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-06 14:11:57 +0200
commit497d1c49f4b75a6827bb400513d53a39dc8bb57c (patch)
tree3227133463cb942c4d5be45108aab82e79daa98c /arch/arm/boards/panda/board.c
parent94418c2d0d3d7dbaa6995fb53f00a5d5fc9f4028 (diff)
parent4024d9ca11295b63dd2b9b795a8f1019b9bba64a (diff)
downloadbarebox-497d1c49f4b75a6827bb400513d53a39dc8bb57c.tar.gz
barebox-497d1c49f4b75a6827bb400513d53a39dc8bb57c.tar.xz
Merge branch 'next'
Diffstat (limited to 'arch/arm/boards/panda/board.c')
-rw-r--r--arch/arm/boards/panda/board.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c
index 26d365c370..84b4ecd77e 100644
--- a/arch/arm/boards/panda/board.c
+++ b/arch/arm/boards/panda/board.c
@@ -20,6 +20,9 @@
#include <mach/gpio.h>
#include <environment.h>
#include <mach/xload.h>
+#include <i2c/i2c.h>
+#include <gpio.h>
+#include <led.h>
static int board_revision;
@@ -106,6 +109,28 @@ static void __init panda_boardrev_init(void)
pr_info("PandaBoard Revision: %03d\n", board_revision);
}
+static struct i2c_board_info i2c_devices[] = {
+ {
+ I2C_BOARD_INFO("twl6030", 0x48),
+ },
+};
+
+struct gpio_led panda_leds[] = {
+ {
+ .gpio = 7,
+ .led = {
+ .name = "heartbeat",
+ },
+ },
+};
+
+static void panda_led_init(void)
+{
+ gpio_direction_output(7, 0);
+ led_gpio_register(&panda_leds[0]);
+ led_set_trigger(LED_TRIGGER_HEARTBEAT, &panda_leds[0].led);
+}
+
static int panda_devices_init(void)
{
panda_boardrev_init();
@@ -134,10 +159,17 @@ static int panda_devices_init(void)
sr32(OMAP44XX_SCRM_ALTCLKSRC, 2, 2, 0x3);
}
+ i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
+ add_generic_device("i2c-omap", DEVICE_ID_DYNAMIC,
+ NULL, 0x48070000, 0x1000,
+ IORESOURCE_MEM, NULL);
+
+
add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, 0x4809C100, SZ_4K,
IORESOURCE_MEM, NULL);
panda_ehci_init();
+ panda_led_init();
armlinux_set_bootparams((void *)0x80000100);
armlinux_set_architecture(MACH_TYPE_OMAP4_PANDA);