All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] fdtgrep exclude nodes
@ 2015-12-01 10:21 Michal Simek
  2015-12-01 10:46 ` Stefan Roese
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Simek @ 2015-12-01 10:21 UTC (permalink / raw)
  To: u-boot

Hi Simon and Stefan,

I was checking spl/u-boot-spl.dtb and I see that you are removing
interrupt-parent property but I think that also make sense to remove
interrupt property as well because it is unused and parent is also removed.
Just extend OF_SPL_REMOVE_PROPS by "interrupts" to save some memory.

Another thing I was checking was that we are missing rules for removing
nodes with status = "disabled" property. I think that will be good to
add it. The reason is that I would move all that u-boot,dm-pre-reloc to
dtsi at least for now.
Or do you also probe drivers for nodes which have status disabled?

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151201/d2def96b/attachment.sig>

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

* [U-Boot] fdtgrep exclude nodes
  2015-12-01 10:21 [U-Boot] fdtgrep exclude nodes Michal Simek
@ 2015-12-01 10:46 ` Stefan Roese
  2015-12-01 13:22   ` Michal Simek
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Roese @ 2015-12-01 10:46 UTC (permalink / raw)
  To: u-boot

Hi Michal,

On 01.12.2015 11:21, Michal Simek wrote:
> I was checking spl/u-boot-spl.dtb and I see that you are removing
> interrupt-parent property but I think that also make sense to remove
> interrupt property as well because it is unused and parent is also removed.
> Just extend OF_SPL_REMOVE_PROPS by "interrupts" to save some memory.

I'm fine with this.

> Another thing I was checking was that we are missing rules for removing
> nodes with status = "disabled" property. I think that will be good to
> add it. The reason is that I would move all that u-boot,dm-pre-reloc to
> dtsi at least for now.

Hmmm. I prefer to add this "u-boot,dm-pre-reloc" to the board dts
file instead of using the dtsi files. At least for the real devices,
like UART etc. As they vary between the different boards.

Perhaps its possible to enable those busses (simple-bus) needed
to traverse to the requested device automatically via fdtgrep?
That would make this much easier and less error-prone. And would
result in less "u-boot,dm-pre-reloc" occurances in the dts / dtsi
files.

Thanks,
Stefan

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

* [U-Boot] fdtgrep exclude nodes
  2015-12-01 10:46 ` Stefan Roese
@ 2015-12-01 13:22   ` Michal Simek
  2015-12-01 13:31     ` Stefan Roese
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Simek @ 2015-12-01 13:22 UTC (permalink / raw)
  To: u-boot

On 1.12.2015 11:46, Stefan Roese wrote:
> Hi Michal,
> 
> On 01.12.2015 11:21, Michal Simek wrote:
>> I was checking spl/u-boot-spl.dtb and I see that you are removing
>> interrupt-parent property but I think that also make sense to remove
>> interrupt property as well because it is unused and parent is also
>> removed.
>> Just extend OF_SPL_REMOVE_PROPS by "interrupts" to save some memory.
> 
> I'm fine with this.
> 
>> Another thing I was checking was that we are missing rules for removing
>> nodes with status = "disabled" property. I think that will be good to
>> add it. The reason is that I would move all that u-boot,dm-pre-reloc to
>> dtsi at least for now.
> 
> Hmmm. I prefer to add this "u-boot,dm-pre-reloc" to the board dts
> file instead of using the dtsi files. At least for the real devices,
> like UART etc. As they vary between the different boards.

How do you handle if you have 2 uarts which one is primary one?
That only one has dm-pre-reloc? Or are you using aliases?


> Perhaps its possible to enable those busses (simple-bus) needed
> to traverse to the requested device automatically via fdtgrep?
> That would make this much easier and less error-prone. And would
> result in less "u-boot,dm-pre-reloc" occurances in the dts / dtsi
> files.

I still think that instead of putting this property to every node having
one property with list of devices in chosen node is better way.
But I haven't had a time to play with it.

Thanks,
Michal



-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151201/94d02572/attachment.sig>

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

