2 * Copyright (C) 2016 Marvell International Ltd.
4 * SPDX-License-Identifier: BSD-3-Clause
5 * https://spdx.org/licenses
11 #include <bl_common.h>
15 #include <xlat_tables.h>
18 * Extern declarations common to Marvell standard platforms
20 extern const mmap_region_t plat_marvell_mmap
[];
22 #define MARVELL_CASSERT_MMAP \
23 CASSERT((ARRAY_SIZE(plat_marvell_mmap) + MARVELL_BL_REGIONS) \
24 <= MAX_MMAP_REGIONS, \
25 assert_max_mmap_regions)
28 * Utility functions common to Marvell standard platforms
30 void marvell_setup_page_tables(uintptr_t total_base
,
34 uintptr_t rodata_start
,
35 uintptr_t rodata_limit
37 , uintptr_t coh_start
,
42 /* Console utility functions */
43 void marvell_console_boot_init(void);
44 void marvell_console_boot_end(void);
45 void marvell_console_runtime_init(void);
46 void marvell_console_runtime_end(void);
48 /* IO storage utility functions */
49 void marvell_io_setup(void);
51 /* Systimer utility function */
52 void marvell_configure_sys_timer(void);
54 /* Topology utility function */
55 int marvell_check_mpidr(u_register_t mpidr
);
57 /* BL1 utility functions */
58 void marvell_bl1_early_platform_setup(void);
59 void marvell_bl1_platform_setup(void);
60 void marvell_bl1_plat_arch_setup(void);
62 /* BL2 utility functions */
63 void marvell_bl2_early_platform_setup(meminfo_t
*mem_layout
);
64 void marvell_bl2_platform_setup(void);
65 void marvell_bl2_plat_arch_setup(void);
66 uint32_t marvell_get_spsr_for_bl32_entry(void);
67 uint32_t marvell_get_spsr_for_bl33_entry(void);
69 /* BL31 utility functions */
70 void marvell_bl31_early_platform_setup(void *from_bl2
,
71 uintptr_t soc_fw_config
,
73 void *plat_params_from_bl2
);
74 void marvell_bl31_platform_setup(void);
75 void marvell_bl31_plat_runtime_setup(void);
76 void marvell_bl31_plat_arch_setup(void);
78 /* FIP TOC validity check */
79 int marvell_io_is_toc_valid(void);
84 void marvell_psci_arch_init(int idx
);
85 void plat_marvell_system_reset(void);
88 * Optional functions required in Marvell standard platforms
90 void plat_marvell_io_setup(void);
91 int plat_marvell_get_alt_image_source(
92 unsigned int image_id
,
93 uintptr_t *dev_handle
,
94 uintptr_t *image_spec
);
95 unsigned int plat_marvell_calc_core_pos(u_register_t mpidr
);
97 void plat_marvell_interconnect_init(void);
98 void plat_marvell_interconnect_enter_coherency(void);
100 const mmap_region_t
*plat_marvell_get_mmap(void);
102 #endif /* PLAT_MARVELL_H */