diff options
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 1bf1b2b8f8e9..fb27bac4cfd1 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -1038,21 +1038,12 @@ static int slot_cn7_get_cd(struct platform_device *pdev) | |||
1038 | } | 1038 | } |
1039 | 1039 | ||
1040 | /* SDHI0 */ | 1040 | /* SDHI0 */ |
1041 | static irqreturn_t mackerel_sdhi0_gpio_cd(int irq, void *arg) | ||
1042 | { | ||
1043 | struct device *dev = arg; | ||
1044 | struct sh_mobile_sdhi_info *info = dev->platform_data; | ||
1045 | struct tmio_mmc_data *pdata = info->pdata; | ||
1046 | |||
1047 | tmio_mmc_cd_wakeup(pdata); | ||
1048 | |||
1049 | return IRQ_HANDLED; | ||
1050 | } | ||
1051 | |||
1052 | static struct sh_mobile_sdhi_info sdhi0_info = { | 1041 | static struct sh_mobile_sdhi_info sdhi0_info = { |
1053 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 1042 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
1054 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 1043 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
1044 | .tmio_flags = TMIO_MMC_USE_GPIO_CD, | ||
1055 | .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, | 1045 | .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, |
1046 | .cd_gpio = GPIO_PORT172, | ||
1056 | }; | 1047 | }; |
1057 | 1048 | ||
1058 | static struct resource sdhi0_resources[] = { | 1049 | static struct resource sdhi0_resources[] = { |
@@ -1411,7 +1402,6 @@ static void __init mackerel_init(void) | |||
1411 | { | 1402 | { |
1412 | u32 srcr4; | 1403 | u32 srcr4; |
1413 | struct clk *clk; | 1404 | struct clk *clk; |
1414 | int ret; | ||
1415 | 1405 | ||
1416 | /* External clock source */ | 1406 | /* External clock source */ |
1417 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | 1407 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); |
@@ -1508,7 +1498,6 @@ static void __init mackerel_init(void) | |||
1508 | irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); | 1498 | irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); |
1509 | 1499 | ||
1510 | /* enable SDHI0 */ | 1500 | /* enable SDHI0 */ |
1511 | gpio_request(GPIO_FN_SDHICD0, NULL); | ||
1512 | gpio_request(GPIO_FN_SDHIWP0, NULL); | 1501 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
1513 | gpio_request(GPIO_FN_SDHICMD0, NULL); | 1502 | gpio_request(GPIO_FN_SDHICMD0, NULL); |
1514 | gpio_request(GPIO_FN_SDHICLK0, NULL); | 1503 | gpio_request(GPIO_FN_SDHICLK0, NULL); |
@@ -1517,13 +1506,6 @@ static void __init mackerel_init(void) | |||
1517 | gpio_request(GPIO_FN_SDHID0_1, NULL); | 1506 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
1518 | gpio_request(GPIO_FN_SDHID0_0, NULL); | 1507 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
1519 | 1508 | ||
1520 | ret = request_irq(evt2irq(0x3340), mackerel_sdhi0_gpio_cd, | ||
1521 | IRQF_TRIGGER_FALLING, "sdhi0 cd", &sdhi0_device.dev); | ||
1522 | if (!ret) | ||
1523 | sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD; | ||
1524 | else | ||
1525 | pr_err("Cannot get IRQ #%d: %d\n", evt2irq(0x3340), ret); | ||
1526 | |||
1527 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) | 1509 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) |
1528 | /* enable SDHI1 */ | 1510 | /* enable SDHI1 */ |
1529 | gpio_request(GPIO_FN_SDHICMD1, NULL); | 1511 | gpio_request(GPIO_FN_SDHICMD1, NULL); |