blob: b00c7aefd27277079137295dfdc7d68fa300011e [file] [log] [blame]
Samuel Hollandb8566642017-08-12 04:07:39 -05001/*
2 * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <arch.h>
8#include <asm_macros.S>
9#include <sunxi_def.h>
10#include <sunxi_mmap.h>
11
12 .globl plat_crash_console_init
13 .globl plat_crash_console_putc
14 .globl plat_crash_console_flush
15 .globl plat_my_core_pos
16 .globl platform_mem_init
17 .globl plat_report_exception
18
19func plat_crash_console_init
20 mov_imm x0, SUNXI_UART0_BASE
21 mov_imm x1, SUNXI_UART0_CLK_IN_HZ
22 mov_imm x2, SUNXI_UART0_BAUDRATE
23 b console_16550_core_init
24endfunc plat_crash_console_init
25
26func plat_crash_console_putc
27 mov_imm x1, SUNXI_UART0_BASE
28 b console_16550_core_putc
29endfunc plat_crash_console_putc
30
31func plat_crash_console_flush
32 ret
33endfunc plat_crash_console_flush
34
35func plat_my_core_pos
36 mrs x0, mpidr_el1
37 and x1, x0, #MPIDR_CLUSTER_MASK
38 and x0, x0, #MPIDR_CPU_MASK
39 add x0, x0, x1, LSR #6
40 ret
41endfunc plat_my_core_pos
42
43func platform_mem_init
44 ret
45endfunc platform_mem_init
46
47func plat_report_exception
48 ret
49endfunc plat_report_exception