public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch
@ 2019-01-03 10:31 Priyanka Jain
  2019-01-03 12:16 ` Lukasz Majewski
  2019-01-03 21:29 ` Simon Glass
  0 siblings, 2 replies; 5+ messages in thread
From: Priyanka Jain @ 2019-01-03 10:31 UTC (permalink / raw)
  To: u-boot

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?

Regards
Priyanka

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch
  2019-01-03 10:31 [U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch Priyanka Jain
@ 2019-01-03 12:16 ` Lukasz Majewski
  2019-01-03 21:29 ` Simon Glass
  1 sibling, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2019-01-03 12:16 UTC (permalink / raw)
  To: u-boot

Hi Priyanka,

> 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?

I'm not sure if this will help in your particular case, but I've got
similar issue with this flag.

Please see this patch and following discussion:
http://patchwork.ozlabs.org/patch/1019846/

> 
> Regards
> Priyanka
> 
> 
> 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190103/e663e11f/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch
  2019-01-03 10:31 [U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch Priyanka Jain
  2019-01-03 12:16 ` Lukasz Majewski
@ 2019-01-03 21:29 ` Simon Glass
  2019-01-07  7:19   ` Priyanka Jain
  1 sibling, 1 reply; 5+ messages in thread
From: Simon Glass @ 2019-01-03 21:29 UTC (permalink / raw)
  To: u-boot

Hi Priyanka,

On Thu, 3 Jan 2019 at 03:31, Priyanka Jain <priyanka.jain@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
>
>
>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch
  2019-01-03 21:29 ` Simon Glass
@ 2019-01-07  7:19   ` Priyanka Jain
  2019-01-08  0:38     ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Priyanka Jain @ 2019-01-07  7:19 UTC (permalink / raw)
  To: u-boot

Hello Simon,

Creating a duplicate driver for enabling the flag will add a lot of redundant code.
Is there a way, I can add some conditional code to enable this flag for case when pl01x_serial_platdata in the same driver.

Regards
Priyanka

From: Simon Glass <sjg@chromium.org>
Sent: Friday, January 4, 2019 3:00 AM
To: Priyanka Jain <priyanka.jain@nxp.com>
Cc: bmeng.cn at gmail.com; York Sun <york.sun@nxp.com>; Vabhav Sharma <vabhav.sharma@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<mailto:priyanka.jain@nxp.com>> wrote:
Hello,

I am working to add support for NXP LX2160ARDB board support" "https://patchwork.ozlabs.org/patch/1004541/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F1004541%2F&data=02%7C01%7Cpriyanka.jain%40nxp.com%7C3bb67c5c25b9469f486a08d671c2a526%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636821478141571674&sdata=N5gMRlinhUzEIrg5Tz5Dk%2BrYkn2lUN2PnmRchhrZ9ys%3D&reserved=0>"

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch
  2019-01-07  7:19   ` Priyanka Jain
@ 2019-01-08  0:38     ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2019-01-08  0:38 UTC (permalink / raw)
  To: u-boot

Hi,

On Mon, 7 Jan 2019 at 00:19, Priyanka Jain <priyanka.jain@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@chromium.org>
> Sent: Friday, January 4, 2019 3:00 AM
> To: Priyanka Jain <priyanka.jain@nxp.com>
> Cc: bmeng.cn at gmail.com; York Sun <york.sun@nxp.com>; Vabhav Sharma <vabhav.sharma@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@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
>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-08  0:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-03 10:31 [U-Boot] Issue faced due to "serial: Remove DM_FLAG_PRE_RELOC flag in various drivers" patch Priyanka Jain
2019-01-03 12:16 ` Lukasz Majewski
2019-01-03 21:29 ` Simon Glass
2019-01-07  7:19   ` Priyanka Jain
2019-01-08  0:38     ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox