Skip to content

Commit

Permalink
socfpga: map uart into virtual address space so that early_printk() w…
Browse files Browse the repository at this point in the history
…orks

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>
  • Loading branch information
Pavel Machek authored and Olof Johansson committed Nov 5, 2012
1 parent ad208d0 commit ef21b49
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/arm/mach-socfpga/socfpga.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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[] = {
Expand Down

0 comments on commit ef21b49

Please sign in to comment.