* [U-Boot] fdtgrep exclude nodes
  2015-12-01 13:22   ` Michal Simek
@ 2015-12-01 13:31     ` Stefan Roese
  2015-12-01 13:43       ` Simon Glass
  2015-12-01 13:43       ` Michal Simek
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Roese @ 2015-12-01 13:31 UTC (permalink / raw)
  To: u-boot

On 01.12.2015 14:22, Michal Simek wrote:
> On 1.12.2015 11:46, Stefan Roese wrote:
>> Hi Michal,
>>
>> On 01.12.2015 11:21, Michal Simek wrote:
>>> I was checking spl/u-boot-spl.dtb and I see that you are removing
>>> interrupt-parent property but I think that also make sense to remove
>>> interrupt property as well because it is unused and parent is also
>>> removed.
>>> Just extend OF_SPL_REMOVE_PROPS by "interrupts" to save some memory.
>>
>> I'm fine with this.
>>
>>> Another thing I was checking was that we are missing rules for removing
>>> nodes with status = "disabled" property. I think that will be good to
>>> add it. The reason is that I would move all that u-boot,dm-pre-reloc to
>>> dtsi at least for now.
>>
>> Hmmm. I prefer to add this "u-boot,dm-pre-reloc" to the board dts
>> file instead of using the dtsi files. At least for the real devices,
>> like UART etc. As they vary between the different boards.
>
> How do you handle if you have 2 uarts which one is primary one?
> That only one has dm-pre-reloc? Or are you using aliases?

I only mark the devices absolutely necessary in SPL for booting
with dm-pre-reloc. And that only one UART, one SPI NOR etc.
And yes, I'm also using aliases.

>
>> Perhaps its possible to enable those busses (simple-bus) needed
>> to traverse to the requested device automatically via fdtgrep?
>> That would make this much easier and less error-prone. And would
>> result in less "u-boot,dm-pre-reloc" occurances in the dts / dtsi
>> files.
>
> I still think that instead of putting this property to every node having
> one property with list of devices in chosen node is better way.

Yes, that would also be a good solution. Sprinkling these pre-reloc
properties all over the files and nodes / busses is definitely
not perfect.

Thanks,
Stefan

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

* [U-Boot] fdtgrep exclude nodes
  2015-12-01 13:31     ` Stefan Roese
@ 2015-12-01 13:43       ` Simon Glass
  2015-12-01 13:43       ` Michal Simek
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2015-12-01 13:43 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On 1 December 2015 at 05:31, Stefan Roese <sr@denx.de> wrote:
> On 01.12.2015 14:22, Michal Simek wrote:
>>
>> On 1.12.2015 11:46, Stefan Roese wrote:
>>>
>>> Hi Michal,
>>>
>>> On 01.12.2015 11:21, Michal Simek wrote:
>>>>
>>>> I was checking spl/u-boot-spl.dtb and I see that you are removing
>>>> interrupt-parent property but I think that also make sense to remove
>>>> interrupt property as well because it is unused and parent is also
>>>> removed.
>>>> Just extend OF_SPL_REMOVE_PROPS by "interrupts" to save some memory.
>>>
>>>
>>> I'm fine with this.
>>>
>>>> Another thing I was checking was that we are missing rules for removing
>>>> nodes with status = "disabled" property. I think that will be good to
>>>> add it. The reason is that I would move all that u-boot,dm-pre-reloc to
>>>> dtsi at least for now.
>>>
>>>
>>> Hmmm. I prefer to add this "u-boot,dm-pre-reloc" to the board dts
>>> file instead of using the dtsi files. At least for the real devices,
>>> like UART etc. As they vary between the different boards.
>>
>>
>> How do you handle if you have 2 uarts which one is primary one?
>> That only one has dm-pre-reloc? Or are you using aliases?
>
>
> I only mark the devices absolutely necessary in SPL for booting
> with dm-pre-reloc. And that only one UART, one SPI NOR etc.
> And yes, I'm also using aliases.
>
>>
>>> Perhaps its possible to enable those busses (simple-bus) needed
>>> to traverse to the requested device automatically via fdtgrep?
>>> That would make this much easier and less error-prone. And would
>>> result in less "u-boot,dm-pre-reloc" occurances in the dts / dtsi
>>> files.
>>
>>
>> I still think that instead of putting this property to every node having
>> one property with list of devices in chosen node is better way.
>
>
> Yes, that would also be a good solution. Sprinkling these pre-reloc
> properties all over the files and nodes / busses is definitely
> not perfect.

This has come up before.

I can see pros and cons, but it's not clear to me that one way is
better than the other. I am concerned that we use the 'best' way to
avoid increasing amounts of rework later if we change the approach.

If someone is willing to sketch out how it would be implemented with a
single property (e.g. on a new thread) then that would help continue
the discussion.

Regards,
Simon

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

* [U-Boot] fdtgrep exclude nodes
  2015-12-01 13:31     ` Stefan Roese
  2015-12-01 13:43       ` Simon Glass
@ 2015-12-01 13:43       ` Michal Simek
  1 sibling, 0 replies; 6+ messages in thread
