summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2011-03-24 07:04:37 +0000
committerPaul Mundt <lethal@linux-sh.org>2011-03-25 01:24:57 +0900
commita6558c2d07d5c955fbb0290f68c27164a5567b9a (patch)
treedc01b3f881dfab39186e1146bfe4ffd9556aaf73 /arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
parent05a5f01c68e70f2b290db5faed00990daaff3990 (diff)
downloadop-kernel-dev-a6558c2d07d5c955fbb0290f68c27164a5567b9a.zip
op-kernel-dev-a6558c2d07d5c955fbb0290f68c27164a5567b9a.tar.gz
mmc, ARM: Rename SuperH Mobile ARM zboot helpers
These headers and helpers will also be used for SDHI boot so the mmcif name will start to make a lot less sense. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach/mmc-mackerel.h')
-rw-r--r--arch/arm/mach-shmobile/include/mach/mmc-mackerel.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
new file mode 100644
index 0000000..15d3a9e
--- /dev/null
+++ b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
@@ -0,0 +1,38 @@
+#ifndef MMC_MACKEREL_H
+#define MMC_MACKEREL_H
+
+#define PORT0CR (void __iomem *)0xe6051000
+#define PORT1CR (void __iomem *)0xe6051001
+#define PORT2CR (void __iomem *)0xe6051002
+#define PORT159CR (void __iomem *)0xe605009f
+
+#define PORTR031_000DR (void __iomem *)0xe6055000
+#define PORTL159_128DR (void __iomem *)0xe6054010
+
+static inline void mmc_init_progress(void)
+{
+ /* Initialise LEDS0-3
+ * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control)
+ * value: 0x10 - enable output
+ */
+ __raw_writeb(0x10, PORT0CR);
+ __raw_writeb(0x10, PORT1CR);
+ __raw_writeb(0x10, PORT2CR);
+ __raw_writeb(0x10, PORT159CR);
+}
+
+static inline void mmc_update_progress(int n)
+{
+ unsigned a = 0, b = 0;
+
+ if (n < 3)
+ a = 1 << n;
+ else
+ b = 1 << 31;
+
+ __raw_writel((__raw_readl(PORTR031_000DR) & ~0x7) | a,
+ PORTR031_000DR);
+ __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b,
+ PORTL159_128DR);
+}
+#endif /* MMC_MACKEREL_H */
OpenPOWER on IntegriCloud