summaryrefslogtreecommitdiff
path: root/include/bl32
diff options
context:
space:
mode:
authorDan Handley <dan.handley@arm.com>2014-04-10 15:37:22 +0100
committerDan Handley <dan.handley@arm.com>2014-05-06 13:57:48 +0100
commitfb037bfb7cbf7b404c069b4ebac5a10059d948b1 (patch)
tree7039b044f48574085b3d3c6a2e7c20d41a87da20 /include/bl32
parentc5945735a9705675201d2799654348425f28f551 (diff)
Always use named structs in header files
Add tag names to all unnamed structs in header files. This allows forward declaration of structs, which is necessary to reduce header file nesting (to be implemented in a subsequent commit). Also change the typedef names across the codebase to use the _t suffix to be more conformant with the Linux coding style. The coding style actually prefers us not to use typedefs at all but this is considered a step too far for Trusted Firmware. Also change the IO framework structs defintions to use typedef'd structs to be consistent with the rest of the codebase. Change-Id: I722b2c86fc0d92e4da3b15e5cab20373dd26786f
Diffstat (limited to 'include/bl32')
-rw-r--r--include/bl32/bl32.h2
-rw-r--r--include/bl32/payloads/tsp.h34
2 files changed, 18 insertions, 18 deletions
diff --git a/include/bl32/bl32.h b/include/bl32/bl32.h
index 88e18bd3..e4698819 100644
--- a/include/bl32/bl32.h
+++ b/include/bl32/bl32.h
@@ -37,7 +37,7 @@
#include <bl_common.h>
extern void bl32_platform_setup(void);
-extern meminfo *bl32_plat_sec_mem_layout(void);
+extern meminfo_t *bl32_plat_sec_mem_layout(void);
extern uint64_t bl32_main(void);
#endif /* __ASSEMBLY__ */
diff --git a/include/bl32/payloads/tsp.h b/include/bl32/payloads/tsp.h
index 68a65b27..4ac7a1aa 100644
--- a/include/bl32/payloads/tsp.h
+++ b/include/bl32/payloads/tsp.h
@@ -88,7 +88,7 @@
#ifndef __ASSEMBLY__
#include <stdint.h>
-typedef void (*tsp_generic_fptr)(uint64_t arg0,
+typedef void (*tsp_generic_fptr_t)(uint64_t arg0,
uint64_t arg1,
uint64_t arg2,
uint64_t arg3,
@@ -97,26 +97,26 @@ typedef void (*tsp_generic_fptr)(uint64_t arg0,
uint64_t arg6,
uint64_t arg7);
-typedef struct {
- tsp_generic_fptr fast_smc_entry;
- tsp_generic_fptr cpu_on_entry;
- tsp_generic_fptr cpu_off_entry;
- tsp_generic_fptr cpu_resume_entry;
- tsp_generic_fptr cpu_suspend_entry;
-} entry_info;
+typedef struct entry_info {
+ tsp_generic_fptr_t fast_smc_entry;
+ tsp_generic_fptr_t cpu_on_entry;
+ tsp_generic_fptr_t cpu_off_entry;
+ tsp_generic_fptr_t cpu_resume_entry;
+ tsp_generic_fptr_t cpu_suspend_entry;
+} entry_info_t;
-typedef struct {
+typedef struct work_statistics {
uint32_t smc_count; /* Number of returns on this cpu */
uint32_t eret_count; /* Number of entries on this cpu */
uint32_t cpu_on_count; /* Number of cpu on requests */
uint32_t cpu_off_count; /* Number of cpu off requests */
uint32_t cpu_suspend_count; /* Number of cpu suspend requests */
uint32_t cpu_resume_count; /* Number of cpu resume requests */
-} __aligned(CACHE_WRITEBACK_GRANULE) work_statistics;
+} __aligned(CACHE_WRITEBACK_GRANULE) work_statistics_t;
-typedef struct {
+typedef struct tsp_args {
uint64_t _regs[TSP_ARGS_END >> 3];
-} __aligned(CACHE_WRITEBACK_GRANULE) tsp_args;
+} __aligned(CACHE_WRITEBACK_GRANULE) tsp_args_t;
/* Macros to access members of the above structure using their offsets */
#define read_sp_arg(args, offset) ((args)->_regs[offset >> 3])
@@ -127,7 +127,7 @@ typedef struct {
* Ensure that the assembler's view of the size of the tsp_args is the
* same as the compilers
*/
-CASSERT(TSP_ARGS_SIZE == sizeof(tsp_args), assert_sp_args_size_mismatch);
+CASSERT(TSP_ARGS_SIZE == sizeof(tsp_args_t), assert_sp_args_size_mismatch);
extern void tsp_get_magic(uint64_t args[4]);
@@ -147,7 +147,7 @@ extern void tsp_cpu_resume_entry(uint64_t arg0,
uint64_t arg5,
uint64_t arg6,
uint64_t arg7);
-extern tsp_args *tsp_cpu_resume_main(uint64_t arg0,
+extern tsp_args_t *tsp_cpu_resume_main(uint64_t arg0,
uint64_t arg1,
uint64_t arg2,
uint64_t arg3,
@@ -163,7 +163,7 @@ extern void tsp_cpu_suspend_entry(uint64_t arg0,
uint64_t arg5,
uint64_t arg6,
uint64_t arg7);
-extern tsp_args *tsp_cpu_suspend_main(uint64_t arg0,
+extern tsp_args_t *tsp_cpu_suspend_main(uint64_t arg0,
uint64_t arg1,
uint64_t arg2,
uint64_t arg3,
@@ -179,7 +179,7 @@ extern void tsp_cpu_on_entry(uint64_t arg0,
uint64_t arg5,
uint64_t arg6,
uint64_t arg7);
-extern tsp_args *tsp_cpu_on_main(void);
+extern tsp_args_t *tsp_cpu_on_main(void);
extern void tsp_cpu_off_entry(uint64_t arg0,
uint64_t arg1,
uint64_t arg2,
@@ -188,7 +188,7 @@ extern void tsp_cpu_off_entry(uint64_t arg0,
uint64_t arg5,
uint64_t arg6,
uint64_t arg7);
-extern tsp_args *tsp_cpu_off_main(uint64_t arg0,
+extern tsp_args_t *tsp_cpu_off_main(uint64_t arg0,
uint64_t arg1,
uint64_t arg2,
uint64_t arg3,