mmc: let MFD's provide supported Vdd card voltages to tmio_mmc
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Wed, 19 May 2010 18:37:25 +0000 (18:37 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Sat, 22 May 2010 08:05:21 +0000 (17:05 +0900)
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/mmc/host/tmio_mmc.c
include/linux/mfd/tmio.h

index faa16b7d941255b57802e68bb1aea8e1358e8f36..883fcac210043dff457bbe99f3e0a09ed8d7eaf0 100644 (file)
@@ -847,7 +847,10 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
        mmc->caps |= pdata->capabilities;
        mmc->f_max = pdata->hclk;
        mmc->f_min = mmc->f_max / 512;
-       mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
+       if (pdata->ocr_mask)
+               mmc->ocr_avail = pdata->ocr_mask;
+       else
+               mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
 
        /* Tell the MFD core we are ready to be enabled */
        if (cell->enable) {
index feeed0b9ee701d28bb4cb610c30e3ae83c78e865..f07425bc3dcdef6fa37f8bc8f7237e0e41971727 100644 (file)
@@ -70,6 +70,7 @@ struct tmio_mmc_data {
        unsigned int                    hclk;
        unsigned long                   capabilities;
        unsigned long                   flags;
+       u32                             ocr_mask;       /* available voltages */
        struct tmio_mmc_dma             *dma;
        void (*set_pwr)(struct platform_device *host, int state);
        void (*set_clk_div)(struct platform_device *host, int state);