On Tue, 25 Apr 2023 14:19:14 +0200
Rasmus Villemoes <[email protected]> wrote:

> On 25/04/2023 04.17, Hugo Villeneuve wrote:
> 
> > I need to detect at runtime the SOM configuration from an EEPROM, and based 
> > on that information adjust the ethernet PHY property inside the device tree.
> > 
> > I have already done that with success, it works great and as a temporary 
> > workaround I simply call my own function imx8m_board_fix_fdt() at the end 
> > of the function board_fix_fdt() of arch/arm/mach-imx/imx8m/soc.c.
> > 
> > But I don't think that a "board" level function should have been put in a 
> > SOC/arch source file in arch/arm/mach-imx/imx8m/soc.c in the first place. 
> > If it were not for that, there wouldn't be any need to define something new 
> > (event or other).
> > 
> > Maybe we should try to remove that board level function from 
> > arch/arm/mach-imx/imx8m/soc.c and use some other already existing mechanism 
> > for SOC-level device tree fixups?
> 
> AFAICT, you/we can just nuke that function completely.
> 
> (1) As you say, it's not appropriate for arch/SOC to provide that in the
> first place.
> (2) It's completely dead and useless code:
> (2a) No in-tree imx8m-based board seems to set CONFIG_OF_BOARD_FIXUP
> (2b) The nodes which that function wants to disable don't even exist in
> the U-Boot copy of imx8mp.dtsi.
> 
> Commit 35bb60787b88 should never have been applied in mainline U-Boot,
> it's some random import of code from downstream NXP U-Boot, with a
> commit message that makes no sense in upstream context.
> 
> Rasmus

Hi Rasmus,
I agree with your analysis, and I will submit a patch to remove that code.

Thank you.

-- 
Hugo Villeneuve

Reply via email to