aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2021-03-14 20:15:02 +0800
committerPriyanka Jain <priyanka.jain@nxp.com>2021-04-15 14:22:17 +0530
commit80279fa1295af73beba8689450ba408130053ff1 (patch)
tree244b631dc544d2ca87cb3f49fcbe80ccc7525e8a /include
parenta081546de93b8fc3bbfe33e61e6dfa12eda35c24 (diff)
downloadu-boot-80279fa1295af73beba8689450ba408130053ff1.zip
u-boot-80279fa1295af73beba8689450ba408130053ff1.tar.gz
u-boot-80279fa1295af73beba8689450ba408130053ff1.tar.bz2
dm: core: Correctly read <ranges> of simple-bus
At present we decode simple bus <ranges> using the following assumption: - parent #address-cells 1 - child #address-cells 1 - child #size-cells 1 However this might not always be the case. Update to use fdt_addr_t and fdt_size_t in 'struct simple_bus_plat', and use fdt_read_ranges() to correctly decode it according to the actual parent and child #address-cells / #size-cells under a Kconfig option CONFIG_SIMPLE_BUS_CORRECT_RANGE which can be turned on for any board that needs it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'include')
-rw-r--r--include/dm/simple_bus.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/dm/simple_bus.h b/include/dm/simple_bus.h
index 4ad4cc4..b710401 100644
--- a/include/dm/simple_bus.h
+++ b/include/dm/simple_bus.h
@@ -7,9 +7,9 @@
#define __DM_SIMPLE_BUS_H
struct simple_bus_plat {
- u32 base;
- u32 size;
- u32 target;
+ fdt_addr_t base;
+ fdt_size_t size;
+ fdt_addr_t target;
};
#endif