On Thu, Sep 11, 2014 at 10:06:08AM +0100, Grant Likely wrote: > On Wed, 10 Sep 2014 15:31:44 +0100, Mark Brown wrote: > > As well as the regulators we'll also need to fix the clocks. If we're > > going to start adding these fixups perhaps we want to consider having a > > wrapper stage that deals with rewriting DTs prior to trying to use them? > > I'm not sure if it makes much difference but there's overlap with other > > tools like the ATAGs conversion wrapper and building separately would > > let the fixup code run early without directly going into the early init > > code (which seems a bit scary). > We've already got a dt fixup hook in the machine struct, created for > exactly this reason. Fixing an incorrect DT provided by firmware: > arch/arm/include/asm/mach/arch.h: > struct machine_desc { > ... > void (*dt_fixup)(void); > ... Hrm, that's in the machine descriptor which doesn't seem the ideal place - something keying off machine ID would be nicer. But that's relatively speaking just detail.