aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-mackerel.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-04-16 17:09:13 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-12 16:12:36 -0400
commit2b3e38c4fbeb88092390f7c29b4934212abe9ded (patch)
tree126ba111ce5874541b7d17904eb79e508f14f1d3 /arch/arm/mach-shmobile/board-mackerel.c
parentd48b97b403d23f6df0b990cee652bdf9a52337a3 (diff)
ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper
This also fixes the following modular mmc build failure: arch/arm/mach-shmobile/built-in.o: In function `ag5evm_sdhi0_gpio_cd': pfc-sh73a0.c:(.text+0x7c0): undefined reference to `mmc_detect_change' on this platform by eliminating the use of an inline function, which calls into the mmc core. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Simon Horman <horms@verge.net.au> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c22
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 f49e28abe0ab..8c6202bb6aeb 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1011,21 +1011,12 @@ static int slot_cn7_get_cd(struct platform_device *pdev)
1011} 1011}
1012 1012
1013/* SDHI0 */ 1013/* SDHI0 */
1014static irqreturn_t mackerel_sdhi0_gpio_cd(int irq, void *arg)
1015{
1016 struct device *dev = arg;
1017 struct sh_mobile_sdhi_info *info = dev->platform_data;
1018 struct tmio_mmc_data *pdata = info->pdata;
1019
1020 tmio_mmc_cd_wakeup(pdata);
1021
1022 return IRQ_HANDLED;
1023}
1024
1025static struct sh_mobile_sdhi_info sdhi0_info = { 1014static struct sh_mobile_sdhi_info sdhi0_info = {
1026 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, 1015 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
1027 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, 1016 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
1017 .tmio_flags = TMIO_MMC_USE_GPIO_CD,
1028 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, 1018 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
1019 .cd_gpio = GPIO_PORT172,
1029}; 1020};
1030 1021
1031static struct resource sdhi0_resources[] = { 1022static struct resource sdhi0_resources[] = {
@@ -1384,7 +1375,6 @@ static void __init mackerel_init(void)
1384{ 1375{
1385 u32 srcr4; 1376 u32 srcr4;
1386 struct clk *clk; 1377 struct clk *clk;
1387 int ret;
1388 1378
1389 /* External clock source */ 1379 /* External clock source */
1390 clk_set_rate(&sh7372_dv_clki_clk, 27000000); 1380 clk_set_rate(&sh7372_dv_clki_clk, 27000000);
@@ -1481,7 +1471,6 @@ static void __init mackerel_init(void)
1481 irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); 1471 irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
1482 1472
1483 /* enable SDHI0 */ 1473 /* enable SDHI0 */
1484 gpio_request(GPIO_FN_SDHICD0, NULL);
1485 gpio_request(GPIO_FN_SDHIWP0, NULL); 1474 gpio_request(GPIO_FN_SDHIWP0, NULL);
1486 gpio_request(GPIO_FN_SDHICMD0, NULL); 1475 gpio_request(GPIO_FN_SDHICMD0, NULL);
1487 gpio_request(GPIO_FN_SDHICLK0, NULL); 1476 gpio_request(GPIO_FN_SDHICLK0, NULL);
@@ -1490,13 +1479,6 @@ static void __init mackerel_init(void)
1490 gpio_request(GPIO_FN_SDHID0_1, NULL); 1479 gpio_request(GPIO_FN_SDHID0_1, NULL);
1491 gpio_request(GPIO_FN_SDHID0_0, NULL); 1480 gpio_request(GPIO_FN_SDHID0_0, NULL);
1492 1481
1493 ret = request_irq(evt2irq(0x3340), mackerel_sdhi0_gpio_cd,
1494 IRQF_TRIGGER_FALLING, "sdhi0 cd", &sdhi0_device.dev);
1495 if (!ret)
1496 sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
1497 else
1498 pr_err("Cannot get IRQ #%d: %d\n", evt2irq(0x3340), ret);
1499
1500#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) 1482#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
1501 /* enable SDHI1 */ 1483 /* enable SDHI1 */
1502 gpio_request(GPIO_FN_SDHICMD1, NULL); 1484 gpio_request(GPIO_FN_SDHICMD1, NULL);