[U-Boot] [PATCH 01/10] dm: imx: serial: support device tree

Stefan Agner stefan at agner.ch
Wed Oct 5 23:58:01 CEST 2016


On 2016-10-04 06:02, Stefano Babic wrote:
> Hi Stefan,
> 
> On 29/08/2016 02:00, Stefan Agner wrote:
>>>
>>> I have applied it, I just noted a slight drawback because this breaks
>>> boards that do not have CONFIG_FIT set.
>>
>> Hm, maybe due to missing CONFIG_OF_LIBFDT? Do you want me to fix it, do
>> you have a certain board you can reproduce it?
> 
> No, I have found it. The patchset breaks two boards (gwventana and
> cmx6), and the reason is that lib/fdtdec.c is not compiled. This is
> because CONFIG_OF_CONTROL is not set for these two boards, but as far as
> I understand this should be not set, because there is no device tree for
> these two boards.
> 
> The issue is generate by the feature use_dte: in fact:
> 
>        plat->use_dte = fdtdec_get_bool(gd->fdt_blob, dev->of_offset,
>                                         "fsl,dte-mode");
> 
> but for boards without DT, fdtdec is not built and gd->fdt_blob is maybe
> not set.
> 
> Can you take a look ? What do you think about it ?

Hm, I see... I guess we need to add a CONFIG_IS_ENABLED(OF_CONTROL)
there, that is what other drivers also do (e.g.
drivers/gpio/mpc85xx_gpio.c).

> 
> The second issue is related to CONFIG_CUSTOM_BOARDINFO:
> 
>        arm:  +   colibri_imx7
> +Error: You must add new CONFIG options using Kconfig
> +The following new ad-hoc CONFIG options were detected:
> +CONFIG_CUSTOM_BOARDINFO
> +
> +Please add these via Kconfig instead. Find a suitable Kconfig
> +file and add a 'config' or 'menuconfig' option.

Yeah I saw that and we either drop that config or will convert it to a
proper Kconfig soon, see also this thread:
http://lists.denx.de/pipermail/u-boot/2016-October/268669.html

> 
> This is related to:
> 
> Author: Stefan Agner <stefan.agner at toradex.com>
> Date:   Mon Aug 1 22:50:24 2016 -0700
> 
>     configs: enable device tree for Colibri iMX7
> 
>     Enable device tree configuration and specify default device tree
>     for Toradex Colibri iMX7. Also configure CONFIG_CUSTOM_BOARDINFO
>     to avoid that board info get printed twice (once from the device
>     tree and one from the runtime detection in board specific code).
> 
>     Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
> 
> What about to split it ? I will let this patch to just enable the device
> tree, and let fix the double output with a follow up patch. What do you
> think ?

Sure, lets just not add CONFIG_CUSTOM_BOARDINFO for now and fix that
once we figure out what we do with that config. I'll send new version of
these two patches, or do you want a new patch which works ontop of your
next branch?

--
Stefan


More information about the U-Boot mailing list