From: Michal Simek @ 2015-12-01 13:43 UTC (permalink / raw)
  To: u-boot

On 1.12.2015 14:31, Stefan Roese wrote:
> On 01.12.2015 14:22, Michal Simek wrote:
>> On 1.12.2015 11:46, Stefan Roese wrote:
>>> Hi Michal,
>>>
>>> On 01.12.2015 11:21, Michal Simek wrote:
>>>> I was checking spl/u-boot-spl.dtb and I see that you are removing
>>>> interrupt-parent property but I think that also make sense to remove
>>>> interrupt property as well because it is unused and parent is also
>>>> removed.
>>>> Just extend OF_SPL_REMOVE_PROPS by "interrupts" to save some memory.
>>>
>>> I'm fine with this.
>>>
>>>> Another thing I was checking was that we are missing rules for removing
>>>> nodes with status = "disabled" property. I think that will be good to
>>>> add it. The reason is that I would move all that u-boot,dm-pre-reloc to
>>>> dtsi at least for now.
>>>
>>> Hmmm. I prefer to add this "u-boot,dm-pre-reloc" to the board dts
>>> file instead of using the dtsi files. At least for the real devices,
>>> like UART etc. As they vary between the different boards.
>>
>> How do you handle if you have 2 uarts which one is primary one?
>> That only one has dm-pre-reloc? Or are you using aliases?
> 
> I only mark the devices absolutely necessary in SPL for booting
> with dm-pre-reloc. And that only one UART, one SPI NOR etc.
> And yes, I'm also using aliases.

TBH I tend to add dm-pre-reloc to DTSI for all IPs which we can use in
SPL. It means by default all devices which can be used for booting will
be there. In combination of removing all IPs which have
status="disabled" I think I am getting pretty accurate picture of all
devices which SPL needs.
There could be small penalty for dt size, SPL size and maybe somewhere
else but I think it will pretty much solve all problems regarding
missing dm-pre-reloc somewhere.
If someone wants to have own production board, they can remove these
dm-pre-reloc properties to shorten time and having smaller footprint.

>>
>>> Perhaps its possible to enable those busses (simple-bus) needed
>>> to traverse to the requested device automatically via fdtgrep?
>>> That would make this much easier and less error-prone. And would
>>> result in less "u-boot,dm-pre-reloc" occurances in the dts / dtsi
>>> files.
>>
>> I still think that instead of putting this property to every node having
>> one property with list of devices in chosen node is better way.
> 
> Yes, that would also be a good solution. Sprinkling these pre-reloc
> properties all over the files and nodes / busses is definitely
> not perfect.

ok.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151201/35afb7f7/attachment.sig>

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

end of thread, other threads:[~2015-12-01 13:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-01 10:21 [U-Boot] fdtgrep exclude nodes Michal Simek
2015-12-01 10:46 ` Stefan Roese
2015-12-01 13:22   ` Michal Simek
2015-12-01 13:31     ` Stefan Roese
2015-12-01 13:43       ` Simon Glass
2015-12-01 13:43       ` Michal Simek

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.