aboutsummaryrefslogtreecommitdiff
path: root/plat/marvell/common
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/common
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/common')
-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
19 files changed, 114 insertions, 84 deletions
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 17f8771238..6a8e11c90f 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 abc501a90d..ea0902cc07 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 fbd19cb612..6f625b95d5 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 c96f00679d..8f72210250 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 883336f0da..3c1c39112b 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 3b1a6f130c..802c01383b 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 2df480243e..80351aedcd 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 eba106dc1a..22c5eb3afd 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 68bff998b1..734099652f 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 19e1ec0f53..2505c9f84d 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 7cfefaf5cf..0bd5545708 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 d69b1b1214..be16b08989 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 cb9ece2475..065f956885 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 2a75790093..3c675b296b 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 bc4b621132..df211059b9 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 731c315bf0..70ccfa5acc 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 7bb15d3f28..bcb4b2d8f9 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 334fcfc614..7e442c6154 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 dfc77c7fef..253975264b 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)