OMAP4: pandaboard: Select CBL & CBS package and initialize mux
authorsricharan <r.sricharan@ti.com>
Mon, 8 Nov 2010 13:56:11 +0000 (19:26 +0530)
committerBenoit Cousson <b-cousson@ti.com>
Wed, 17 Nov 2010 11:01:54 +0000 (12:01 +0100)
The mux framework allows the change of pad configuration by drivers
when needed. Prior to this the mux framework has to be initialised
with all the mux parameters specific to the board. The mux init is
already present in the board file for SDP. Adding the mux init
for panda boards.

Signed-off-by: sricharan <r.sricharan@ti.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/board-omap4panda.c

index 39229cf72c4b72f17caebe8065e23c5c71c6f986..186d270344e8a3e3616756cbe5b4c5342a036643 100644 (file)
@@ -290,6 +290,8 @@ config MACH_OMAP4_PANDA
        bool "OMAP4 Panda Board"
        default y
        depends on ARCH_OMAP4
+       select OMAP_PACKAGE_CBL
+       select OMAP_PACKAGE_CBS
 
 config OMAP3_EMU
        bool "OMAP3 debugging peripherals"
index 1ecd0a6cefb777736e6148060e74557783280e2b..801f8146b00c9162c0a298599e223adb642f2712 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "hsmmc.h"
 #include "control.h"
+#include "mux.h"
 
 #define GPIO_HUB_POWER         1
 #define GPIO_HUB_NRESET                62
@@ -368,8 +369,23 @@ static int __init omap4_panda_i2c_init(void)
        omap_register_i2c_bus(4, 400, NULL, 0);
        return 0;
 }
+
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+       { .reg_offset = OMAP_MUX_TERMINATOR },
+};
+#else
+#define board_mux      NULL
+#endif
+
 static void __init omap4_panda_init(void)
 {
+       int package = OMAP_PACKAGE_CBS;
+
+       if (omap_rev() == OMAP4430_REV_ES1_0)
+               package = OMAP_PACKAGE_CBL;
+       omap4_mux_init(board_mux, package);
+
        omap4_panda_i2c_init();
        platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
        omap_serial_init();