• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2018-2020 NXP
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include <arch.h>
9#include <asm_macros.S>
10
11#include <platform_def.h>
12
13.globl	plat_secondary_cold_boot_setup
14.globl	plat_is_my_cpu_primary
15.globl	plat_reset_handler
16.globl  platform_mem_init
17
18
19func platform_mem1_init
20	ret
21endfunc platform_mem1_init
22
23
24func platform_mem_init
25	ret
26endfunc	platform_mem_init
27
28
29func apply_platform_errata
30
31	ret
32endfunc apply_platform_errata
33
34
35func plat_reset_handler
36	mov x29, x30
37	bl  apply_platform_errata
38
39#if defined(IMAGE_BL31)
40	ldr x0, =POLICY_SMMU_PAGESZ_64K
41	cbz x0, 1f
42	/* Set the SMMU page size in the sACR register */
43	bl _set_smmu_pagesz_64
44#endif
451:
46	mov x30, x29
47
48	ret
49endfunc plat_reset_handler
50
51
52/* void plat_secondary_cold_boot_setup (void);
53 *
54 * This function performs any platform specific actions
55 * needed for a secondary cpu after a cold reset e.g
56 * mark the cpu's presence, mechanism to place it in a
57 * holding pen etc.
58 */
59func plat_secondary_cold_boot_setup
60	/* lx2160a does not do cold boot for secondary CPU */
61cb_panic:
62	b	cb_panic
63endfunc plat_secondary_cold_boot_setup
64
65
66/* unsigned int plat_is_my_cpu_primary (void);
67 *
68 * Find out whether the current cpu is the primary
69 * cpu.
70 */
71func plat_is_my_cpu_primary
72	mrs	x0, mpidr_el1
73	and	x0, x0, #(MPIDR_CLUSTER_MASK | MPIDR_CPU_MASK)
74	cmp	x0, 0x0
75	cset	w0, eq
76	ret
77endfunc plat_is_my_cpu_primary
78