Reduce deep nesting of header files

Reduce the number of header files included from other header
files as much as possible without splitting the files. Use forward
declarations where possible. This allows removal of some unnecessary
"#ifndef __ASSEMBLY__" statements.

Also, review the .c and .S files for which header files really need
including and reorder the #include statements alphabetically.

Fixes ARM-software/tf-issues#31

Change-Id: Iec92fb976334c77453e010b60bcf56f3be72bd3e
diff --git a/drivers/arm/cci400/cci400.c b/drivers/arm/cci400/cci400.c
index 4ca55b1..02f7f95 100644
--- a/drivers/arm/cci400/cci400.c
+++ b/drivers/arm/cci400/cci400.c
@@ -28,9 +28,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <assert.h>
-#include <platform.h>
 #include <cci400.h>
+#include <mmio.h>
+#include <platform.h>
 
 static inline unsigned long get_slave_iface_base(unsigned long mpidr)
 {
diff --git a/drivers/arm/gic/gic_v3.c b/drivers/arm/gic/gic_v3.c
index d658a61..f429662 100644
--- a/drivers/arm/gic/gic_v3.c
+++ b/drivers/arm/gic/gic_v3.c
@@ -28,11 +28,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <stdint.h>
 #include <arch.h>
-#include <platform.h>
-#include <gic_v3.h>
 #include <debug.h>
+#include <gic_v3.h>
 
 uintptr_t gicv3_get_rdist(uintptr_t gicr_base, uint64_t mpidr)
 {
diff --git a/drivers/arm/pl011/pl011.c b/drivers/arm/pl011/pl011.c
index 8288cd8..f12bd23 100644
--- a/drivers/arm/pl011/pl011.c
+++ b/drivers/arm/pl011/pl011.c
@@ -28,9 +28,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <assert.h>
 #include <platform.h>
 #include <pl011.h>
-#include <assert.h>
 
 void pl011_setbaudrate(unsigned long base_addr, unsigned int baudrate)
 {
diff --git a/drivers/arm/pl011/pl011_console.c b/drivers/arm/pl011/pl011_console.c
index 1a684ff..3b0e237 100644
--- a/drivers/arm/pl011/pl011_console.c
+++ b/drivers/arm/pl011/pl011_console.c
@@ -28,10 +28,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <assert.h>
 #include <console.h>
 #include <platform.h>
 #include <pl011.h>
-#include <assert.h>
 
 static unsigned long uart_base;
 
diff --git a/drivers/arm/tzc400/tzc400.c b/drivers/arm/tzc400/tzc400.c
index 56c6dea..c1716db 100644
--- a/drivers/arm/tzc400/tzc400.c
+++ b/drivers/arm/tzc400/tzc400.c
@@ -29,10 +29,10 @@
  */
 
 #include <assert.h>
-#include <arch_helpers.h>
-#include <tzc400.h>
-#include <mmio.h>
 #include <debug.h>
+#include <mmio.h>
+#include <stddef.h>
+#include <tzc400.h>
 
 static uint32_t tzc_read_build_config(uint64_t base)
 {