Эх сурвалжийг харах

sh: allow platforms to specify SD-card supported voltages

Boards can have different supplied voltages on different SD card slots. This
information has to be passed down to the SD/MMC driver.

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>
Guennadi Liakhovetski 15 жил өмнө
parent
commit
bb0fe53351

+ 3 - 1
drivers/mfd/sh_mobile_sdhi.c

@@ -107,8 +107,10 @@ static int __init sh_mobile_sdhi_probe(struct platform_device *pdev)
 	mmc_data->hclk = clk_get_rate(priv->clk);
 	mmc_data->set_pwr = sh_mobile_sdhi_set_pwr;
 	mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED;
-	if (p)
+	if (p) {
 		mmc_data->flags = p->tmio_flags;
+		mmc_data->ocr_mask = p->tmio_ocr_mask;
+	}
 
 	if (p && p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
 		priv->param_tx.slave_id = p->dma_slave_tx;

+ 3 - 0
include/linux/mfd/sh_mobile_sdhi.h

@@ -1,10 +1,13 @@
 #ifndef __SH_MOBILE_SDHI_H__
 #define __SH_MOBILE_SDHI_H__
 
+#include <linux/types.h>
+
 struct sh_mobile_sdhi_info {
 	int dma_slave_tx;
 	int dma_slave_rx;
 	unsigned long tmio_flags;
+	u32 tmio_ocr_mask;	/* available MMC voltages */
 	void (*set_pwr)(struct platform_device *pdev, int state);
 };