* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override @ 2018-05-02 0:46 Martin Kelly 2018-05-17 12:01 ` Maxime Ripard 0 siblings, 1 reply; 11+ messages in thread From: Martin Kelly @ 2018-05-02 0:46 UTC (permalink / raw) To: u-boot Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes the kernel fdtfile and the u-boot devicetree names are the same. Although this is typically the case, sometimes you might want to customize one of these differently, so it's useful to allow them to be different. Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, and default to the values it currently uses. Signed-off-by: Martin Kelly <mkelly@xevo.com> --- include/configs/sunxi-common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 9d9e9ce173..cfd0b1d8c6 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -501,12 +501,18 @@ extern int soft_i2c_gpio_scl; CONSOLE_STDIN_SETTINGS \ CONSOLE_STDOUT_SETTINGS +#ifdef CONFIG_DEFAULT_FDT_FILE +#define FDTFILE CONFIG_DEFAULT_FDT_FILE ".dtb" +#else /* ifndef CONFIG_DEFAULT_FDT_FILE */ + #ifdef CONFIG_ARM64 #define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb" #else #define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" #endif +#endif /* ifdef CONFIG_DEFAULT_FDT_FILE */ + #define CONFIG_EXTRA_ENV_SETTINGS \ CONSOLE_ENV_SETTINGS \ MEM_LAYOUT_ENV_SETTINGS \ -- 2.11.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-02 0:46 [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override Martin Kelly @ 2018-05-17 12:01 ` Maxime Ripard 2018-05-23 18:34 ` Martin Kelly 2018-05-31 18:13 ` Jagan Teki 0 siblings, 2 replies; 11+ messages in thread From: Maxime Ripard @ 2018-05-17 12:01 UTC (permalink / raw) To: u-boot On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: > Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes > the kernel fdtfile and the u-boot devicetree names are the same. > Although this is typically the case, sometimes you might want to > customize one of these differently, so it's useful to allow them to be > different. > > Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, > and default to the values it currently uses. > > Signed-off-by: Martin Kelly <mkelly@xevo.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180517/de892107/attachment.sig> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-17 12:01 ` Maxime Ripard @ 2018-05-23 18:34 ` Martin Kelly 2018-05-31 17:49 ` Martin Kelly 2018-05-31 18:13 ` Jagan Teki 1 sibling, 1 reply; 11+ messages in thread From: Martin Kelly @ 2018-05-23 18:34 UTC (permalink / raw) To: u-boot On 05/17/2018 05:01 AM, Maxime Ripard wrote: > On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: >> Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes >> the kernel fdtfile and the u-boot devicetree names are the same. >> Although this is typically the case, sometimes you might want to >> customize one of these differently, so it's useful to allow them to be >> different. >> >> Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, >> and default to the values it currently uses. >> >> Signed-off-by: Martin Kelly <mkelly@xevo.com> > > Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> > > Maxime > (ping) ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-23 18:34 ` Martin Kelly @ 2018-05-31 17:49 ` Martin Kelly 2018-05-31 18:15 ` klaus.goger at theobroma-systems.com 0 siblings, 1 reply; 11+ messages in thread From: Martin Kelly @ 2018-05-31 17:49 UTC (permalink / raw) To: u-boot On 05/23/2018 11:34 AM, Martin Kelly wrote: > On 05/17/2018 05:01 AM, Maxime Ripard wrote: >> On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: >>> Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes >>> the kernel fdtfile and the u-boot devicetree names are the same. >>> Although this is typically the case, sometimes you might want to >>> customize one of these differently, so it's useful to allow them to be >>> different. >>> >>> Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, >>> and default to the values it currently uses. >>> >>> Signed-off-by: Martin Kelly <mkelly@xevo.com> >> >> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> >> >> Maxime >> > > (ping) (ping again) Can we get this patch merged? ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-31 17:49 ` Martin Kelly @ 2018-05-31 18:15 ` klaus.goger at theobroma-systems.com 2018-05-31 19:48 ` Martin Kelly 0 siblings, 1 reply; 11+ messages in thread From: klaus.goger at theobroma-systems.com @ 2018-05-31 18:15 UTC (permalink / raw) To: u-boot Hi Martin, > On 31.05.2018, at 19:49, Martin Kelly <mkelly@xevo.com> wrote: > > On 05/23/2018 11:34 AM, Martin Kelly wrote: >> On 05/17/2018 05:01 AM, Maxime Ripard wrote: >>> On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: >>>> Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes >>>> the kernel fdtfile and the u-boot devicetree names are the same. >>>> Although this is typically the case, sometimes you might want to >>>> customize one of these differently, so it's useful to allow them to be >>>> different. >>>> >>>> Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, >>>> and default to the values it currently uses. >>>> >>>> Signed-off-by: Martin Kelly <mkelly@xevo.com> >>> >>> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> >>> >>> Maxime >>> >> (ping) > > (ping again) > > Can we get this patch merged? The else branch will never be selected. CONFIG_DEFAULT_FDT_FILE will be set to “” if not set by your defconfig. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-31 18:15 ` klaus.goger at theobroma-systems.com @ 2018-05-31 19:48 ` Martin Kelly 2018-05-31 19:58 ` klaus.goger at theobroma-systems.com 0 siblings, 1 reply; 11+ messages in thread From: Martin Kelly @ 2018-05-31 19:48 UTC (permalink / raw) To: u-boot On 05/31/2018 11:15 AM, klaus.goger at theobroma-systems.com wrote: > Hi Martin, > >> On 31.05.2018, at 19:49, Martin Kelly <mkelly@xevo.com> wrote: >> >> On 05/23/2018 11:34 AM, Martin Kelly wrote: >>> On 05/17/2018 05:01 AM, Maxime Ripard wrote: >>>> On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: >>>>> Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes >>>>> the kernel fdtfile and the u-boot devicetree names are the same. >>>>> Although this is typically the case, sometimes you might want to >>>>> customize one of these differently, so it's useful to allow them to be >>>>> different. >>>>> >>>>> Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, >>>>> and default to the values it currently uses. >>>>> >>>>> Signed-off-by: Martin Kelly <mkelly@xevo.com> >>>> >>>> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> >>>> >>>> Maxime >>>> >>> (ping) >> >> (ping again) >> >> Can we get this patch merged? > > The else branch will never be selected. > CONFIG_DEFAULT_FDT_FILE will be set to “” if not set by your defconfig. > Thanks for noticing this; unfortunately you are right. I thought I tested this, but it was in the context of a larger build and I missed it. It looks like we have two options: (a) Test for empty string in preprocessor language. This is quite ugly and has some gotchas but should be doable (e.g. https://stackoverflow.com/questions/3781520/how-to-test-if-preprocessor-symbol-is-defined-but-has-no-value). (b) Always use the value of CONFIG_DEFAULT_FDT_FILE and stop using CONFIG_DEFAULT_DEVICE_TREE as a default. In each board file, explicitly set CONFIG_DEFAULT_FDT_FILE to its current default. This is what other boards are doing. I favor (b). If others are in favor, I'll submit a patch for it. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-31 19:48 ` Martin Kelly @ 2018-05-31 19:58 ` klaus.goger at theobroma-systems.com 2018-05-31 20:02 ` Martin Kelly 0 siblings, 1 reply; 11+ messages in thread From: klaus.goger at theobroma-systems.com @ 2018-05-31 19:58 UTC (permalink / raw) To: u-boot > On 31.05.2018, at 21:48, Martin Kelly <mkelly@xevo.com> wrote: > > On 05/31/2018 11:15 AM, klaus.goger at theobroma-systems.com wrote: >> Hi Martin, >>> On 31.05.2018, at 19:49, Martin Kelly <mkelly@xevo.com> wrote: >>> >>> On 05/23/2018 11:34 AM, Martin Kelly wrote: >>>> On 05/17/2018 05:01 AM, Maxime Ripard wrote: >>>>> On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: >>>>>> Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes >>>>>> the kernel fdtfile and the u-boot devicetree names are the same. >>>>>> Although this is typically the case, sometimes you might want to >>>>>> customize one of these differently, so it's useful to allow them to be >>>>>> different. >>>>>> >>>>>> Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, >>>>>> and default to the values it currently uses. >>>>>> >>>>>> Signed-off-by: Martin Kelly <mkelly@xevo.com> >>>>> >>>>> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> >>>>> >>>>> Maxime >>>>> >>>> (ping) >>> >>> (ping again) >>> >>> Can we get this patch merged? >> The else branch will never be selected. >> CONFIG_DEFAULT_FDT_FILE will be set to “” if not set by your defconfig. > > Thanks for noticing this; unfortunately you are right. I thought I tested this, but it was in the context of a larger build and I missed it. > > It looks like we have two options: > > (a) Test for empty string in preprocessor language. This is quite ugly and has some gotchas but should be doable (e.g. https://stackoverflow.com/questions/3781520/how-to-test-if-preprocessor-symbol-is-defined-but-has-no-value). > > (b) Always use the value of CONFIG_DEFAULT_FDT_FILE and stop using CONFIG_DEFAULT_DEVICE_TREE as a default. In each board file, explicitly set CONFIG_DEFAULT_FDT_FILE to its current default. This is what other boards are doing. > > I favor (b). If others are in favor, I'll submit a patch for it. I run into the same issue for the rockchip architecture[1]. After giving up on finding a rock-solid solution for detecting the emtpy string I decided to go with your option (b). Another solution would be to hide CONFIG_DEFAULT_DEVICE_TREE behind a Kconfig bool so it would not be defined until something like CONFIG_FDT_FILE is selected. But in favour of having U-Boot devicetree decoupled from any OS fdt I still prefer option (b). [1] https://patchwork.ozlabs.org/patch/920785/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-31 19:58 ` klaus.goger at theobroma-systems.com @ 2018-05-31 20:02 ` Martin Kelly 2018-06-01 9:29 ` Jagan Teki 0 siblings, 1 reply; 11+ messages in thread From: Martin Kelly @ 2018-05-31 20:02 UTC (permalink / raw) To: u-boot On 05/31/2018 12:58 PM, klaus.goger at theobroma-systems.com wrote: > > >> On 31.05.2018, at 21:48, Martin Kelly <mkelly@xevo.com> wrote: >> >> On 05/31/2018 11:15 AM, klaus.goger at theobroma-systems.com wrote: >>> Hi Martin, >>>> On 31.05.2018, at 19:49, Martin Kelly <mkelly@xevo.com> wrote: >>>> >>>> On 05/23/2018 11:34 AM, Martin Kelly wrote: >>>>> On 05/17/2018 05:01 AM, Maxime Ripard wrote: >>>>>> On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: >>>>>>> Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes >>>>>>> the kernel fdtfile and the u-boot devicetree names are the same. >>>>>>> Although this is typically the case, sometimes you might want to >>>>>>> customize one of these differently, so it's useful to allow them to be >>>>>>> different. >>>>>>> >>>>>>> Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, >>>>>>> and default to the values it currently uses. >>>>>>> >>>>>>> Signed-off-by: Martin Kelly <mkelly@xevo.com> >>>>>> >>>>>> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> >>>>>> >>>>>> Maxime >>>>>> >>>>> (ping) >>>> >>>> (ping again) >>>> >>>> Can we get this patch merged? >>> The else branch will never be selected. >>> CONFIG_DEFAULT_FDT_FILE will be set to “” if not set by your defconfig. >> >> Thanks for noticing this; unfortunately you are right. I thought I tested this, but it was in the context of a larger build and I missed it. >> >> It looks like we have two options: >> >> (a) Test for empty string in preprocessor language. This is quite ugly and has some gotchas but should be doable (e.g. https://stackoverflow.com/questions/3781520/how-to-test-if-preprocessor-symbol-is-defined-but-has-no-value). >> >> (b) Always use the value of CONFIG_DEFAULT_FDT_FILE and stop using CONFIG_DEFAULT_DEVICE_TREE as a default. In each board file, explicitly set CONFIG_DEFAULT_FDT_FILE to its current default. This is what other boards are doing. >> >> I favor (b). If others are in favor, I'll submit a patch for it. > > I run into the same issue for the rockchip architecture[1]. After giving up on finding a > rock-solid solution for detecting the emtpy string I decided to go with your option (b). > Another solution would be to hide CONFIG_DEFAULT_DEVICE_TREE behind a > Kconfig bool so it would not be defined until something like CONFIG_FDT_FILE is > selected. But in favour of having U-Boot devicetree decoupled from any OS fdt I > still prefer option (b). > > [1] https://patchwork.ozlabs.org/patch/920785/ > > Thanks, I'll go ahead with that solution and issue a follow-up patch. Jagan, should I make the patch against this one, or against master? ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-31 20:02 ` Martin Kelly @ 2018-06-01 9:29 ` Jagan Teki 0 siblings, 0 replies; 11+ messages in thread From: Jagan Teki @ 2018-06-01 9:29 UTC (permalink / raw) To: u-boot On Fri, Jun 1, 2018 at 1:32 AM, Martin Kelly <mkelly@xevo.com> wrote: > On 05/31/2018 12:58 PM, klaus.goger at theobroma-systems.com wrote: >> [snip] >> >> >> I run into the same issue for the rockchip architecture[1]. After giving >> up on finding a >> rock-solid solution for detecting the emtpy string I decided to go with >> your option (b). >> Another solution would be to hide CONFIG_DEFAULT_DEVICE_TREE behind a >> Kconfig bool so it would not be defined until something like >> CONFIG_FDT_FILE is >> selected. But in favour of having U-Boot devicetree decoupled from any OS >> fdt I >> still prefer option (b). >> >> [1] https://patchwork.ozlabs.org/patch/920785/ >> >> > > Thanks, I'll go ahead with that solution and issue a follow-up patch. > > Jagan, should I make the patch against this one, or against master? on master ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-17 12:01 ` Maxime Ripard 2018-05-23 18:34 ` Martin Kelly @ 2018-05-31 18:13 ` Jagan Teki 2018-05-31 18:14 ` Martin Kelly 1 sibling, 1 reply; 11+ messages in thread From: Jagan Teki @ 2018-05-31 18:13 UTC (permalink / raw) To: u-boot On Thu, May 17, 2018 at 5:31 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote: > On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: >> Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes >> the kernel fdtfile and the u-boot devicetree names are the same. >> Although this is typically the case, sometimes you might want to >> customize one of these differently, so it's useful to allow them to be >> different. >> >> Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, >> and default to the values it currently uses. >> >> Signed-off-by: Martin Kelly <mkelly@xevo.com> > > Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Applied to u-boot-sunxi/master ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override 2018-05-31 18:13 ` Jagan Teki @ 2018-05-31 18:14 ` Martin Kelly 0 siblings, 0 replies; 11+ messages in thread From: Martin Kelly @ 2018-05-31 18:14 UTC (permalink / raw) To: u-boot On 05/31/2018 11:13 AM, Jagan Teki wrote: > On Thu, May 17, 2018 at 5:31 PM, Maxime Ripard > <maxime.ripard@bootlin.com> wrote: >> On Tue, May 01, 2018 at 05:46:41PM -0700, Martin Kelly wrote: >>> Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes >>> the kernel fdtfile and the u-boot devicetree names are the same. >>> Although this is typically the case, sometimes you might want to >>> customize one of these differently, so it's useful to allow them to be >>> different. >>> >>> Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set, >>> and default to the values it currently uses. >>> >>> Signed-off-by: Martin Kelly <mkelly@xevo.com> >> >> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> > > Applied to u-boot-sunxi/master > Thanks! ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-06-01 9:29 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-05-02 0:46 [U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override Martin Kelly 2018-05-17 12:01 ` Maxime Ripard 2018-05-23 18:34 ` Martin Kelly 2018-05-31 17:49 ` Martin Kelly 2018-05-31 18:15 ` klaus.goger at theobroma-systems.com 2018-05-31 19:48 ` Martin Kelly 2018-05-31 19:58 ` klaus.goger at theobroma-systems.com 2018-05-31 20:02 ` Martin Kelly 2018-06-01 9:29 ` Jagan Teki 2018-05-31 18:13 ` Jagan Teki 2018-05-31 18:14 ` Martin Kelly
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.