aboutsummaryrefslogtreecommitdiff
path: root/include/drivers/arm
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/drivers/arm
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 'include/drivers/arm')
-rw-r--r--include/drivers/arm/cci.h2
-rw-r--r--include/drivers/arm/gic_common.h2
-rw-r--r--include/drivers/arm/gicv2.h5
-rw-r--r--include/drivers/arm/gicv3.h9
-rw-r--r--include/drivers/arm/pl011.h2
-rw-r--r--include/drivers/arm/pl061_gpio.h2
-rw-r--r--include/drivers/arm/smmu_v3.h3
-rw-r--r--include/drivers/arm/sp804_delay_timer.h2
-rw-r--r--include/drivers/arm/sp805.h2
-rw-r--r--include/drivers/arm/tzc380.h4
-rw-r--r--include/drivers/arm/tzc400.h4
-rw-r--r--include/drivers/arm/tzc_common.h2
-rw-r--r--include/drivers/arm/tzc_dmc500.h4
-rw-r--r--include/drivers/arm/tzc_dmc620.h2
14 files changed, 24 insertions, 21 deletions
diff --git a/include/drivers/arm/cci.h b/include/drivers/arm/cci.h
index 24b76dab8a..c5ddcfd448 100644
--- a/include/drivers/arm/cci.h
+++ b/include/drivers/arm/cci.h
@@ -7,7 +7,7 @@
#ifndef CCI_H
#define CCI_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Slave interface offsets from PERIPHBASE */
#define SLAVE_IFACE6_OFFSET UL(0x7000)
diff --git a/include/drivers/arm/gic_common.h b/include/drivers/arm/gic_common.h
index a9ec7b7645..3ac1b43fff 100644
--- a/include/drivers/arm/gic_common.h
+++ b/include/drivers/arm/gic_common.h
@@ -7,7 +7,7 @@
#ifndef GIC_COMMON_H
#define GIC_COMMON_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* GIC Distributor interface general definitions
diff --git a/include/drivers/arm/gicv2.h b/include/drivers/arm/gicv2.h
index 705077ce3d..6bc5101d13 100644
--- a/include/drivers/arm/gicv2.h
+++ b/include/drivers/arm/gicv2.h
@@ -7,7 +7,7 @@
#ifndef GICV2_H
#define GICV2_H
-#include <gic_common.h>
+#include <drivers/arm/gic_common.h>
/*******************************************************************************
* GICv2 miscellaneous definitions
@@ -119,9 +119,10 @@
#ifndef __ASSEMBLY__
#include <cdefs.h>
-#include <interrupt_props.h>
#include <stdint.h>
+#include <common/interrupt_props.h>
+
/*******************************************************************************
* This structure describes some of the implementation defined attributes of
* the GICv2 IP. It is used by the platform port to specify these attributes
diff --git a/include/drivers/arm/gicv3.h b/include/drivers/arm/gicv3.h
index c26f2975ab..2382697748 100644
--- a/include/drivers/arm/gicv3.h
+++ b/include/drivers/arm/gicv3.h
@@ -209,12 +209,13 @@
#ifndef __ASSEMBLY__
-#include <arch_helpers.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
#include <stdbool.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <arch_helpers.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/utils_def.h>
static inline bool gicv3_is_intr_id_special_identifier(unsigned int id)
{
diff --git a/include/drivers/arm/pl011.h b/include/drivers/arm/pl011.h
index 6216a61fc5..f201f0048f 100644
--- a/include/drivers/arm/pl011.h
+++ b/include/drivers/arm/pl011.h
@@ -7,7 +7,7 @@
#ifndef PL011_H
#define PL011_H
-#include <console.h>
+#include <drivers/console.h>
/* PL011 Registers */
#define UARTDR 0x000
diff --git a/include/drivers/arm/pl061_gpio.h b/include/drivers/arm/pl061_gpio.h
index 6c4a9f5a50..68238c9abe 100644
--- a/include/drivers/arm/pl061_gpio.h
+++ b/include/drivers/arm/pl061_gpio.h
@@ -7,7 +7,7 @@
#ifndef PL061_GPIO_H
#define PL061_GPIO_H
-#include <gpio.h>
+#include <drivers/gpio.h>
void pl061_gpio_register(uintptr_t base_addr, int gpio_dev);
void pl061_gpio_init(void);
diff --git a/include/drivers/arm/smmu_v3.h b/include/drivers/arm/smmu_v3.h
index 1b7ffb8db0..33f3d6fcfc 100644
--- a/include/drivers/arm/smmu_v3.h
+++ b/include/drivers/arm/smmu_v3.h
@@ -8,7 +8,8 @@
#define SMMU_V3_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* SMMUv3 register offsets from device base */
#define SMMU_S_IDR1 U(0x8004)
diff --git a/include/drivers/arm/sp804_delay_timer.h b/include/drivers/arm/sp804_delay_timer.h
index 8eb8715ae8..f8769e8369 100644
--- a/include/drivers/arm/sp804_delay_timer.h
+++ b/include/drivers/arm/sp804_delay_timer.h
@@ -7,9 +7,9 @@
#ifndef SP804_DELAY_TIMER_H
#define SP804_DELAY_TIMER_H
-#include <delay_timer.h>
#include <stdint.h>
+#include <drivers/delay_timer.h>
uint32_t sp804_get_timer_value(void);
diff --git a/include/drivers/arm/sp805.h b/include/drivers/arm/sp805.h
index e7714a3932..551bfe4bae 100644
--- a/include/drivers/arm/sp805.h
+++ b/include/drivers/arm/sp805.h
@@ -7,7 +7,7 @@
#ifndef SP805_H
#define SP805_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* SP805 register offset */
#define SP805_WDOG_LOAD_OFF UL(0x000)
diff --git a/include/drivers/arm/tzc380.h b/include/drivers/arm/tzc380.h
index 19cf988313..03b9b054e7 100644
--- a/include/drivers/arm/tzc380.h
+++ b/include/drivers/arm/tzc380.h
@@ -7,8 +7,8 @@
#ifndef TZC380_H
#define TZC380_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define TZC380_CONFIGURATION_OFF U(0x000)
#define ACTION_OFF U(0x004)
diff --git a/include/drivers/arm/tzc400.h b/include/drivers/arm/tzc400.h
index a7bb3f6484..98ef0ec1e0 100644
--- a/include/drivers/arm/tzc400.h
+++ b/include/drivers/arm/tzc400.h
@@ -7,8 +7,8 @@
#ifndef TZC400_H
#define TZC400_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define BUILD_CONFIG_OFF U(0x000)
#define GATE_KEEPER_OFF U(0x008)
diff --git a/include/drivers/arm/tzc_common.h b/include/drivers/arm/tzc_common.h
index 4b8154788a..4820baa1a0 100644
--- a/include/drivers/arm/tzc_common.h
+++ b/include/drivers/arm/tzc_common.h
@@ -7,7 +7,7 @@
#ifndef TZC_COMMON_H
#define TZC_COMMON_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*
* Offset of core registers from the start of the base of configuration
diff --git a/include/drivers/arm/tzc_dmc500.h b/include/drivers/arm/tzc_dmc500.h
index df6e7f9494..24bfaeb145 100644
--- a/include/drivers/arm/tzc_dmc500.h
+++ b/include/drivers/arm/tzc_dmc500.h
@@ -7,8 +7,8 @@
#ifndef TZC_DMC500_H
#define TZC_DMC500_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define SI_STATUS_OFFSET U(0x000)
#define SI_STATE_CTRL_OFFSET U(0x030)
diff --git a/include/drivers/arm/tzc_dmc620.h b/include/drivers/arm/tzc_dmc620.h
index 074bbc1224..e0e6760b28 100644
--- a/include/drivers/arm/tzc_dmc620.h
+++ b/include/drivers/arm/tzc_dmc620.h
@@ -7,7 +7,7 @@
#ifndef TZC_DMC620_H
#define TZC_DMC620_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* DMC-620 memc register offsets */
#define DMC620_MEMC_STATUS U(0x0000)