aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-11-20 03:31:13 -0500
committerChris Ball <chris@printf.net>2014-01-13 12:48:24 -0500
commite3c418f1b26b59841bd074baa740a43afc15199b (patch)
tree907c9258ca082d79b696f055fdff8f948c53bd53 /drivers/mmc
parent5d60e500541ed154112809627f12d86056ac5f09 (diff)
mmc: SDHI: add SoC specific workaround via HW version
One of Renesas SDHI chip needs workaround to use it, and, we can judge it based on chip version. This patch adds very quick-hack workaround method, since we still don't know how many chips need workaround in the future. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sh_mobile_sdhi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 38553ae68e3a..2d6ce257a273 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -33,6 +33,8 @@
33 33
34#include "tmio_mmc.h" 34#include "tmio_mmc.h"
35 35
36#define EXT_ACC 0xe4
37
36struct sh_mobile_sdhi_of_data { 38struct sh_mobile_sdhi_of_data {
37 unsigned long tmio_flags; 39 unsigned long tmio_flags;
38}; 40};
@@ -137,6 +139,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
137 int irq, ret, i = 0; 139 int irq, ret, i = 0;
138 bool multiplexed_isr = true; 140 bool multiplexed_isr = true;
139 struct tmio_mmc_dma *dma_priv; 141 struct tmio_mmc_dma *dma_priv;
142 u16 ver;
140 143
141 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 144 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
142 if (!res) 145 if (!res)
@@ -219,6 +222,14 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
219 goto eprobe; 222 goto eprobe;
220 223
221 /* 224 /*
225 * FIXME:
226 * this Workaround can be more clever method
227 */
228 ver = sd_ctrl_read16(host, CTL_VERSION);
229 if (ver == 0xCB0D)
230 sd_ctrl_write16(host, EXT_ACC, 1);
231
232 /*
222 * Allow one or more specific (named) ISRs or 233 * Allow one or more specific (named) ISRs or
223 * one or more multiplexed (un-named) ISRs. 234 * one or more multiplexed (un-named) ISRs.
224 */ 235 */