diff options
Diffstat (limited to 'core/arch/arm/plat-ls/main.c')
-rw-r--r-- | core/arch/arm/plat-ls/main.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/core/arch/arm/plat-ls/main.c b/core/arch/arm/plat-ls/main.c index 23ac0c6..7f8d523 100644 --- a/core/arch/arm/plat-ls/main.c +++ b/core/arch/arm/plat-ls/main.c @@ -48,7 +48,7 @@ static void main_fiq(void); static const struct thread_handlers handlers = { .std_smc = tee_entry_std, .fast_smc = tee_entry_fast, - .fiq = main_fiq, + .nintr = main_fiq, .cpu_on = pm_panic, .cpu_off = pm_panic, .cpu_suspend = pm_panic, @@ -58,6 +58,7 @@ static const struct thread_handlers handlers = { }; static struct gic_data gic_data; +static struct ns16550_data console_data __early_bss; register_phys_mem(MEM_AREA_IO_NSEC, CONSOLE_UART_BASE, CORE_MMU_DEVICE_SIZE); register_phys_mem(MEM_AREA_IO_SEC, GIC_BASE, CORE_MMU_DEVICE_SIZE); @@ -120,38 +121,10 @@ void plat_cpu_reset_late(void) } } -static vaddr_t console_base(void) -{ - static void *va __early_bss; - - if (cpu_mmu_enabled()) { - if (!va) - va = phys_to_virt(CONSOLE_UART_BASE, MEM_AREA_IO_NSEC); - return (vaddr_t)va; - } - return CONSOLE_UART_BASE; -} - void console_init(void) { - /* - * Do nothing, uart driver shared with normal world, - * everything for uart driver intialization is done in bootloader. - */ -} - -void console_putc(int ch) -{ - vaddr_t base = console_base(); - - if (ch == '\n') - ns16550_putc('\r', base); - ns16550_putc(ch, base); -} - -void console_flush(void) -{ - ns16550_flush(console_base()); + ns16550_init(&console_data, CONSOLE_UART_BASE); + register_serial_console(&console_data.chip); } void main_init_gic(void) |