summaryrefslogtreecommitdiff
path: root/common/bl_common.c
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 /common/bl_common.c
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 'common/bl_common.c')
-rw-r--r--common/bl_common.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/common/bl_common.c b/common/bl_common.c
index acdcc1fa..e96bfa05 100644
--- a/common/bl_common.c
+++ b/common/bl_common.c
@@ -74,7 +74,7 @@ void change_security_state(unsigned int target_security_state)
write_scr(scr);
}
-void __dead2 drop_el(aapcs64_params *args,
+void __dead2 drop_el(aapcs64_params_t *args,
unsigned long spsr,
unsigned long entrypoint)
{
@@ -90,7 +90,7 @@ void __dead2 drop_el(aapcs64_params *args,
args->arg7);
}
-void __dead2 raise_el(aapcs64_params *args)
+void __dead2 raise_el(aapcs64_params_t *args)
{
smc(args->arg0,
args->arg1,
@@ -107,7 +107,7 @@ void __dead2 raise_el(aapcs64_params *args)
* Add support for dropping into EL0 etc. Consider adding support
* for switching from S-EL1 to S-EL0/1 etc.
*/
-void __dead2 change_el(el_change_info *info)
+void __dead2 change_el(el_change_info_t *info)
{
unsigned long current_el = read_current_el();
@@ -156,8 +156,8 @@ unsigned long make_spsr(unsigned long target_el,
* TODO: Revisit if this and init_bl2_mem_layout can be replaced by a single
* routine.
******************************************************************************/
-void init_bl31_mem_layout(const meminfo *bl2_mem_layout,
- meminfo *bl31_mem_layout,
+void init_bl31_mem_layout(const meminfo_t *bl2_mem_layout,
+ meminfo_t *bl31_mem_layout,
unsigned int load_type)
{
if (load_type == BOT_LOAD) {
@@ -200,7 +200,7 @@ void init_bl31_mem_layout(const meminfo *bl2_mem_layout,
bl31_mem_layout->total_size = bl2_mem_layout->total_size;
bl31_mem_layout->attr = load_type;
- flush_dcache_range((unsigned long) bl31_mem_layout, sizeof(meminfo));
+ flush_dcache_range((unsigned long) bl31_mem_layout, sizeof(meminfo_t));
return;
}
@@ -210,8 +210,8 @@ void init_bl31_mem_layout(const meminfo *bl2_mem_layout,
* this information, it populates bl2_mem_layout to tell BL2 how much memory
* it has access to and how much is available for use.
******************************************************************************/
-void init_bl2_mem_layout(meminfo *bl1_mem_layout,
- meminfo *bl2_mem_layout,
+void init_bl2_mem_layout(meminfo_t *bl1_mem_layout,
+ meminfo_t *bl2_mem_layout,
unsigned int load_type,
unsigned long bl2_base)
{
@@ -232,13 +232,13 @@ void init_bl2_mem_layout(meminfo *bl1_mem_layout,
bl2_mem_layout->free_size = bl1_mem_layout->free_size;
bl2_mem_layout->attr = load_type;
- flush_dcache_range((unsigned long) bl2_mem_layout, sizeof(meminfo));
+ flush_dcache_range((unsigned long) bl2_mem_layout, sizeof(meminfo_t));
return;
}
static void dump_load_info(unsigned long image_load_addr,
unsigned long image_size,
- const meminfo *mem_layout)
+ const meminfo_t *mem_layout)
{
#if DEBUG
printf("Trying to load image at address 0x%lx, size = 0x%lx\r\n",
@@ -301,7 +301,7 @@ unsigned long image_size(const char *image_name)
* the bottom or top of the free memory. It updates the memory layout if the
* load is successful.
******************************************************************************/
-unsigned long load_image(meminfo *mem_layout,
+unsigned long load_image(meminfo_t *mem_layout,
const char *image_name,
unsigned int load_type,
unsigned long fixed_addr)
@@ -553,7 +553,7 @@ void __dead2 run_image(unsigned long entrypoint,
void *first_arg,
void *second_arg)
{
- el_change_info run_image_info;
+ el_change_info_t run_image_info;
unsigned long current_el = read_current_el();
/* Tell next EL what we want done */