diff options
author | Dan Handley <dan.handley@arm.com> | 2014-04-09 13:14:54 +0100 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2014-05-06 13:57:48 +0100 |
commit | 97043ac98e13a726dbf8b3b41654dca759e3da2c (patch) | |
tree | 18133148dea88d9a2313113111b24b56e8130505 /services/std_svc | |
parent | fb037bfb7cbf7b404c069b4ebac5a10059d948b1 (diff) |
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
Diffstat (limited to 'services/std_svc')
-rw-r--r-- | services/std_svc/psci/psci_afflvl_off.c | 10 | ||||
-rw-r--r-- | services/std_svc/psci/psci_afflvl_on.c | 12 | ||||
-rw-r--r-- | services/std_svc/psci/psci_afflvl_suspend.c | 10 | ||||
-rw-r--r-- | services/std_svc/psci/psci_common.c | 11 | ||||
-rw-r--r-- | services/std_svc/psci/psci_entry.S | 4 | ||||
-rw-r--r-- | services/std_svc/psci/psci_main.c | 8 | ||||
-rw-r--r-- | services/std_svc/psci/psci_private.h | 3 | ||||
-rw-r--r-- | services/std_svc/psci/psci_setup.c | 12 | ||||
-rw-r--r-- | services/std_svc/std_svc_setup.c | 9 |
9 files changed, 29 insertions, 50 deletions
diff --git a/services/std_svc/psci/psci_afflvl_off.c b/services/std_svc/psci/psci_afflvl_off.c index b3959125..e007bc30 100644 --- a/services/std_svc/psci/psci_afflvl_off.c +++ b/services/std_svc/psci/psci_afflvl_off.c @@ -28,14 +28,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> -#include <string.h> -#include <assert.h> -#include <debug.h> +#include <arch.h> #include <arch_helpers.h> -#include <console.h> -#include <platform.h> -#include <psci.h> +#include <assert.h> +#include <string.h> #include "psci_private.h" typedef int (*afflvl_off_handler_t)(unsigned long, aff_map_node_t *); diff --git a/services/std_svc/psci/psci_afflvl_on.c b/services/std_svc/psci/psci_afflvl_on.c index a1c12a88..8f9bb4de 100644 --- a/services/std_svc/psci/psci_afflvl_on.c +++ b/services/std_svc/psci/psci_afflvl_on.c @@ -28,18 +28,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> -#include <stdint.h> -#include <string.h> +#include <arch.h> +#include <arch_helpers.h> #include <assert.h> +#include <bl_common.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 <runtime_svc.h> +#include <stddef.h> #include "psci_private.h" typedef int (*afflvl_on_handler_t)(unsigned long, diff --git a/services/std_svc/psci/psci_afflvl_suspend.c b/services/std_svc/psci/psci_afflvl_suspend.c index a8d09892..dc12f7a3 100644 --- a/services/std_svc/psci/psci_afflvl_suspend.c +++ b/services/std_svc/psci/psci_afflvl_suspend.c @@ -28,16 +28,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> -#include <string.h> #include <assert.h> -#include <debug.h> +#include <bl_common.h> +#include <arch.h> #include <arch_helpers.h> -#include <console.h> -#include <platform.h> -#include <psci.h> +#include <context.h> #include <context_mgmt.h> #include <runtime_svc.h> +#include <stddef.h> #include "psci_private.h" typedef int (*afflvl_suspend_handler_t)(unsigned long, diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c index 1ce28dc7..1d5c3621 100644 --- a/services/std_svc/psci/psci_common.c +++ b/services/std_svc/psci/psci_common.c @@ -28,15 +28,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> -#include <string.h> -#include <assert.h> +#include <arch.h> #include <arch_helpers.h> -#include <console.h> -#include <platform.h> -#include <psci.h> +#include <assert.h> +#include <bl_common.h> +#include <context.h> #include <context_mgmt.h> -#include <runtime_svc.h> #include <debug.h> #include "psci_private.h" diff --git a/services/std_svc/psci/psci_entry.S b/services/std_svc/psci/psci_entry.S index 51d9b570..e2c690db 100644 --- a/services/std_svc/psci/psci_entry.S +++ b/services/std_svc/psci/psci_entry.S @@ -29,11 +29,9 @@ */ #include <arch.h> -#include <platform.h> -#include <runtime_svc.h> #include <asm_macros.S> #include <cm_macros.S> -#include "psci_private.h" +#include <psci.h> .globl psci_aff_on_finish_entry .globl psci_aff_suspend_finish_entry diff --git a/services/std_svc/psci/psci_main.c b/services/std_svc/psci/psci_main.c index fd20ad5b..1bcf2166 100644 --- a/services/std_svc/psci/psci_main.c +++ b/services/std_svc/psci/psci_main.c @@ -28,15 +28,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> -#include <string.h> -#include <assert.h> +#include <arch.h> #include <arch_helpers.h> -#include <console.h> -#include <platform.h> +#include <assert.h> #include <runtime_svc.h> #include <debug.h> -#include <context_mgmt.h> #include "psci_private.h" /******************************************************************************* diff --git a/services/std_svc/psci/psci_private.h b/services/std_svc/psci/psci_private.h index e34ccfc7..b0b5cc9f 100644 --- a/services/std_svc/psci/psci_private.h +++ b/services/std_svc/psci/psci_private.h @@ -33,8 +33,8 @@ #include <arch.h> #include <bakery_lock.h> +#include <psci.h> -#ifndef __ASSEMBLY__ /******************************************************************************* * The following two data structures hold the generic information to bringup * a suspended/hotplugged out cpu @@ -156,6 +156,5 @@ extern int psci_afflvl_suspend(unsigned long, int); extern unsigned int psci_afflvl_suspend_finish(unsigned long, int, int); -#endif /*__ASSEMBLY__*/ #endif /* __PSCI_PRIVATE_H__ */ diff --git a/services/std_svc/psci/psci_setup.c b/services/std_svc/psci/psci_setup.c index 960c4b8b..71d3f1e7 100644 --- a/services/std_svc/psci/psci_setup.c +++ b/services/std_svc/psci/psci_setup.c @@ -28,14 +28,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> -#include <string.h> -#include <assert.h> +#include <arch.h> #include <arch_helpers.h> -#include <console.h> -#include <platform.h> +#include <assert.h> +#include <bl_common.h> +#include <context.h> #include <context_mgmt.h> -#include <runtime_svc.h> +#include <platform.h> +#include <stddef.h> #include "psci_private.h" /******************************************************************************* diff --git a/services/std_svc/std_svc_setup.c b/services/std_svc/std_svc_setup.c index 40d70960..6cb03199 100644 --- a/services/std_svc/std_svc_setup.c +++ b/services/std_svc/std_svc_setup.c @@ -28,13 +28,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <stdint.h> -#include <uuid.h> -#include <context_mgmt.h> +#include <debug.h> +#include <psci.h> #include <runtime_svc.h> #include <std_svc.h> -#include <psci.h> -#include <debug.h> +#include <stdint.h> +#include <uuid.h> /* Standard Service UUID */ DEFINE_SVC_UUID(arm_svc_uid, |