From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 3 Mar 2021 08:23:37 -0500 Subject: [PATCH 16/20] dm: core: Correctly read of simple-bus In-Reply-To: <20210302153451.19440-17-bmeng.cn@gmail.com> References: <20210302153451.19440-1-bmeng.cn@gmail.com> <20210302153451.19440-17-bmeng.cn@gmail.com> Message-ID: <20210303132337.GB1310@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Mar 02, 2021 at 11:34:47PM +0800, Bin Meng wrote: > At present we decode simple bus 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 > --- > > 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 > #include > #include > +#include > + > +DECLARE_GLOBAL_DATA_PTR; You need to add here too. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: