diff options
author | York Sun <yorksun@freescale.com> | 2015-08-03 12:02:04 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-08-06 07:31:36 -0600 |
commit | 28445aa7ec099bf8d7dc49db5fbf6bdd9098b410 (patch) | |
tree | b86ede3c825c578cf9fe93766e4d757aefdb48a9 /include | |
parent | fdb9f349be255b9b69a5e1a300296779b48a36b0 (diff) | |
download | u-boot-imx-28445aa7ec099bf8d7dc49db5fbf6bdd9098b410.zip u-boot-imx-28445aa7ec099bf8d7dc49db5fbf6bdd9098b410.tar.gz u-boot-imx-28445aa7ec099bf8d7dc49db5fbf6bdd9098b410.tar.bz2 |
lib/fdtdec: Fix fdt_addr_t and fdt_size_t typedef
fdt_addr_t is a physical address. It can be either 64-bit or 32-bit,
depending on the architecture. It should be phys_addr_t instead of
u64 or u32. Similarly, fdt_size_t is changed to phys_size_t.
Signed-off-by: York Sun <yorksun@freescale.com>
CC: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/fdtdec.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h index cd4ec66..c9a5c9a 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -21,15 +21,13 @@ * A typedef for a physical address. Note that fdt data is always big * endian even on a litle endian machine. */ +typedef phys_addr_t fdt_addr_t; +typedef phys_size_t fdt_size_t; #ifdef CONFIG_PHYS_64BIT -typedef u64 fdt_addr_t; -typedef u64 fdt_size_t; #define FDT_ADDR_T_NONE (-1ULL) #define fdt_addr_to_cpu(reg) be64_to_cpu(reg) #define fdt_size_to_cpu(reg) be64_to_cpu(reg) #else -typedef u32 fdt_addr_t; -typedef u32 fdt_size_t; #define FDT_ADDR_T_NONE (-1U) #define fdt_addr_to_cpu(reg) be32_to_cpu(reg) #define fdt_size_to_cpu(reg) be32_to_cpu(reg) |