diff options
author | Pavel Machek <pavel@denx.de> | 2012-10-28 20:27:24 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-05 12:17:20 -0500 |
commit | ef21b491bfe0ddf2b61f1804271b0d2cc58e19f2 (patch) | |
tree | 3e3d635815338b7380c8a578d5a4e61ee5ea9ccf /arch/arm/mach-socfpga/socfpga.c | |
parent | ad208d03a5a32957a419eb1a473aa96ff4da45ca (diff) |
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>
Diffstat (limited to 'arch/arm/mach-socfpga/socfpga.c')
-rw-r--r-- | arch/arm/mach-socfpga/socfpga.c | 9 |
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 = { | |||
37 | .type = MT_DEVICE, | 37 | .type = MT_DEVICE, |
38 | }; | 38 | }; |
39 | 39 | ||
40 | static struct map_desc uart_io_desc __initdata = { | ||
41 | .virtual = 0xfec02000, | ||
42 | .pfn = __phys_to_pfn(0xffc02000), | ||
43 | .length = SZ_8K, | ||
44 | .type = MT_DEVICE, | ||
45 | }; | ||
46 | |||
40 | static void __init socfpga_scu_map_io(void) | 47 | static void __init socfpga_scu_map_io(void) |
41 | { | 48 | { |
42 | unsigned long base; | 49 | unsigned long base; |
@@ -51,6 +58,8 @@ static void __init socfpga_scu_map_io(void) | |||
51 | static void __init socfpga_map_io(void) | 58 | static void __init socfpga_map_io(void) |
52 | { | 59 | { |
53 | socfpga_scu_map_io(); | 60 | socfpga_scu_map_io(); |
61 | iotable_init(&uart_io_desc, 1); | ||
62 | early_printk("Early printk initialized\n"); | ||
54 | } | 63 | } |
55 | 64 | ||
56 | const static struct of_device_id irq_match[] = { | 65 | const static struct of_device_id irq_match[] = { |