summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-vexpress
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-10-22 16:35:25 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-10-22 16:49:48 +0200
commita0030a8f91caf50b8c02404be73c5a331af979de (patch)
tree24d63f199ae2e193baa1610dc0cb3eeff2ba2e94 /arch/arm/mach-vexpress
parent4d2d66fe52f6ac54653cc0889b81bbee52547b7f (diff)
downloadbarebox-a0030a8f91caf50b8c02404be73c5a331af979de.tar.gz
barebox-a0030a8f91caf50b8c02404be73c5a331af979de.tar.xz
vexpress: mmc support
qemu-system-arm -m 1024 -smp 1 -M vexpress-a15 -monitor pty -kernel zbarebox -drive if=sd,cache=unsafe,file=sd -nographic -tftp . -net nic -net user Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-vexpress')
-rw-r--r--arch/arm/mach-vexpress/devices.c12
-rw-r--r--arch/arm/mach-vexpress/include/mach/devices.h5
-rw-r--r--arch/arm/mach-vexpress/v2m.c1
3 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/mach-vexpress/devices.c b/arch/arm/mach-vexpress/devices.c
index 6ccce5261f..5b53011924 100644
--- a/arch/arm/mach-vexpress/devices.c
+++ b/arch/arm/mach-vexpress/devices.c
@@ -20,7 +20,6 @@ void vexpress_a9_legacy_add_ddram(u32 ddr0_size, u32 ddr1_size)
arm_add_mem_device("ram1", 0x80000000, ddr1_size);
}
-
void vexpress_a9_legacy_register_uart(unsigned id)
{
resource_size_t start;
@@ -44,6 +43,12 @@ void vexpress_a9_legacy_register_uart(unsigned id)
amba_apb_device_add(NULL, "uart-pl011", id, start, 4096, NULL, 0);
}
+void vexpress_a9_legacy_register_mmc(struct mmci_platform_data *plat)
+{
+ amba_apb_device_add(NULL, "mmci-pl18x", DEVICE_ID_SINGLE, 0x10005000,
+ 4096, plat, 0);
+}
+
void vexpress_add_ddram(u32 size)
{
arm_add_mem_device("ram1", 0x80000000, size);
@@ -71,3 +76,8 @@ void vexpress_register_uart(unsigned id)
}
amba_apb_device_add(NULL, "uart-pl011", id, start, 4096, NULL, 0);
}
+
+void vexpress_register_mmc(struct mmci_platform_data *plat)
+{
+ amba_apb_device_add(NULL, "mmci-pl18x", DEVICE_ID_SINGLE, 0x1c050000, 4096, plat, 0);
+}
diff --git a/arch/arm/mach-vexpress/include/mach/devices.h b/arch/arm/mach-vexpress/include/mach/devices.h
index 3146a475eb..96d1400501 100644
--- a/arch/arm/mach-vexpress/include/mach/devices.h
+++ b/arch/arm/mach-vexpress/include/mach/devices.h
@@ -7,6 +7,8 @@
#ifndef __ASM_ARCH_DEVICES_H__
#define __ASM_ARCH_DEVICES_H__
+#include <linux/amba/mmci.h>
+
void vexpress_a9_legacy_add_ddram(u32 ddr0_size, u32 ddr1_size);
void vexpress_add_ddram(u32 size);
@@ -16,6 +18,9 @@ void vexpress_register_uart(unsigned id);
void vexpress_a9_legacy_init(void);
void vexpress_init(void);
+void vexpress_a9_legacy_register_mmc(struct mmci_platform_data *plat);
+void vexpress_register_mmc(struct mmci_platform_data *plat);
+
extern void *v2m_wdt_base;
extern void *v2m_sysreg_base;
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index d6dde83e46..025bbb17fc 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -20,6 +20,7 @@
void __iomem *v2m_sysreg_base;
static const char *v2m_osc2_periphs[] = {
+ "mb:mmci", "mmci-pl18x", /* PL180 MMCI */
"mb:uart0", "uart-pl0110", /* PL011 UART0 */
"mb:uart1", "uart-pl0111", /* PL011 UART1 */
"mb:uart2", "uart-pl0112", /* PL011 UART2 */