mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Thu, 9 Feb 2012 21:57:10 +0000 (22:57 +0100)
committerChris Ball <cjb@laptop.org>
Tue, 27 Mar 2012 16:20:16 +0000 (12:20 -0400)
To use TMIO MMC driver ability to interface to the generic MMC GPIO card
hotplug detection helper, the SDHI driver has to pass the GPIO number
from its own platform data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sh_mobile_sdhi.c
include/linux/mmc/sh_mobile_sdhi.h

index 58da3c44acc5d129428198b7ec80f987fe73d68a..cb279b4e501bca91e7d338a62ac24c5ff0633461 100644 (file)
@@ -129,6 +129,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
                        mmc_data->write16_hook = sh_mobile_sdhi_write16_hook;
                mmc_data->ocr_mask = p->tmio_ocr_mask;
                mmc_data->capabilities |= p->tmio_caps;
+               mmc_data->cd_gpio = p->cd_gpio;
 
                if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
                        priv->param_tx.slave_id = p->dma_slave_tx;
@@ -211,7 +212,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 
        dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",
                 mmc_hostname(host->mmc), (unsigned long)
-                (platform_get_resource(pdev,IORESOURCE_MEM, 0)->start),
+                (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
                 mmc_data->hclk / 1000000);
 
        return ret;
index 71b805451bd82d9175ae2dff99a467edb62a83b2..082a736a9bfb3e7e31ed018e6036c4e033af9359 100644 (file)
@@ -16,6 +16,7 @@ struct sh_mobile_sdhi_info {
        unsigned long tmio_flags;
        unsigned long tmio_caps;
        u32 tmio_ocr_mask;      /* available MMC voltages */
+       unsigned int cd_gpio;
        struct tmio_mmc_data *pdata;
        void (*set_pwr)(struct platform_device *pdev, int state);
        int (*get_cd)(struct platform_device *pdev);