Skip to content

Commit a2b14dc

Browse files
lyakhpmundt
authored andcommitted
mmc: let MFD's provide supported Vdd card voltages to tmio_mmc
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>
1 parent 8f4b303 commit a2b14dc

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/mmc/host/tmio_mmc.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,10 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
847847
mmc->caps |= pdata->capabilities;
848848
mmc->f_max = pdata->hclk;
849849
mmc->f_min = mmc->f_max / 512;
850-
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
850+
if (pdata->ocr_mask)
851+
mmc->ocr_avail = pdata->ocr_mask;
852+
else
853+
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
851854

852855
/* Tell the MFD core we are ready to be enabled */
853856
if (cell->enable) {

‎include/linux/mfd/tmio.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ struct tmio_mmc_data {
7070
unsigned int hclk;
7171
unsigned long capabilities;
7272
unsigned long flags;
73+
u32 ocr_mask; /* available voltages */
7374
struct tmio_mmc_dma *dma;
7475
void (*set_pwr)(struct platform_device *host, int state);
7576
void (*set_clk_div)(struct platform_device *host, int state);

0 commit comments

Comments
 (0)