[U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch

Simon Glass sjg at chromium.org
Tue Jan 8 00:38:20 UTC 2019


Hi,

On Mon, 7 Jan 2019 at 00:19, Priyanka Jain <priyanka.jain at nxp.com> wrote:
>
> Hello Simon,
>
>
>
> Creating a duplicate driver for enabling the flag will add a lot of redundant code.

Please can you avoid top posting?

>
> Is there a way, I can add some conditional code to enable this flag for case when pl01x_serial_platdata in the same driver.

Firstly, can you use device tree?

No you cannot add an arch-specific #ifdef here. Is the overhead a lot?

Regards,
Simon


>
>
>
> Regards
>
> Priyanka
>
> From: Simon Glass <sjg at chromium.org>
> Sent: Friday, January 4, 2019 3:00 AM
> To: Priyanka Jain <priyanka.jain at nxp.com>
> Cc: bmeng.cn at gmail.com; York Sun <york.sun at nxp.com>; Vabhav Sharma <vabhav.sharma at nxp.com>; u-boot at lists.denx.de
> Subject: Re: Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch
>
>
>
> Hi Priyanka,
>
>
>
> On Thu, 3 Jan 2019 at 03:31, Priyanka Jain <priyanka.jain at nxp.com> wrote:
>
> Hello,
>
> I am working to add support for NXP LX2160ARDB board support" "https://patchwork.ozlabs.org/patch/1004541/"
>
> For serial driver, we are using PL01X_SERIAL driver with DM_SERIAL enabled
> Since we need to support various clock frequencies, we have defined pl01x_serial_platdata in board file
> So it's a combination of CONFIG_DM_SERIAL + pl01x_serial_platdata
>
> Also we have requirement to use serial driver before relocation as well.
>
> Now with the patch  " serial: Remove DM_FLAG_PRE_RELOC flag in various drivers"
> the flag "DM_FLAG_PRE_RELOC" is no longer getting set resulting in UART driver not being available before relocation.
>
> I tried adding "u-boot,dm-pre-reloc" in uart node, but it doesn't helped. [May be because uart nodes are set to disable to use 'pl01x_serial_platdata' method]
>
> Can you please provide some suggestions on this issue.
> How to use "DM_SERIAL + pl01x_serial_platdata" feature in pre_reloc phase?
>
>
>
> This really should be using device tree - how come your board cannot use that?
>
>
>
> But it seems that removing the flag has in fact made it impossible to use platdata before relocation? That seems bad. One option is to create your own driver when that flag set.
>
>
>
> Regards,
>
> Simon
>
>
>
>
> Regards
> Priyanka
>
>
>


More information about the U-Boot mailing list