summaryrefslogtreecommitdiff
path: root/lib/aarch64
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 /lib/aarch64
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 'lib/aarch64')
-rw-r--r--lib/aarch64/xlat_tables.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/aarch64/xlat_tables.c b/lib/aarch64/xlat_tables.c
index 33a8b6d..6e04f65 100644
--- a/lib/aarch64/xlat_tables.c
+++ b/lib/aarch64/xlat_tables.c
@@ -61,14 +61,14 @@ static unsigned next_xlat;
* Array of all memory regions stored in order of ascending base address.
* The list is terminated by the first entry with size == 0.
*/
-static mmap_region mmap[MAX_MMAP_REGIONS + 1];
+static mmap_region_t mmap[MAX_MMAP_REGIONS + 1];
static void print_mmap(void)
{
#if DEBUG_XLAT_TABLE
debug_print("mmap:\n");
- mmap_region *mm = mmap;
+ mmap_region_t *mm = mmap;
while (mm->size) {
debug_print(" %010lx %10lx %x\n", mm->base, mm->size, mm->attr);
++mm;
@@ -79,8 +79,8 @@ static void print_mmap(void)
void mmap_add_region(unsigned long base, unsigned long size, unsigned attr)
{
- mmap_region *mm = mmap;
- mmap_region *mm_last = mm + sizeof(mmap) / sizeof(mmap[0]) - 1;
+ mmap_region_t *mm = mmap;
+ mmap_region_t *mm_last = mm + sizeof(mmap) / sizeof(mmap[0]) - 1;
assert(IS_PAGE_ALIGNED(base));
assert(IS_PAGE_ALIGNED(size));
@@ -103,7 +103,7 @@ void mmap_add_region(unsigned long base, unsigned long size, unsigned attr)
mm->attr = attr;
}
-void mmap_add(const mmap_region *mm)
+void mmap_add(const mmap_region_t *mm)
{
while (mm->size) {
mmap_add_region(mm->base, mm->size, mm->attr);
@@ -140,7 +140,7 @@ static unsigned long mmap_desc(unsigned attr, unsigned long addr,
return desc;
}
-static int mmap_region_attr(mmap_region *mm, unsigned long base,
+static int mmap_region_attr(mmap_region_t *mm, unsigned long base,
unsigned long size)
{
int attr = mm->attr;
@@ -167,7 +167,7 @@ static int mmap_region_attr(mmap_region *mm, unsigned long base,
}
}
-static mmap_region *init_xlation_table(mmap_region *mm, unsigned long base,
+static mmap_region_t *init_xlation_table(mmap_region_t *mm, unsigned long base,
unsigned long *table, unsigned level)
{
unsigned level_size_shift = L1_XLAT_ADDRESS_SHIFT - (level - 1) *