@@ -290,8 +290,6 @@ static unsigned long balloon3_mmc_pin_config[] __initdata = {
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,
};
@@ -289,8 +289,6 @@ static inline void cmx270_init_ohci(void) {}
#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,
};
@@ -459,8 +459,6 @@ static inline void cm_x300_init_nand(void) {}
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,
};
@@ -493,8 +491,6 @@ static struct pxamci_platform_data cm_x300_mci2_platform_data = {
.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,
};
@@ -37,8 +37,6 @@
#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,
};
@@ -71,21 +69,12 @@ static struct gpiod_lookup_table colibri_pxa320_mci_gpio_table = {
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);
}
@@ -52,8 +52,6 @@
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,
};
@@ -494,8 +494,6 @@ static struct platform_device corgi_audio_device = {
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,
};
@@ -129,8 +129,6 @@ static struct pxamci_platform_data csb726_mci = {
.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,
};
@@ -577,15 +577,7 @@ static int em_x270_mci_init(struct device *dev,
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",
@@ -625,17 +617,10 @@ static void em_x270_mci_exit(struct device *dev, void *data)
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|
@@ -645,17 +630,13 @@ static struct pxamci_platform_data em_x270_mci_platform_data = {
.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);
}
@@ -90,8 +90,6 @@ static struct platform_device *devices[] __initdata = {
#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,
};
@@ -160,8 +160,6 @@ static struct pxafb_mach_info sharp_lm8v31 = {
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,
};
@@ -51,8 +51,6 @@
#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 */
@@ -278,8 +276,6 @@ static inline void littleton_init_keypad(void) {}
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,
};
@@ -440,8 +440,6 @@ static struct pxamci_platform_data lubbock_mci_platform_data = {
.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,
};
@@ -775,8 +775,6 @@ static struct pxamci_platform_data magician_mci_info = {
.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,
};
@@ -361,8 +361,6 @@ static struct pxamci_platform_data mainstone_mci_platform_data = {
.init = mainstone_mci_init,
.setpower = mainstone_mci_setpower,
.exit = mainstone_mci_exit,
- .gpio_card_detect = -1,
- .gpio_card_ro = -1,
.gpio_power = -1,
};
@@ -398,8 +398,6 @@ struct gpio_vbus_mach_info gpio_vbus_data = {
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,
};
@@ -326,8 +326,6 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
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
};
@@ -50,13 +50,9 @@ static struct pxamci_platform_data palm27x_mci_platform_data = {
};
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;
@@ -16,14 +16,10 @@
#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)
{}
@@ -339,8 +339,6 @@ static void __init palmld_init(void)
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);
@@ -201,8 +201,6 @@ static void __init palmt5_init(void)
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);
@@ -121,8 +121,6 @@ static unsigned long palmtc_pin_config[] __initdata = {
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,
};
@@ -102,8 +102,6 @@ static unsigned long palmte2_pin_config[] __initdata = {
******************************************************************************/
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,
};
@@ -497,8 +497,6 @@ static void __init treo680_init(void)
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
@@ -519,7 +517,6 @@ static void __init centro_init(void)
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
@@ -356,8 +356,6 @@ static void __init palmtx_init(void)
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);
@@ -408,8 +408,6 @@ static void __init palmz72_init(void)
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,
@@ -370,8 +370,6 @@ static struct pxamci_platform_data pcm990_mci_platform_data = {
.init = pcm990_mci_init,
.setpower = pcm990_mci_setpower,
.exit = pcm990_mci_exit,
- .gpio_card_detect = -1,
- .gpio_card_ro = -1,
.gpio_power = -1,
};
@@ -289,8 +289,6 @@ static struct pxamci_platform_data poodle_mci_platform_data = {
.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,
};
@@ -749,8 +749,6 @@ static struct pxamci_platform_data raumfeld_mci_platform_data = {
.init = raumfeld_mci_init,
.exit = raumfeld_mci_exit,
.detect_delay_ms = 200,
- .gpio_card_detect = -1,
- .gpio_card_ro = -1,
.gpio_power = -1,
};
@@ -616,8 +616,6 @@ static struct pxamci_platform_data spitz_mci_platform_data = {
.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,
};
@@ -436,8 +436,6 @@ static int imote2_mci_get_ro(struct device *dev)
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,
};
@@ -292,8 +292,6 @@ static struct pxamci_platform_data tosa_mci_platform_data = {
.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,
};
@@ -355,8 +355,6 @@ static struct pxamci_platform_data trizeps4_mci_platform_data = {
.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,
};
@@ -242,8 +242,6 @@ static void __init vpac270_onenand_init(void) {}
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,
};
@@ -291,9 +291,7 @@ static inline void z2_lcd_init(void) {}
#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,
};
@@ -663,8 +663,6 @@ static struct pxafb_mach_info zeus_fb_info = {
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
};
@@ -227,8 +227,6 @@ static inline void zylonite_init_lcd(void) {}
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,
};
@@ -253,8 +251,6 @@ static struct gpiod_lookup_table zylonite_mci_gpio_table = {
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,
};
@@ -272,8 +268,6 @@ static struct gpiod_lookup_table zylonite_mci2_gpio_table = {
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,
};
This deletes the platform data passed for card detect and write protect from various PXA machines. Make sure to keep .gpio_card_ro_invert as this is still in use by some machines and needed to set the right flag to the MMC core (will be cleaned up later). Cc: Daniel Mack <daniel@zonque.org> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Bartosz Golaszewski <brgl@bgdev.pl> Cc: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- ChangeLog v3->v4: - Rebase on the other changes. - Restore some defines for CD and WP: hands off! ChangeLog v1->v3: - Split out as separate patch at Robert's request. --- arch/arm/mach-pxa/balloon3.c | 2 -- arch/arm/mach-pxa/cm-x270.c | 2 -- arch/arm/mach-pxa/cm-x300.c | 4 ---- arch/arm/mach-pxa/colibri-evalboard.c | 17 +++------------ arch/arm/mach-pxa/colibri-pxa270-income.c | 2 -- arch/arm/mach-pxa/corgi.c | 2 -- arch/arm/mach-pxa/csb726.c | 2 -- arch/arm/mach-pxa/em-x270.c | 25 +++-------------------- arch/arm/mach-pxa/gumstix.c | 2 -- arch/arm/mach-pxa/idp.c | 2 -- arch/arm/mach-pxa/littleton.c | 4 ---- arch/arm/mach-pxa/lubbock.c | 2 -- arch/arm/mach-pxa/magician.c | 2 -- arch/arm/mach-pxa/mainstone.c | 2 -- arch/arm/mach-pxa/mioa701.c | 2 -- arch/arm/mach-pxa/mxm8x10.c | 2 -- arch/arm/mach-pxa/palm27x.c | 4 ---- arch/arm/mach-pxa/palm27x.h | 4 ---- arch/arm/mach-pxa/palmld.c | 2 -- arch/arm/mach-pxa/palmt5.c | 2 -- arch/arm/mach-pxa/palmtc.c | 2 -- arch/arm/mach-pxa/palmte2.c | 2 -- arch/arm/mach-pxa/palmtreo.c | 3 --- arch/arm/mach-pxa/palmtx.c | 2 -- arch/arm/mach-pxa/palmz72.c | 2 -- arch/arm/mach-pxa/pcm990-baseboard.c | 2 -- arch/arm/mach-pxa/poodle.c | 2 -- arch/arm/mach-pxa/raumfeld.c | 2 -- arch/arm/mach-pxa/spitz.c | 2 -- arch/arm/mach-pxa/stargate2.c | 2 -- arch/arm/mach-pxa/tosa.c | 2 -- arch/arm/mach-pxa/trizeps4.c | 2 -- arch/arm/mach-pxa/vpac270.c | 2 -- arch/arm/mach-pxa/z2.c | 2 -- arch/arm/mach-pxa/zeus.c | 2 -- arch/arm/mach-pxa/zylonite.c | 6 ------ 36 files changed, 6 insertions(+), 117 deletions(-) -- 2.19.1