| 1 |
/* |
| 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 |
|
| 19 |
func 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 |
| 24 |
endfunc plat_crash_console_init |
| 25 |
|
| 26 |
func plat_crash_console_putc |
| 27 |
mov_imm x1, SUNXI_UART0_BASE |
| 28 |
b console_16550_core_putc |
| 29 |
endfunc plat_crash_console_putc |
| 30 |
|
| 31 |
func plat_crash_console_flush |
| 32 |
ret |
| 33 |
endfunc plat_crash_console_flush |
| 34 |
|
| 35 |
func 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 |
| 41 |
endfunc plat_my_core_pos |
| 42 |
|
| 43 |
func platform_mem_init |
| 44 |
ret |
| 45 |
endfunc platform_mem_init |
| 46 |
|
| 47 |
func plat_report_exception |
| 48 |
ret |
| 49 |
endfunc plat_report_exception |