Commit 97043ac9 authored by Dan Handley's avatar Dan Handley
Browse files

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
parent fb037bfb
...@@ -28,14 +28,10 @@ ...@@ -28,14 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h> #include <arch.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
#include <arch_helpers.h> #include <arch_helpers.h>
#include <console.h> #include <assert.h>
#include <platform.h> #include <string.h>
#include <psci.h>
#include "psci_private.h" #include "psci_private.h"
typedef int (*afflvl_off_handler_t)(unsigned long, aff_map_node_t *); typedef int (*afflvl_off_handler_t)(unsigned long, aff_map_node_t *);
......
...@@ -28,18 +28,14 @@ ...@@ -28,18 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h> #include <arch.h>
#include <stdint.h> #include <arch_helpers.h>
#include <string.h>
#include <assert.h> #include <assert.h>
#include <bl_common.h>
#include <bl31.h> #include <bl31.h>
#include <debug.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <psci.h>
#include <context_mgmt.h> #include <context_mgmt.h>
#include <runtime_svc.h> #include <runtime_svc.h>
#include <stddef.h>
#include "psci_private.h" #include "psci_private.h"
typedef int (*afflvl_on_handler_t)(unsigned long, typedef int (*afflvl_on_handler_t)(unsigned long,
......
...@@ -28,16 +28,14 @@ ...@@ -28,16 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h>
#include <string.h>
#include <assert.h> #include <assert.h>
#include <debug.h> #include <bl_common.h>
#include <arch.h>
#include <arch_helpers.h> #include <arch_helpers.h>
#include <console.h> #include <context.h>
#include <platform.h>
#include <psci.h>
#include <context_mgmt.h> #include <context_mgmt.h>
#include <runtime_svc.h> #include <runtime_svc.h>
#include <stddef.h>
#include "psci_private.h" #include "psci_private.h"
typedef int (*afflvl_suspend_handler_t)(unsigned long, typedef int (*afflvl_suspend_handler_t)(unsigned long,
......
...@@ -28,15 +28,12 @@ ...@@ -28,15 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h> #include <arch.h>
#include <string.h>
#include <assert.h>
#include <arch_helpers.h> #include <arch_helpers.h>
#include <console.h> #include <assert.h>
#include <platform.h> #include <bl_common.h>
#include <psci.h> #include <context.h>
#include <context_mgmt.h> #include <context_mgmt.h>
#include <runtime_svc.h>
#include <debug.h> #include <debug.h>
#include "psci_private.h" #include "psci_private.h"
......
...@@ -29,11 +29,9 @@ ...@@ -29,11 +29,9 @@
*/ */
#include <arch.h> #include <arch.h>
#include <platform.h>
#include <runtime_svc.h>
#include <asm_macros.S> #include <asm_macros.S>
#include <cm_macros.S> #include <cm_macros.S>
#include "psci_private.h" #include <psci.h>
.globl psci_aff_on_finish_entry .globl psci_aff_on_finish_entry
.globl psci_aff_suspend_finish_entry .globl psci_aff_suspend_finish_entry
......
...@@ -28,15 +28,11 @@ ...@@ -28,15 +28,11 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h> #include <arch.h>
#include <string.h>
#include <assert.h>
#include <arch_helpers.h> #include <arch_helpers.h>
#include <console.h> #include <assert.h>
#include <platform.h>
#include <runtime_svc.h> #include <runtime_svc.h>
#include <debug.h> #include <debug.h>
#include <context_mgmt.h>
#include "psci_private.h" #include "psci_private.h"
/******************************************************************************* /*******************************************************************************
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#include <arch.h> #include <arch.h>
#include <bakery_lock.h> #include <bakery_lock.h>
#include <psci.h>
#ifndef __ASSEMBLY__
/******************************************************************************* /*******************************************************************************
* The following two data structures hold the generic information to bringup * The following two data structures hold the generic information to bringup
* a suspended/hotplugged out cpu * a suspended/hotplugged out cpu
...@@ -156,6 +156,5 @@ extern int psci_afflvl_suspend(unsigned long, ...@@ -156,6 +156,5 @@ extern int psci_afflvl_suspend(unsigned long,
int); int);
extern unsigned int psci_afflvl_suspend_finish(unsigned long, int, int); extern unsigned int psci_afflvl_suspend_finish(unsigned long, int, int);
#endif /*__ASSEMBLY__*/
#endif /* __PSCI_PRIVATE_H__ */ #endif /* __PSCI_PRIVATE_H__ */
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h> #include <arch.h>
#include <string.h>
#include <assert.h>
#include <arch_helpers.h> #include <arch_helpers.h>
#include <console.h> #include <assert.h>
#include <platform.h> #include <bl_common.h>
#include <context.h>
#include <context_mgmt.h> #include <context_mgmt.h>
#include <runtime_svc.h> #include <platform.h>
#include <stddef.h>
#include "psci_private.h" #include "psci_private.h"
/******************************************************************************* /*******************************************************************************
......
...@@ -28,13 +28,12 @@ ...@@ -28,13 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdint.h> #include <debug.h>
#include <uuid.h> #include <psci.h>
#include <context_mgmt.h>
#include <runtime_svc.h> #include <runtime_svc.h>
#include <std_svc.h> #include <std_svc.h>
#include <psci.h> #include <stdint.h>
#include <debug.h> #include <uuid.h>
/* Standard Service UUID */ /* Standard Service UUID */
DEFINE_SVC_UUID(arm_svc_uid, DEFINE_SVC_UUID(arm_svc_uid,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment