aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-23 16:06:38 -0400
committerTom Rini <trini@konsulko.com>2020-08-23 16:06:38 -0400
commitd584648dad691caec3ecc7777dbfa3f1936878e5 (patch)
treeee787f8204c917526859da55840f6f159a00b8ba /include
parentc84341f5acd6140f361300f02b354a7238f95b72 (diff)
parenta4020350289c520e896fd6180e510be557ed3bf9 (diff)
downloadu-boot-d584648dad691caec3ecc7777dbfa3f1936878e5.zip
u-boot-d584648dad691caec3ecc7777dbfa3f1936878e5.tar.gz
u-boot-d584648dad691caec3ecc7777dbfa3f1936878e5.tar.bz2
Merge tag 'dm-pull-22aug20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
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.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/dm/read.h b/include/dm/read.h
index 487ec9e..0a7aacd 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)