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/io/io_fip.c b/drivers/io/io_fip.c
index 482e068..b2dcfcc 100644
--- a/drivers/io/io_fip.c
+++ b/drivers/io/io_fip.c
@@ -28,17 +28,17 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <stdint.h>
-#include <uuid.h>
-#include <errno.h>
-#include <string.h>
 #include <assert.h>
-#include <platform.h>
+#include <debug.h>
+#include <errno.h>
 #include <firmware_image_package.h>
-#include <io_storage.h>
 #include <io_driver.h>
 #include <io_fip.h>
-#include <debug.h>
+#include <io_storage.h>
+#include <platform.h>
+#include <stdint.h>
+#include <string.h>
+#include <uuid.h>
 
 /* Useful for printing UUIDs when debugging.*/
 #define PRINT_UUID2(x)								\
diff --git a/drivers/io/io_memmap.c b/drivers/io/io_memmap.c
index 2e70e96..a40e612 100644
--- a/drivers/io/io_memmap.c
+++ b/drivers/io/io_memmap.c
@@ -29,10 +29,10 @@
  */
 
 #include <assert.h>
-#include <string.h>
-#include <io_storage.h>
-#include <io_driver.h>
 #include <debug.h>
+#include <io_driver.h>
+#include <io_storage.h>
+#include <string.h>
 
 /* As we need to be able to keep state for seek, only one file can be open
  * at a time. Make this a structure and point to the entity->info. When we
diff --git a/drivers/io/io_semihosting.c b/drivers/io/io_semihosting.c
index 89c844b..a37693d 100644
--- a/drivers/io/io_semihosting.c
+++ b/drivers/io/io_semihosting.c
@@ -29,8 +29,8 @@
  */
 
 #include <assert.h>
-#include <io_storage.h>
 #include <io_driver.h>
+#include <io_storage.h>
 #include <semihosting.h>