static struct pxamci_platform_data balloon3_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
        .detect_delay_ms        = 200,
 };
 
 #if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
 static struct pxamci_platform_data cmx270_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect       = GPIO83_MMC_IRQ,
-       .gpio_card_ro           = -1,
        .gpio_power             = GPIO105_MMC_POWER,
        .gpio_power_invert      = 1,
 };
 
 static struct pxamci_platform_data cm_x300_mci_platform_data = {
        .detect_delay_ms        = 200,
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect       = GPIO82_MMC_IRQ,
-       .gpio_card_ro           = GPIO85_MMC_WP,
        .gpio_power             = -1,
 };
 
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
        .init                   = cm_x300_mci2_init,
        .exit                   = cm_x300_mci2_exit,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 
 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
 static struct pxamci_platform_data colibri_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .gpio_power             = -1,
-       .gpio_card_ro           = -1,
        .detect_delay_ms        = 200,
 };
 
 
 static void __init colibri_mmc_init(void)
 {
-       if (machine_is_colibri()) {     /* PXA270 Colibri */
-               colibri_mci_platform_data.gpio_card_detect =
-                       GPIO0_COLIBRI_PXA270_SD_DETECT;
+       if (machine_is_colibri())       /* PXA270 Colibri */
                gpiod_add_lookup_table(&colibri_pxa270_mci_gpio_table);
-       }
-       if (machine_is_colibri300()) {  /* PXA300 Colibri */
-               colibri_mci_platform_data.gpio_card_detect =
-                       GPIO13_COLIBRI_PXA300_SD_DETECT;
+       if (machine_is_colibri300())    /* PXA300 Colibri */
                gpiod_add_lookup_table(&colibri_pxa300_mci_gpio_table);
-       }
-       else {                          /* PXA320 Colibri */
-               colibri_mci_platform_data.gpio_card_detect =
-                       GPIO28_COLIBRI_PXA320_SD_DETECT;
+       else                            /* PXA320 Colibri */
                gpiod_add_lookup_table(&colibri_pxa320_mci_gpio_table);
-       }
 
        pxa_set_mci_info(&colibri_mci_platform_data);
 }
 
 static struct pxamci_platform_data income_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
        .gpio_power             = -1,
-       .gpio_card_detect       = GPIO0_INCOME_SD_DETECT,
-       .gpio_card_ro           = GPIO0_INCOME_SD_RO,
        .detect_delay_ms        = 200,
 };
 
 
 static struct pxamci_platform_data corgi_mci_platform_data = {
        .detect_delay_ms        = 250,
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect       = CORGI_GPIO_nSD_DETECT,
-       .gpio_card_ro           = CORGI_GPIO_nSD_WP,
        .gpio_power             = CORGI_GPIO_SD_PWR,
 };
 
 
        .detect_delay_ms        = 500,
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
        /* FIXME setpower */
-       .gpio_card_detect       = CSB726_GPIO_MMC_DETECT,
-       .gpio_card_ro           = CSB726_GPIO_MMC_RO,
        .gpio_power             = -1,
 };
 
 
                goto err_irq;
        }
 
