Message ID | 20190925145750.200592-6-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
Series | x86: Add initial support for apollolake | expand |
On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote: > > These functions cannot work with of-platdata since libfdt is not > available. At present when dev_read_...() functions are used it produces > error messages about ofnode which is confusing. > > Adjust the Makefile and header to produce an error message for the actual > dev_read...() function which is called. This makes it easier to see what > code needs to be converted for use with of-platdata. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > drivers/core/Makefile | 4 +++- > include/dm/read.h | 3 +-- > 2 files changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
On Thu, Oct 3, 2019 at 8:48 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote: > > > > These functions cannot work with of-platdata since libfdt is not > > available. At present when dev_read_...() functions are used it produces > > error messages about ofnode which is confusing. > > > > Adjust the Makefile and header to produce an error message for the actual > > dev_read...() function which is called. This makes it easier to see what > > code needs to be converted for use with of-platdata. > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > --- > > > > drivers/core/Makefile | 4 +++- > > include/dm/read.h | 3 +-- > > 2 files changed, 4 insertions(+), 3 deletions(-) > > > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> applied to u-boot-x86/next, thanks!
Hi Simon, On Sun, Oct 6, 2019 at 5:15 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > On Thu, Oct 3, 2019 at 8:48 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > > > On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote: > > > > > > These functions cannot work with of-platdata since libfdt is not > > > available. At present when dev_read_...() functions are used it produces > > > error messages about ofnode which is confusing. > > > > > > Adjust the Makefile and header to produce an error message for the actual > > > dev_read...() function which is called. This makes it easier to see what > > > code needs to be converted for use with of-platdata. As this commit message says, with this patch now it causes a large number of ARM boards build break. See: https://gitlab.denx.de/u-boot/custodians/u-boot-x86/-/jobs/16696 https://gitlab.denx.de/u-boot/custodians/u-boot-x86/-/jobs/16697 So this is intentional, but I think we should provide the build fix at the same time to make gitlab-CI happy. > > > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > > --- > > > > > > drivers/core/Makefile | 4 +++- > > > include/dm/read.h | 3 +-- > > > 2 files changed, 4 insertions(+), 3 deletions(-) > > > > > > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> > > applied to u-boot-x86/next, thanks! I will have to drop this patch from the queue. Regards, Bin
Hi Bin, On Sun, 6 Oct 2019 at 19:40, Bin Meng <bmeng.cn@gmail.com> wrote: > > Hi Simon, > > On Sun, Oct 6, 2019 at 5:15 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > > > On Thu, Oct 3, 2019 at 8:48 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > > > > > On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote: > > > > > > > > These functions cannot work with of-platdata since libfdt is not > > > > available. At present when dev_read_...() functions are used it produces > > > > error messages about ofnode which is confusing. > > > > > > > > Adjust the Makefile and header to produce an error message for the actual > > > > dev_read...() function which is called. This makes it easier to see what > > > > code needs to be converted for use with of-platdata. > > As this commit message says, with this patch now it causes a large > number of ARM boards build break. See: > https://gitlab.denx.de/u-boot/custodians/u-boot-x86/-/jobs/16696 > https://gitlab.denx.de/u-boot/custodians/u-boot-x86/-/jobs/16697 > > So this is intentional, but I think we should provide the build fix at > the same time to make gitlab-CI happy. Yes that makes sense. In fact I think I'll pull this out into a separate series since it is better done with multiple patches. Regards, Simon
diff --git a/drivers/core/Makefile b/drivers/core/Makefile index bce7467da1d..b9e4a2aab1a 100644 --- a/drivers/core/Makefile +++ b/drivers/core/Makefile @@ -13,6 +13,8 @@ obj-$(CONFIG_OF_LIVE) += of_access.o of_addr.o ifndef CONFIG_DM_DEV_READ_INLINE obj-$(CONFIG_OF_CONTROL) += read.o endif -obj-$(CONFIG_OF_CONTROL) += of_extra.o ofnode.o read_extra.o +ifdef CONFIG_$(SPL_TPL_)OF_LIBFDT +obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += of_extra.o ofnode.o read_extra.o +endif ccflags-$(CONFIG_DM_DEBUG) += -DDEBUG diff --git a/include/dm/read.h b/include/dm/read.h index 803daf7620c..03189838ff7 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -43,8 +43,7 @@ static inline bool dev_of_valid(struct udevice *dev) return ofnode_valid(dev_ofnode(dev)); } -#ifndef CONFIG_DM_DEV_READ_INLINE - +#if !defined(CONFIG_DM_DEV_READ_INLINE) || CONFIG_IS_ENABLED(OF_PLATDATA) /** * dev_read_u32() - read a 32-bit integer from a device's DT property *
These functions cannot work with of-platdata since libfdt is not available. At present when dev_read_...() functions are used it produces error messages about ofnode which is confusing. Adjust the Makefile and header to produce an error message for the actual dev_read...() function which is called. This makes it easier to see what code needs to be converted for use with of-platdata. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/core/Makefile | 4 +++- include/dm/read.h | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-)