imx7_helpers.S 1.37 KB
Newer Older
1
/*
Jun Nie's avatar
Jun Nie committed
2
 * Copyright (c) Linaro 2018-2019 Limited and Contributors. All rights reserved.
3
4
5
6
7
8
9
10
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <arch.h>
#include <asm_macros.S>
#include <assert_macros.S>
#include <platform_def.h>
11
#include <imx_hab.h>
12
13
14
15
16

	.globl	platform_mem_init
	.globl	plat_get_my_entrypoint
	.globl	plat_crash_console_init
	.globl	plat_crash_console_putc
17
	.globl	plat_crash_console_flush
18
	.globl	plat_panic_handler
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

	/* ---------------------------------------------
	 * int plat_mem_init(void)
	 * Function to initialize memory.
	 * The HAB hands off the DDR controller already
	 * setup and ready to use.
	 * Implement the mandatory function as a NOP
	 * ---------------------------------------------
	 */
func platform_mem_init
	bx	lr
endfunc platform_mem_init

func plat_get_my_entrypoint
	mov	r0, #0
	bx	lr
endfunc plat_get_my_entrypoint

func plat_crash_console_init
Jun Nie's avatar
Jun Nie committed
38
39
40
	mov_imm	r0, PLAT_IMX7_BOOT_UART_BASE
	mov_imm	r1, PLAT_IMX7_BOOT_UART_CLK_IN_HZ
	mov_imm	r2, PLAT_IMX7_CONSOLE_BAUDRATE
41
42
43
44
	b	imx_crash_uart_init
endfunc plat_crash_console_init

func plat_crash_console_putc
Jun Nie's avatar
Jun Nie committed
45
	mov_imm r1, PLAT_IMX7_BOOT_UART_BASE
46
47
	b	imx_crash_uart_putc
endfunc plat_crash_console_putc
48

49
50
51
52
53
54
func plat_crash_console_flush
	/* Placeholder */
	mov	r0, #0
	bx	lr
endfunc plat_crash_console_flush

55
56
57
58
59
func plat_panic_handler
	mov	r3, #HAB_ROM_VECTOR_TABLE_FAILSAFE
	ldr	r3, [r3, #0]
	blx	r3
endfunc plat_panic_handler