]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-apollon.c
ARM: OMAP: Fix gpio by switching to generic gpio calls
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-apollon.c
index e76328062c0d2e754dabbaec73e0d2f537340e0e..c2ef58ae832af4b27e28cf2f6e1d0e530e9fc955 100644 (file)
@@ -195,8 +195,8 @@ static struct resource apollon_smc91x_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = OMAP_GPIO_IRQ(APOLLON_ETHR_GPIO_IRQ),
-               .end    = OMAP_GPIO_IRQ(APOLLON_ETHR_GPIO_IRQ),
+               .start  = gpio_to_irq(APOLLON_ETHR_GPIO_IRQ),
+               .end    = gpio_to_irq(APOLLON_ETHR_GPIO_IRQ),
                .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
        },
 };
@@ -308,13 +308,13 @@ static inline void __init apollon_init_smc91x(void)
        udelay(100);
 
        omap_cfg_reg(W4__24XX_GPIO74);
-       if (omap_request_gpio(APOLLON_ETHR_GPIO_IRQ) < 0) {
+       if (gpio_request(APOLLON_ETHR_GPIO_IRQ, "SMC91x irq") < 0) {
                printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
                        APOLLON_ETHR_GPIO_IRQ);
                gpmc_cs_free(eth_cs);
                goto out;
        }
-       omap_set_gpio_direction(APOLLON_ETHR_GPIO_IRQ, 1);
+       gpio_direction_input(APOLLON_ETHR_GPIO_IRQ);
 
 out:
        clk_disable(gpmc_fck);
@@ -351,18 +351,6 @@ static struct omap_uart_config apollon_uart_config __initdata = {
        .enabled_uarts = (1 << 0) | (0 << 1) | (0 << 2),
 };
 
-/*
- * Note: If you want to detect card feature, please assign GPIO 37
- */
-static struct omap_mmc_config apollon_mmc_config __initdata = {
-       .mmc [0] = {
-               .enabled        = 1,
-               .wire4          = 1,
-       /* Use internal loop-back in MMC/SDIO Module Input Clock selection */
-               .internal_clock = 1,
-       },
-};
-
 static struct omap_usb_config apollon_usb_config __initdata = {
        .register_dev   = 1,
        .hmc_mode       = 0x14, /* 0:dev 1:host1 2:disable */
@@ -376,7 +364,6 @@ static struct omap_lcd_config apollon_lcd_config __initdata = {
 
 static struct omap_board_config_kernel apollon_config[] __initdata = {
        { OMAP_TAG_UART,        &apollon_uart_config },
-       { OMAP_TAG_MMC,         &apollon_mmc_config },
        { OMAP_TAG_USB,         &apollon_usb_config },
        { OMAP_TAG_LCD,         &apollon_lcd_config },
 };
@@ -404,17 +391,16 @@ static void __init apollon_usb_init(void)
        /* USB device */
        /* DEVICE_SUSPEND */
        omap_cfg_reg(P21_242X_GPIO12);
-       omap_request_gpio(12);
-       omap_set_gpio_direction(12, 0);         /* OUT */
-       omap_set_gpio_dataout(12, 0);
+       gpio_request(12, "USB suspend");
+       gpio_direction_output(12, 0);
 }
 
 static void __init apollon_tsc_init(void)
 {
        /* TSC2101 */
        omap_cfg_reg(N15_24XX_GPIO85);
-       omap_request_gpio(85);
-       omap_set_gpio_direction(85, 1);
+       gpio_request(85, "tsc2101 irq");
+       gpio_direction_input(85);
 
        omap_cfg_reg(W14_24XX_SYS_CLKOUT);      /* mclk */
 }