Add i2c-omap and twlcore driver to panda board.
(Based on similar patch for pcm049).

Signed-off-by: Anand Gadiyar <[email protected]>
---
Tested on OMAP4430 Pandaboard

 arch/arm/boards/panda/board.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c
index 26d365c..fcca5dd 100644
--- a/arch/arm/boards/panda/board.c
+++ b/arch/arm/boards/panda/board.c
@@ -20,6 +20,7 @@
 #include <mach/gpio.h>
 #include <environment.h>
 #include <mach/xload.h>
+#include <i2c/i2c.h>
 
 static int board_revision;
 
@@ -106,6 +107,12 @@ 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),
+       },
+};
+
 static int panda_devices_init(void)
 {
        panda_boardrev_init();
@@ -134,6 +141,12 @@ 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();
-- 
1.7.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to