On Tue, Mar 02, 2021 at 11:34:47PM +0800, Bin Meng wrote: > 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. > > Signed-off-by: Bin Meng <bmeng...@gmail.com> > --- > > drivers/core/simple-bus.c | 15 ++++++++++----- > include/dm/simple_bus.h | 6 +++--- > 2 files changed, 13 insertions(+), 8 deletions(-) > > diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c > index b0c2c20958..b5863f2b2c 100644 > --- a/drivers/core/simple-bus.c > +++ b/drivers/core/simple-bus.c > @@ -6,6 +6,9 @@ > #include <common.h> > #include <dm.h> > #include <dm/simple_bus.h> > +#include <fdt_support.h> > + > +DECLARE_GLOBAL_DATA_PTR;
You need to add <asm/global_data.h> here too. -- Tom
signature.asc
Description: PGP signature