]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-n800-mmc.c
Revert "ARM: OMAP: Get rid of controller vs slot confusion, initialize MMC devices...
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-n800-mmc.c
index 2cf8213f729c37a4d93a8d19d348bc3b82574969..bcbba9440bf16632cdef77e655f5abd1fbe9f055 100644 (file)
@@ -19,7 +19,7 @@
 #include <mach/gpio.h>
 #include <mach/mmc.h>
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#ifdef CONFIG_MMC_OMAP
 
 static const int slot_switch_gpio = 96;
 
@@ -296,22 +296,19 @@ static void n800_mmc_cleanup(struct device *dev)
        }
 }
 
-/*
- * MMC controller1 has two slots that are multiplexed via I2C.
- * MMC controller2 is not in use.
- */
-static struct omap_mmc_platform_data mmc1_data = {
+static struct omap_mmc_platform_data n800_mmc_data = {
        .nr_slots               = 2,
        .switch_slot            = n800_mmc_switch_slot,
        .init                   = n800_mmc_late_init,
        .cleanup                = n800_mmc_cleanup,
        .shutdown               = n800_mmc_shutdown,
        .max_freq               = 24000000,
-       .dma_mask               = 0xffffffff,
        .slots[0] = {
+               .enabled        = 1,
                .wire4          = 1,
                .set_power      = n800_mmc_set_power,
                .set_bus_mode   = n800_mmc_set_bus_mode,
+               .get_ro         = NULL,
                .get_cover_state= n800_mmc_get_cover_state,
                .ocr_mask       = MMC_VDD_165_195 | MMC_VDD_30_31 |
                                  MMC_VDD_32_33   | MMC_VDD_33_34,
@@ -320,6 +317,7 @@ static struct omap_mmc_platform_data mmc1_data = {
        .slots[1] = {
                .set_power      = n800_mmc_set_power,
                .set_bus_mode   = n800_mmc_set_bus_mode,
+               .get_ro         = NULL,
                .get_cover_state= n800_mmc_get_cover_state,
                .ocr_mask       = MMC_VDD_165_195 | MMC_VDD_20_21 |
                                  MMC_VDD_21_22 | MMC_VDD_22_23 | MMC_VDD_23_24 |
@@ -330,13 +328,11 @@ static struct omap_mmc_platform_data mmc1_data = {
        },
 };
 
-static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC];
-
 void __init n800_mmc_init(void)
 
 {
        if (machine_is_nokia_n810()) {
-               n800_mmc1_data.slots[0].name = "external";
+               n800_mmc_data.slots[0].name = "external";
 
                /*
                 * Some Samsung Movinand chips do not like open-ended
@@ -344,8 +340,8 @@ void __init n800_mmc_init(void)
                 * while doing so. Reducing the number of blocks in
                 * the transfer or delays in clock disable do not help
                 */
-               n800_mmc1_data.slots[1].name = "internal";
-               n800_mmc1_data.slots[1].ban_openended = 1;
+               n800_mmc_data.slots[1].name = "internal";
+               n800_mmc_data.slots[1].ban_openended = 1;
        }
 
        if (omap_request_gpio(slot_switch_gpio) < 0)
@@ -365,8 +361,7 @@ void __init n800_mmc_init(void)
                omap_set_gpio_direction(n810_slot2_pw_vdd, 0);
        }
 
-       mmc_data[0] = &mmc1_data;
-       omap2_init_mmc(mmc_data, OMAP24XX_NR_MMC);
+       omap2_init_mmc(&n800_mmc_data);
 }
 #else