diff options
| author | Eric Miao <eric.y.miao@gmail.com> | 2010-04-13 19:00:42 -0400 |
|---|---|---|
| committer | Eric Miao <eric.y.miao@gmail.com> | 2010-05-11 11:25:04 -0400 |
| commit | f97cab28b1895ecb0aa317cc785bb209f57fc1e8 (patch) | |
| tree | 6bb09cf5ff94d39fd1a7ed1691ceb7e0ea674955 | |
| parent | e66b6d8e86a67c637203684ab76ea760dccb10f9 (diff) | |
[ARM] pxa: make it clear by converting MMC 'delay_detect' to millisecond
delay_detect in HZ is confusing, convert it to be millisecond based. And
thus remove those unnecessary call to msecs_to_jiffies() at runtime for
this field. Other constants are converted assuming HZ == 100, which are
basically true for those platforms.
The assignment in csb726.c was incorrect, and is fixed in this patch as
a result.
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Marc Zyngier <maz@misterjones.org>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Daniel Mack <daniel@caiaq.de>
26 files changed, 29 insertions, 41 deletions
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index be9dc7a20fbd..fdda6be6c391 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
| @@ -433,7 +433,7 @@ static inline void cm_x300_init_nand(void) {} | |||
| 433 | 433 | ||
| 434 | #if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE) | 434 | #if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE) |
| 435 | static struct pxamci_platform_data cm_x300_mci_platform_data = { | 435 | static struct pxamci_platform_data cm_x300_mci_platform_data = { |
| 436 | .detect_delay = 20, | 436 | .detect_delay_ms = 200, |
| 437 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 437 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 438 | .gpio_card_detect = GPIO82_MMC_IRQ, | 438 | .gpio_card_detect = GPIO82_MMC_IRQ, |
| 439 | .gpio_card_ro = GPIO85_MMC_WP, | 439 | .gpio_card_ro = GPIO85_MMC_WP, |
| @@ -454,7 +454,7 @@ static void cm_x300_mci2_exit(struct device *dev, void *data) | |||
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | static struct pxamci_platform_data cm_x300_mci2_platform_data = { | 456 | static struct pxamci_platform_data cm_x300_mci2_platform_data = { |
| 457 | .detect_delay = 20, | 457 | .detect_delay_ms = 200, |
| 458 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 458 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 459 | .init = cm_x300_mci2_init, | 459 | .init = cm_x300_mci2_init, |
| 460 | .exit = cm_x300_mci2_exit, | 460 | .exit = cm_x300_mci2_exit, |
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c index e6c0a2287eb8..199afa2ae303 100644 --- a/arch/arm/mach-pxa/colibri-pxa3xx.c +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c | |||
| @@ -96,7 +96,7 @@ static void colibri_pxa3xx_mci_exit(struct device *dev, void *data) | |||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = { | 98 | static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = { |
| 99 | .detect_delay = 20, | 99 | .detect_delay_ms = 200, |
| 100 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 100 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 101 | .init = colibri_pxa3xx_mci_init, | 101 | .init = colibri_pxa3xx_mci_init, |
| 102 | .exit = colibri_pxa3xx_mci_exit, | 102 | .exit = colibri_pxa3xx_mci_exit, |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index f8e295900c58..3d1dcb9ac08f 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
| @@ -444,6 +444,7 @@ static struct platform_device corgiled_device = { | |||
| 444 | * to give the card a chance to fully insert/eject. | 444 | * to give the card a chance to fully insert/eject. |
| 445 | */ | 445 | */ |
| 446 | static struct pxamci_platform_data corgi_mci_platform_data = { | 446 | static struct pxamci_platform_data corgi_mci_platform_data = { |
| 447 | .detect_delay_ms = 250, | ||
| 447 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 448 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 448 | .gpio_card_detect = -1, | 449 | .gpio_card_detect = -1, |
| 449 | .gpio_card_ro = CORGI_GPIO_nSD_WP, | 450 | .gpio_card_ro = CORGI_GPIO_nSD_WP, |
| @@ -695,7 +696,6 @@ static void __init corgi_init(void) | |||
| 695 | corgi_init_spi(); | 696 | corgi_init_spi(); |
| 696 | 697 | ||
| 697 | pxa_set_udc_info(&udc_info); | 698 | pxa_set_udc_info(&udc_info); |
| 698 | corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
| 699 | pxa_set_mci_info(&corgi_mci_platform_data); | 699 | pxa_set_mci_info(&corgi_mci_platform_data); |
| 700 | pxa_set_ficp_info(&corgi_ficp_platform_data); | 700 | pxa_set_ficp_info(&corgi_ficp_platform_data); |
| 701 | pxa_set_i2c_info(NULL); | 701 | pxa_set_i2c_info(NULL); |
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c index 88575b87bd33..91fd4fea6a54 100644 --- a/arch/arm/mach-pxa/csb726.c +++ b/arch/arm/mach-pxa/csb726.c | |||
| @@ -125,18 +125,9 @@ static unsigned long csb726_pin_config[] = { | |||
| 125 | GPIO118_I2C_SDA, | 125 | GPIO118_I2C_SDA, |
| 126 | }; | 126 | }; |
| 127 | 127 | ||
| 128 | static struct pxamci_platform_data csb726_mci_data; | ||
| 129 | |||
| 130 | static int csb726_mci_init(struct device *dev, | ||
| 131 | irq_handler_t detect, void *data) | ||
| 132 | { | ||
| 133 | csb726_mci_data.detect_delay = msecs_to_jiffies(500); | ||
| 134 | return 0; | ||
| 135 | } | ||
| 136 | |||
| 137 | static struct pxamci_platform_data csb726_mci = { | 128 | static struct pxamci_platform_data csb726_mci = { |
| 129 | .detect_delay_ms = 500, | ||
| 138 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 130 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 139 | .init = csb726_mci_init, | ||
| 140 | /* FIXME setpower */ | 131 | /* FIXME setpower */ |
| 141 | .gpio_card_detect = CSB726_GPIO_MMC_DETECT, | 132 | .gpio_card_detect = CSB726_GPIO_MMC_DETECT, |
| 142 | .gpio_card_ro = CSB726_GPIO_MMC_RO, | 133 | .gpio_card_ro = CSB726_GPIO_MMC_RO, |
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index aab04f33e49b..0517c17978f3 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
| @@ -626,6 +626,7 @@ static int em_x270_mci_get_ro(struct device *dev) | |||
| 626 | } | 626 | } |
| 627 | 627 | ||
| 628 | static struct pxamci_platform_data em_x270_mci_platform_data = { | 628 | static struct pxamci_platform_data em_x270_mci_platform_data = { |
| 629 | .detect_delay_ms = 250, | ||
| 629 | .ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23| | 630 | .ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23| |
| 630 | MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27| | 631 | MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27| |
| 631 | MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30| | 632 | MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30| |
| @@ -643,7 +644,6 @@ static void __init em_x270_init_mmc(void) | |||
| 643 | if (machine_is_em_x270()) | 644 | if (machine_is_em_x270()) |
| 644 | em_x270_mci_platform_data.get_ro = em_x270_mci_get_ro; | 645 | em_x270_mci_platform_data.get_ro = em_x270_mci_get_ro; |
| 645 | 646 | ||
| 646 | em_x270_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
| 647 | pxa_set_mci_info(&em_x270_mci_platform_data); | 647 | pxa_set_mci_info(&em_x270_mci_platform_data); |
| 648 | } | 648 | } |
| 649 | #else | 649 | #else |
diff --git a/arch/arm/mach-pxa/include/mach/mmc.h b/arch/arm/mach-pxa/include/mach/mmc.h index 02a69dc2ee63..9eb515bb799d 100644 --- a/arch/arm/mach-pxa/include/mach/mmc.h +++ b/arch/arm/mach-pxa/include/mach/mmc.h | |||
| @@ -9,7 +9,7 @@ struct mmc_host; | |||
| 9 | 9 | ||
| 10 | struct pxamci_platform_data { | 10 | struct pxamci_platform_data { |
| 11 | unsigned int ocr_mask; /* available voltages */ | 11 | unsigned int ocr_mask; /* available voltages */ |
| 12 | unsigned long detect_delay; /* delay in jiffies before detecting cards after interrupt */ | 12 | unsigned long detect_delay_ms; /* delay in millisecond before detecting cards after interrupt */ |
| 13 | int (*init)(struct device *, irq_handler_t , void *); | 13 | int (*init)(struct device *, irq_handler_t , void *); |
| 14 | int (*get_ro)(struct device *); | 14 | int (*get_ro)(struct device *); |
| 15 | void (*setpower)(struct device *, unsigned int); | 15 | void (*setpower)(struct device *, unsigned int); |
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index be727aeed217..9b9046185b00 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
| @@ -271,7 +271,7 @@ static inline void littleton_init_keypad(void) {} | |||
| 271 | 271 | ||
| 272 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) | 272 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) |
| 273 | static struct pxamci_platform_data littleton_mci_platform_data = { | 273 | static struct pxamci_platform_data littleton_mci_platform_data = { |
| 274 | .detect_delay = 20, | 274 | .detect_delay_ms = 200, |
| 275 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 275 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 276 | .gpio_card_detect = GPIO_MMC1_CARD_DETECT, | 276 | .gpio_card_detect = GPIO_MMC1_CARD_DETECT, |
| 277 | .gpio_card_ro = -1, | 277 | .gpio_card_ro = -1, |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 63d65a2a0387..330c3282856e 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
| @@ -478,7 +478,7 @@ static void lubbock_mci_exit(struct device *dev, void *data) | |||
| 478 | 478 | ||
| 479 | static struct pxamci_platform_data lubbock_mci_platform_data = { | 479 | static struct pxamci_platform_data lubbock_mci_platform_data = { |
| 480 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 480 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 481 | .detect_delay = 1, | 481 | .detect_delay_ms = 10, |
| 482 | .init = lubbock_mci_init, | 482 | .init = lubbock_mci_init, |
| 483 | .get_ro = lubbock_mci_get_ro, | 483 | .get_ro = lubbock_mci_get_ro, |
| 484 | .exit = lubbock_mci_exit, | 484 | .exit = lubbock_mci_exit, |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 7a50ed8fce94..d60db87dde08 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
| @@ -426,6 +426,7 @@ struct gpio_vbus_mach_info gpio_vbus_data = { | |||
| 426 | * to give the card a chance to fully insert/eject. | 426 | * to give the card a chance to fully insert/eject. |
| 427 | */ | 427 | */ |
| 428 | static struct pxamci_platform_data mioa701_mci_info = { | 428 | static struct pxamci_platform_data mioa701_mci_info = { |
| 429 | .detect_delay_ms = 250, | ||
| 429 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 430 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 430 | .gpio_card_detect = GPIO15_SDIO_INSERT, | 431 | .gpio_card_detect = GPIO15_SDIO_INSERT, |
| 431 | .gpio_card_ro = GPIO78_SDIO_RO, | 432 | .gpio_card_ro = GPIO78_SDIO_RO, |
| @@ -791,7 +792,6 @@ static void __init mioa701_machine_init(void) | |||
| 791 | mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); | 792 | mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); |
| 792 | bootstrap_init(); | 793 | bootstrap_init(); |
| 793 | set_pxa_fb_info(&mioa701_pxafb_info); | 794 | set_pxa_fb_info(&mioa701_pxafb_info); |
| 794 | mioa701_mci_info.detect_delay = msecs_to_jiffies(250); | ||
| 795 | pxa_set_mci_info(&mioa701_mci_info); | 795 | pxa_set_mci_info(&mioa701_mci_info); |
| 796 | pxa_set_keypad_info(&mioa701_keypad_info); | 796 | pxa_set_keypad_info(&mioa701_keypad_info); |
| 797 | wm97xx_bat_set_pdata(&mioa701_battery_data); | 797 | wm97xx_bat_set_pdata(&mioa701_battery_data); |
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c index 8c9c6f0d56bb..462167ac05f9 100644 --- a/arch/arm/mach-pxa/mxm8x10.c +++ b/arch/arm/mach-pxa/mxm8x10.c | |||
| @@ -325,7 +325,7 @@ static mfp_cfg_t mfp_cfg[] __initdata = { | |||
| 325 | #if defined(CONFIG_MMC) | 325 | #if defined(CONFIG_MMC) |
| 326 | static struct pxamci_platform_data mxm_8x10_mci_platform_data = { | 326 | static struct pxamci_platform_data mxm_8x10_mci_platform_data = { |
| 327 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 327 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 328 | .detect_delay = 1, | 328 | .detect_delay_ms = 10, |
| 329 | .gpio_card_detect = MXM_8X10_SD_nCD, | 329 | .gpio_card_detect = MXM_8X10_SD_nCD, |
| 330 | .gpio_card_ro = MXM_8X10_SD_WP, | 330 | .gpio_card_ro = MXM_8X10_SD_WP, |
| 331 | .gpio_power = -1 | 331 | .gpio_power = -1 |
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index f70c75b38769..1963819dba98 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c | |||
| @@ -168,7 +168,7 @@ static struct pxamci_platform_data palmld_mci_platform_data = { | |||
| 168 | .gpio_card_detect = GPIO_NR_PALMLD_SD_DETECT_N, | 168 | .gpio_card_detect = GPIO_NR_PALMLD_SD_DETECT_N, |
| 169 | .gpio_card_ro = GPIO_NR_PALMLD_SD_READONLY, | 169 | .gpio_card_ro = GPIO_NR_PALMLD_SD_READONLY, |
| 170 | .gpio_power = GPIO_NR_PALMLD_SD_POWER, | 170 | .gpio_power = GPIO_NR_PALMLD_SD_POWER, |
| 171 | .detect_delay = 20, | 171 | .detect_delay_ms = 200, |
| 172 | }; | 172 | }; |
| 173 | 173 | ||
| 174 | /****************************************************************************** | 174 | /****************************************************************************** |
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c index d902a813aae3..5305a3993e69 100644 --- a/arch/arm/mach-pxa/palmt5.c +++ b/arch/arm/mach-pxa/palmt5.c | |||
| @@ -110,7 +110,7 @@ static struct pxamci_platform_data palmt5_mci_platform_data = { | |||
| 110 | .gpio_card_detect = GPIO_NR_PALMT5_SD_DETECT_N, | 110 | .gpio_card_detect = GPIO_NR_PALMT5_SD_DETECT_N, |
| 111 | .gpio_card_ro = GPIO_NR_PALMT5_SD_READONLY, | 111 | .gpio_card_ro = GPIO_NR_PALMT5_SD_READONLY, |
| 112 | .gpio_power = GPIO_NR_PALMT5_SD_POWER, | 112 | .gpio_power = GPIO_NR_PALMT5_SD_POWER, |
| 113 | .detect_delay = 20, | 113 | .detect_delay_ms = 200, |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | /****************************************************************************** | 116 | /****************************************************************************** |
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index 717d7a638675..033b567e50bb 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c | |||
| @@ -121,7 +121,7 @@ static struct pxamci_platform_data palmtc_mci_platform_data = { | |||
| 121 | .gpio_power = GPIO_NR_PALMTC_SD_POWER, | 121 | .gpio_power = GPIO_NR_PALMTC_SD_POWER, |
| 122 | .gpio_card_ro = GPIO_NR_PALMTC_SD_READONLY, | 122 | .gpio_card_ro = GPIO_NR_PALMTC_SD_READONLY, |
| 123 | .gpio_card_detect = GPIO_NR_PALMTC_SD_DETECT_N, | 123 | .gpio_card_detect = GPIO_NR_PALMTC_SD_DETECT_N, |
| 124 | .detect_delay = 20, | 124 | .detect_delay_ms = 200, |
| 125 | }; | 125 | }; |
| 126 | 126 | ||
| 127 | /****************************************************************************** | 127 | /****************************************************************************** |
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 007b58c11f8d..ecc1a401598e 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c | |||
| @@ -170,7 +170,7 @@ static struct pxamci_platform_data palmtx_mci_platform_data = { | |||
| 170 | .gpio_card_detect = GPIO_NR_PALMTX_SD_DETECT_N, | 170 | .gpio_card_detect = GPIO_NR_PALMTX_SD_DETECT_N, |
| 171 | .gpio_card_ro = GPIO_NR_PALMTX_SD_READONLY, | 171 | .gpio_card_ro = GPIO_NR_PALMTX_SD_READONLY, |
| 172 | .gpio_power = GPIO_NR_PALMTX_SD_POWER, | 172 | .gpio_power = GPIO_NR_PALMTX_SD_POWER, |
| 173 | .detect_delay = 20, | 173 | .detect_delay_ms = 200, |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | /****************************************************************************** | 176 | /****************************************************************************** |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 9d0ecea1760c..f56ae1008759 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
| @@ -326,7 +326,7 @@ static void pcm990_mci_exit(struct device *dev, void *data) | |||
| 326 | #define MSECS_PER_JIFFY (1000/HZ) | 326 | #define MSECS_PER_JIFFY (1000/HZ) |
| 327 | 327 | ||
| 328 | static struct pxamci_platform_data pcm990_mci_platform_data = { | 328 | static struct pxamci_platform_data pcm990_mci_platform_data = { |
| 329 | .detect_delay = 250 / MSECS_PER_JIFFY, | 329 | .detect_delay_ms = 250, |
| 330 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 330 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 331 | .init = pcm990_mci_init, | 331 | .init = pcm990_mci_init, |
| 332 | .setpower = pcm990_mci_setpower, | 332 | .setpower = pcm990_mci_setpower, |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index dcb178807046..f4abdaafdac4 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
| @@ -276,6 +276,7 @@ static void poodle_mci_exit(struct device *dev, void *data) | |||
| 276 | } | 276 | } |
| 277 | 277 | ||
| 278 | static struct pxamci_platform_data poodle_mci_platform_data = { | 278 | static struct pxamci_platform_data poodle_mci_platform_data = { |
| 279 | .detect_delay_ms = 250, | ||
| 279 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 280 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 280 | .init = poodle_mci_init, | 281 | .init = poodle_mci_init, |
| 281 | .setpower = poodle_mci_setpower, | 282 | .setpower = poodle_mci_setpower, |
| @@ -449,7 +450,6 @@ static void __init poodle_init(void) | |||
| 449 | set_pxa_fb_parent(&poodle_locomo_device.dev); | 450 | set_pxa_fb_parent(&poodle_locomo_device.dev); |
| 450 | set_pxa_fb_info(&poodle_fb_info); | 451 | set_pxa_fb_info(&poodle_fb_info); |
| 451 | pxa_set_udc_info(&udc_info); | 452 | pxa_set_udc_info(&udc_info); |
| 452 | poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
| 453 | pxa_set_mci_info(&poodle_mci_platform_data); | 453 | pxa_set_mci_info(&poodle_mci_platform_data); |
| 454 | pxa_set_ficp_info(&poodle_ficp_platform_data); | 454 | pxa_set_ficp_info(&poodle_ficp_platform_data); |
| 455 | pxa_set_i2c_info(NULL); | 455 | pxa_set_i2c_info(NULL); |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index d12667bd9ebe..d4b61b3f08f3 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
| @@ -714,7 +714,7 @@ static void raumfeld_mci_exit(struct device *dev, void *data) | |||
| 714 | static struct pxamci_platform_data raumfeld_mci_platform_data = { | 714 | static struct pxamci_platform_data raumfeld_mci_platform_data = { |
| 715 | .init = raumfeld_mci_init, | 715 | .init = raumfeld_mci_init, |
| 716 | .exit = raumfeld_mci_exit, | 716 | .exit = raumfeld_mci_exit, |
| 717 | .detect_delay = 20, | 717 | .detect_delay_ms = 200, |
| 718 | .gpio_card_detect = -1, | 718 | .gpio_card_detect = -1, |
| 719 | .gpio_card_ro = -1, | 719 | .gpio_card_ro = -1, |
| 720 | .gpio_power = -1, | 720 | .gpio_power = -1, |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 451029ea9eec..4d2413ed0ffa 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
| @@ -539,6 +539,7 @@ static void spitz_mci_setpower(struct device *dev, unsigned int vdd) | |||
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | static struct pxamci_platform_data spitz_mci_platform_data = { | 541 | static struct pxamci_platform_data spitz_mci_platform_data = { |
| 542 | .detect_delay_ms = 250, | ||
| 542 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 543 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 543 | .setpower = spitz_mci_setpower, | 544 | .setpower = spitz_mci_setpower, |
| 544 | .gpio_card_detect = SPITZ_GPIO_nSD_DETECT, | 545 | .gpio_card_detect = SPITZ_GPIO_nSD_DETECT, |
| @@ -759,7 +760,6 @@ static void __init common_init(void) | |||
| 759 | spitz_init_spi(); | 760 | spitz_init_spi(); |
| 760 | 761 | ||
| 761 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 762 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 762 | spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
| 763 | pxa_set_mci_info(&spitz_mci_platform_data); | 763 | pxa_set_mci_info(&spitz_mci_platform_data); |
| 764 | pxa_set_ohci_info(&spitz_ohci_platform_data); | 764 | pxa_set_ohci_info(&spitz_ohci_platform_data); |
| 765 | pxa_set_ficp_info(&spitz_ficp_platform_data); | 765 | pxa_set_ficp_info(&spitz_ficp_platform_data); |
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index 2041eb1d90ba..af40d2a12d37 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c | |||
| @@ -464,8 +464,6 @@ static struct platform_device smc91x_device = { | |||
| 464 | 464 | ||
| 465 | 465 | ||
| 466 | 466 | ||
| 467 | static struct pxamci_platform_data stargate2_mci_platform_data; | ||
| 468 | |||
| 469 | /* | 467 | /* |
| 470 | * The card detect interrupt isn't debounced so we delay it by 250ms | 468 | * The card detect interrupt isn't debounced so we delay it by 250ms |
| 471 | * to give the card a chance to fully insert / eject. | 469 | * to give the card a chance to fully insert / eject. |
| @@ -489,8 +487,6 @@ static int stargate2_mci_init(struct device *dev, | |||
| 489 | goto free_power_en; | 487 | goto free_power_en; |
| 490 | } | 488 | } |
| 491 | gpio_direction_input(SG2_GPIO_nSD_DETECT); | 489 | gpio_direction_input(SG2_GPIO_nSD_DETECT); |
| 492 | /* Delay to allow for full insertion */ | ||
| 493 | stargate2_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
| 494 | 490 | ||
| 495 | err = request_irq(IRQ_GPIO(SG2_GPIO_nSD_DETECT), | 491 | err = request_irq(IRQ_GPIO(SG2_GPIO_nSD_DETECT), |
| 496 | stargate2_detect_int, | 492 | stargate2_detect_int, |
| @@ -529,6 +525,7 @@ static void stargate2_mci_exit(struct device *dev, void *data) | |||
| 529 | } | 525 | } |
| 530 | 526 | ||
| 531 | static struct pxamci_platform_data stargate2_mci_platform_data = { | 527 | static struct pxamci_platform_data stargate2_mci_platform_data = { |
| 528 | .detect_delay_ms = 250, | ||
| 532 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 529 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 533 | .init = stargate2_mci_init, | 530 | .init = stargate2_mci_init, |
| 534 | .setpower = stargate2_mci_setpower, | 531 | .setpower = stargate2_mci_setpower, |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index ad552791c4ce..7512b822c6ca 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
| @@ -275,6 +275,7 @@ static void tosa_mci_exit(struct device *dev, void *data) | |||
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | static struct pxamci_platform_data tosa_mci_platform_data = { | 277 | static struct pxamci_platform_data tosa_mci_platform_data = { |
| 278 | .detect_delay_ms = 250, | ||
| 278 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 279 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 279 | .init = tosa_mci_init, | 280 | .init = tosa_mci_init, |
| 280 | .exit = tosa_mci_exit, | 281 | .exit = tosa_mci_exit, |
| @@ -926,7 +927,6 @@ static void __init tosa_init(void) | |||
| 926 | dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12); | 927 | dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12); |
| 927 | dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); | 928 | dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); |
| 928 | 929 | ||
| 929 | tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
| 930 | pxa_set_mci_info(&tosa_mci_platform_data); | 930 | pxa_set_mci_info(&tosa_mci_platform_data); |
| 931 | pxa_set_udc_info(&udc_info); | 931 | pxa_set_udc_info(&udc_info); |
| 932 | pxa_set_ficp_info(&tosa_ficp_platform_data); | 932 | pxa_set_ficp_info(&tosa_ficp_platform_data); |
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 797f2544d0ce..69689112eae7 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c | |||
| @@ -349,7 +349,7 @@ static void trizeps4_mci_exit(struct device *dev, void *data) | |||
| 349 | 349 | ||
| 350 | static struct pxamci_platform_data trizeps4_mci_platform_data = { | 350 | static struct pxamci_platform_data trizeps4_mci_platform_data = { |
| 351 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 351 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 352 | .detect_delay = 1, | 352 | .detect_delay_ms= 10, |
| 353 | .init = trizeps4_mci_init, | 353 | .init = trizeps4_mci_init, |
| 354 | .exit = trizeps4_mci_exit, | 354 | .exit = trizeps4_mci_exit, |
| 355 | .get_ro = NULL, /* write-protection not supported */ | 355 | .get_ro = NULL, /* write-protection not supported */ |
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 0954c2433a98..9884fa978f16 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
| @@ -240,7 +240,7 @@ static struct pxamci_platform_data vpac270_mci_platform_data = { | |||
| 240 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 240 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 241 | .gpio_card_detect = GPIO53_VPAC270_SD_DETECT_N, | 241 | .gpio_card_detect = GPIO53_VPAC270_SD_DETECT_N, |
| 242 | .gpio_card_ro = GPIO52_VPAC270_SD_READONLY, | 242 | .gpio_card_ro = GPIO52_VPAC270_SD_READONLY, |
| 243 | .detect_delay = 20, | 243 | .detect_delay_ms = 200, |
| 244 | }; | 244 | }; |
| 245 | 245 | ||
| 246 | static void __init vpac270_mmc_init(void) | 246 | static void __init vpac270_mmc_init(void) |
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index c837318ec1fa..f5d1ae3db3a4 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
| @@ -291,7 +291,7 @@ static struct pxamci_platform_data z2_mci_platform_data = { | |||
| 291 | .gpio_card_detect = GPIO96_ZIPITZ2_SD_DETECT, | 291 | .gpio_card_detect = GPIO96_ZIPITZ2_SD_DETECT, |
| 292 | .gpio_power = -1, | 292 | .gpio_power = -1, |
| 293 | .gpio_card_ro = -1, | 293 | .gpio_card_ro = -1, |
| 294 | .detect_delay = 20, | 294 | .detect_delay_ms = 200, |
| 295 | }; | 295 | }; |
| 296 | 296 | ||
| 297 | static void __init z2_mmc_init(void) | 297 | static void __init z2_mmc_init(void) |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 39896d883584..3680f6a90623 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
| @@ -644,7 +644,7 @@ static struct pxafb_mach_info zeus_fb_info = { | |||
| 644 | 644 | ||
| 645 | static struct pxamci_platform_data zeus_mci_platform_data = { | 645 | static struct pxamci_platform_data zeus_mci_platform_data = { |
| 646 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 646 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 647 | .detect_delay = HZ/4, | 647 | .detect_delay_ms = 250, |
| 648 | .gpio_card_detect = ZEUS_MMC_CD_GPIO, | 648 | .gpio_card_detect = ZEUS_MMC_CD_GPIO, |
| 649 | .gpio_card_ro = ZEUS_MMC_WP_GPIO, | 649 | .gpio_card_ro = ZEUS_MMC_WP_GPIO, |
| 650 | .gpio_card_ro_invert = 1, | 650 | .gpio_card_ro_invert = 1, |
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 2b4043c04d0c..c479cbecf784 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
| @@ -218,7 +218,7 @@ static inline void zylonite_init_lcd(void) {} | |||
| 218 | 218 | ||
| 219 | #if defined(CONFIG_MMC) | 219 | #if defined(CONFIG_MMC) |
| 220 | static struct pxamci_platform_data zylonite_mci_platform_data = { | 220 | static struct pxamci_platform_data zylonite_mci_platform_data = { |
| 221 | .detect_delay = 20, | 221 | .detect_delay_ms= 200, |
| 222 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 222 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 223 | .gpio_card_detect = EXT_GPIO(0), | 223 | .gpio_card_detect = EXT_GPIO(0), |
| 224 | .gpio_card_ro = EXT_GPIO(2), | 224 | .gpio_card_ro = EXT_GPIO(2), |
| @@ -226,7 +226,7 @@ static struct pxamci_platform_data zylonite_mci_platform_data = { | |||
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | static struct pxamci_platform_data zylonite_mci2_platform_data = { | 228 | static struct pxamci_platform_data zylonite_mci2_platform_data = { |
| 229 | .detect_delay = 20, | 229 | .detect_delay_ms= 200, |
| 230 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 230 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 231 | .gpio_card_detect = EXT_GPIO(1), | 231 | .gpio_card_detect = EXT_GPIO(1), |
| 232 | .gpio_card_ro = EXT_GPIO(3), | 232 | .gpio_card_ro = EXT_GPIO(3), |
| @@ -234,7 +234,7 @@ static struct pxamci_platform_data zylonite_mci2_platform_data = { | |||
| 234 | }; | 234 | }; |
| 235 | 235 | ||
| 236 | static struct pxamci_platform_data zylonite_mci3_platform_data = { | 236 | static struct pxamci_platform_data zylonite_mci3_platform_data = { |
| 237 | .detect_delay = 20, | 237 | .detect_delay_ms= 200, |
| 238 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 238 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 239 | .gpio_card_detect = EXT_GPIO(30), | 239 | .gpio_card_detect = EXT_GPIO(30), |
| 240 | .gpio_card_ro = EXT_GPIO(31), | 240 | .gpio_card_ro = EXT_GPIO(31), |
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 0ed48959b590..e4f00e70a749 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c | |||
| @@ -544,7 +544,7 @@ static irqreturn_t pxamci_detect_irq(int irq, void *devid) | |||
| 544 | { | 544 | { |
| 545 | struct pxamci_host *host = mmc_priv(devid); | 545 | struct pxamci_host *host = mmc_priv(devid); |
| 546 | 546 | ||
| 547 | mmc_detect_change(devid, host->pdata->detect_delay); | 547 | mmc_detect_change(devid, msecs_to_jiffies(host->pdata->detect_delay_ms)); |
| 548 | return IRQ_HANDLED; | 548 | return IRQ_HANDLED; |
| 549 | } | 549 | } |
| 550 | 550 | ||
