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/xilinx/versal/aarch64/versal_common.c b/plat/xilinx/versal/aarch64/versal_common.c
index c13b1b5..587b797 100644
--- a/plat/xilinx/versal/aarch64/versal_common.c
+++ b/plat/xilinx/versal/aarch64/versal_common.c
@@ -4,11 +4,12 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <debug.h>
-#include <generic_delay_timer.h>
-#include <mmio.h>
-#include <platform.h>
-#include <xlat_tables.h>
+#include <common/debug.h>
+#include <drivers/generic_delay_timer.h>
+#include <lib/mmio.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/platform.h>
+
 #include "../versal_def.h"
 #include "../versal_private.h"
 
diff --git a/plat/xilinx/versal/aarch64/versal_helpers.S b/plat/xilinx/versal/aarch64/versal_helpers.S
index 1b7f955..26eb052 100644
--- a/plat/xilinx/versal/aarch64/versal_helpers.S
+++ b/plat/xilinx/versal/aarch64/versal_helpers.S
@@ -6,7 +6,7 @@
 
 #include <arch.h>
 #include <asm_macros.S>
-#include <gicv3.h>
+#include <drivers/arm/gicv3.h>
 #include <platform_def.h>
 
 	.globl	plat_secondary_cold_boot_setup
diff --git a/plat/xilinx/versal/bl31_versal_setup.c b/plat/xilinx/versal/bl31_versal_setup.c
index 9f71a1c..d7e07e0 100644
--- a/plat/xilinx/versal/bl31_versal_setup.c
+++ b/plat/xilinx/versal/bl31_versal_setup.c
@@ -5,14 +5,16 @@
  */
 
 #include <assert.h>
-#include <bl_common.h>
-#include <bl31.h>
-#include <console.h>
-#include <debug.h>
 #include <errno.h>
-#include <platform.h>
-#include <pl011.h>
-#include <xlat_tables.h>
+
+#include <bl31/bl31.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/arm/pl011.h>
+#include <drivers/console.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/platform.h>
+
 #include "versal_private.h"
 
 static entry_point_info_t bl32_image_ep_info;
diff --git a/plat/xilinx/versal/include/plat_macros.S b/plat/xilinx/versal/include/plat_macros.S
index 4fc1315..3a52212 100644
--- a/plat/xilinx/versal/include/plat_macros.S
+++ b/plat/xilinx/versal/include/plat_macros.S
@@ -7,10 +7,11 @@
 #ifndef PLAT_MACROS_S
 #define PLAT_MACROS_S
 
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/gicv3.h>
+
 #include "../include/platform_def.h"
-#include <gic_common.h>
-#include <gicv2.h>
-#include <gicv3.h>
 
 .section .rodata.gic_reg_name, "aS"
 /* Applicable only to GICv2 and GICv3 with SRE disabled (legacy mode) */
diff --git a/plat/xilinx/versal/include/platform_def.h b/plat/xilinx/versal/include/platform_def.h
index 45aaa84..0c4b954 100644
--- a/plat/xilinx/versal/include/platform_def.h
+++ b/plat/xilinx/versal/include/platform_def.h
@@ -8,6 +8,7 @@
 #define PLATFORM_DEF_H
 
 #include <arch.h>
+
 #include "../versal_def.h"
 
 /*******************************************************************************
diff --git a/plat/xilinx/versal/plat_psci.c b/plat/xilinx/versal/plat_psci.c
index 37d00f6..4a44369 100644
--- a/plat/xilinx/versal/plat_psci.c
+++ b/plat/xilinx/versal/plat_psci.c
@@ -4,10 +4,11 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <debug.h>
-#include <mmio.h>
-#include <platform.h>
-#include <psci.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <lib/psci/psci.h>
+#include <plat/common/platform.h>
+
 #include "versal_private.h"
 
 static uintptr_t versal_sec_entry;
diff --git a/plat/xilinx/versal/plat_versal.c b/plat/xilinx/versal/plat_versal.c
index 152cb36..642867d 100644
--- a/plat/xilinx/versal/plat_versal.c
+++ b/plat/xilinx/versal/plat_versal.c
@@ -3,7 +3,9 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#include <platform.h>
+
+#include <plat/common/platform.h>
+
 #include "versal_private.h"
 
 int plat_core_pos_by_mpidr(u_register_t mpidr)
diff --git a/plat/xilinx/versal/sip_svc_setup.c b/plat/xilinx/versal/sip_svc_setup.c
index 4007d5c..8f2180b 100644
--- a/plat/xilinx/versal/sip_svc_setup.c
+++ b/plat/xilinx/versal/sip_svc_setup.c
@@ -6,9 +6,9 @@
 
 /* Top level SMC handler for SiP calls. Dispatch PM calls to PM SMC handler. */
 
-#include <debug.h>
-#include <runtime_svc.h>
-#include <uuid.h>
+#include <common/debug.h>
+#include <common/runtime_svc.h>
+#include <tools_share/uuid.h>
 
 /* SMC function IDs for SiP Service queries */
 #define VERSAL_SIP_SVC_CALL_COUNT	0x8200ff00
diff --git a/plat/xilinx/versal/versal_def.h b/plat/xilinx/versal/versal_def.h
index 5e42bd7..41c65b9 100644
--- a/plat/xilinx/versal/versal_def.h
+++ b/plat/xilinx/versal/versal_def.h
@@ -7,7 +7,7 @@
 #ifndef VERSAL_DEF_H
 #define VERSAL_DEF_H
 
-#include <common_def.h>
+#include <plat/common/common_def.h>
 
 /* List all consoles */
 #define VERSAL_CONSOLE_ID_pl011	1
diff --git a/plat/xilinx/versal/versal_gicv3.c b/plat/xilinx/versal/versal_gicv3.c
index 72374b5..dcf23b4 100644
--- a/plat/xilinx/versal/versal_gicv3.c
+++ b/plat/xilinx/versal/versal_gicv3.c
@@ -4,11 +4,13 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <gicv3.h>
-#include <interrupt_props.h>
-#include <platform.h>
 #include <platform_def.h>
-#include <utils.h>
+
+#include <common/interrupt_props.h>
+#include <drivers/arm/gicv3.h>
+#include <lib/utils.h>
+#include <plat/common/platform.h>
+
 #include "versal_private.h"
 
 /******************************************************************************
diff --git a/plat/xilinx/versal/versal_private.h b/plat/xilinx/versal/versal_private.h
index 1e30ebc..5d98d08 100644
--- a/plat/xilinx/versal/versal_private.h
+++ b/plat/xilinx/versal/versal_private.h
@@ -7,7 +7,7 @@
 #ifndef VERSAL_PRIVATE_H
 #define VERSAL_PRIVATE_H
 
-#include <xlat_tables.h>
+#include <lib/xlat_tables/xlat_tables.h>
 
 void versal_config_setup(void);