xref: /rk3399_ARM-atf/plat/hisilicon/hikey960/hikey960_image_load.c (revision 2de0c5cc4fac47dcc5df295bd1eaf3a6da528424)
1*2de0c5ccSVictor Chong /*
2*2de0c5ccSVictor Chong  * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3*2de0c5ccSVictor Chong  *
4*2de0c5ccSVictor Chong  * SPDX-License-Identifier: BSD-3-Clause
5*2de0c5ccSVictor Chong  */
6*2de0c5ccSVictor Chong 
7*2de0c5ccSVictor Chong #include <bl_common.h>
8*2de0c5ccSVictor Chong #include <desc_image_load.h>
9*2de0c5ccSVictor Chong #include <platform.h>
10*2de0c5ccSVictor Chong 
11*2de0c5ccSVictor Chong #include "hikey960_private.h"
12*2de0c5ccSVictor Chong 
13*2de0c5ccSVictor Chong /*******************************************************************************
14*2de0c5ccSVictor Chong  * This function flushes the data structures so that they are visible
15*2de0c5ccSVictor Chong  * in memory for the next BL image.
16*2de0c5ccSVictor Chong  ******************************************************************************/
17*2de0c5ccSVictor Chong void plat_flush_next_bl_params(void)
18*2de0c5ccSVictor Chong {
19*2de0c5ccSVictor Chong 	flush_bl_params_desc();
20*2de0c5ccSVictor Chong }
21*2de0c5ccSVictor Chong 
22*2de0c5ccSVictor Chong /*******************************************************************************
23*2de0c5ccSVictor Chong  * This function returns the list of loadable images.
24*2de0c5ccSVictor Chong  ******************************************************************************/
25*2de0c5ccSVictor Chong bl_load_info_t *plat_get_bl_image_load_info(void)
26*2de0c5ccSVictor Chong {
27*2de0c5ccSVictor Chong 	/* Required before loading scp_bl2 */
28*2de0c5ccSVictor Chong 	hikey960_init_ufs();
29*2de0c5ccSVictor Chong 	hikey960_io_setup();
30*2de0c5ccSVictor Chong 
31*2de0c5ccSVictor Chong 	return get_bl_load_info_from_mem_params_desc();
32*2de0c5ccSVictor Chong }
33*2de0c5ccSVictor Chong 
34*2de0c5ccSVictor Chong /*******************************************************************************
35*2de0c5ccSVictor Chong  * This function returns the list of executable images.
36*2de0c5ccSVictor Chong  ******************************************************************************/
37*2de0c5ccSVictor Chong bl_params_t *plat_get_next_bl_params(void)
38*2de0c5ccSVictor Chong {
39*2de0c5ccSVictor Chong 	return get_next_bl_params_from_mem_params_desc();
40*2de0c5ccSVictor Chong }
41