aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2010-11-26 18:02:58 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-11-28 22:54:50 -0500
commit1ae0affedce1d3e401991fbe7f2674753f0a7641 (patch)
tree0df282400a9e16d6a8ad131359c4794b7154de48 /include/linux/mmc
parent7211a1bae6eac26539eb2d77a26fcd1bccef8137 (diff)
mmc, sh: Correct value for reset
This resolves a regression that I introduced in "mmc, sh: Move constants to sh_mmcif.h". Having examined the manual and tested the code on an AP4EVB board it seems that the correct sequence is. 1) Write 1 to bit 31 and zeros to all other bits 2) Write zero to all bits Cc: Yusuke Goda <yusuke.goda.sx@renesas.com> Cc: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/sh_mmcif.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h
index a6bfa5296495..342ec1a38684 100644
--- a/include/linux/mmc/sh_mmcif.h
+++ b/include/linux/mmc/sh_mmcif.h
@@ -80,7 +80,7 @@ struct sh_mmcif_plat_data {
80 80
81/* CE_VERSION */ 81/* CE_VERSION */
82#define SOFT_RST_ON (1 << 31) 82#define SOFT_RST_ON (1 << 31)
83#define SOFT_RST_OFF ~SOFT_RST_ON 83#define SOFT_RST_OFF 0
84 84
85static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) 85static inline u32 sh_mmcif_readl(void __iomem *addr, int reg)
86{ 86{
@@ -168,12 +168,9 @@ static inline int sh_mmcif_boot_do_read(void __iomem *base,
168 168
169static inline void sh_mmcif_boot_init(void __iomem *base) 169static inline void sh_mmcif_boot_init(void __iomem *base)
170{ 170{
171 unsigned long tmp;
172
173 /* reset */ 171 /* reset */
174 tmp = sh_mmcif_readl(base, MMCIF_CE_VERSION); 172 sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_ON);
175 sh_mmcif_writel(base, MMCIF_CE_VERSION, tmp | SOFT_RST_ON); 173 sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_OFF);
176 sh_mmcif_writel(base, MMCIF_CE_VERSION, tmp & SOFT_RST_OFF);
177 174
178 /* byte swap */ 175 /* byte swap */
179 sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, BUF_ACC_ATYP); 176 sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, BUF_ACC_ATYP);