summaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-06-25 13:53:07 +1000
committerJon Loeliger <jdl@jdl.com>2008-07-14 12:07:19 -0500
commit53359016caf6db9ab2347517a323d6ba8eb6671e (patch)
tree842a2883cc831aaab29db92a528d025d098cc4f3 /dtc.h
parentf8e52fe6d87cadbaf0b440073fb9137bef36ee98 (diff)
downloaddtc-53359016caf6db9ab2347517a323d6ba8eb6671e.tar.gz
dtc: Use stdint.h types throughout dtc
Currently, dtc defines Linux-like names for various fixed-size integer types. There's no good reason to do this; even Linux itself doesn't use these names for externally visible things any more. This patch replaces these with the C99 standardized type names from stdint.h. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/dtc.h b/dtc.h
index 762706e..7154bfd 100644
--- a/dtc.h
+++ b/dtc.h
@@ -75,11 +75,7 @@ static inline void *xrealloc(void *p, size_t len)
return new;
}
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
-typedef u32 cell_t;
+typedef uint32_t cell_t;
#define cpu_to_be16(x) htons(x)
#define be16_to_cpu(x) ntohs(x)
@@ -144,7 +140,7 @@ struct data data_insert_at_marker(struct data d, struct marker *m,
struct data data_merge(struct data d1, struct data d2);
struct data data_append_cell(struct data d, cell_t word);
struct data data_append_re(struct data d, const struct fdt_reserve_entry *re);
-struct data data_append_addr(struct data d, u64 addr);
+struct data data_append_addr(struct data d, uint64_t addr);
struct data data_append_byte(struct data d, uint8_t byte);
struct data data_append_zeroes(struct data d, int len);
struct data data_append_align(struct data d, int align);
@@ -222,7 +218,7 @@ struct reserve_info {
char *label;
};
-struct reserve_info *build_reserve_entry(u64 start, u64 len, char *label);
+struct reserve_info *build_reserve_entry(uint64_t start, uint64_t len, char *label);
struct reserve_info *chain_reserve_entry(struct reserve_info *first,
struct reserve_info *list);
struct reserve_info *add_reserve_entry(struct reserve_info *list,
@@ -232,11 +228,11 @@ struct reserve_info *add_reserve_entry(struct reserve_info *list,
struct boot_info {
struct reserve_info *reservelist;
struct node *dt; /* the device tree */
- u32 boot_cpuid_phys;
+ uint32_t boot_cpuid_phys;
};
struct boot_info *build_boot_info(struct reserve_info *reservelist,
- struct node *tree, u32 boot_cpuid_phys);
+ struct node *tree, uint32_t boot_cpuid_phys);
/* Checks */