summaryrefslogtreecommitdiff
path: root/plat/imx/common/include
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/imx/common/include
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 'plat/imx/common/include')
-rw-r--r--plat/imx/common/include/imx8_lpuart.h2
-rw-r--r--plat/imx/common/include/imx_snvs.h1
-rw-r--r--plat/imx/common/include/imx_uart.h2
-rw-r--r--plat/imx/common/include/imx_wdog.h3
-rw-r--r--plat/imx/common/include/plat_imx8.h4
-rw-r--r--plat/imx/common/include/sci/sci_rpc.h3
6 files changed, 9 insertions, 6 deletions
diff --git a/plat/imx/common/include/imx8_lpuart.h b/plat/imx/common/include/imx8_lpuart.h
index 8e1184f9..63449e7d 100644
--- a/plat/imx/common/include/imx8_lpuart.h
+++ b/plat/imx/common/include/imx8_lpuart.h
@@ -7,7 +7,7 @@
#ifndef IMX8_LPUART_H
#define IMX8_LPUART_H
-#include <console.h>
+#include <drivers/console.h>
#define VERID 0x0
#define PARAM 0x4
diff --git a/plat/imx/common/include/imx_snvs.h b/plat/imx/common/include/imx_snvs.h
index 0aed1e14..0b3d1085 100644
--- a/plat/imx/common/include/imx_snvs.h
+++ b/plat/imx/common/include/imx_snvs.h
@@ -7,6 +7,7 @@
#define IMX_SNVS_H
#include <stdint.h>
+
#include <arch.h>
struct snvs {
diff --git a/plat/imx/common/include/imx_uart.h b/plat/imx/common/include/imx_uart.h
index d2c39688..a251024f 100644
--- a/plat/imx/common/include/imx_uart.h
+++ b/plat/imx/common/include/imx_uart.h
@@ -7,7 +7,7 @@
#ifndef IMX_UART_H
#define IMX_UART_H
-#include <console.h>
+#include <drivers/console.h>
#ifndef __ASSEMBLY__
diff --git a/plat/imx/common/include/imx_wdog.h b/plat/imx/common/include/imx_wdog.h
index 7b3037df..75a729a9 100644
--- a/plat/imx/common/include/imx_wdog.h
+++ b/plat/imx/common/include/imx_wdog.h
@@ -7,9 +7,10 @@
#ifndef IMX_WDOG_H
#define IMX_WDOG_H
-#include <arch.h>
#include <stdint.h>
+#include <arch.h>
+
struct wdog_regs {
uint16_t wcr;
uint16_t wsr;
diff --git a/plat/imx/common/include/plat_imx8.h b/plat/imx/common/include/plat_imx8.h
index 03799c45..8d83173f 100644
--- a/plat/imx/common/include/plat_imx8.h
+++ b/plat/imx/common/include/plat_imx8.h
@@ -7,8 +7,8 @@
#ifndef PLAT_IMX8_H
#define PLAT_IMX8_H
-#include <gicv3.h>
-#include <psci.h>
+#include <drivers/arm/gicv3.h>
+#include <lib/psci/psci.h>
unsigned int plat_calc_core_pos(uint64_t mpidr);
void imx_mailbox_init(uintptr_t base_addr);
diff --git a/plat/imx/common/include/sci/sci_rpc.h b/plat/imx/common/include/sci/sci_rpc.h
index 1771baed..60dbc27b 100644
--- a/plat/imx/common/include/sci/sci_rpc.h
+++ b/plat/imx/common/include/sci/sci_rpc.h
@@ -13,9 +13,10 @@
/* Includes */
+#include <stdbool.h>
+
#include <sci/sci_types.h>
#include <sci/sci_ipc.h>
-#include <stdbool.h>
/* Defines */