diff options
author | Tom Rini <trini@konsulko.com> | 2020-08-23 16:06:38 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-23 16:06:38 -0400 |
commit | d584648dad691caec3ecc7777dbfa3f1936878e5 (patch) | |
tree | ee787f8204c917526859da55840f6f159a00b8ba /include | |
parent | c84341f5acd6140f361300f02b354a7238f95b72 (diff) | |
parent | a4020350289c520e896fd6180e510be557ed3bf9 (diff) | |
download | u-boot-WIP/23Aug2020.tar.gz |
Merge tag 'dm-pull-22aug20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmWIP/23Aug2020
replace devfdt_get_addr_ptr() with dev_read_addr_ptr()
binman fixes for portage
various minor fixes
'bind' command improvements
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/read.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/dm/read.h b/include/dm/read.h index 487ec9e9c9..0a7aacd2d0 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -802,9 +802,7 @@ static inline fdt_addr_t dev_read_addr(const struct udevice *dev) static inline void *dev_read_addr_ptr(const struct udevice *dev) { - void *addr = devfdt_get_addr_ptr(dev); - - return ((fdt_addr_t)(uintptr_t)addr == FDT_ADDR_T_NONE) ? NULL : addr; + return devfdt_get_addr_ptr(dev); } static inline fdt_addr_t dev_read_addr_pci(const struct udevice *dev) @@ -878,14 +876,16 @@ static inline int dev_count_phandle_with_args(const struct udevice *dev, static inline int dev_read_addr_cells(const struct udevice *dev) { - /* NOTE: this call should walk up the parent stack */ - return fdt_address_cells(gd->fdt_blob, dev_of_offset(dev)); + int parent = fdt_parent_offset(gd->fdt_blob, dev_of_offset(dev)); + + return fdt_address_cells(gd->fdt_blob, parent); } static inline int dev_read_size_cells(const struct udevice *dev) { - /* NOTE: this call should walk up the parent stack */ - return fdt_size_cells(gd->fdt_blob, dev_of_offset(dev)); + int parent = fdt_parent_offset(gd->fdt_blob, dev_of_offset(dev)); + + return fdt_size_cells(gd->fdt_blob, parent); } static inline int dev_read_simple_addr_cells(const struct udevice *dev) |