summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2011-04-26 09:29:53 +0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-06-29 13:00:52 +0400
commit090ab3ff8ebb842c0f159d34d57d6e51bd94ace1 (patch)
tree76b2dd13d94313c9ef9d417cc04e38e500ebf07c /arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h
parent74facffeca3795ffb5cf8898f5859fbb822e4c5d (diff)
downloadlinux-090ab3ff8ebb842c0f159d34d57d6e51bd94ace1.tar.xz
ARM: 6886/1: mmc, Add zboot from eSD support for SuperH Mobile ARM
This allows a ROM-able zImage to be written to eSD and for SuperH Mobile ARM to boot directly from the SDHI hardware block. This is achieved by the MaskROM loading the first portion of the image into MERAM and then jumping to it. This portion contains loader code which copies the entire image to SDRAM and jumps to it. From there the zImage boot code proceeds as normal, uncompressing the image into its final location and then jumping to it. Cc: Paul Mundt <lethal@linux-sh.org> Acked-by: Magnus Damm <magnus.damm@gmail.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h')
-rw-r--r--arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h b/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h
new file mode 100644
index 000000000000..4a81b01f1e8f
--- /dev/null
+++ b/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h
@@ -0,0 +1,21 @@
+#ifndef SDHI_SH7372_H
+#define SDHI_SH7372_H
+
+#define SDGENCNTA 0xfe40009c
+
+/* The countdown of SDGENCNTA is controlled by
+ * ZB3D2CLK which runs at 149.5MHz.
+ * That is 149.5ticks/us. Approximate this as 150ticks/us.
+ */
+static void udelay(int us)
+{
+ __raw_writel(us * 150, SDGENCNTA);
+ while(__raw_readl(SDGENCNTA)) ;
+}
+
+static void msleep(int ms)
+{
+ udelay(ms * 1000);
+}
+
+#endif