Skip to contentSkip to conversation

mmc: au1xmmc: allow platforms to disable host capabilities

PATCH In review Manuel Lauss 2 participants 2 messages Oct 14, 2009 – Jan 29, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: au1xmmc: allow platforms to disable host capabilities

Although the hardware supports a 4/8bit SD interface and the driver unconditionally advertises all hardware caps to the MMC core, not all datalines may actually be wired up. This patch introduces another field to au1xmmc platform data allowing platforms to disable certain advanced host controller features.

---
 arch/mips/include/asm/mach-au1x00/au1100_mmc.h |    1 +
 drivers/mmc/host/au1xmmc.c                     |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
arch/mips/include/asm/mach-au1x00/au1100_mmc.h +1 -0
index c35e209..a674643 100644
@@ -46,6 +46,7 @@ struct au1xmmc_platform_data {
 	int(*card_readonly)(void *mmc_host);
 	void(*set_power)(void *mmc_host, int state);
 	struct led_classdev *led;
+	unsigned long mask_host_caps;
 };
 
 #define SD0_BASE	0xB0600000
drivers/mmc/host/au1xmmc.c +4 -0
index 7534726..e2caf5a 100644
@@ -1025,6 +1025,10 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev)
 	} else
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
 
+	/* platform may not be able to use all advertised caps */
+	if (host->platdata)
+		mmc->caps &= ~(host->platdata->mask_host_caps);
+
 	tasklet_init(&host->data_task, au1xmmc_tasklet_data,
 			(unsigned long)host);
 
Signature · 1 line
1.6.5
#1 lore raw
Quoted 5 lines · Manuel Lauss

Although the hardware supports a 4/8bit SD interface and the driver unconditionally advertises all hardware caps to the MMC core, not all datalines may actually be wired up. This patch introduces another field to au1xmmc platform data allowing platforms to disable certain advanced host controller features.

Haven't heared anything from the MMC folks so I've queued this one for 2.6.34.

Thanks,

Ralf