aboutsummaryrefslogtreecommitdiff
path: root/plat/hisilicon/poplar
diff options
context:
space:
mode:
Diffstat (limited to 'plat/hisilicon/poplar')
-rw-r--r--plat/hisilicon/poplar/aarch64/platform_common.c16
-rw-r--r--plat/hisilicon/poplar/bl1_plat_setup.c29
-rw-r--r--plat/hisilicon/poplar/bl2_plat_mem_params_desc.c6
-rw-r--r--plat/hisilicon/poplar/bl2_plat_setup.c26
-rw-r--r--plat/hisilicon/poplar/bl31_plat_setup.c25
-rw-r--r--plat/hisilicon/poplar/include/hi3798cv200.h2
-rw-r--r--plat/hisilicon/poplar/include/plat_private.h3
-rw-r--r--plat/hisilicon/poplar/include/platform_def.h11
-rw-r--r--plat/hisilicon/poplar/plat_pm.c19
-rw-r--r--plat/hisilicon/poplar/plat_storage.c32
-rw-r--r--plat/hisilicon/poplar/plat_topology.c6
-rw-r--r--plat/hisilicon/poplar/platform.mk4
-rw-r--r--plat/hisilicon/poplar/poplar_gicv2.c5
-rw-r--r--plat/hisilicon/poplar/poplar_image_load.c6
14 files changed, 104 insertions, 86 deletions
diff --git a/plat/hisilicon/poplar/aarch64/platform_common.c b/plat/hisilicon/poplar/aarch64/platform_common.c
index d408209d8..fcd0a8bcf 100644
--- a/plat/hisilicon/poplar/aarch64/platform_common.c
+++ b/plat/hisilicon/poplar/aarch64/platform_common.c
@@ -4,15 +4,17 @@
* 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 <mmio.h>
-#include <platform.h>
-#include <xlat_tables.h>
+
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/platform.h>
+
#include "hi3798cv200.h"
#include "platform_def.h"
diff --git a/plat/hisilicon/poplar/bl1_plat_setup.c b/plat/hisilicon/poplar/bl1_plat_setup.c
index d0b12ad2b..eb8ffe4fd 100644
--- a/plat/hisilicon/poplar/bl1_plat_setup.c
+++ b/plat/hisilicon/poplar/bl1_plat_setup.c
@@ -4,22 +4,25 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
-#include <dw_mmc.h>
#include <errno.h>
-#include <generic_delay_timer.h>
-#include <mmc.h>
-#include <mmio.h>
-#include <pl011.h>
-#include <pl061_gpio.h>
-#include <platform.h>
-#include <platform_def.h>
#include <string.h>
-#include <tbbr_img_def.h>
-#include "../../bl1/bl1_private.h"
+
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/arm/pl061_gpio.h>
+#include <drivers/generic_delay_timer.h>
+#include <drivers/mmc.h>
+#include <drivers/synopsys/dw_mmc.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
+#include "../../../bl1/bl1_private.h"
#include "hi3798cv200.h"
#include "plat_private.h"
diff --git a/plat/hisilicon/poplar/bl2_plat_mem_params_desc.c b/plat/hisilicon/poplar/bl2_plat_mem_params_desc.c
index c73ead8d7..f683d750d 100644
--- a/plat/hisilicon/poplar/bl2_plat_mem_params_desc.c
+++ b/plat/hisilicon/poplar/bl2_plat_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/poplar/bl2_plat_setup.c b/plat/hisilicon/poplar/bl2_plat_setup.c
index 3a3ed6a46..ff8e107db 100644
--- a/plat/hisilicon/poplar/bl2_plat_setup.c
+++ b/plat/hisilicon/poplar/bl2_plat_setup.c
@@ -4,21 +4,23 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
-#include <desc_image_load.h>
-#include <dw_mmc.h>
#include <errno.h>
-#include <generic_delay_timer.h>
-#include <mmc.h>
-#include <mmio.h>
-#include <optee_utils.h>
-#include <partition/partition.h>
-#include <pl011.h>
-#include <platform.h>
#include <string.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/generic_delay_timer.h>
+#include <drivers/partition/partition.h>
+#include <drivers/synopsys/dw_mmc.h>
+#include <drivers/mmc.h>
+#include <lib/mmio.h>
+#include <lib/optee_utils.h>
+#include <plat/common/platform.h>
+
#include "hi3798cv200.h"
#include "plat_private.h"
diff --git a/plat/hisilicon/poplar/bl31_plat_setup.c b/plat/hisilicon/poplar/bl31_plat_setup.c
index e2079f9ee..69911e8d5 100644
--- a/plat/hisilicon/poplar/bl31_plat_setup.c
+++ b/plat/hisilicon/poplar/bl31_plat_setup.c
@@ -4,21 +4,24 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl31.h>
-#include <bl_common.h>
-#include <cortex_a53.h>
-#include <debug.h>
#include <errno.h>
-#include <generic_delay_timer.h>
-#include <mmio.h>
-#include <pl011.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stddef.h>
#include <string.h>
+
+#include <platform_def.h>
+
+#include <arch.h>
+#include <arch_helpers.h>
+#include <bl31/bl31.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <cortex_a53.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/generic_delay_timer.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
#include "hi3798cv200.h"
#include "plat_private.h"
diff --git a/plat/hisilicon/poplar/include/hi3798cv200.h b/plat/hisilicon/poplar/include/hi3798cv200.h
index ddb43964c..e31f4b3e1 100644
--- a/plat/hisilicon/poplar/include/hi3798cv200.h
+++ b/plat/hisilicon/poplar/include/hi3798cv200.h
@@ -7,7 +7,7 @@
#ifndef HI3798CV200_H
#define HI3798CV200_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* PL011 */
#define PL011_UART0_BASE (0xF8B00000)
diff --git a/plat/hisilicon/poplar/include/plat_private.h b/plat/hisilicon/poplar/include/plat_private.h
index 3aeccc424..a34f13846 100644
--- a/plat/hisilicon/poplar/include/plat_private.h
+++ b/plat/hisilicon/poplar/include/plat_private.h
@@ -7,7 +7,8 @@
#ifndef PLAT_PRIVATE_H
#define PLAT_PRIVATE_H
-#include <bl_common.h>
+#include <common/bl_common.h>
+
#include "hi3798cv200.h"
void plat_configure_mmu_el3(unsigned long total_base,
diff --git a/plat/hisilicon/poplar/include/platform_def.h b/plat/hisilicon/poplar/include/platform_def.h
index e39d94471..8f7a1559b 100644
--- a/plat/hisilicon/poplar/include/platform_def.h
+++ b/plat/hisilicon/poplar/include/platform_def.h
@@ -8,11 +8,12 @@
#define PLATFORM_DEF_H
#include <arch.h>
-#include <common_def.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
-#include <tbbr/tbbr_img_def.h>
-#include <utils_def.h>
+#include <common/interrupt_props.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
+
#include "hi3798cv200.h"
#include "poplar_layout.h" /* BL memory region sizes, etc */
diff --git a/plat/hisilicon/poplar/plat_pm.c b/plat/hisilicon/poplar/plat_pm.c
index eccb0b0d8..67ebca1ca 100644
--- a/plat/hisilicon/poplar/plat_pm.c
+++ b/plat/hisilicon/poplar/plat_pm.c
@@ -4,16 +4,19 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <context.h>
-#include <context_mgmt.h>
-#include <debug.h>
-#include <mmio.h>
-#include <platform.h>
+
#include <platform_def.h>
-#include <psci.h>
+
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <context.h>
+#include <lib/el3_runtime/context_mgmt.h>
+#include <lib/mmio.h>
+#include <lib/psci/psci.h>
+#include <plat/common/platform.h>
+
#include "hi3798cv200.h"
#include "plat_private.h"
diff --git a/plat/hisilicon/poplar/plat_storage.c b/plat/hisilicon/poplar/plat_storage.c
index 925274ce4..a17e0f1a2 100644
--- a/plat/hisilicon/poplar/plat_storage.c
+++ b/plat/hisilicon/poplar/plat_storage.c
@@ -4,23 +4,25 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.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 <mmc.h>
-#include <mmio.h>
-#include <partition/partition.h>
-#include <semihosting.h>
#include <string.h>
-#include <tbbr_img_def.h>
-#include <utils.h>
-#include "platform_def.h"
+
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <common/tbbr/tbbr_img_def.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 <drivers/mmc.h>
+#include <drivers/partition/partition.h>
+#include <lib/mmio.h>
+#include <lib/semihosting.h>
+#include <lib/utils.h>
+#include <tools_share/firmware_image_package.h>
#if !POPLAR_RECOVERY
static const io_dev_connector_t *emmc_dev_con;
diff --git a/plat/hisilicon/poplar/plat_topology.c b/plat/hisilicon/poplar/plat_topology.c
index bb53c6b1f..764008e9e 100644
--- a/plat/hisilicon/poplar/plat_topology.c
+++ b/plat/hisilicon/poplar/plat_topology.c
@@ -4,9 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <platform_def.h>
+
#include <arch.h>
-#include <psci.h>
-#include "platform_def.h"
+#include <lib/psci/psci.h>
+
#include "plat_private.h"
const unsigned char hisi_power_domain_tree_desc[] = {
diff --git a/plat/hisilicon/poplar/platform.mk b/plat/hisilicon/poplar/platform.mk
index 0aaa7074a..eca14125e 100644
--- a/plat/hisilicon/poplar/platform.mk
+++ b/plat/hisilicon/poplar/platform.mk
@@ -54,9 +54,7 @@ $(eval $(call add_define,PLAT_PL061_MAX_GPIOS))
PLAT_INCLUDES := -Iplat/hisilicon/poplar/include \
-Iplat/hisilicon/poplar \
- -Iinclude/common/tbbr \
- -Iinclude/drivers/synopsys \
- -Iinclude/drivers/io
+ -Iinclude/common/tbbr
PLAT_BL_COMMON_SOURCES := \
lib/xlat_tables/aarch64/xlat_tables.c \
diff --git a/plat/hisilicon/poplar/poplar_gicv2.c b/plat/hisilicon/poplar/poplar_gicv2.c
index 1c1be47fb..59f7b76ee 100644
--- a/plat/hisilicon/poplar/poplar_gicv2.c
+++ b/plat/hisilicon/poplar/poplar_gicv2.c
@@ -4,10 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <gicv2.h>
-#include <platform.h>
#include <platform_def.h>
+#include <drivers/arm/gicv2.h>
+#include <plat/common/platform.h>
+
/******************************************************************************
* On a GICv2 system, the Group 1 secure interrupts are treated as Group 0
* interrupts.
diff --git a/plat/hisilicon/poplar/poplar_image_load.c b/plat/hisilicon/poplar/poplar_image_load.c
index 32ca36db0..0ab1ca496 100644
--- a/plat/hisilicon/poplar/poplar_image_load.c
+++ b/plat/hisilicon/poplar/poplar_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