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 /drivers | |
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 'drivers')
-rw-r--r-- | drivers/arm/cci400/cci400.c | 4 | ||||
-rw-r--r-- | drivers/arm/gic/gic_v3.c | 4 | ||||
-rw-r--r-- | drivers/arm/pl011/pl011.c | 2 | ||||
-rw-r--r-- | drivers/arm/pl011/pl011_console.c | 2 | ||||
-rw-r--r-- | drivers/arm/tzc400/tzc400.c | 6 | ||||
-rw-r--r-- | drivers/io/io_fip.c | 14 | ||||
-rw-r--r-- | drivers/io/io_memmap.c | 6 | ||||
-rw-r--r-- | drivers/io/io_semihosting.c | 2 |
8 files changed, 19 insertions, 21 deletions
diff --git a/drivers/arm/cci400/cci400.c b/drivers/arm/cci400/cci400.c index 4ca55b18..02f7f955 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 d658a61b..f4296629 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 8288cd81..f12bd23d 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 1a684ff6..3b0e237f 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 56c6dea7..c1716db4 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) { diff --git a/drivers/io/io_fip.c b/drivers/io/io_fip.c index 482e0684..b2dcfccf 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 2e70e969..a40e6120 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 89c844b2..a37693df 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> |