mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* raspi: should vc fixups update properties of existing nodes?
@ 2024-04-10  9:59 Jonas Richardsen
  2024-04-10 11:51 ` Ahmad Fatoum
  0 siblings, 1 reply; 6+ messages in thread
From: Jonas Richardsen @ 2024-04-10  9:59 UTC (permalink / raw)
  To: barebox

Hi,

the function `rpi_vc_fdt_parse` in 
arch/arm/boards/raspberry-pi/rpi-common.c registers multiple fixups that 
take over nodes from the video core device tree. These fixups make use 
of the `of_copy_property` function to copy the properties of the 
respective node. In the case of already existing nodes (and properties), 
this function duplicates the properties instead of updating them.

If the intention is to not override existing properties, one should 
probably check for the existence of each property before copying to 
avoid kernel warnings and misconfiguration due to duplicate properties.

If existing properties are supposed to be updated, this could be 
achieved by switching to `of_set_property` (or something similar). Note 
that this notion of overriding properties also exists in video core, see 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/broadcom/bcm2711.dtsi?h=v6.8#n412 
for an example.

I would be glad to submit a patch for either case.

Regards,

Jonas




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

end of thread, other threads:[~2024-04-16 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10  9:59 raspi: should vc fixups update properties of existing nodes? Jonas Richardsen
2024-04-10 11:51 ` Ahmad Fatoum
2024-04-15  8:14   ` [PATCH] of: do not copy properties if they already exist in the destination Jonas Richardsen
2024-04-15  8:30     ` Ahmad Fatoum
2024-04-15 12:26       ` [PATCH v2] " Jonas Richardsen
2024-04-16 13:38         ` Sascha Hauer

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