[coreboot] [PATCH] Proposal for dealing with superio *.c includes
mr.nuke.me at gmail.com
Thu Mar 3 16:08:55 CET 2011
On 03/03/2011 04:49 PM, Keith Hui wrote:
> I like this solution too. Just that it requires hacking sconfig, and
> I'm not even close to qualified to actually do it. :)
> And this requires sconfig to produce some other output for romstage as
> well. The hardware tree it produces is currently only used during
> While we're on sconfig, devicetree, superio and romstage, can we add a
> facility where I can declare some known, fixed initialization
> sequences that needs to be programmed into certain devices?
And have the same sequence in every devicetree.cb that uses that device?
That's code duplication, which is exactly what we are trying to avoid.
Imagine if we find a problem with a superio used in 30 boards. Instead
of changing one file, we have 30 devicetree.cb .
> Suppose my new board requires 0x00 to be written into pnp device 2e.5,
> registers 0xf0-0xf5. Can we make it so that it will accept this
> declaration, and do it during romstage?
On second thought, it might be a good idea if and only if your board
requires a _different_ sequence, and anything in devicetree.cb would
override the default one.
> If I need to do it now, I'll need to hijack either of io and drq for
> it and can only do it when pnp is initialized in ramstage.
> chip superio/foo/bar # Super I/O
> device pnp 2e.5 on # PME
> reg 0xf0 = 0x00
> reg 0xf1 = 0x00
> reg 0xf2 = 0x00
> reg 0xf3 = 0x00
> reg 0xf4 = 0x00
> reg 0xf5 = 0x00
I'm not seeing any generic "reg" infrastructure. It doesn't look that
hard to extend though.
However, devicetree.cb _seems_ to deal exclusively with ramstage. Not
too sure how we can extend that to romstage.
More information about the coreboot