summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek <pavel@denx.de>2012-10-29 01:27:24 +0100
committerOlof Johansson <olof@lixom.net>2012-11-05 18:17:20 +0100
commitef21b491bfe0ddf2b61f1804271b0d2cc58e19f2 (patch)
tree3e3d635815338b7380c8a578d5a4e61ee5ea9ccf
parentARM: socfpga: fix build break for allyesconfig (diff)
downloadlinux-ef21b491bfe0ddf2b61f1804271b0d2cc58e19f2.tar.xz
linux-ef21b491bfe0ddf2b61f1804271b0d2cc58e19f2.zip
socfpga: map uart into virtual address space so that early_printk() works
Early printk code needs UART to be mapped early during boot. early_printk() is left there during the start-up; it is useful as our emulators are fairly slow. Signed-off-by: Pavel Machek <pavel@denx.de> Acked-by: Dinh Nguyen <dinguyen@altera.com> [olof: removed redundant newlines] Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/arm/mach-socfpga/socfpga.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index ab81ea91a7c4..6732924a5fee 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -37,6 +37,13 @@ static struct map_desc scu_io_desc __initdata = {
.type = MT_DEVICE,
};
+static struct map_desc uart_io_desc __initdata = {
+ .virtual = 0xfec02000,
+ .pfn = __phys_to_pfn(0xffc02000),
+ .length = SZ_8K,
+ .type = MT_DEVICE,
+};
+
static void __init socfpga_scu_map_io(void)
{
unsigned long base;
@@ -51,6 +58,8 @@ static void __init socfpga_scu_map_io(void)
static void __init socfpga_map_io(void)
{
socfpga_scu_map_io();
+ iotable_init(&uart_io_desc, 1);
+ early_printk("Early printk initialized\n");
}
const static struct of_device_id irq_match[] = {