mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
fdtdec: Remove fdt_{addr,size}_unpack()
U-Boot already defines the {upper,lower}_32_bits() macros that have the same purpose. Use the existing macros instead of defining new APIs. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
089ff8eb66
commit
3bf2f15351
3 changed files with 12 additions and 28 deletions
|
@ -24,30 +24,6 @@
|
|||
typedef phys_addr_t fdt_addr_t;
|
||||
typedef phys_size_t fdt_size_t;
|
||||
|
||||
static inline fdt32_t fdt_addr_unpack(fdt_addr_t addr, fdt32_t *upper)
|
||||
{
|
||||
if (upper)
|
||||
#ifdef CONFIG_PHYS_64BIT
|
||||
*upper = addr >> 32;
|
||||
#else
|
||||
*upper = 0;
|
||||
#endif
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
static inline fdt32_t fdt_size_unpack(fdt_size_t size, fdt32_t *upper)
|
||||
{
|
||||
if (upper)
|
||||
#ifdef CONFIG_PHYS_64BIT
|
||||
*upper = size >> 32;
|
||||
#else
|
||||
*upper = 0;
|
||||
#endif
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PHYS_64BIT
|
||||
#define FDT_ADDR_T_NONE (-1U)
|
||||
#define fdt_addr_to_cpu(reg) be64_to_cpu(reg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue