]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-omap3evm.c
USB: Clean-up USB init code for next merge window
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-omap3evm.c
index eb21bc56517270a478cd459e5e6acb8bec5d9728..657772677a347c756569e652891ca46d2d3f4086 100644 (file)
 #include <asm/mach/map.h>
 
 #include <mach/gpio.h>
-#include <mach/keypad.h>
 #include <mach/board.h>
-#include <mach/mmc.h>
-#include <mach/usb-musb.h>
-#include <mach/usb-ehci.h>
+#include <mach/usb.h>
 #include <mach/common.h>
 #include <mach/mcspi.h>
 
 #include "sdram-micron-mt46h32m32lf-6.h"
 #include "twl4030-generic-scripts.h"
+#include "mmc-twl4030.h"
+
 
 static struct resource omap3evm_smc911x_resources[] = {
        [0] =   {
@@ -75,13 +74,13 @@ static inline void __init omap3evm_init_smc911x(void)
        else
                rate = clk_get_rate(l3ck);
 
-       if (omap_request_gpio(OMAP3EVM_ETHR_GPIO_IRQ) < 0) {
+       if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMC911x irq") < 0) {
                printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
                        OMAP3EVM_ETHR_GPIO_IRQ);
                return;
        }
 
-       omap_set_gpio_direction(OMAP3EVM_ETHR_GPIO_IRQ, 1);
+       gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
 }
 
 static struct omap_uart_config omap3_evm_uart_config __initdata = {
@@ -123,7 +122,6 @@ static struct twl4030_keypad_data omap3evm_kp_data = {
        .keymap         = omap3evm_keymap,
        .keymapsize     = ARRAY_SIZE(omap3evm_keymap),
        .rep            = 1,
-       .irq            = TWL4030_MODIRQ_KEYPAD,
 };
 
 static struct twl4030_madc_platform_data omap3evm_madc_data = {
@@ -138,7 +136,7 @@ static struct twl4030_platform_data omap3evm_twldata = {
        .keypad         = &omap3evm_kp_data,
        .madc           = &omap3evm_madc_data,
        .usb            = &omap3evm_usb_data,
-       .power          = &generic3430_t2scripts_data,
+       .power          = GENERIC3430_T2SCRIPTS_DATA,
        .gpio           = &omap3evm_gpio_data,
 };
 
@@ -171,10 +169,10 @@ static struct omap_lcd_config omap3_evm_lcd_config __initdata = {
 
 static void ads7846_dev_init(void)
 {
-       if (omap_request_gpio(OMAP3_EVM_TS_GPIO) < 0)
+       if (gpio_request(OMAP3_EVM_TS_GPIO, "ADS7846 pendown") < 0)
                printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
 
-       omap_set_gpio_direction(OMAP3_EVM_TS_GPIO, 1);
+       gpio_direction_input(OMAP3_EVM_TS_GPIO);
 
        omap_set_gpio_debounce(OMAP3_EVM_TS_GPIO, 1);
        omap_set_gpio_debounce_time(OMAP3_EVM_TS_GPIO, 0xa);
@@ -182,7 +180,7 @@ static void ads7846_dev_init(void)
 
 static int ads7846_get_pendown_state(void)
 {
-       return !omap_get_gpio_datain(OMAP3_EVM_TS_GPIO);
+       return !gpio_get_value(OMAP3_EVM_TS_GPIO);
 }
 
 struct ads7846_platform_data ads7846_config = {
@@ -238,6 +236,7 @@ static struct twl4030_hsmmc_info mmc[] __initdata = {
                .mmc            = 1,
                .wires          = 4,
                .gpio_cd        = -EINVAL,
+               .gpio_wp        = -EINVAL,
        },
        {}      /* Terminator */
 };
@@ -254,7 +253,7 @@ static void __init omap3_evm_init(void)
                                ARRAY_SIZE(omap3evm_spi_board_info));
 
        omap_serial_init();
-       hsmmc_init(mmc);
+       twl4030_mmc_init(mmc);
        usb_musb_init();
        usb_ehci_init();
        omap3evm_flash_init();