[coreboot] mainboard.c: init() still being called?

Jens Rottmann JRottmann at LiPPERTEmbedded.de
Fri Aug 27 16:24:51 CEST 2010

Myles wrote:
> It looks like the register at gpio_address + 0x18
> (GPIOL_PULLUP_ENABLE) is getting written in cs5536.c and
> spacerunner-lx/mainboard.c.

No, that's fine. These are not normal r/w registers, they set and clear bits
only by writing 1-bits. Writing 0-bits has no effect. The writes in cs5536.c
and mainboard.c address different bits so are independent of each other.

Patrick wrote:
> Am 25.08.2010 18:10, schrieb Jens Rottmann:
> > i.e. make the mainboard the root device of the device tree - seemed
plausible to
> > me, somehow. This compiles and boots fine, but the 'register' statement still
> > doesn't have any effect, sio_gp1x_config in the mainboard's chip.h still isn't
> > set - hmm, tough luck ... Why have a struct mainboard_config if it can't be
> > used? Maybe it should be removed completely??
> That mechanism could be fixed to work correctly again. Attached patch
> should do that.

Tried chip mainboard / register ... in several locations but couldn't get it
to work, sometimes it wouldn't compile or else the mainboard's enable_dev +
init weren't called at all.

However, as I said in my last mail, I'll go for the Kconfig approach now, just
as Myles suggested.

In my last mail I described some restructuring to make (user visible) options
in the board specific Kconfig files possible (i.e. don't source from within
choice/endchoice). Another change I'd like to add is to move MAINBOARD_VENDOR
and MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID to the vendor's Kconfigs.

I'm going to try and prepare a patch for _all_ vendors/boards. If someone is
already doing this or has objections or suggestions how to do this better
(like how to avoid the dummy option!) please tell me before I waste too much time.


More information about the coreboot mailing list