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>
diff --git a/plat/meson/gxbb/gxbb_bl31_setup.c b/plat/meson/gxbb/gxbb_bl31_setup.c
index 3e176f9..b867a58 100644
--- a/plat/meson/gxbb/gxbb_bl31_setup.c
+++ b/plat/meson/gxbb/gxbb_bl31_setup.c
@@ -5,12 +5,14 @@
  */
 
 #include <assert.h>
-#include <bl_common.h>
-#include <gicv2.h>
-#include <interrupt_props.h>
-#include <platform.h>
+
 #include <platform_def.h>
-#include <xlat_mmu_helpers.h>
+
+#include <common/bl_common.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gicv2.h>
+#include <lib/xlat_tables/xlat_mmu_helpers.h>
+#include <plat/common/platform.h>
 
 #include "gxbb_private.h"
 
diff --git a/plat/meson/gxbb/gxbb_common.c b/plat/meson/gxbb/gxbb_common.c
index 349d02f..0ca15e8 100644
--- a/plat/meson/gxbb/gxbb_common.c
+++ b/plat/meson/gxbb/gxbb_common.c
@@ -5,15 +5,17 @@
  */
 
 #include <assert.h>
-#include <bl_common.h>
-#include <debug.h>
-#include <ep_info.h>
-#include <interrupt_mgmt.h>
-#include <meson_console.h>
-#include <mmio.h>
-#include <platform_def.h>
 #include <stdint.h>
-#include <xlat_tables_v2.h>
+
+#include <platform_def.h>
+
+#include <bl31/interrupt_mgmt.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <common/ep_info.h>
+#include <drivers/meson/meson_console.h>
+#include <lib/mmio.h>
+#include <lib/xlat_tables/xlat_tables_v2.h>
 
 /*******************************************************************************
  * Platform memory map regions
diff --git a/plat/meson/gxbb/gxbb_def.h b/plat/meson/gxbb/gxbb_def.h
index 0c73ac0..3e27097 100644
--- a/plat/meson/gxbb/gxbb_def.h
+++ b/plat/meson/gxbb/gxbb_def.h
@@ -7,7 +7,7 @@
 #ifndef GXBB_DEF_H
 #define GXBB_DEF_H
 
-#include <utils_def.h>
+#include <lib/utils_def.h>
 
 /*******************************************************************************
  * System oscillator
diff --git a/plat/meson/gxbb/gxbb_mhu.c b/plat/meson/gxbb/gxbb_mhu.c
index 78b895c..903ef41 100644
--- a/plat/meson/gxbb/gxbb_mhu.c
+++ b/plat/meson/gxbb/gxbb_mhu.c
@@ -4,10 +4,11 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <bakery_lock.h>
-#include <mmio.h>
 #include <platform_def.h>
 
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+
 static DEFINE_BAKERY_LOCK(mhu_lock);
 
 void mhu_secure_message_start(void)
diff --git a/plat/meson/gxbb/gxbb_pm.c b/plat/meson/gxbb/gxbb_pm.c
index 930b5e1..59b9436 100644
--- a/plat/meson/gxbb/gxbb_pm.c
+++ b/plat/meson/gxbb/gxbb_pm.c
@@ -4,16 +4,18 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <arch_helpers.h>
 #include <assert.h>
-#include <console.h>
-#include <debug.h>
 #include <errno.h>
-#include <gicv2.h>
-#include <mmio.h>
-#include <platform.h>
+
 #include <platform_def.h>
-#include <psci.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/console.h>
+#include <lib/mmio.h>
+#include <lib/psci/psci.h>
+#include <plat/common/platform.h>
 
 #include "gxbb_private.h"
 
diff --git a/plat/meson/gxbb/gxbb_scpi.c b/plat/meson/gxbb/gxbb_scpi.c
index 2390bca..83eeda2 100644
--- a/plat/meson/gxbb/gxbb_scpi.c
+++ b/plat/meson/gxbb/gxbb_scpi.c
@@ -5,11 +5,13 @@
  */
 
 #include <assert.h>
-#include <mmio.h>
-#include <platform.h>
-#include <platform_def.h>
 #include <string.h>
 
+#include <platform_def.h>
+
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
 #include "gxbb_private.h"
 
 #define SIZE_SHIFT	20
diff --git a/plat/meson/gxbb/gxbb_sip_svc.c b/plat/meson/gxbb/gxbb_sip_svc.c
index 82ed449..63c7dba 100644
--- a/plat/meson/gxbb/gxbb_sip_svc.c
+++ b/plat/meson/gxbb/gxbb_sip_svc.c
@@ -4,12 +4,14 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <debug.h>
-#include <mmio.h>
-#include <platform_def.h>
-#include <runtime_svc.h>
 #include <stdint.h>
 
+#include <platform_def.h>
+
+#include <common/debug.h>
+#include <common/runtime_svc.h>
+#include <lib/mmio.h>
+
 #include "gxbb_private.h"
 
 /*******************************************************************************
diff --git a/plat/meson/gxbb/gxbb_topology.c b/plat/meson/gxbb/gxbb_topology.c
index 49bb2dc..eec2d34 100644
--- a/plat/meson/gxbb/gxbb_topology.c
+++ b/plat/meson/gxbb/gxbb_topology.c
@@ -4,10 +4,12 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <arch.h>
-#include <platform_def.h>
 #include <stdint.h>
 
+#include <platform_def.h>
+
+#include <arch.h>
+
 #include "gxbb_private.h"
 
 /* The power domain tree descriptor */
diff --git a/plat/meson/gxbb/include/plat_macros.S b/plat/meson/gxbb/include/plat_macros.S
index 948b5f9..c721c21 100644
--- a/plat/meson/gxbb/include/plat_macros.S
+++ b/plat/meson/gxbb/include/plat_macros.S
@@ -7,7 +7,7 @@
 #ifndef PLAT_MACROS_S
 #define PLAT_MACROS_S
 
-#include <gicv2.h>
+#include <drivers/arm/gicv2.h>
 #include <platform_def.h>
 
 .section .rodata.gic_reg_name, "aS"
diff --git a/plat/meson/gxbb/include/platform_def.h b/plat/meson/gxbb/include/platform_def.h
index a85637f..da4aedd 100644
--- a/plat/meson/gxbb/include/platform_def.h
+++ b/plat/meson/gxbb/include/platform_def.h
@@ -8,7 +8,7 @@
 #define PLATFORM_DEF_H
 
 #include <arch.h>
-#include <utils_def.h>
+#include <lib/utils_def.h>
 
 #include "../gxbb_def.h"
 
diff --git a/plat/meson/gxbb/platform.mk b/plat/meson/gxbb/platform.mk
index 68ff400..9669bf9 100644
--- a/plat/meson/gxbb/platform.mk
+++ b/plat/meson/gxbb/platform.mk
@@ -6,8 +6,7 @@
 
 include lib/xlat_tables_v2/xlat_tables.mk
 
-PLAT_INCLUDES		:=	-Iinclude/drivers/meson/		\
-				-Iplat/meson/gxbb/include
+PLAT_INCLUDES		:=	-Iplat/meson/gxbb/include
 
 GXBB_GIC_SOURCES	:=	drivers/arm/gic/common/gic_common.c	\
 				drivers/arm/gic/v2/gicv2_main.c		\