aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2009-10-14 03:38:06 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:53:19 -0500
commit3b839070f11295735ce8d9ef580c5eb23417aabf (patch)
treef5a466669cea7e172d260c319601b9e1522d01ac
parent92bbe1b988d3d6fa6348e3e376ff6d27e0712147 (diff)
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. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> To: linux-mmc@vger.kernel.org CC: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: http://patchwork.linux-mips.org/patch/460/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/mach-au1x00/au1100_mmc.h1
-rw-r--r--drivers/mmc/host/au1xmmc.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-au1x00/au1100_mmc.h b/arch/mips/include/asm/mach-au1x00/au1100_mmc.h
index 58fbe173ecde..94000a3b6f0b 100644
--- a/arch/mips/include/asm/mach-au1x00/au1100_mmc.h
+++ b/arch/mips/include/asm/mach-au1x00/au1100_mmc.h
@@ -46,6 +46,7 @@ struct au1xmmc_platform_data {
46 int(*card_readonly)(void *mmc_host); 46 int(*card_readonly)(void *mmc_host);
47 void(*set_power)(void *mmc_host, int state); 47 void(*set_power)(void *mmc_host, int state);
48 struct led_classdev *led; 48 struct led_classdev *led;
49 unsigned long mask_host_caps;
49}; 50};
50 51
51#define SD0_BASE 0xB0600000 52#define SD0_BASE 0xB0600000
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index c8649dfb2d0c..57b21198828f 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -1017,6 +1017,10 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev)
1017 } else 1017 } else
1018 mmc->caps |= MMC_CAP_NEEDS_POLL; 1018 mmc->caps |= MMC_CAP_NEEDS_POLL;
1019 1019
1020 /* platform may not be able to use all advertised caps */
1021 if (host->platdata)
1022 mmc->caps &= ~(host->platdata->mask_host_caps);
1023
1020 tasklet_init(&host->data_task, au1xmmc_tasklet_data, 1024 tasklet_init(&host->data_task, au1xmmc_tasklet_data,
1021 (unsigned long)host); 1025 (unsigned long)host);
1022 1026