hikey960: fix invoking driver init in image load driver

It's unnecessary to call platform driver initialization in image
load driver. We could make bl2_platform_setup() to executing
just before SCP_BL2 by setting flag IMAGE_ATTRIB_PLAT_SETUP.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
This commit is contained in:
Haojian Zhuang 2018-01-30 10:35:17 +08:00
parent d2128731a9
commit 19b731e810
3 changed files with 4 additions and 9 deletions

View File

@ -157,7 +157,7 @@ static void hikey960_ufs_reset(void)
} while (data & PERI_UFS_BIT);
}
void hikey960_init_ufs(void)
static void hikey960_init_ufs(void)
{
dw_ufs_params_t ufs_params;
@ -747,4 +747,6 @@ void bl2_platform_setup(void)
hikey960_tzc_init();
hikey960_peri_init();
hikey960_pinmux_init();
hikey960_init_ufs();
hikey960_io_setup();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -8,8 +8,6 @@
#include <desc_image_load.h>
#include <platform.h>
#include "hikey960_private.h"
/*******************************************************************************
* This function flushes the data structures so that they are visible
* in memory for the next BL image.
@ -24,10 +22,6 @@ void plat_flush_next_bl_params(void)
******************************************************************************/
bl_load_info_t *plat_get_bl_image_load_info(void)
{
/* Required before loading scp_bl2 */
hikey960_init_ufs();
hikey960_io_setup();
return get_bl_load_info_from_mem_params_desc();
}

View File

@ -24,7 +24,6 @@ void hikey960_init_mmu_el3(unsigned long total_base,
unsigned long ro_limit,
unsigned long coh_start,
unsigned long coh_limit);
void hikey960_init_ufs(void);
void hikey960_io_setup(void);
int hikey960_read_boardid(unsigned int *id);
void set_retention_ticks(unsigned int val);