aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-02-20 19:54:58 -0500
committerChris Ball <chris@printf.net>2014-02-22 13:02:54 -0500
commitb3a5d4ce65162d27a495b8fa3ac21dcdf58738b1 (patch)
tree2dafc1f3970ea28edc34f2270b62a0885eeef342
parent2772ef30eacd72fef013ac2fade2f384342ba6c7 (diff)
mmc: sdhi: update sh_mobile_sdhi_of_data for r8a7778
This patch updates r8a7778 DT data to have SoC specific settings. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Chris Ball <chris@printf.net>
-rw-r--r--drivers/mmc/host/sh_mobile_sdhi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index a7a3f689a309..e956bc4e28c1 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -37,6 +37,7 @@
37 37
38struct sh_mobile_sdhi_of_data { 38struct sh_mobile_sdhi_of_data {
39 unsigned long tmio_flags; 39 unsigned long tmio_flags;
40 unsigned long capabilities;
40}; 41};
41 42
42static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = { 43static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = {
@@ -45,13 +46,18 @@ static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = {
45 }, 46 },
46}; 47};
47 48
49static const struct sh_mobile_sdhi_of_data of_rcar_gen1_compatible = {
50 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,
51 .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
52};
53
48static const struct of_device_id sh_mobile_sdhi_of_match[] = { 54static const struct of_device_id sh_mobile_sdhi_of_match[] = {
49 { .compatible = "renesas,sdhi-shmobile" }, 55 { .compatible = "renesas,sdhi-shmobile" },
50 { .compatible = "renesas,sdhi-sh7372" }, 56 { .compatible = "renesas,sdhi-sh7372" },
51 { .compatible = "renesas,sdhi-sh73a0", .data = &sh_mobile_sdhi_of_cfg[0], }, 57 { .compatible = "renesas,sdhi-sh73a0", .data = &sh_mobile_sdhi_of_cfg[0], },
52 { .compatible = "renesas,sdhi-r8a73a4", .data = &sh_mobile_sdhi_of_cfg[0], }, 58 { .compatible = "renesas,sdhi-r8a73a4", .data = &sh_mobile_sdhi_of_cfg[0], },
53 { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], }, 59 { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], },
54 { .compatible = "renesas,sdhi-r8a7778", .data = &sh_mobile_sdhi_of_cfg[0], }, 60 { .compatible = "renesas,sdhi-r8a7778", .data = &of_rcar_gen1_compatible, },
55 { .compatible = "renesas,sdhi-r8a7779", .data = &sh_mobile_sdhi_of_cfg[0], }, 61 { .compatible = "renesas,sdhi-r8a7779", .data = &sh_mobile_sdhi_of_cfg[0], },
56 { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], }, 62 { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], },
57 {}, 63 {},
@@ -212,6 +218,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
212 if (of_id && of_id->data) { 218 if (of_id && of_id->data) {
213 const struct sh_mobile_sdhi_of_data *of_data = of_id->data; 219 const struct sh_mobile_sdhi_of_data *of_data = of_id->data;
214 mmc_data->flags |= of_data->tmio_flags; 220 mmc_data->flags |= of_data->tmio_flags;
221 mmc_data->capabilities |= of_data->capabilities;
215 } 222 }
216 223
217 /* SD control register space size is 0x100, 0x200 for bus_shift=1 */ 224 /* SD control register space size is 0x100, 0x200 for bus_shift=1 */