]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-3430sdp.c
use standard gpio get/set calls (OMAP tree only)
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-3430sdp.c
index 87736986db44620aa33553633110de04de6340cf..eb53d56f0b96956a943ae346e53976189f9c7892 100644 (file)
@@ -35,7 +35,7 @@
 #include <mach/board.h>
 #include <mach/usb-musb.h>
 #include <mach/usb-ehci.h>
-#include <mach/hsmmc.h>
+#include <mach/mmc.h>
 #include <mach/common.h>
 #include <mach/keypad.h>
 #include <mach/dma.h>
@@ -46,6 +46,7 @@
 #include <mach/control.h>
 
 #include "sdram-qimonda-hyb18m512160af-6.h"
+#include "mmc-twl4030.h"
 
 #define CONFIG_DISABLE_HFCLK 1
 
@@ -129,7 +130,7 @@ static int __init msecure_init(void)
 #ifdef CONFIG_RTC_DRV_TWL4030
        /* 3430ES2.0 doesn't have msecure/gpio-22 line connected to T2 */
        if (omap_type() == OMAP2_DEVICE_TYPE_GP &&
-                       system_rev < OMAP3430_REV_ES2_0) {
+                       omap_rev() < OMAP3430_REV_ES2_0) {
                void __iomem *msecure_pad_config_reg = omap_ctrl_base_get() +
                        0xA3C;
                int mux_mask = 0x04;
@@ -178,7 +179,7 @@ static void ads7846_dev_init(void)
 
 static int ads7846_get_pendown_state(void)
 {
-       return !omap_get_gpio_datain(ts_gpio);
+       return !gpio_get_value(ts_gpio);
 }
 
 /*
@@ -266,7 +267,7 @@ static inline void __init sdp3430_init_smc91x(void)
        sdp3430_smc91x_resources[0].end   = cs_mem_base + 0xf;
        udelay(100);
 
-       if (system_rev > OMAP3430_REV_ES1_0)
+       if (omap_rev() > OMAP3430_REV_ES1_0)
                eth_gpio = OMAP34XX_ETHR_GPIO_IRQ_SDPV2;
        else
                eth_gpio = OMAP34XX_ETHR_GPIO_IRQ_SDPV1;
@@ -444,6 +445,22 @@ static int __init omap3430_i2c_init(void)
        return 0;
 }
 
+static struct twl4030_hsmmc_info mmc[] __initdata = {
+       {
+               .mmc            = 1,
+               .wires          = 8,
+               .gpio_cd        = -EINVAL,
+               .gpio_wp        = -EINVAL,
+       },
+       {
+               .mmc            = 2,
+               .wires          = 8,
+               .gpio_cd        = -EINVAL,
+               .gpio_wp        = -EINVAL,
+       },
+       {}      /* Terminator */
+};
+
 extern void __init sdp3430_flash_init(void);
 
 static void __init omap_3430sdp_init(void)
@@ -452,7 +469,7 @@ static void __init omap_3430sdp_init(void)
        platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
        omap_board_config = sdp3430_config;
        omap_board_config_size = ARRAY_SIZE(sdp3430_config);
-       if (system_rev > OMAP3430_REV_ES1_0)
+       if (omap_rev() > OMAP3430_REV_ES1_0)
                ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV2;
        else
                ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV1;
@@ -465,7 +482,7 @@ static void __init omap_3430sdp_init(void)
        omap_serial_init();
        usb_musb_init();
        usb_ehci_init();
-       hsmmc_init();
+       hsmmc_init(mmc);
 }
 
 static void __init omap_3430sdp_map_io(void)