summaryrefslogtreecommitdiff
path: root/include/plat
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 /include/plat
parentf5478dedf9e096d9539362b38ceb096b940ba3e2 (diff)
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 'include/plat')
-rw-r--r--include/plat/arm/board/common/board_css_def.h7
-rw-r--r--include/plat/arm/board/common/v2m_def.h2
-rw-r--r--include/plat/arm/common/aarch64/arm_macros.S6
-rw-r--r--include/plat/arm/common/aarch64/cci_macros.S2
-rw-r--r--include/plat/arm/common/arm_config.h3
-rw-r--r--include/plat/arm/common/arm_def.h14
-rw-r--r--include/plat/arm/common/arm_sip_svc.h2
-rw-r--r--include/plat/arm/common/arm_spm_def.h5
-rw-r--r--include/plat/arm/common/arm_tzc_dram.ld.S8
-rw-r--r--include/plat/arm/common/plat_arm.h15
-rw-r--r--include/plat/arm/css/common/css_def.h7
-rw-r--r--include/plat/arm/css/common/css_pm.h3
-rw-r--r--include/plat/arm/soc/common/soc_css_def.h5
-rw-r--r--include/plat/common/common_def.h7
-rw-r--r--include/plat/common/platform.h3
-rw-r--r--include/plat/marvell/a3700/common/armada_common.h3
-rw-r--r--include/plat/marvell/a3700/common/marvell_def.h8
-rw-r--r--include/plat/marvell/a3700/common/plat_marvell.h9
-rw-r--r--include/plat/marvell/a8k/common/armada_common.h8
-rw-r--r--include/plat/marvell/a8k/common/marvell_def.h8
-rw-r--r--include/plat/marvell/a8k/common/plat_marvell.h9
-rw-r--r--include/plat/marvell/common/aarch64/cci_macros.S2
-rw-r--r--include/plat/marvell/common/aarch64/marvell_macros.S8
-rw-r--r--include/plat/marvell/common/marvell_plat_priv.h2
24 files changed, 78 insertions, 68 deletions
diff --git a/include/plat/arm/board/common/board_css_def.h b/include/plat/arm/board/common/board_css_def.h
index 29211be2..6cca3890 100644
--- a/include/plat/arm/board/common/board_css_def.h
+++ b/include/plat/arm/board/common/board_css_def.h
@@ -7,9 +7,10 @@
#ifndef BOARD_CSS_DEF_H
#define BOARD_CSS_DEF_H
-#include <common_def.h>
+#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
+
#include <soc_css_def.h>
-#include <utils_def.h>
#include <v2m_def.h>
/*
@@ -31,7 +32,7 @@
#ifndef __ASSEMBLY__
-#include <mmio.h>
+#include <lib/mmio.h>
#define BOARD_CSS_GET_PLAT_TYPE(addr) \
((mmio_read_32(addr) & BOARD_CSS_PLAT_ID_REG_ID_MASK) \
diff --git a/include/plat/arm/board/common/v2m_def.h b/include/plat/arm/board/common/v2m_def.h
index ed57fc9a..c5de407a 100644
--- a/include/plat/arm/board/common/v2m_def.h
+++ b/include/plat/arm/board/common/v2m_def.h
@@ -6,7 +6,7 @@
#ifndef V2M_DEF_H
#define V2M_DEF_H
-#include <xlat_tables_compat.h>
+#include <lib/xlat_tables/xlat_tables_compat.h>
/* V2M motherboard system registers & offsets */
#define V2M_SYSREGS_BASE UL(0x1c010000)
diff --git a/include/plat/arm/common/aarch64/arm_macros.S b/include/plat/arm/common/aarch64/arm_macros.S
index c2ba7db9..0bd0daf5 100644
--- a/include/plat/arm/common/aarch64/arm_macros.S
+++ b/include/plat/arm/common/aarch64/arm_macros.S
@@ -6,9 +6,9 @@
#ifndef ARM_MACROS_S
#define ARM_MACROS_S
-#include <gic_common.h>
-#include <gicv2.h>
-#include <gicv3.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/gicv3.h>
#include <platform_def.h>
.section .rodata.gic_reg_name, "aS"
diff --git a/include/plat/arm/common/aarch64/cci_macros.S b/include/plat/arm/common/aarch64/cci_macros.S
index 069dc854..07f7cd39 100644
--- a/include/plat/arm/common/aarch64/cci_macros.S
+++ b/include/plat/arm/common/aarch64/cci_macros.S
@@ -6,7 +6,7 @@
#ifndef CCI_MACROS_S
#define CCI_MACROS_S
-#include <cci.h>
+#include <drivers/arm/cci.h>
#include <platform_def.h>
.section .rodata.cci_reg_name, "aS"
diff --git a/include/plat/arm/common/arm_config.h b/include/plat/arm/common/arm_config.h
index 4dda3506..c2b28df5 100644
--- a/include/plat/arm/common/arm_config.h
+++ b/include/plat/arm/common/arm_config.h
@@ -7,7 +7,8 @@
#define ARM_CONFIG_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Whether Base memory map is in use */
#define ARM_CONFIG_BASE_MMAP BIT(1)
diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h
index 4ab3a808..c63fddb3 100644
--- a/include/plat/arm/common/arm_def.h
+++ b/include/plat/arm/common/arm_def.h
@@ -6,15 +6,15 @@
#ifndef ARM_DEF_H
#define ARM_DEF_H
-#include <arch.h>
-#include <common_def.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+#include <arch.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 <lib/xlat_tables/xlat_tables_defs.h>
+#include <plat/common/common_def.h>
/******************************************************************************
* Definitions common to all ARM standard platforms
diff --git a/include/plat/arm/common/arm_sip_svc.h b/include/plat/arm/common/arm_sip_svc.h
index 3e25cbc6..16573ce6 100644
--- a/include/plat/arm/common/arm_sip_svc.h
+++ b/include/plat/arm/common/arm_sip_svc.h
@@ -7,7 +7,7 @@
#ifndef ARM_SIP_SVC_H
#define ARM_SIP_SVC_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* SMC function IDs for SiP Service queries */
diff --git a/include/plat/arm/common/arm_spm_def.h b/include/plat/arm/common/arm_spm_def.h
index bf3cb8fa..bdcbc96a 100644
--- a/include/plat/arm/common/arm_spm_def.h
+++ b/include/plat/arm/common/arm_spm_def.h
@@ -6,9 +6,10 @@
#ifndef ARM_SPM_DEF_H
#define ARM_SPM_DEF_H
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
+
#include <arm_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
/*
* Reserve 4 MiB for binaries of Secure Partitions and Resource Description
diff --git a/include/plat/arm/common/arm_tzc_dram.ld.S b/include/plat/arm/common/arm_tzc_dram.ld.S
index df951e11..6dcea0b6 100644
--- a/include/plat/arm/common/arm_tzc_dram.ld.S
+++ b/include/plat/arm/common/arm_tzc_dram.ld.S
@@ -3,10 +3,10 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef ARM_TZC_DRAM_LD_S__
-#define ARM_TZC_DRAM_LD_S__
+#ifndef ARM_TZC_DRAM_LD_S
+#define ARM_TZC_DRAM_LD_S
-#include <xlat_tables_defs.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
MEMORY {
EL3_SEC_DRAM (rw): ORIGIN = ARM_EL3_TZC_DRAM1_BASE, LENGTH = ARM_EL3_TZC_DRAM1_SIZE
@@ -27,4 +27,4 @@ SECTIONS
} >EL3_SEC_DRAM
}
-#endif /* ARM_TZC_DRAM_LD_S__ */
+#endif /* ARM_TZC_DRAM_LD_S */
diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h
index 9b459841..62816082 100644
--- a/include/plat/arm/common/plat_arm.h
+++ b/include/plat/arm/common/plat_arm.h
@@ -6,14 +6,15 @@
#ifndef PLAT_ARM_H
#define PLAT_ARM_H
-#include <bakery_lock.h>
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <spinlock.h>
-#include <tzc_common.h>
-#include <utils_def.h>
-#include <xlat_tables_compat.h>
+
+#include <drivers/arm/tzc_common.h>
+#include <lib/bakery_lock.h>
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/spinlock.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_compat.h>
/*******************************************************************************
* Forward declarations
diff --git a/include/plat/arm/css/common/css_def.h b/include/plat/arm/css/common/css_def.h
index 4a7d314c..6b355a4e 100644
--- a/include/plat/arm/css/common/css_def.h
+++ b/include/plat/arm/css/common/css_def.h
@@ -7,10 +7,11 @@
#ifndef CSS_DEF_H
#define CSS_DEF_H
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/tzc400.h>
+
#include <arm_def.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
-#include <tzc400.h>
/*************************************************************************
* Definitions common to all ARM Compute SubSystems (CSS)
diff --git a/include/plat/arm/css/common/css_pm.h b/include/plat/arm/css/common/css_pm.h
index ff75c691..b82ff47e 100644
--- a/include/plat/arm/css/common/css_pm.h
+++ b/include/plat/arm/css/common/css_pm.h
@@ -8,9 +8,10 @@
#define CSS_PM_H
#include <cdefs.h>
-#include <psci.h>
#include <stdint.h>
+#include <lib/psci/psci.h>
+
/* Macros to read the CSS power domain state */
#define CSS_CORE_PWR_STATE(state) (state)->pwr_domain_state[ARM_PWR_LVL0]
#define CSS_CLUSTER_PWR_STATE(state) (state)->pwr_domain_state[ARM_PWR_LVL1]
diff --git a/include/plat/arm/soc/common/soc_css_def.h b/include/plat/arm/soc/common/soc_css_def.h
index 263313a9..b4b6ba8e 100644
--- a/include/plat/arm/soc/common/soc_css_def.h
+++ b/include/plat/arm/soc/common/soc_css_def.h
@@ -7,9 +7,8 @@
#ifndef SOC_CSS_DEF_H
#define SOC_CSS_DEF_H
-#include <common_def.h>
-#include <utils_def.h>
-
+#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
/*
* Definitions common to all ARM CSS SoCs
diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h
index 66074ac1..66c88ba8 100644
--- a/include/plat/common/common_def.h
+++ b/include/plat/common/common_def.h
@@ -6,10 +6,11 @@
#ifndef COMMON_DEF_H
#define COMMON_DEF_H
-#include <bl_common.h>
#include <platform_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+
+#include <common/bl_common.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
/******************************************************************************
* Required platform porting definitions that are expected to be common to
diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h
index 04272b1b..13767ff0 100644
--- a/include/plat/common/platform.h
+++ b/include/plat/common/platform.h
@@ -7,9 +7,10 @@
#ifndef PLATFORM_H
#define PLATFORM_H
-#include <psci.h>
#include <stdint.h>
+#include <lib/psci/psci.h>
+
/*******************************************************************************
* Forward declarations
******************************************************************************/
diff --git a/include/plat/marvell/a3700/common/armada_common.h b/include/plat/marvell/a3700/common/armada_common.h
index fdcc02a6..c6953fb7 100644
--- a/include/plat/marvell/a3700/common/armada_common.h
+++ b/include/plat/marvell/a3700/common/armada_common.h
@@ -8,9 +8,10 @@
#ifndef ARMADA_COMMON_H
#define ARMADA_COMMON_H
-#include <io_addr_dec.h>
#include <stdint.h>
+#include <io_addr_dec.h>
+
int marvell_get_io_dec_win_conf(struct dec_win_config **win, uint32_t *size);
#endif /* ARMADA_COMMON_H */
diff --git a/include/plat/marvell/a3700/common/marvell_def.h b/include/plat/marvell/a3700/common/marvell_def.h
index 3c105fca..229b8b02 100644
--- a/include/plat/marvell/a3700/common/marvell_def.h
+++ b/include/plat/marvell/a3700/common/marvell_def.h
@@ -8,12 +8,12 @@
#ifndef MARVELL_DEF_H
#define MARVELL_DEF_H
-#include <arch.h>
-#include <common_def.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <xlat_tables.h>
+#include <arch.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/common_def.h>
/****************************************************************************
* Definitions common to all MARVELL standard platforms
diff --git a/include/plat/marvell/a3700/common/plat_marvell.h b/include/plat/marvell/a3700/common/plat_marvell.h
index 01e42c54..8b8b53ff 100644
--- a/include/plat/marvell/a3700/common/plat_marvell.h
+++ b/include/plat/marvell/a3700/common/plat_marvell.h
@@ -8,11 +8,12 @@
#ifndef PLAT_MARVELL_H
#define PLAT_MARVELL_H
-#include <bl_common.h>
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <xlat_tables.h>
+
+#include <common/bl_common.h>
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/xlat_tables/xlat_tables.h>
/*
* Extern declarations common to Marvell standard platforms
diff --git a/include/plat/marvell/a8k/common/armada_common.h b/include/plat/marvell/a8k/common/armada_common.h
index 64d9adf9..dd2a24ab 100644
--- a/include/plat/marvell/a8k/common/armada_common.h
+++ b/include/plat/marvell/a8k/common/armada_common.h
@@ -8,10 +8,10 @@
#ifndef ARMADA_COMMON_H
#define ARMADA_COMMON_H
-#include <amb_adec.h>
-#include <io_win.h>
-#include <iob.h>
-#include <ccu.h>
+#include <drivers/marvell/amb_adec.h>
+#include <drivers/marvell/ccu.h>
+#include <drivers/marvell/io_win.h>
+#include <drivers/marvell/iob.h>
/*
* This struct supports skip image request
diff --git a/include/plat/marvell/a8k/common/marvell_def.h b/include/plat/marvell/a8k/common/marvell_def.h
index c67b3cd8..5ba90f71 100644
--- a/include/plat/marvell/a8k/common/marvell_def.h
+++ b/include/plat/marvell/a8k/common/marvell_def.h
@@ -8,12 +8,12 @@
#ifndef MARVELL_DEF_H
#define MARVELL_DEF_H
-#include <arch.h>
-#include <common_def.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <xlat_tables.h>
+#include <arch.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/common_def.h>
/******************************************************************************
* Definitions common to all MARVELL standard platforms
diff --git a/include/plat/marvell/a8k/common/plat_marvell.h b/include/plat/marvell/a8k/common/plat_marvell.h
index 037548da..65d4de8a 100644
--- a/include/plat/marvell/a8k/common/plat_marvell.h
+++ b/include/plat/marvell/a8k/common/plat_marvell.h
@@ -8,11 +8,12 @@
#ifndef PLAT_MARVELL_H
#define PLAT_MARVELL_H
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <utils.h>
-#include <xlat_tables.h>
+
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/utils.h>
+#include <lib/xlat_tables/xlat_tables.h>
/*
* Extern declarations common to Marvell standard platforms
diff --git a/include/plat/marvell/common/aarch64/cci_macros.S b/include/plat/marvell/common/aarch64/cci_macros.S
index 96b364ee..b0a909bb 100644
--- a/include/plat/marvell/common/aarch64/cci_macros.S
+++ b/include/plat/marvell/common/aarch64/cci_macros.S
@@ -8,7 +8,7 @@
#ifndef CCI_MACROS_S
#define CCI_MACROS_S
-#include <cci.h>
+#include <drivers/arm/cci.h>
#include <platform_def.h>
.section .rodata.cci_reg_name, "aS"
diff --git a/include/plat/marvell/common/aarch64/marvell_macros.S b/include/plat/marvell/common/aarch64/marvell_macros.S
index c2a8bd05..bfe2d412 100644
--- a/include/plat/marvell/common/aarch64/marvell_macros.S
+++ b/include/plat/marvell/common/aarch64/marvell_macros.S
@@ -8,10 +8,10 @@
#ifndef MARVELL_MACROS_S
#define MARVELL_MACROS_S
-#include <cci.h>
-#include <gic_common.h>
-#include <gicv2.h>
-#include <gicv3.h>
+#include <drivers/arm/cci.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/gicv3.h>
#include <platform_def.h>
/*
diff --git a/include/plat/marvell/common/marvell_plat_priv.h b/include/plat/marvell/common/marvell_plat_priv.h
index 6f0b588a..78b5331e 100644
--- a/include/plat/marvell/common/marvell_plat_priv.h
+++ b/include/plat/marvell/common/marvell_plat_priv.h
@@ -8,7 +8,7 @@
#ifndef MARVELL_PLAT_PRIV_H
#define MARVELL_PLAT_PRIV_H
-#include <utils.h>
+#include <lib/utils.h>
/*****************************************************************************
* Function and variable prototypes