mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 20:54:24 +08:00
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>
This commit is contained in:
parent
fdb9f349be
commit
28445aa7ec
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user