aboutsummaryrefslogtreecommitdiff
path: root/plat/marvell
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-12-14 00:18:21 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-01-04 10:43:17 +0000
commit09d40e0e08283a249e7dce0e106c07c5141f9b7e (patch)
tree46e7af7b5be2738948b359b2a07078e4cf1bbec1 /plat/marvell
parentf5478dedf9e096d9539362b38ceb096b940ba3e2 (diff)
downloadtrusted-firmware-a-09d40e0e08283a249e7dce0e106c07c5141f9b7e.tar.gz
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths. The following folders inside include/lib have been left unchanged: - include/lib/cpus/${ARCH} - include/lib/el3_runtime/${ARCH} The reason for this change is that having a global namespace for includes isn't a good idea. It defeats one of the advantages of having folders and it introduces problems that are sometimes subtle (because you may not know the header you are actually including if there are two of them). For example, this patch had to be created because two headers were called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3a282 ("drivers: add tzc380 support"). This problem was introduced in commit 4ecca33988b9 ("Move include and source files to logical locations"). At that time, there weren't too many headers so it wasn't a real issue. However, time has shown that this creates problems. Platforms that want to preserve the way they include headers may add the removed paths to PLAT_INCLUDES, but this is discouraged. Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'plat/marvell')
-rw-r--r--plat/marvell/a3700/a3700/board/pm_src.c1
-rw-r--r--plat/marvell/a3700/a3700/plat_bl31_setup.c3
-rw-r--r--plat/marvell/a3700/common/a3700_common.mk4
-rw-r--r--plat/marvell/a3700/common/a3700_sip_svc.c8
-rw-r--r--plat/marvell/a3700/common/dram_win.c6
-rw-r--r--plat/marvell/a3700/common/include/dram_win.h3
-rw-r--r--plat/marvell/a3700/common/include/platform_def.h5
-rw-r--r--plat/marvell/a3700/common/io_addr_dec.c6
-rw-r--r--plat/marvell/a3700/common/marvell_plat_config.c3
-rw-r--r--plat/marvell/a3700/common/plat_pm.c15
-rw-r--r--plat/marvell/a8k/a70x0/board/dram_port.c3
-rw-r--r--plat/marvell/a8k/a70x0_amc/board/dram_port.c3
-rw-r--r--plat/marvell/a8k/a80x0/board/dram_port.c7
-rw-r--r--plat/marvell/a8k/a80x0_mcbin/board/dram_port.c7
-rw-r--r--plat/marvell/a8k/a80x0_mcbin/board/marvell_plat_config.c5
-rw-r--r--plat/marvell/a8k/common/a8k_common.mk2
-rw-r--r--plat/marvell/a8k/common/aarch64/plat_arch_config.c9
-rw-r--r--plat/marvell/a8k/common/ble/ble.mk2
-rw-r--r--plat/marvell/a8k/common/ble/ble_main.c11
-rw-r--r--plat/marvell/a8k/common/include/platform_def.h10
-rw-r--r--plat/marvell/a8k/common/mss/mss_bl2_setup.c14
-rw-r--r--plat/marvell/a8k/common/mss/mss_pm_ipc.c7
-rw-r--r--plat/marvell/a8k/common/plat_bl1_setup.c3
-rw-r--r--plat/marvell/a8k/common/plat_bl31_setup.c12
-rw-r--r--plat/marvell/a8k/common/plat_ble_setup.c15
-rw-r--r--plat/marvell/a8k/common/plat_pm.c20
-rw-r--r--plat/marvell/a8k/common/plat_pm_trace.c5
-rw-r--r--plat/marvell/a8k/common/plat_thermal.c9
-rw-r--r--plat/marvell/common/aarch64/marvell_bl2_mem_params_desc.c8
-rw-r--r--plat/marvell/common/aarch64/marvell_common.c14
-rw-r--r--plat/marvell/common/aarch64/marvell_helpers.S8
-rw-r--r--plat/marvell/common/marvell_bl1_setup.c16
-rw-r--r--plat/marvell/common/marvell_bl2_setup.c19
-rw-r--r--plat/marvell/common/marvell_bl31_setup.c17
-rw-r--r--plat/marvell/common/marvell_cci.c3
-rw-r--r--plat/marvell/common/marvell_console.c13
-rw-r--r--plat/marvell/common/marvell_ddr_info.c6
-rw-r--r--plat/marvell/common/marvell_gicv2.c16
-rw-r--r--plat/marvell/common/marvell_gicv3.c12
-rw-r--r--plat/marvell/common/marvell_image_load.c7
-rw-r--r--plat/marvell/common/marvell_io_storage.c18
-rw-r--r--plat/marvell/common/marvell_pm.c6
-rw-r--r--plat/marvell/common/mrvl_sip_svc.c12
-rw-r--r--plat/marvell/common/mss/mss_ipc_drv.c8
-rw-r--r--plat/marvell/common/mss/mss_ipc_drv.h2
-rw-r--r--plat/marvell/common/mss/mss_scp_bootloader.c10
-rw-r--r--plat/marvell/common/plat_delay_timer.c3
47 files changed, 226 insertions, 170 deletions
diff --git a/plat/marvell/a3700/a3700/board/pm_src.c b/plat/marvell/a3700/a3700/board/pm_src.c
index bc48ce8ca..d6eca5d16 100644
--- a/plat/marvell/a3700/a3700/board/pm_src.c
+++ b/plat/marvell/a3700/a3700/board/pm_src.c
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
* https://spdx.org/licenses
*/
+
#include <a3700_pm.h>
#include <plat_marvell.h>
diff --git a/plat/marvell/a3700/a3700/plat_bl31_setup.c b/plat/marvell/a3700/a3700/plat_bl31_setup.c
index 83db06f9d..6862a8670 100644
--- a/plat/marvell/a3700/a3700/plat_bl31_setup.c
+++ b/plat/marvell/a3700/a3700/plat_bl31_setup.c
@@ -5,10 +5,11 @@
* https://spdx.org/licenses
*/
+#include <lib/mmio.h>
+
#include <armada_common.h>
#include <dram_win.h>
#include <io_addr_dec.h>
-#include <mmio.h>
#include <marvell_plat_priv.h>
#include <plat_marvell.h>
diff --git a/plat/marvell/a3700/common/a3700_common.mk b/plat/marvell/a3700/common/a3700_common.mk
index e2ac97ffc..a4727d2ea 100644
--- a/plat/marvell/a3700/common/a3700_common.mk
+++ b/plat/marvell/a3700/common/a3700_common.mk
@@ -84,14 +84,12 @@ MARVELL_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
plat/common/plat_gicv3.c \
drivers/arm/gic/v3/gic500.c
-ATF_INCLUDES := -Iinclude/common/tbbr \
- -Iinclude/drivers
+ATF_INCLUDES := -Iinclude/common/tbbr
PLAT_INCLUDES := -I$(PLAT_FAMILY_BASE)/$(PLAT) \
-I$(PLAT_COMMON_BASE)/include \
-I$(PLAT_INCLUDE_BASE)/common \
-I$(MARVELL_DRV_BASE) \
- -Iinclude/drivers/marvell/uart \
-I$/drivers/arm/gic/common/ \
$(ATF_INCLUDES)
diff --git a/plat/marvell/a3700/common/a3700_sip_svc.c b/plat/marvell/a3700/common/a3700_sip_svc.c
index 88d1fc2f7..e8ac5fc08 100644
--- a/plat/marvell/a3700/common/a3700_sip_svc.c
+++ b/plat/marvell/a3700/common/a3700_sip_svc.c
@@ -5,11 +5,13 @@
* https://spdx.org/licenses
*/
-#include <debug.h>
+#include <common/debug.h>
+#include <common/runtime_svc.h>
+#include <lib/smccc.h>
+
#include <marvell_plat_priv.h>
#include <plat_marvell.h>
-#include <runtime_svc.h>
-#include <smccc.h>
+
#include "comphy/phy-comphy-3700.h"
/* Comphy related FID's */
diff --git a/plat/marvell/a3700/common/dram_win.c b/plat/marvell/a3700/common/dram_win.c
index fb236d82d..694f6d480 100644
--- a/plat/marvell/a3700/common/dram_win.c
+++ b/plat/marvell/a3700/common/dram_win.c
@@ -5,12 +5,14 @@
* https://spdx.org/licenses
*/
+#include <string.h>
+
+#include <lib/mmio.h>
+
#include <dram_win.h>
#include <marvell_plat_priv.h>
-#include <mmio.h>
#include <mvebu.h>
#include <plat_marvell.h>
-#include <string.h>
/* Armada 3700 has 5 configurable windows */
#define MV_CPU_WIN_NUM 5
diff --git a/plat/marvell/a3700/common/include/dram_win.h b/plat/marvell/a3700/common/include/dram_win.h
index 6f345f945..26a013784 100644
--- a/plat/marvell/a3700/common/include/dram_win.h
+++ b/plat/marvell/a3700/common/include/dram_win.h
@@ -8,7 +8,8 @@
#ifndef DRAM_WIN_H
#define DRAM_WIN_H
-#include <bl_common.h>
+#include <common/bl_common.h>
+
#include <io_addr_dec.h>
void dram_win_map_build(struct dram_win_map *win_map);
diff --git a/plat/marvell/a3700/common/include/platform_def.h b/plat/marvell/a3700/common/include/platform_def.h
index ca2553c99..16865c4d2 100644
--- a/plat/marvell/a3700/common/include/platform_def.h
+++ b/plat/marvell/a3700/common/include/platform_def.h
@@ -8,12 +8,13 @@
#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H
-#include <board_marvell_def.h>
-#include <mvebu_def.h>
#ifndef __ASSEMBLY__
#include <stdio.h>
#endif /* __ASSEMBLY__ */
+#include <board_marvell_def.h>
+#include <mvebu_def.h>
+
/*
* Most platform porting definitions provided by included headers
*/
diff --git a/plat/marvell/a3700/common/io_addr_dec.c b/plat/marvell/a3700/common/io_addr_dec.c
index f00959433..b27633cf2 100644
--- a/plat/marvell/a3700/common/io_addr_dec.c
+++ b/plat/marvell/a3700/common/io_addr_dec.c
@@ -4,9 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
* https://spdx.org/licenses
*/
-#include <debug.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include <io_addr_dec.h>
-#include <mmio.h>
#include <plat_marvell.h>
#define MVEBU_DEC_WIN_CTRL_REG(base, win, off) (MVEBU_REGS_BASE + (base) + \
diff --git a/plat/marvell/a3700/common/marvell_plat_config.c b/plat/marvell/a3700/common/marvell_plat_config.c
index 85a420130..3bf3d96bd 100644
--- a/plat/marvell/a3700/common/marvell_plat_config.c
+++ b/plat/marvell/a3700/common/marvell_plat_config.c
@@ -5,7 +5,8 @@
* https://spdx.org/licenses
*/
-#include <bl_common.h>
+#include <common/bl_common.h>
+
#include <io_addr_dec.h>
#include <mvebu_def.h>
diff --git a/plat/marvell/a3700/common/plat_pm.c b/plat/marvell/a3700/common/plat_pm.c
index dce484168..f8ce6fe29 100644
--- a/plat/marvell/a3700/common/plat_pm.c
+++ b/plat/marvell/a3700/common/plat_pm.c
@@ -5,22 +5,23 @@
* https://spdx.org/licenses
*/
+#include <common/debug.h>
+#ifdef USE_CCI
+#include <drivers/arm/cci.h>
+#endif
+#include <lib/psci/psci.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
#include <a3700_pm.h>
#include <arch_helpers.h>
#include <armada_common.h>
-#include <debug.h>
#include <dram_win.h>
#include <io_addr_dec.h>
-#include <mmio.h>
#include <mvebu.h>
#include <mvebu_def.h>
#include <marvell_plat_priv.h>
-#include <platform.h>
#include <plat_marvell.h>
-#include <psci.h>
-#ifdef USE_CCI
-#include <cci.h>
-#endif
/* Warm reset register */
#define MVEBU_WARM_RESET_REG (MVEBU_NB_REGS_BASE + 0x840)
diff --git a/plat/marvell/a8k/a70x0/board/dram_port.c b/plat/marvell/a8k/a70x0/board/dram_port.c
index c67025899..4fca7e383 100644
--- a/plat/marvell/a8k/a70x0/board/dram_port.c
+++ b/plat/marvell/a8k/a70x0/board/dram_port.c
@@ -6,7 +6,8 @@
*/
#include <arch_helpers.h>
-#include <debug.h>
+#include <common/debug.h>
+
#include <mv_ddr_if.h>
#include <plat_marvell.h>
diff --git a/plat/marvell/a8k/a70x0_amc/board/dram_port.c b/plat/marvell/a8k/a70x0_amc/board/dram_port.c
index ab1df465e..aecf6c567 100644
--- a/plat/marvell/a8k/a70x0_amc/board/dram_port.c
+++ b/plat/marvell/a8k/a70x0_amc/board/dram_port.c
@@ -6,7 +6,8 @@
*/
#include <arch_helpers.h>
-#include <debug.h>
+#include <common/debug.h>
+
#include <mv_ddr_if.h>
#include <plat_marvell.h>
diff --git a/plat/marvell/a8k/a80x0/board/dram_port.c b/plat/marvell/a8k/a80x0/board/dram_port.c
index a99bf7c21..02f4ffb0a 100644
--- a/plat/marvell/a8k/a80x0/board/dram_port.c
+++ b/plat/marvell/a8k/a80x0/board/dram_port.c
@@ -6,9 +6,10 @@
*/
#include <arch_helpers.h>
-#include <debug.h>
-#include <mentor/mi2cv.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/mentor/mi2cv.h>
+#include <lib/mmio.h>
+
#include <mv_ddr_if.h>
#include <mvebu_def.h>
#include <plat_marvell.h>
diff --git a/plat/marvell/a8k/a80x0_mcbin/board/dram_port.c b/plat/marvell/a8k/a80x0_mcbin/board/dram_port.c
index fa222eecf..25808523c 100644
--- a/plat/marvell/a8k/a80x0_mcbin/board/dram_port.c
+++ b/plat/marvell/a8k/a80x0_mcbin/board/dram_port.c
@@ -6,9 +6,10 @@
*/
#include <arch_helpers.h>
-#include <debug.h>
-#include <mentor/mi2cv.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/mentor/mi2cv.h>
+#include <lib/mmio.h>
+
#include <mv_ddr_if.h>
#include <mvebu_def.h>
#include <plat_marvell.h>
diff --git a/plat/marvell/a8k/a80x0_mcbin/board/marvell_plat_config.c b/plat/marvell/a8k/a80x0_mcbin/board/marvell_plat_config.c
index 384d0f54b..fa4e144c9 100644
--- a/plat/marvell/a8k/a80x0_mcbin/board/marvell_plat_config.c
+++ b/plat/marvell/a8k/a80x0_mcbin/board/marvell_plat_config.c
@@ -5,9 +5,10 @@
* https://spdx.org/licenses
*/
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
#include <armada_common.h>
-#include <delay_timer.h>
-#include <mmio.h>
/*
* If bootrom is currently at BLE there's no need to include the memory
diff --git a/plat/marvell/a8k/common/a8k_common.mk b/plat/marvell/a8k/common/a8k_common.mk
index e350d6ac9..efb05b8e2 100644
--- a/plat/marvell/a8k/common/a8k_common.mk
+++ b/plat/marvell/a8k/common/a8k_common.mk
@@ -50,8 +50,6 @@ ATF_INCLUDES := -Iinclude/common/tbbr
PLAT_INCLUDES := -I$(PLAT_FAMILY_BASE)/$(PLAT) \
-I$(PLAT_COMMON_BASE)/include \
-I$(PLAT_INCLUDE_BASE)/common \
- -Iinclude/drivers/marvell \
- -Iinclude/drivers/marvell/mochi \
$(ATF_INCLUDES)
PLAT_BL_COMMON_SOURCES := $(PLAT_COMMON_BASE)/aarch64/a8k_common.c \
diff --git a/plat/marvell/a8k/common/aarch64/plat_arch_config.c b/plat/marvell/a8k/common/aarch64/plat_arch_config.c
index 866733145..06dc84115 100644
--- a/plat/marvell/a8k/common/aarch64/plat_arch_config.c
+++ b/plat/marvell/a8k/common/aarch64/plat_arch_config.c
@@ -5,12 +5,11 @@
* https://spdx.org/licenses
*/
-#include <platform.h>
#include <arch_helpers.h>
-#include <mmio.h>
-#include <debug.h>
-#include <cache_llc.h>
-
+#include <common/debug.h>
+#include <drivers/marvell/cache_llc.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
#define CCU_HTC_ASET (MVEBU_CCU_BASE(MVEBU_AP0) + 0x264)
#define MVEBU_IO_AFFINITY (0xF00)
diff --git a/plat/marvell/a8k/common/ble/ble.mk b/plat/marvell/a8k/common/ble/ble.mk
index 5f24ced23..ed4ff3af2 100644
--- a/plat/marvell/a8k/common/ble/ble.mk
+++ b/plat/marvell/a8k/common/ble/ble.mk
@@ -13,12 +13,12 @@ PLAT_MARVELL = plat/marvell
BLE_SOURCES += $(BLE_PATH)/ble_main.c \
$(BLE_PATH)/ble_mem.S \
drivers/delay_timer/delay_timer.c \
+ $(PLAT_MARVELL)/common/aarch64/marvell_helpers.S \
$(PLAT_MARVELL)/common/plat_delay_timer.c \
$(PLAT_MARVELL)/common/marvell_console.c
PLAT_INCLUDES += -I$(MV_DDR_PATH) \
-I$(CURDIR)/include/ \
- -I$(CURDIR)/include/drivers \
-I$(CURDIR)/include/lib \
-I$(CURDIR)/include/lib/libc \
-I$(CURDIR)/include/lib/libc/aarch64 \
diff --git a/plat/marvell/a8k/common/ble/ble_main.c b/plat/marvell/a8k/common/ble/ble_main.c
index b04e8b7a6..5b3acec2d 100644
--- a/plat/marvell/a8k/common/ble/ble_main.c
+++ b/plat/marvell/a8k/common/ble/ble_main.c
@@ -5,14 +5,17 @@
* https://spdx.org/licenses
*/
+#include <string.h>
+
+#include <platform_def.h>
+
#include <arch_helpers.h>
-#include <debug.h>
-#include <console.h>
+#include <common/debug.h>
+#include <drivers/console.h>
+
#include <marvell_plat_priv.h>
#include <marvell_pm.h>
-#include <platform_def.h>
#include <plat_marvell.h>
-#include <string.h>
#define BR_FLAG_SILENT 0x1
#define SKIP_IMAGE_CODE 0xDEADB002
diff --git a/plat/marvell/a8k/common/include/platform_def.h b/plat/marvell/a8k/common/include/platform_def.h
index 4c3e7a9ea..3f6154e75 100644
--- a/plat/marvell/a8k/common/include/platform_def.h
+++ b/plat/marvell/a8k/common/include/platform_def.h
@@ -8,14 +8,16 @@
#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H
-#include <board_marvell_def.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
-#include <mvebu_def.h>
#ifndef __ASSEMBLY__
#include <stdio.h>
#endif /* __ASSEMBLY__ */
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+
+#include <board_marvell_def.h>
+#include <mvebu_def.h>
+
/*
* Most platform porting definitions provided by included headers
*/
diff --git a/plat/marvell/a8k/common/mss/mss_bl2_setup.c b/plat/marvell/a8k/common/mss/mss_bl2_setup.c
index 973c56dc8..728ee54a0 100644
--- a/plat/marvell/a8k/common/mss/mss_bl2_setup.c
+++ b/plat/marvell/a8k/common/mss/mss_bl2_setup.c
@@ -5,14 +5,16 @@
* https://spdx.org/licenses
*/
+#include <platform_def.h>
+
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/marvell/ccu.h>
+#include <drivers/marvell/mochi/cp110_setup.h>
+#include <lib/mmio.h>
+
#include <armada_common.h>
-#include <bl_common.h>
-#include <ccu.h>
-#include <cp110_setup.h>
-#include <debug.h>
#include <marvell_plat_priv.h> /* timer functionality */
-#include <mmio.h>
-#include <platform_def.h>
#include "mss_scp_bootloader.h"
diff --git a/plat/marvell/a8k/common/mss/mss_pm_ipc.c b/plat/marvell/a8k/common/mss/mss_pm_ipc.c
index d1297b07b..a0705832f 100644
--- a/plat/marvell/a8k/common/mss/mss_pm_ipc.c
+++ b/plat/marvell/a8k/common/mss/mss_pm_ipc.c
@@ -5,11 +5,12 @@
* https://spdx.org/licenses
*/
-#include <debug.h>
-#include <mmio.h>
-#include <psci.h>
#include <string.h>
+#include <common/debug.h>
+#include <lib/psci/psci.h>
+#include <lib/mmio.h>
+
#include <mss_pm_ipc.h>
/*
diff --git a/plat/marvell/a8k/common/plat_bl1_setup.c b/plat/marvell/a8k/common/plat_bl1_setup.c
index 5d8510279..f9521c871 100644
--- a/plat/marvell/a8k/common/plat_bl1_setup.c
+++ b/plat/marvell/a8k/common/plat_bl1_setup.c
@@ -5,7 +5,8 @@
* https://spdx.org/licenses
*/
-#include <mmio.h>
+#include <lib/mmio.h>
+
#include <plat_marvell.h>
void marvell_bl1_setup_mpps(void)
diff --git a/plat/marvell/a8k/common/plat_bl31_setup.c b/plat/marvell/a8k/common/plat_bl31_setup.c
index 6dfbcbb20..98b3966ae 100644
--- a/plat/marvell/a8k/common/plat_bl31_setup.c
+++ b/plat/marvell/a8k/common/plat_bl31_setup.c
@@ -5,17 +5,17 @@
* https://spdx.org/licenses
*/
+#include <common/debug.h>
+#include <drivers/marvell/mci.h>
+#include <drivers/marvell/mochi/ap_setup.h>
+#include <drivers/marvell/mochi/cp110_setup.h>
+#include <lib/mmio.h>
+
#include <armada_common.h>
-#include <ap_setup.h>
-#include <cp110_setup.h>
-#include <debug.h>
#include <marvell_plat_priv.h>
#include <marvell_pm.h>
#include <mc_trustzone/mc_trustzone.h>
-#include <mmio.h>
-#include <mci.h>
#include <plat_marvell.h>
-
#include <mss_ipc_drv.h>
#include <mss_mem.h>
diff --git a/plat/marvell/a8k/common/plat_ble_setup.c b/plat/marvell/a8k/common/plat_ble_setup.c
index dbadeb768..0590cc0ae 100644
--- a/plat/marvell/a8k/common/plat_ble_setup.c
+++ b/plat/marvell/a8k/common/plat_ble_setup.c
@@ -5,17 +5,18 @@
* https://spdx.org/licenses
*/
-#include <ap_setup.h>
+#include <common/debug.h>
+#include <drivers/marvell/ap807_clocks_init.h>
+#include <drivers/marvell/aro.h>
+#include <drivers/marvell/ccu.h>
+#include <drivers/marvell/io_win.h>
+#include <drivers/marvell/mochi/ap_setup.h>
+#include <drivers/marvell/mochi/cp110_setup.h>
+
#include <armada_common.h>
-#include <aro.h>
-#include <ccu.h>
-#include <cp110_setup.h>
-#include <debug.h>
-#include <io_win.h>
#include <mv_ddr_if.h>
#include <mvebu_def.h>
#include <plat_marvell.h>
-#include "ap807_clocks_init.h"
/* Register for skip image use */
#define SCRATCH_PAD_REG2 0xF06F00A8
diff --git a/plat/marvell/a8k/common/plat_pm.c b/plat/marvell/a8k/common/plat_pm.c
index 285441691..e2575b13c 100644
--- a/plat/marvell/a8k/common/plat_pm.c
+++ b/plat/marvell/a8k/common/plat_pm.c
@@ -5,19 +5,21 @@
* https://spdx.org/licenses
*/
-#include <armada_common.h>
#include <assert.h>
-#include <bakery_lock.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <cache_llc.h>
-#include <console.h>
-#include <gicv2.h>
+
+#include <common/debug.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/console.h>
+#include <drivers/delay_timer.h>
+#include <drivers/marvell/cache_llc.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
+#include <armada_common.h>
#include <marvell_pm.h>
-#include <mmio.h>
#include <mss_pm_ipc.h>
#include <plat_marvell.h>
-#include <platform.h>
#include <plat_pm_trace.h>
#define MVEBU_PRIVATE_UID_REG 0x30
diff --git a/plat/marvell/a8k/common/plat_pm_trace.c b/plat/marvell/a8k/common/plat_pm_trace.c
index 683e56f6a..f589ff31b 100644
--- a/plat/marvell/a8k/common/plat_pm_trace.c
+++ b/plat/marvell/a8k/common/plat_pm_trace.c
@@ -5,9 +5,10 @@
* https://spdx.org/licenses
*/
-#include <mmio.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
#include <mss_mem.h>
-#include <platform.h>
#include <plat_pm_trace.h>
#ifdef PM_TRACE_ENABLE
diff --git a/plat/marvell/a8k/common/plat_thermal.c b/plat/marvell/a8k/common/plat_thermal.c
index 02fe82097..a2fc0d0ab 100644
--- a/plat/marvell/a8k/common/plat_thermal.c
+++ b/plat/marvell/a8k/common/plat_thermal.c
@@ -5,11 +5,12 @@
* https://spdx.org/licenses
*/
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/marvell/thermal.h>
+#include <lib/mmio.h>
+
#include <mvebu_def.h>
-#include <thermal.h>
#define THERMAL_TIMEOUT 1200
diff --git a/plat/marvell/common/aarch64/marvell_bl2_mem_params_desc.c b/plat/marvell/common/aarch64/marvell_bl2_mem_params_desc.c
index 17f877123..6a8e11c90 100644
--- a/plat/marvell/common/aarch64/marvell_bl2_mem_params_desc.c
+++ b/plat/marvell/common/aarch64/marvell_bl2_mem_params_desc.c
@@ -4,12 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <bl_common.h>
-#include <desc_image_load.h>
-#include <marvell_def.h>
-#include <platform.h>
#include <platform_def.h>
+#include <common/bl_common.h>
+#include <common/desc_image_load.h>
+#include <marvell_def.h>
+#include <plat/common/platform.h>
/*******************************************************************************
* Following descriptor provides BL image/ep information that gets used
diff --git a/plat/marvell/common/aarch64/marvell_common.c b/plat/marvell/common/aarch64/marvell_common.c
index abc501a90..ea0902cc0 100644
--- a/plat/marvell/common/aarch64/marvell_common.c
+++ b/plat/marvell/common/aarch64/marvell_common.c
@@ -5,15 +5,17 @@
* https://spdx.org/licenses
*/
-#include <arch.h>
-#include <arch_helpers.h>
#include <assert.h>
-#include <debug.h>
-#include <mmio.h>
-#include <plat_marvell.h>
+
#include <platform_def.h>
-#include <xlat_tables.h>
+#include <arch.h>
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <lib/xlat_tables/xlat_tables.h>
+
+#include <plat_marvell.h>
/* Weak definitions may be overridden in specific ARM standard platform */
#pragma weak plat_get_ns_image_entrypoint
diff --git a/plat/marvell/common/aarch64/marvell_helpers.S b/plat/marvell/common/aarch64/marvell_helpers.S
index fbd19cb61..6f625b95d 100644
--- a/plat/marvell/common/aarch64/marvell_helpers.S
+++ b/plat/marvell/common/aarch64/marvell_helpers.S
@@ -7,12 +7,12 @@
#include <asm_macros.S>
#include <cortex_a72.h>
-#include <marvell_def.h>
-#include <platform_def.h>
#ifndef PLAT_a3700
-#include <ccu.h>
-#include <cache_llc.h>
+#include <drivers/marvell/ccu.h>
+#include <drivers/marvell/cache_llc.h>
#endif
+#include <marvell_def.h>
+#include <platform_def.h>
.weak plat_marvell_calc_core_pos
.weak plat_my_core_pos
diff --git a/plat/marvell/common/marvell_bl1_setup.c b/plat/marvell/common/marvell_bl1_setup.c
index c96f00679..8f7221025 100644
--- a/plat/marvell/common/marvell_bl1_setup.c
+++ b/plat/marvell/common/marvell_bl1_setup.c
@@ -5,15 +5,17 @@
* https://spdx.org/licenses
*/
-#include <bl1.h>
-#include <bl1/bl1_private.h>
-#include <bl_common.h>
-#include <console.h>
-#include <debug.h>
-#include <platform.h>
#include <platform_def.h>
+
+#include <bl1/bl1.h>
+#include <bl1/bl1_private.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/arm/sp805.h>
+#include <drivers/console.h>
+#include <plat/common/platform.h>
+
#include <plat_marvell.h>
-#include <sp805.h>
/* Weak definitions may be overridden in specific Marvell standard platform */
#pragma weak bl1_early_platform_setup
diff --git a/plat/marvell/common/marvell_bl2_setup.c b/plat/marvell/common/marvell_bl2_setup.c
index 883336f0d..3c1c39112 100644
--- a/plat/marvell/common/marvell_bl2_setup.c
+++ b/plat/marvell/common/marvell_bl2_setup.c
@@ -5,17 +5,20 @@
* https://spdx.org/licenses
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <console.h>
-#include <debug.h>
-#include <desc_image_load.h>
-#include <marvell_def.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/console.h>
+#include <lib/utils.h>
+
+#include <marvell_def.h>
#include <plat_marvell.h>
-#include <string.h>
-#include <utils.h>
/* Data structure which holds the extents of the trusted SRAM for BL2 */
static meminfo_t bl2_tzram_layout __aligned(CACHE_WRITEBACK_GRANULE);
diff --git a/plat/marvell/common/marvell_bl31_setup.c b/plat/marvell/common/marvell_bl31_setup.c
index 3b1a6f130..802c01383 100644
--- a/plat/marvell/common/marvell_bl31_setup.c
+++ b/plat/marvell/common/marvell_bl31_setup.c
@@ -5,18 +5,19 @@
* https://spdx.org/licenses
*/
-#include <arch.h>
#include <assert.h>
-#include <console.h>
-#include <debug.h>
-#include <marvell_def.h>
-#include <marvell_plat_priv.h>
-#include <plat_marvell.h>
-#include <platform.h>
+#include <arch.h>
+#include <common/debug.h>
#ifdef USE_CCI
-#include <cci.h>
+#include <drivers/arm/cci.h>
#endif
+#include <drivers/console.h>
+#include <plat/common/platform.h>
+
+#include <marvell_def.h>
+#include <marvell_plat_priv.h>
+#include <plat_marvell.h>
/*
* The next 3 constants identify the extents of the code, RO data region and the
diff --git a/plat/marvell/common/marvell_cci.c b/plat/marvell/common/marvell_cci.c
index 2df480243..80351aedc 100644
--- a/plat/marvell/common/marvell_cci.c
+++ b/plat/marvell/common/marvell_cci.c
@@ -5,7 +5,8 @@
* https://spdx.org/licenses
*/
-#include <cci.h>
+#include <drivers/arm/cci.h>
+
#include <plat_marvell.h>
static const int cci_map[] = {
diff --git a/plat/marvell/common/marvell_console.c b/plat/marvell/common/marvell_console.c
index eba106dc1..22c5eb3af 100644
--- a/plat/marvell/common/marvell_console.c
+++ b/plat/marvell/common/marvell_console.c
@@ -4,18 +4,21 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
-#include <console.h>
-#include <debug.h>
-#include <plat_marvell.h>
+
#include <platform_def.h>
+#include <common/debug.h>
+#include <drivers/console.h>
+
+#include <plat_marvell.h>
+
#ifdef PLAT_a3700
-#include <a3700_console.h>
+#include <drivers/marvell/uart/a3700_console.h>
static console_a3700_t marvell_boot_console;
static console_a3700_t marvell_runtime_console;
#else
-#include <uart_16550.h>
+#include <drivers/ti/uart/uart_16550.h>
static console_16550_t marvell_boot_console;
static console_16550_t marvell_runtime_console;
diff --git a/plat/marvell/common/marvell_ddr_info.c b/plat/marvell/common/marvell_ddr_info.c
index 68bff998b..734099652 100644
--- a/plat/marvell/common/marvell_ddr_info.c
+++ b/plat/marvell/common/marvell_ddr_info.c
@@ -5,10 +5,12 @@
* https://spdx.org/licenses
*/
-#include <debug.h>
#include <platform_def.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
#include <ddr_info.h>
-#include <mmio.h>
#define DRAM_CH0_MMAP_LOW_REG(iface, cs, base) \
(base + DRAM_CH0_MMAP_LOW_OFFSET + (iface) * 0x10000 + (cs) * 0x8)
diff --git a/plat/marvell/common/marvell_gicv2.c b/plat/marvell/common/marvell_gicv2.c
index 19e1ec0f5..2505c9f84 100644
--- a/plat/marvell/common/marvell_gicv2.c
+++ b/plat/marvell/common/marvell_gicv2.c
@@ -5,15 +5,17 @@
* https://spdx.org/licenses
*/
-#include <bakery_lock.h>
-#include <debug.h>
-#include <gicv2.h>
-#include <interrupt_mgmt.h>
-#include <mmio.h>
-#include <plat_marvell.h>
-#include <platform.h>
#include <platform_def.h>
+#include <bl31/interrupt_mgmt.h>
+#include <common/debug.h>
+#include <drivers/arm/gicv2.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
+#include <plat_marvell.h>
+
/*
* The following functions are defined as weak to allow a platform to override
* the way the GICv2 driver is initialised and used.
diff --git a/plat/marvell/common/marvell_gicv3.c b/plat/marvell/common/marvell_gicv3.c
index 7cfefaf5c..0bd554570 100644
--- a/plat/marvell/common/marvell_gicv3.c
+++ b/plat/marvell/common/marvell_gicv3.c
@@ -5,13 +5,15 @@
* https://spdx.org/licenses
*/
-#include <debug.h>
-#include <gicv3.h>
-#include <interrupt_props.h>
+#include <platform_def.h>
+
+#include <common/debug.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gicv3.h>
+#include <plat/common/platform.h>
+
#include <marvell_def.h>
#include <plat_marvell.h>
-#include <platform.h>
-#include <platform_def.h>
/******************************************************************************
* The following functions are defined as weak to allow a platform to override
diff --git a/plat/marvell/common/marvell_image_load.c b/plat/marvell/common/marvell_image_load.c
index d69b1b121..be16b0898 100644
--- a/plat/marvell/common/marvell_image_load.c
+++ b/plat/marvell/common/marvell_image_load.c
@@ -4,11 +4,12 @@
* 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>
+
/*******************************************************************************
* This function flushes the data structures so that they are visible
* in memory for the next BL image.
diff --git a/plat/marvell/common/marvell_io_storage.c b/plat/marvell/common/marvell_io_storage.c
index cb9ece247..065f95688 100644
--- a/plat/marvell/common/marvell_io_storage.c
+++ b/plat/marvell/common/marvell_io_storage.c
@@ -6,16 +6,18 @@
*/
#include <assert.h>
-#include <bl_common.h> /* For ARRAY_SIZE */
-#include <debug.h>
-#include <firmware_image_package.h>
-#include <io_driver.h>
-#include <io_fip.h>
-#include <io_memmap.h>
-#include <io_storage.h>
-#include <platform_def.h>
#include <string.h>
+#include <platform_def.h>
+
+#include <common/bl_common.h>
+#include <common/debug.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 <tools_share/firmware_image_package.h>
+
/* IO devices */
static const io_dev_connector_t *fip_dev_con;
static uintptr_t fip_dev_handle;
diff --git a/plat/marvell/common/marvell_pm.c b/plat/marvell/common/marvell_pm.c
index 2a7579009..3c675b296 100644
--- a/plat/marvell/common/marvell_pm.c
+++ b/plat/marvell/common/marvell_pm.c
@@ -5,9 +5,11 @@
* https://spdx.org/licenses
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <psci.h>
+
+#include <arch_helpers.h>
+#include <lib/psci/psci.h>
+
#include <marvell_pm.h>
/* Standard ARM platforms are expected to export plat_arm_psci_pm_ops */
diff --git a/plat/marvell/common/mrvl_sip_svc.c b/plat/marvell/common/mrvl_sip_svc.c
index bc4b62113..df211059b 100644
--- a/plat/marvell/common/mrvl_sip_svc.c
+++ b/plat/marvell/common/mrvl_sip_svc.c
@@ -5,13 +5,15 @@
* https://spdx.org/licenses
*/
-#include <ap_setup.h>
-#include <cache_llc.h>
-#include <debug.h>
+#include <common/debug.h>
+#include <common/runtime_svc.h>
+#include <drivers/marvell/cache_llc.h>
+#include <drivers/marvell/mochi/ap_setup.h>
+#include <lib/smccc.h>
+
#include <marvell_plat_priv.h>
#include <plat_marvell.h>
-#include <runtime_svc.h>
-#include <smccc.h>
+
#include "comphy/phy-comphy-cp110.h"
/* #define DEBUG_COMPHY */
diff --git a/plat/marvell/common/mss/mss_ipc_drv.c b/plat/marvell/common/mss/mss_ipc_drv.c
index 731c315bf..70ccfa5ac 100644
--- a/plat/marvell/common/mss/mss_ipc_drv.c
+++ b/plat/marvell/common/mss/mss_ipc_drv.c
@@ -5,11 +5,13 @@
* https://spdx.org/licenses
*/
-#include <plat_marvell.h>
-#include <debug.h>
#include <string.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
+#include <plat_marvell.h>
#include <mss_ipc_drv.h>
-#include <mmio.h>
#define IPC_MSG_BASE_MASK MVEBU_REGS_BASE_MASK
diff --git a/plat/marvell/common/mss/mss_ipc_drv.h b/plat/marvell/common/mss/mss_ipc_drv.h
index 7bb15d3f2..bcb4b2d8f 100644
--- a/plat/marvell/common/mss/mss_ipc_drv.h
+++ b/plat/marvell/common/mss/mss_ipc_drv.h
@@ -8,7 +8,7 @@
#ifndef MSS_IPC_DRV_H
#define MSS_IPC_DRV_H
-#include <psci.h>
+#include <lib/psci/psci.h>
#define MV_PM_FW_IPC_VERSION_MAGIC (0xCA530000) /* Do NOT change */
/* Increament for each version */
diff --git a/plat/marvell/common/mss/mss_scp_bootloader.c b/plat/marvell/common/mss/mss_scp_bootloader.c
index 334fcfc61..7e442c615 100644
--- a/plat/marvell/common/mss/mss_scp_bootloader.c
+++ b/plat/marvell/common/mss/mss_scp_bootloader.c
@@ -6,11 +6,13 @@
*/
#include <assert.h>
-#include <debug.h>
-#include <mmio.h>
-#include <arch_helpers.h> /* for cache maintanance operations */
+
#include <platform_def.h>
-#include <delay_timer.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
#include <plat_pm_trace.h>
#include <mss_scp_bootloader.h>
diff --git a/plat/marvell/common/plat_delay_timer.c b/plat/marvell/common/plat_delay_timer.c
index dfc77c7fe..253975264 100644
--- a/plat/marvell/common/plat_delay_timer.c
+++ b/plat/marvell/common/plat_delay_timer.c
@@ -6,7 +6,8 @@
*/
#include <arch_helpers.h>
-#include <delay_timer.h>
+#include <drivers/delay_timer.h>
+
#include <mvebu_def.h>
#define SYS_COUNTER_FREQ_IN_MHZ (COUNTER_FREQUENCY/1000000)