aboutsummaryrefslogtreecommitdiff
path: root/plat/hisilicon/hikey960
diff options
context:
space:
mode:
Diffstat (limited to 'plat/hisilicon/hikey960')
-rw-r--r--plat/hisilicon/hikey960/aarch64/hikey960_common.c14
-rw-r--r--plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c14
-rw-r--r--plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c11
-rw-r--r--plat/hisilicon/hikey960/hikey960_bl1_setup.c34
-rw-r--r--plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c6
-rw-r--r--plat/hisilicon/hikey960/hikey960_bl2_setup.c30
-rw-r--r--plat/hisilicon/hikey960/hikey960_bl31_setup.c30
-rw-r--r--plat/hisilicon/hikey960/hikey960_bl_common.c10
-rw-r--r--plat/hisilicon/hikey960/hikey960_boardid.c9
-rw-r--r--plat/hisilicon/hikey960/hikey960_def.h4
-rw-r--r--plat/hisilicon/hikey960/hikey960_image_load.c6
-rw-r--r--plat/hisilicon/hikey960/hikey960_io_storage.c26
-rw-r--r--plat/hisilicon/hikey960/hikey960_mcu_load.c14
-rw-r--r--plat/hisilicon/hikey960/hikey960_pm.c20
-rw-r--r--plat/hisilicon/hikey960/hikey960_private.h2
-rw-r--r--plat/hisilicon/hikey960/hikey960_tbbr.c2
-rw-r--r--plat/hisilicon/hikey960/hikey960_topology.c6
-rw-r--r--plat/hisilicon/hikey960/include/plat_macros.S4
-rw-r--r--plat/hisilicon/hikey960/include/platform_def.h3
19 files changed, 133 insertions, 112 deletions
diff --git a/plat/hisilicon/hikey960/aarch64/hikey960_common.c b/plat/hisilicon/hikey960/aarch64/hikey960_common.c
index 1ed3eaa67..612a7f21b 100644
--- a/plat/hisilicon/hikey960/aarch64/hikey960_common.c
+++ b/plat/hisilicon/hikey960/aarch64/hikey960_common.c
@@ -4,14 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
-#include <mmio.h>
-#include <platform.h>
+
#include <platform_def.h>
-#include <xlat_tables.h>
+
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/platform.h>
#include "../hikey960_def.h"
#include "../hikey960_private.h"
diff --git a/plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c b/plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c
index 4c664d112..a6a494934 100644
--- a/plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c
+++ b/plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c
@@ -4,15 +4,17 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
-#include <hi3660.h>
-#include <hisi_ipc.h>
-#include <mmio.h>
-#include <platform.h>
+
#include <platform_def.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
+#include <hi3660.h>
+#include <hisi_ipc.h>
#include "../../hikey960_private.h"
#define IPC_MBX_SOURCE_REG(m) (IPC_BASE + ((m) << 6))
diff --git a/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c b/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c
index 45fcd42b4..659a1c4ad 100644
--- a/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c
+++ b/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c
@@ -4,15 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <../hikey960_def.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <hisi_ipc.h>
-#include <mmio.h>
-#include <platform.h>
+
#include <platform_def.h>
+#include <arch_helpers.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+#include <../hikey960_def.h>
+#include <hisi_ipc.h>
#include "hisi_pwrc.h"
diff --git a/plat/hisilicon/hikey960/hikey960_bl1_setup.c b/plat/hisilicon/hikey960/hikey960_bl1_setup.c
index ff2c77a60..38bdbe417 100644
--- a/plat/hisilicon/hikey960/hikey960_bl1_setup.c
+++ b/plat/hisilicon/hikey960/hikey960_bl1_setup.c
@@ -4,26 +4,28 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <dw_ufs.h>
#include <errno.h>
-#include <generic_delay_timer.h>
-#include <gicv2.h>
-#include <hi3660.h>
-#include <interrupt_props.h>
-#include <mmio.h>
-#include <pl011.h>
-#include <platform.h>
-#include <platform_def.h>
#include <string.h>
-#include <tbbr/tbbr_img_desc.h>
-#include <ufs.h>
-#include "../../bl1/bl1_private.h"
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <bl1/tbbr/tbbr_img_desc.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/delay_timer.h>
+#include <drivers/dw_ufs.h>
+#include <drivers/generic_delay_timer.h>
+#include <drivers/ufs.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
+#include <hi3660.h>
+#include "../../../bl1/bl1_private.h"
#include "hikey960_def.h"
#include "hikey960_private.h"
diff --git a/plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c b/plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c
index 2944b1f7c..ba236d22f 100644
--- a/plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c
+++ b/plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c
@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <bl_common.h>
-#include <desc_image_load.h>
-#include <platform.h>
#include <platform_def.h>
+#include <common/bl_common.h>
+#include <common/desc_image_load.h>
+#include <plat/common/platform.h>
/*******************************************************************************
* Following descriptor provides BL image/ep information that gets used
diff --git a/plat/hisilicon/hikey960/hikey960_bl2_setup.c b/plat/hisilicon/hikey960/hikey960_bl2_setup.c
index 552356f1c..788392db7 100644
--- a/plat/hisilicon/hikey960/hikey960_bl2_setup.c
+++ b/plat/hisilicon/hikey960/hikey960_bl2_setup.c
@@ -4,25 +4,27 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <desc_image_load.h>
-#include <dw_ufs.h>
#include <errno.h>
-#include <generic_delay_timer.h>
-#include <hi3660.h>
-#include <mmio.h>
+#include <string.h>
+
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <common/desc_image_load.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/delay_timer.h>
+#include <drivers/dw_ufs.h>
+#include <drivers/generic_delay_timer.h>
+#include <drivers/ufs.h>
+#include <lib/mmio.h>
#ifdef SPD_opteed
-#include <optee_utils.h>
+#include <lib/optee_utils.h>
#endif
-#include <pl011.h>
-#include <platform_def.h>
-#include <string.h>
-#include <ufs.h>
+#include <hi3660.h>
#include "hikey960_def.h"
#include "hikey960_private.h"
diff --git a/plat/hisilicon/hikey960/hikey960_bl31_setup.c b/plat/hisilicon/hikey960/hikey960_bl31_setup.c
index 226147061..67b06f498 100644
--- a/plat/hisilicon/hikey960/hikey960_bl31_setup.c
+++ b/plat/hisilicon/hikey960/hikey960_bl31_setup.c
@@ -4,24 +4,26 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <cci.h>
-#include <console.h>
-#include <debug.h>
#include <errno.h>
-#include <generic_delay_timer.h>
-#include <gicv2.h>
-#include <hi3660.h>
-#include <mmio.h>
-#include <hisi_ipc.h>
-#include <interrupt_mgmt.h>
-#include <interrupt_props.h>
-#include <pl011.h>
-#include <platform.h>
+
#include <platform_def.h>
+#include <arch_helpers.h>
+#include <bl31/interrupt_mgmt.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/cci.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/console.h>
+#include <drivers/generic_delay_timer.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
+#include <hi3660.h>
+#include <hisi_ipc.h>
#include "hikey960_def.h"
#include "hikey960_private.h"
diff --git a/plat/hisilicon/hikey960/hikey960_bl_common.c b/plat/hisilicon/hikey960/hikey960_bl_common.c
index 0cee69f94..89adccb2b 100644
--- a/plat/hisilicon/hikey960/hikey960_bl_common.c
+++ b/plat/hisilicon/hikey960/hikey960_bl_common.c
@@ -4,12 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <delay_timer.h>
-#include <hi3660.h>
-#include <mmio.h>
-#include <pl061_gpio.h>
+#include <common/debug.h>
+#include <drivers/arm/pl061_gpio.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+#include <hi3660.h>
#include "hikey960_private.h"
void hikey960_clk_init(void)
diff --git a/plat/hisilicon/hikey960/hikey960_boardid.c b/plat/hisilicon/hikey960/hikey960_boardid.c
index f39c15385..1e1126fb1 100644
--- a/plat/hisilicon/hikey960/hikey960_boardid.c
+++ b/plat/hisilicon/hikey960/hikey960_boardid.c
@@ -5,12 +5,13 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <hi3660.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
+#include <hi3660.h>
#include "hikey960_private.h"
#define ADC_ADCIN0 0
diff --git a/plat/hisilicon/hikey960/hikey960_def.h b/plat/hisilicon/hikey960/hikey960_def.h
index 91d0af3c0..d977c7989 100644
--- a/plat/hisilicon/hikey960/hikey960_def.h
+++ b/plat/hisilicon/hikey960/hikey960_def.h
@@ -7,8 +7,8 @@
#ifndef HIKEY960_DEF_H
#define HIKEY960_DEF_H
-#include <common_def.h>
-#include <tbbr_img_def.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <plat/common/common_def.h>
#define DDR_BASE 0x0
#define DDR_SIZE 0xC0000000
diff --git a/plat/hisilicon/hikey960/hikey960_image_load.c b/plat/hisilicon/hikey960/hikey960_image_load.c
index ad7be5081..57cb1b228 100644
--- a/plat/hisilicon/hikey960/hikey960_image_load.c
+++ b/plat/hisilicon/hikey960/hikey960_image_load.c
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <bl_common.h>
-#include <desc_image_load.h>
-#include <platform.h>
+#include <common/bl_common.h>
+#include <common/desc_image_load.h>
+#include <plat/common/platform.h>
/*******************************************************************************
* This function flushes the data structures so that they are visible
diff --git a/plat/hisilicon/hikey960/hikey960_io_storage.c b/plat/hisilicon/hikey960/hikey960_io_storage.c
index cff3b0d23..a4e83897e 100644
--- a/plat/hisilicon/hikey960/hikey960_io_storage.c
+++ b/plat/hisilicon/hikey960/hikey960_io_storage.c
@@ -4,21 +4,23 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
#include <errno.h>
-#include <firmware_image_package.h>
-#include <io_block.h>
-#include <io_driver.h>
-#include <io_fip.h>
-#include <io_memmap.h>
-#include <io_storage.h>
-#include <mmio.h>
-#include <platform_def.h>
-#include <semihosting.h> /* For FOPEN_MODE_... */
#include <string.h>
-#include <ufs.h>
+
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/ufs.h>
+#include <drivers/io/io_block.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/io/io_fip.h>
+#include <drivers/io/io_memmap.h>
+#include <drivers/io/io_storage.h>
+#include <lib/mmio.h>
+#include <lib/semihosting.h>
+#include <tools_share/firmware_image_package.h>
struct plat_io_policy {
uintptr_t *dev_handle;
diff --git a/plat/hisilicon/hikey960/hikey960_mcu_load.c b/plat/hisilicon/hikey960/hikey960_mcu_load.c
index 7bf9a3d06..b9ae31368 100644
--- a/plat/hisilicon/hikey960/hikey960_mcu_load.c
+++ b/plat/hisilicon/hikey960/hikey960_mcu_load.c
@@ -4,16 +4,18 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <hi3660.h>
-#include <mmio.h>
#include <string.h>
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
+#include <hi3660.h>
+
#define ADDR_CONVERT(addr) ((addr) < 0x40000 ? \
(addr) + 0xFFF30000 : \
(addr) + 0x40000000)
diff --git a/plat/hisilicon/hikey960/hikey960_pm.c b/plat/hisilicon/hikey960/hikey960_pm.c
index f1873eecd..676cfa3f3 100644
--- a/plat/hisilicon/hikey960/hikey960_pm.c
+++ b/plat/hisilicon/hikey960/hikey960_pm.c
@@ -4,19 +4,21 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <cci.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <gicv2.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/arm/cci.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+#include <lib/psci/psci.h>
+
#include <hi3660.h>
#include <hi3660_crg.h>
-#include <mmio.h>
-#include <pl011.h>
-#include <psci.h>
-#include "drivers/pwrc/hisi_pwrc.h"
+#include "drivers/pwrc/hisi_pwrc.h"
#include "hikey960_def.h"
#include "hikey960_private.h"
diff --git a/plat/hisilicon/hikey960/hikey960_private.h b/plat/hisilicon/hikey960/hikey960_private.h
index 31d3a4ae3..9a18dd620 100644
--- a/plat/hisilicon/hikey960/hikey960_private.h
+++ b/plat/hisilicon/hikey960/hikey960_private.h
@@ -7,7 +7,7 @@
#ifndef HIKEY960_PRIVATE_H
#define HIKEY960_PRIVATE_H
-#include <bl_common.h>
+#include <common/bl_common.h>
/*
* Function and variable prototypes
diff --git a/plat/hisilicon/hikey960/hikey960_tbbr.c b/plat/hisilicon/hikey960/hikey960_tbbr.c
index e9f28b3bc..e435ec2e5 100644
--- a/plat/hisilicon/hikey960/hikey960_tbbr.c
+++ b/plat/hisilicon/hikey960/hikey960_tbbr.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <platform.h>
+#include <plat/common/platform.h>
extern char hikey960_rotpk_hash[], hikey960_rotpk_hash_end[];
diff --git a/plat/hisilicon/hikey960/hikey960_topology.c b/plat/hisilicon/hikey960/hikey960_topology.c
index 336372469..a242bb1d3 100644
--- a/plat/hisilicon/hikey960/hikey960_topology.c
+++ b/plat/hisilicon/hikey960/hikey960_topology.c
@@ -3,9 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
+
#include <platform_def.h>
-#include <psci.h>
+
+#include <arch.h>
+#include <lib/psci/psci.h>
/*
* The HiKey power domain tree descriptor. The cluster power domains
diff --git a/plat/hisilicon/hikey960/include/plat_macros.S b/plat/hisilicon/hikey960/include/plat_macros.S
index 3b126f652..8765562a0 100644
--- a/plat/hisilicon/hikey960/include/plat_macros.S
+++ b/plat/hisilicon/hikey960/include/plat_macros.S
@@ -7,8 +7,8 @@
#ifndef PLAT_MACROS_S
#define PLAT_MACROS_S
-#include <cci.h>
-#include <gicv2.h>
+#include <drivers/arm/cci.h>
+#include <drivers/arm/gicv2.h>
#include <hi3660.h>
#include <platform_def.h>
diff --git a/plat/hisilicon/hikey960/include/platform_def.h b/plat/hisilicon/hikey960/include/platform_def.h
index 427a1e759..3e2d79daa 100644
--- a/plat/hisilicon/hikey960/include/platform_def.h
+++ b/plat/hisilicon/hikey960/include/platform_def.h
@@ -8,7 +8,8 @@
#define PLATFORM_DEF_H
#include <arch.h>
-#include <utils_def.h>
+#include <lib/utils_def.h>
+
#include "../hikey960_def.h"
/* Special value used to verify platform parameters from BL2 to BL3-1 */