-       if (machine_is_em_x270()) {
-               err = gpio_request(GPIO95_MMC_WP, "MMC WP");
-               if (err) {
-                       dev_err(dev, "can't request MMC write protect: %d\n",
-                               err);
-                       goto err_gpio_wp;
-               }
-               gpio_direction_input(GPIO95_MMC_WP);
-       } else {
+       if (!machine_is_em_x270()) {
                err = gpio_request(GPIO38_SD_PWEN, "sdio power");
                if (err) {
                        dev_err(dev, "can't request MMC power control : %d\n",
        free_irq(gpio_to_irq(mmc_cd), data);
        regulator_put(em_x270_sdio_ldo);
 
-       if (machine_is_em_x270())
-               gpio_free(GPIO95_MMC_WP);
-       else
+       if (!machine_is_em_x270())
                gpio_free(GPIO38_SD_PWEN);
 }
 
-static int em_x270_mci_get_ro(struct device *dev)
-{
-       return gpio_get_value(GPIO95_MMC_WP);
-}
-
 static struct pxamci_platform_data em_x270_mci_platform_data = {
        .detect_delay_ms        = 250,
        .ocr_mask               = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
        .init                   = em_x270_mci_init,
        .setpower               = em_x270_mci_setpower,
        .exit                   = em_x270_mci_exit,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 static void __init em_x270_init_mmc(void)
 {
-       if (machine_is_em_x270()) {
-               em_x270_mci_platform_data.get_ro = em_x270_mci_get_ro;
+       if (machine_is_em_x270())
                gpiod_add_lookup_table(&em_x270_mci_wp_gpio_table);
-       }
 
        pxa_set_mci_info(&em_x270_mci_platform_data);
 }
 
 #ifdef CONFIG_MMC_PXA
 static struct pxamci_platform_data gumstix_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 
 
 static struct pxamci_platform_data idp_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 
 
 #include "generic.h"
 
-#define GPIO_MMC1_CARD_DETECT  mfp_to_gpio(MFP_PIN_GPIO15)
-
 /* Littleton MFP configurations */
 static mfp_cfg_t littleton_mfp_cfg[] __initdata = {
        /* LCD */
 static struct pxamci_platform_data littleton_mci_platform_data = {
        .detect_delay_ms        = 200,
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .gpio_card_detect       = GPIO_MMC1_CARD_DETECT,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 
        .init                   = lubbock_mci_init,
        .get_ro                 = lubbock_mci_get_ro,
        .exit                   = lubbock_mci_exit,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
        .init                   = magician_mci_init,
        .exit                   = magician_mci_exit,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = EGPIO_MAGICIAN_nSD_READONLY,
        .gpio_card_ro_invert    = 1,
        .gpio_power             = EGPIO_MAGICIAN_SD_POWER,
 };
 
        .init                   = mainstone_mci_init,
        .setpower               = mainstone_mci_setpower,
        .exit                   = mainstone_mci_exit,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 
 static struct pxamci_platform_data mioa701_mci_info = {
        .detect_delay_ms        = 250,
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .gpio_card_detect       = GPIO15_SDIO_INSERT,
-       .gpio_card_ro           = GPIO78_SDIO_RO,
        .gpio_power             = GPIO91_SDIO_EN,
 };
 
 
 static struct pxamci_platform_data mxm_8x10_mci_platform_data = {
        .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
        .detect_delay_ms = 10,
-       .gpio_card_detect = MXM_8X10_SD_nCD,
-       .gpio_card_ro = MXM_8X10_SD_WP,
        .gpio_power = -1
 };
 
 
 };
 
 void __init palm27x_mmc_init(struct gpiod_lookup_table *gtable,
-                            int detect,
-                            int ro,
                             int power,
                             int power_inverted)
 {
-       palm27x_mci_platform_data.gpio_card_detect      = detect;
-       palm27x_mci_platform_data.gpio_card_ro          = ro;
        palm27x_mci_platform_data.gpio_power            = power;
        palm27x_mci_platform_data.gpio_power_invert     = power_inverted;
 
 
 
 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
 extern void __init palm27x_mmc_init(struct gpiod_lookup_table *gtable,
-                                   int detect,
-                                   int ro,
                                    int power,
                                    int power_inverted);
 #else
 static inline void palm27x_mmc_init(struct gpiod_lookup_table *gtable,
-                                   int detect,
-                                   int ro,
                                    int power,
                                    int power_inverted)
 {}
 
        pxa_set_stuart_info(NULL);
 
        palm27x_mmc_init(&palmld_mci_gpio_table,
-                        GPIO_NR_PALMLD_SD_DETECT_N,
-                        GPIO_NR_PALMLD_SD_READONLY,
                         GPIO_NR_PALMLD_SD_POWER, 0);
        palm27x_pm_init(PALMLD_STR_BASE);
        palm27x_lcd_init(-1, &palm_320x480_lcd_mode);
 
        pxa_set_stuart_info(NULL);
 
        palm27x_mmc_init(&palmt5_mci_gpio_table,
-                        GPIO_NR_PALMT5_SD_DETECT_N,
-                        GPIO_NR_PALMT5_SD_READONLY,
                         GPIO_NR_PALMT5_SD_POWER, 0);
        palm27x_pm_init(PALMT5_STR_BASE);
        palm27x_lcd_init(-1, &palm_320x480_lcd_mode);
 
 static struct pxamci_platform_data palmtc_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
        .gpio_power             = GPIO_NR_PALMTC_SD_POWER,
-       .gpio_card_ro           = GPIO_NR_PALMTC_SD_READONLY,
-       .gpio_card_detect       = GPIO_NR_PALMTC_SD_DETECT_N,
        .detect_delay_ms        = 200,
 };
 
 
  ******************************************************************************/
 static struct pxamci_platform_data palmte2_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .gpio_card_detect       = GPIO_NR_PALMTE2_SD_DETECT_N,
-       .gpio_card_ro           = GPIO_NR_PALMTE2_SD_READONLY,
        .gpio_power             = GPIO_NR_PALMTE2_SD_POWER,
 };
 
 
        palmphone_common_init();
        treo680_gpio_init();
        palm27x_mmc_init(&treo680_mci_gpio_table,
-                        GPIO_NR_TREO_SD_DETECT_N,
-                        GPIO_NR_TREO680_SD_READONLY,
                         GPIO_NR_TREO680_SD_POWER, 0);
 }
 #endif
        pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config));
        palmphone_common_init();
        palm27x_mmc_init(¢ro685_mci_gpio_table,
-                        GPIO_NR_TREO_SD_DETECT_N, -1,
                         GPIO_NR_CENTRO_SD_POWER, 1);
 }
 #endif
 
        pxa_set_stuart_info(NULL);
 
        palm27x_mmc_init(&palmtx_mci_gpio_table,
-                        GPIO_NR_PALMTX_SD_DETECT_N,
-                        GPIO_NR_PALMTX_SD_READONLY,
                         GPIO_NR_PALMTX_SD_POWER, 0);
        palm27x_pm_init(PALMTX_STR_BASE);
        palm27x_lcd_init(-1, &palm_320x480_lcd_mode);
 
        pxa_set_stuart_info(NULL);
 
        palm27x_mmc_init(&palmz72_mci_gpio_table,
-                        GPIO_NR_PALMZ72_SD_DETECT_N,
-                        GPIO_NR_PALMZ72_SD_RO,
                         GPIO_NR_PALMZ72_SD_POWER_N, 1);
        palm27x_lcd_init(-1, &palm_320x320_lcd_mode);
        palm27x_udc_init(GPIO_NR_PALMZ72_USB_DETECT_N,
 
        .init                   = pcm990_mci_init,
        .setpower               = pcm990_mci_setpower,
        .exit                   = pcm990_mci_exit,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 
        .init                   = poodle_mci_init,
        .setpower               = poodle_mci_setpower,
        .exit                   = poodle_mci_exit,
-       .gpio_card_detect       = POODLE_GPIO_nSD_DETECT,
-       .gpio_card_ro           = POODLE_GPIO_nSD_WP,
        .gpio_power             = -1,
 };
 
 
        .init                   = raumfeld_mci_init,
        .exit                   = raumfeld_mci_exit,
        .detect_delay_ms        = 200,
