aboutsummaryrefslogtreecommitdiff
path: root/plat/socionext/synquacer
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/socionext/synquacer
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/socionext/synquacer')
-rw-r--r--plat/socionext/synquacer/drivers/mhu/sq_mhu.c9
-rw-r--r--plat/socionext/synquacer/drivers/scpi/sq_scpi.c9
-rw-r--r--plat/socionext/synquacer/include/platform_def.h4
-rw-r--r--plat/socionext/synquacer/include/sq_common.h3
-rw-r--r--plat/socionext/synquacer/sq_bl31_setup.c15
-rw-r--r--plat/socionext/synquacer/sq_ccn.c5
-rw-r--r--plat/socionext/synquacer/sq_gicv3.c8
-rw-r--r--plat/socionext/synquacer/sq_psci.c15
-rw-r--r--plat/socionext/synquacer/sq_topology.c4
-rw-r--r--plat/socionext/synquacer/sq_xlat_setup.c5
10 files changed, 48 insertions, 29 deletions
diff --git a/plat/socionext/synquacer/drivers/mhu/sq_mhu.c b/plat/socionext/synquacer/drivers/mhu/sq_mhu.c
index 5c2a635bb9..925ed97042 100644
--- a/plat/socionext/synquacer/drivers/mhu/sq_mhu.c
+++ b/plat/socionext/synquacer/drivers/mhu/sq_mhu.c
@@ -4,11 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bakery_lock.h>
-#include <mmio.h>
+
#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+
#include <sq_common.h>
#include "sq_mhu.h"
diff --git a/plat/socionext/synquacer/drivers/scpi/sq_scpi.c b/plat/socionext/synquacer/drivers/scpi/sq_scpi.c
index 170b7e1846..0cb75a02df 100644
--- a/plat/socionext/synquacer/drivers/scpi/sq_scpi.c
+++ b/plat/socionext/synquacer/drivers/scpi/sq_scpi.c
@@ -4,12 +4,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
+#include <string.h>
+
#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
#include <sq_common.h>
-#include <debug.h>
-#include <string.h>
+
#include "sq_mhu.h"
#include "sq_scpi.h"
diff --git a/plat/socionext/synquacer/include/platform_def.h b/plat/socionext/synquacer/include/platform_def.h
index bde73485bf..de6be7d231 100644
--- a/plat/socionext/synquacer/include/platform_def.h
+++ b/plat/socionext/synquacer/include/platform_def.h
@@ -7,8 +7,8 @@
#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H
-#include <common_def.h>
-#include <utils_def.h>
+#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
/* CPU topology */
#define PLAT_MAX_CORES_PER_CLUSTER 2
diff --git a/plat/socionext/synquacer/include/sq_common.h b/plat/socionext/synquacer/include/sq_common.h
index c395640347..abd90904d7 100644
--- a/plat/socionext/synquacer/include/sq_common.h
+++ b/plat/socionext/synquacer/include/sq_common.h
@@ -8,7 +8,8 @@
#define SQ_COMMON_H
#include <stdint.h>
-#include <xlat_tables_v2.h>
+
+#include <lib/xlat_tables/xlat_tables_v2.h>
struct draminfo {
uint32_t num_regions;
diff --git a/plat/socionext/synquacer/sq_bl31_setup.c b/plat/socionext/synquacer/sq_bl31_setup.c
index 07c1f89970..f8d252622c 100644
--- a/plat/socionext/synquacer/sq_bl31_setup.c
+++ b/plat/socionext/synquacer/sq_bl31_setup.c
@@ -4,14 +4,17 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <assert.h>
+
+#include <platform_def.h>
+
#include <arch.h>
#include <arch_helpers.h>
-#include <platform_def.h>
-#include <assert.h>
-#include <bl_common.h>
-#include <pl011.h>
-#include <debug.h>
-#include <mmio.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/arm/pl011.h>
+#include <lib/mmio.h>
+
#include <sq_common.h>
static console_pl011_t console;
diff --git a/plat/socionext/synquacer/sq_ccn.c b/plat/socionext/synquacer/sq_ccn.c
index bb70d5d801..fa6ea87b2d 100644
--- a/plat/socionext/synquacer/sq_ccn.c
+++ b/plat/socionext/synquacer/sq_ccn.c
@@ -4,10 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <platform_def.h>
+
#include <arch.h>
#include <arch_helpers.h>
-#include <ccn.h>
-#include <platform_def.h>
+#include <drivers/arm/ccn.h>
static const unsigned char master_to_rn_id_map[] = {
PLAT_SQ_CLUSTER_TO_CCN_ID_MAP
diff --git a/plat/socionext/synquacer/sq_gicv3.c b/plat/socionext/synquacer/sq_gicv3.c
index 94e5a66b69..05318e3723 100644
--- a/plat/socionext/synquacer/sq_gicv3.c
+++ b/plat/socionext/synquacer/sq_gicv3.c
@@ -5,11 +5,13 @@
*/
#include <assert.h>
-#include <gicv3.h>
-#include <interrupt_props.h>
-#include <platform.h>
+
#include <platform_def.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gicv3.h>
+#include <plat/common/platform.h>
+
#include "sq_common.h"
static uintptr_t sq_rdistif_base_addrs[PLATFORM_CORE_COUNT];
diff --git a/plat/socionext/synquacer/sq_psci.c b/plat/socionext/synquacer/sq_psci.c
index c327f1d483..134224dce6 100644
--- a/plat/socionext/synquacer/sq_psci.c
+++ b/plat/socionext/synquacer/sq_psci.c
@@ -4,17 +4,20 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <cassert.h>
-#include <debug.h>
-#include <delay_timer.h>
#include <errno.h>
-#include <generic_delay_timer.h>
+
#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <drivers/generic_delay_timer.h>
+#include <lib/cassert.h>
+#include <lib/psci/psci.h>
+
#include <sq_common.h>
#include "sq_scpi.h"
-#include <psci.h>
/* Macros to read the SQ power domain state */
#define SQ_PWR_LVL0 MPIDR_AFFLVL0
diff --git a/plat/socionext/synquacer/sq_topology.c b/plat/socionext/synquacer/sq_topology.c
index aa20355999..359997aaef 100644
--- a/plat/socionext/synquacer/sq_topology.c
+++ b/plat/socionext/synquacer/sq_topology.c
@@ -4,9 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <platform_def.h>
+
#include <arch.h>
+
#include <sq_common.h>
-#include <platform_def.h>
unsigned char sq_pd_tree_desc[PLAT_CLUSTER_COUNT + 1];
diff --git a/plat/socionext/synquacer/sq_xlat_setup.c b/plat/socionext/synquacer/sq_xlat_setup.c
index ae147003a3..5d1669d03e 100644
--- a/plat/socionext/synquacer/sq_xlat_setup.c
+++ b/plat/socionext/synquacer/sq_xlat_setup.c
@@ -4,9 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
#include <platform_def.h>
-#include <xlat_tables_v2.h>
+
+#include <common/debug.h>
+#include <lib/xlat_tables/xlat_tables_v2.h>
#define SQ_REG_REGION_BASE 0x20000000ULL
#define SQ_REG_REGION_SIZE 0x60000000ULL