Merge branch 'devel-gpio' into omap-for-linus
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-omap2 / board-2430sdp.c
index a11a575745e44c5bcab1d1fd7cc202afeedd06ea..c00f26aca0d6105678138501dfbb298fdda4a5e5 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
+#include <linux/mmc/host.h>
 #include <linux/delay.h>
 #include <linux/i2c/twl.h>
 #include <linux/err.h>
 #include <asm/mach/map.h>
 
 #include <mach/gpio.h>
-#include <plat/mux.h>
 #include <plat/board.h>
 #include <plat/common.h>
 #include <plat/gpmc.h>
 #include <plat/usb.h>
 #include <plat/gpmc-smc91x.h>
 
+#include "mux.h"
 #include "hsmmc.h"
 
 #define SDP2430_CS0_BASE       0x04000000
@@ -122,11 +123,7 @@ static struct omap_smc91x_platform_data board_smc91x_data = {
 
 static void __init board_smc91x_init(void)
 {
-       if (omap_rev() > OMAP3430_REV_ES1_0)
-               board_smc91x_data.gpio_irq = 6;
-       else
-               board_smc91x_data.gpio_irq = 29;
-
+       omap_mux_init_gpio(149, OMAP_PIN_INPUT);
        gpmc_smc91x_init(&board_smc91x_data);
 }
 
@@ -148,7 +145,6 @@ static void __init omap_2430sdp_init_irq(void)
        omap_board_config_size = ARRAY_SIZE(sdp2430_config);
        omap2_init_common_hw(NULL, NULL);
        omap_init_irq();
-       omap_gpio_init();
 }
 
 static struct twl4030_gpio_platform_data sdp2430_gpio_data = {
@@ -194,7 +190,7 @@ static int __init omap2430_i2c_init(void)
 static struct omap2_hsmmc_info mmc[] __initdata = {
        {
                .mmc            = 1,
-               .wires          = 4,
+               .caps           = MMC_CAP_4_BIT_DATA,
                .gpio_cd        = -EINVAL,
                .gpio_wp        = -EINVAL,
                .ext_clock      = 1,
@@ -217,17 +213,28 @@ static struct omap_usb_config sdp2430_usb_config __initdata = {
        .pins[0]        = 3,
 };
 
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+       { .reg_offset = OMAP_MUX_TERMINATOR },
+};
+#endif
+
 static void __init omap_2430sdp_init(void)
 {
        int ret;
 
+       omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC);
+
        omap2430_i2c_init();
 
        platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
        omap_serial_init();
        omap2_hsmmc_init(mmc);
-       omap_usb_init(&sdp2430_usb_config);
+       omap2_usbfs_init(&sdp2430_usb_config);
+
+       omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
        usb_musb_init(&musb_board_data);
+
        board_smc91x_init();
 
        /* Turn off secondary LCD backlight */
@@ -244,10 +251,9 @@ static void __init omap_2430sdp_map_io(void)
 
 MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
        /* Maintainer: Syed Khasim - Texas Instruments Inc */
-       .phys_io        = 0x48000000,
-       .io_pg_offst    = ((0xfa000000) >> 18) & 0xfffc,
        .boot_params    = 0x80000100,
        .map_io         = omap_2430sdp_map_io,
+       .reserve        = omap_reserve,
        .init_irq       = omap_2430sdp_init_irq,
        .init_machine   = omap_2430sdp_init,
        .timer          = &omap_timer,