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/include/bl31/bl31.h b/include/bl31/bl31.h
index 6dd7596..b60e32c 100644
--- a/include/bl31/bl31.h
+++ b/include/bl31/bl31.h
@@ -31,13 +31,19 @@
 #ifndef __BL31_H__
 #define __BL31_H__
 
-#include <bl_common.h>
+#include <stdint.h>
 
 /*******************************************************************************
  * Data declarations
  ******************************************************************************/
 extern unsigned long bl31_entrypoint;
 
+/******************************************
+ * Forward declarations
+ *****************************************/
+struct meminfo;
+struct el_change_info;
+
 /*******************************************************************************
  * Function prototypes
  ******************************************************************************/
@@ -46,9 +52,10 @@
 extern void bl31_set_next_image_type(uint32_t type);
 extern uint32_t bl31_get_next_image_type(void);
 extern void bl31_prepare_next_image_entry();
-extern el_change_info_t *bl31_get_next_image_info(uint32_t type);
+extern struct el_change_info *bl31_get_next_image_info(uint32_t type);
 extern void bl31_platform_setup(void);
-extern meminfo_t *bl31_plat_get_bl32_mem_layout(void);
-extern meminfo_t *bl31_plat_sec_mem_layout(void);
-extern void bl31_register_bl32_init(int32_t (*)(meminfo_t *));
+extern struct meminfo *bl31_plat_get_bl32_mem_layout(void);
+extern struct meminfo *bl31_plat_sec_mem_layout(void);
+extern void bl31_register_bl32_init(int32_t (*)(struct meminfo *));
+
 #endif /* __BL31_H__ */