-       .gpio_card_detect       = -1,
-       .gpio_card_ro           = -1,
        .gpio_power             = -1,
 };
 
 
        .detect_delay_ms        = 250,
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
        .setpower               = spitz_mci_setpower,
-       .gpio_card_detect       = SPITZ_GPIO_nSD_DETECT,
-       .gpio_card_ro           = SPITZ_GPIO_nSD_WP,
        .gpio_power             = -1,
 };
 
 
 static struct pxamci_platform_data imote2_mci_platform_data = {
        .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* default anyway */
        .get_ro = imote2_mci_get_ro,
-       .gpio_card_detect = -1,
-       .gpio_card_ro   = -1,
        .gpio_power = -1,
 };
 
 
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
        .init                   = tosa_mci_init,
        .exit                   = tosa_mci_exit,
-       .gpio_card_detect       = TOSA_GPIO_nSD_DETECT,
-       .gpio_card_ro           = TOSA_GPIO_SD_WP,
        .gpio_power             = TOSA_GPIO_PWR_ON,
 };
 
 
        .exit           = trizeps4_mci_exit,
        .get_ro         = NULL, /* write-protection not supported */
        .setpower       = NULL, /* power-switching not supported */
-       .gpio_card_detect = -1,
-       .gpio_card_ro   = -1,
        .gpio_power     = -1,
 };
 
 
 static struct pxamci_platform_data vpac270_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
        .gpio_power             = -1,
-       .gpio_card_detect       = GPIO53_VPAC270_SD_DETECT_N,
-       .gpio_card_ro           = GPIO52_VPAC270_SD_READONLY,
        .detect_delay_ms        = 200,
 };
 
 
 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
 static struct pxamci_platform_data z2_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .gpio_card_detect       = GPIO96_ZIPITZ2_SD_DETECT,
        .gpio_power             = -1,
-       .gpio_card_ro           = -1,
        .detect_delay_ms        = 200,
 };
 
 
 static struct pxamci_platform_data zeus_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
        .detect_delay_ms        = 250,
-       .gpio_card_detect       = ZEUS_MMC_CD_GPIO,
-       .gpio_card_ro           = ZEUS_MMC_WP_GPIO,
        .gpio_card_ro_invert    = 1,
        .gpio_power             = -1
 };
 
 static struct pxamci_platform_data zylonite_mci_platform_data = {
        .detect_delay_ms= 200,
        .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect = EXT_GPIO(0),
-       .gpio_card_ro   = EXT_GPIO(2),
        .gpio_power     = -1,
 };
 
 static struct pxamci_platform_data zylonite_mci2_platform_data = {
        .detect_delay_ms= 200,
        .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect = EXT_GPIO(1),
-       .gpio_card_ro   = EXT_GPIO(3),
        .gpio_power     = -1,
 };
 
 static struct pxamci_platform_data zylonite_mci3_platform_data = {
        .detect_delay_ms= 200,
        .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect = EXT_GPIO(30),
-       .gpio_card_ro   = EXT_GPIO(31),
        .gpio_power     = -1,
 };