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/mediatek/mt8173/drivers/crypt/crypt.c b/plat/mediatek/mt8173/drivers/crypt/crypt.c
index 74d7702..bfb3082 100644
--- a/plat/mediatek/mt8173/drivers/crypt/crypt.c
+++ b/plat/mediatek/mt8173/drivers/crypt/crypt.c
@@ -3,12 +3,15 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
+
+#include <assert.h>
+
 #include <arch.h>
 #include <arch_helpers.h>
-#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
 #include <mt8173_def.h>
 #include <mtk_sip_svc.h>
 
diff --git a/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c b/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c
index 25f2509..452ac22 100644
--- a/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c
+++ b/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c
@@ -4,9 +4,10 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
 #include <mt8173_def.h>
 #include <mtcmos.h>
 #include <spm.h>
diff --git a/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c b/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c
index c64fdf7..8120d99 100644
--- a/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c
+++ b/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c
@@ -3,9 +3,11 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
 #include <mt8173_def.h>
 #include <pmic_wrap_init.h>
 
diff --git a/plat/mediatek/mt8173/drivers/rtc/rtc.c b/plat/mediatek/mt8173/drivers/rtc/rtc.c
index 22fed9e..2b9033e 100644
--- a/plat/mediatek/mt8173/drivers/rtc/rtc.c
+++ b/plat/mediatek/mt8173/drivers/rtc/rtc.c
@@ -3,9 +3,12 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
+
 #include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+
 #include <mt8173_def.h>
 #include <pmic_wrap_init.h>
 #include <rtc.h>
diff --git a/plat/mediatek/mt8173/drivers/spm/spm.c b/plat/mediatek/mt8173/drivers/spm/spm.c
index eb40072..1caab3b 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm.c
@@ -3,9 +3,11 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#include <bakery_lock.h>
-#include <debug.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+
 #include <mt8173_def.h>
 #include <spm.h>
 #include <spm_suspend.h>
diff --git a/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c b/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
index 6d275d0..b2b9ada 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
@@ -3,10 +3,12 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
+
 #include <arch.h>
-#include <mmio.h>
+#include <lib/mmio.h>
 #include <mt8173_def.h>
-#include <platform.h>
+#include <plat/common/platform.h>
+
 #include <spm.h>
 #include <spm_hotplug.h>
 #include <spm_mcdi.h>
diff --git a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c b/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
index de8d73a..ea5f2bb 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
@@ -3,12 +3,15 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
+
+#include <platform_def.h>
+
 #include <arch.h>
-#include <debug.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
 #include <mt8173_def.h>
-#include <platform.h>
-#include <platform_def.h>
 #include <spm.h>
 #include <spm_hotplug.h>
 #include <spm_mcdi.h>
diff --git a/plat/mediatek/mt8173/drivers/spm/spm_suspend.c b/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
index 8c79b3b..5021695 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
@@ -3,10 +3,12 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#include <bakery_lock.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+
 #include <mt8173_def.h>
 #include <spm.h>
 #include <spm_suspend.h>
diff --git a/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c b/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c
index 8a30d8a..174a24d 100644
--- a/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c
+++ b/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c
@@ -3,9 +3,11 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
+
 #include <arch_helpers.h>
+#include <lib/mmio.h>
+
 #include <mcucfg.h>
-#include <mmio.h>
 #include <mt8173_def.h>
 #include <mt_cpuxgpt.h>