summaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2010-12-06 00:12:45 +0000
committerPaul Mundt <lethal@linux-sh.org>2010-12-08 16:24:28 +0900
commit54b384634f7083bcacf9a9ed2e6f4c3d0a246e49 (patch)
tree51a37b9fc454ff9e5fced781e433a23ccc3d11d7 /include/linux/mmc
parent9f843706bb87837b823228467f4f83973fd110e9 (diff)
downloadop-kernel-dev-54b384634f7083bcacf9a9ed2e6f4c3d0a246e49.zip
op-kernel-dev-54b384634f7083bcacf9a9ed2e6f4c3d0a246e49.tar.gz
mmc, sh: Remove sh_mmcif_boot_slurp()
As the only caller of sh_mmcif_boot_do_read() is sh_mmcif_boot_slurp() the configuration portion of sh_mmcif_boot_slurp() can be merged into sh_mmcif_boot_do_read(). Once this is done sh_mmcif_boot_slurp() is only a call to sh_mmcif_boot_do_read() with platform specific information - the offset that images are stored on MMC. So make the sh_mmcif_boot_do_read() call directly from platform code and remove sh_mmcif_boot_slurp() altogether. 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.h34
1 files changed, 11 insertions, 23 deletions
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h
index 6a98e97..cfcc6e3 100644
--- a/include/linux/mmc/sh_mmcif.h
+++ b/include/linux/mmc/sh_mmcif.h
@@ -162,6 +162,17 @@ static inline int sh_mmcif_boot_do_read(void __iomem *base,
unsigned long k;
int ret = 0;
+ /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */
+ sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL,
+ CLK_ENABLE | CLKDIV_4 | SRSPTO_256 |
+ SRBSYTO_29 | SRWDTO_29 | SCCSTO_29);
+
+ /* CMD9 - Get CSD */
+ sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000);
+
+ /* CMD7 - Select the card */
+ sh_mmcif_boot_cmd(base, 0x07400000, 0x00010000);
+
/* CMD16 - Set the block size */
sh_mmcif_boot_cmd(base, 0x10400000, SH_MMCIF_BBS);
@@ -205,27 +216,4 @@ static inline void sh_mmcif_boot_init(void __iomem *base)
sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000);
}
-static inline void sh_mmcif_boot_slurp(void __iomem *base,
- unsigned char *buf,
- unsigned long no_bytes)
-{
- unsigned long tmp;
-
- /* In data transfer mode: Set clock to Bus clock/4 (about 20Mhz) */
- sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL,
- CLK_ENABLE | CLKDIV_4 | SRSPTO_256 |
- SRBSYTO_29 | SRWDTO_29 | SCCSTO_29);
-
- /* CMD9 - Get CSD */
- sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000);
-
- /* CMD7 - Select the card */
- sh_mmcif_boot_cmd(base, 0x07400000, 0x00010000);
-
- tmp = no_bytes / SH_MMCIF_BBS;
- tmp += (no_bytes % SH_MMCIF_BBS) ? 1 : 0;
-
- sh_mmcif_boot_do_read(base, 512, tmp, buf);
-}
-
#endif /* __SH_MMCIF_H__ */
OpenPOWER on IntegriCloud