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/marvell/a3700/a3700/board/pm_src.c b/plat/marvell/a3700/a3700/board/pm_src.c
index bc48ce8..d6eca5d 100644
--- a/plat/marvell/a3700/a3700/board/pm_src.c
+++ b/plat/marvell/a3700/a3700/board/pm_src.c
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier:	BSD-3-Clause
  * https://spdx.org/licenses
  */
+
 #include <a3700_pm.h>
 #include <plat_marvell.h>
 
diff --git a/plat/marvell/a3700/a3700/plat_bl31_setup.c b/plat/marvell/a3700/a3700/plat_bl31_setup.c
index 83db06f..6862a86 100644
--- a/plat/marvell/a3700/a3700/plat_bl31_setup.c
+++ b/plat/marvell/a3700/a3700/plat_bl31_setup.c
@@ -5,10 +5,11 @@
  * https://spdx.org/licenses
  */
 
+#include <lib/mmio.h>
+
 #include <armada_common.h>
 #include <dram_win.h>
 #include <io_addr_dec.h>
-#include <mmio.h>
 #include <marvell_plat_priv.h>
 #include <plat_marvell.h>
 
diff --git a/plat/marvell/a3700/common/a3700_common.mk b/plat/marvell/a3700/common/a3700_common.mk
index e2ac97f..a4727d2 100644
--- a/plat/marvell/a3700/common/a3700_common.mk
+++ b/plat/marvell/a3700/common/a3700_common.mk
@@ -84,14 +84,12 @@
 				plat/common/plat_gicv3.c		\
 				drivers/arm/gic/v3/gic500.c
 
-ATF_INCLUDES		:=	-Iinclude/common/tbbr		\
-				-Iinclude/drivers
+ATF_INCLUDES		:=	-Iinclude/common/tbbr
 
 PLAT_INCLUDES		:=	-I$(PLAT_FAMILY_BASE)/$(PLAT)		\
 				-I$(PLAT_COMMON_BASE)/include		\
 				-I$(PLAT_INCLUDE_BASE)/common		\
 				-I$(MARVELL_DRV_BASE)			\
-				-Iinclude/drivers/marvell/uart		\
 				-I$/drivers/arm/gic/common/		\
 				$(ATF_INCLUDES)
 
diff --git a/plat/marvell/a3700/common/a3700_sip_svc.c b/plat/marvell/a3700/common/a3700_sip_svc.c
index 88d1fc2..e8ac5fc 100644
--- a/plat/marvell/a3700/common/a3700_sip_svc.c
+++ b/plat/marvell/a3700/common/a3700_sip_svc.c
@@ -5,11 +5,13 @@
  * https://spdx.org/licenses
  */
 
-#include <debug.h>
+#include <common/debug.h>
+#include <common/runtime_svc.h>
+#include <lib/smccc.h>
+
 #include <marvell_plat_priv.h>
 #include <plat_marvell.h>
-#include <runtime_svc.h>
-#include <smccc.h>
+
 #include "comphy/phy-comphy-3700.h"
 
 /* Comphy related FID's */
diff --git a/plat/marvell/a3700/common/dram_win.c b/plat/marvell/a3700/common/dram_win.c
index fb236d8..694f6d4 100644
--- a/plat/marvell/a3700/common/dram_win.c
+++ b/plat/marvell/a3700/common/dram_win.c
@@ -5,12 +5,14 @@
  * https://spdx.org/licenses
  */
 
+#include <string.h>
+
+#include <lib/mmio.h>
+
 #include <dram_win.h>
 #include <marvell_plat_priv.h>
-#include <mmio.h>
 #include <mvebu.h>
 #include <plat_marvell.h>
-#include <string.h>
 
 /* Armada 3700 has 5 configurable windows */
 #define MV_CPU_WIN_NUM		5
diff --git a/plat/marvell/a3700/common/include/dram_win.h b/plat/marvell/a3700/common/include/dram_win.h
index 6f345f9..26a0137 100644
--- a/plat/marvell/a3700/common/include/dram_win.h
+++ b/plat/marvell/a3700/common/include/dram_win.h
@@ -8,7 +8,8 @@
 #ifndef DRAM_WIN_H
 #define DRAM_WIN_H
 
-#include <bl_common.h>
+#include <common/bl_common.h>
+
 #include <io_addr_dec.h>
 
 void dram_win_map_build(struct dram_win_map *win_map);
diff --git a/plat/marvell/a3700/common/include/platform_def.h b/plat/marvell/a3700/common/include/platform_def.h
index ca2553c..16865c4 100644
--- a/plat/marvell/a3700/common/include/platform_def.h
+++ b/plat/marvell/a3700/common/include/platform_def.h
@@ -8,12 +8,13 @@
 #ifndef PLATFORM_DEF_H
 #define PLATFORM_DEF_H
 
-#include <board_marvell_def.h>
-#include <mvebu_def.h>
 #ifndef __ASSEMBLY__
 #include <stdio.h>
 #endif /* __ASSEMBLY__ */
 
+#include <board_marvell_def.h>
+#include <mvebu_def.h>
+
 /*
  * Most platform porting definitions provided by included headers
  */
diff --git a/plat/marvell/a3700/common/io_addr_dec.c b/plat/marvell/a3700/common/io_addr_dec.c
index f009594..b27633c 100644
--- a/plat/marvell/a3700/common/io_addr_dec.c
+++ b/plat/marvell/a3700/common/io_addr_dec.c
@@ -4,9 +4,11 @@
  * SPDX-License-Identifier:	BSD-3-Clause
  * https://spdx.org/licenses
  */
-#include <debug.h>
+
+#include <common/debug.h>
+#include <lib/mmio.h>
+
 #include <io_addr_dec.h>
-#include <mmio.h>
 #include <plat_marvell.h>
 
 #define MVEBU_DEC_WIN_CTRL_REG(base, win, off)	(MVEBU_REGS_BASE + (base) + \
diff --git a/plat/marvell/a3700/common/marvell_plat_config.c b/plat/marvell/a3700/common/marvell_plat_config.c
index 85a4201..3bf3d96 100644
--- a/plat/marvell/a3700/common/marvell_plat_config.c
+++ b/plat/marvell/a3700/common/marvell_plat_config.c
@@ -5,7 +5,8 @@
  * https://spdx.org/licenses
  */
 
-#include <bl_common.h>
+#include <common/bl_common.h>
+
 #include <io_addr_dec.h>
 #include <mvebu_def.h>
 
diff --git a/plat/marvell/a3700/common/plat_pm.c b/plat/marvell/a3700/common/plat_pm.c
index dce4841..f8ce6fe 100644
--- a/plat/marvell/a3700/common/plat_pm.c
+++ b/plat/marvell/a3700/common/plat_pm.c
@@ -5,22 +5,23 @@
  * https://spdx.org/licenses
  */
 
+#include <common/debug.h>
+#ifdef USE_CCI
+#include <drivers/arm/cci.h>
+#endif
+#include <lib/psci/psci.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
 #include <a3700_pm.h>
 #include <arch_helpers.h>
 #include <armada_common.h>
-#include <debug.h>
 #include <dram_win.h>
 #include <io_addr_dec.h>
-#include <mmio.h>
 #include <mvebu.h>
 #include <mvebu_def.h>
 #include <marvell_plat_priv.h>
-#include <platform.h>
 #include <plat_marvell.h>
-#include <psci.h>
-#ifdef USE_CCI
-#include <cci.h>
-#endif
 
 /* Warm reset register */
 #define MVEBU_WARM_RESET_REG		(MVEBU_NB_REGS_BASE + 0x840)