[coreboot] mainboard.c: init() still being called?
mylesgw at gmail.com
Mon Aug 16 17:11:41 CEST 2010
On Mon, Aug 16, 2010 at 7:57 AM, Jens Rottmann
<JRottmann at lippertembedded.de> wrote:
> Hi all,
> in Nov 2008 (around rev. 3760) I had done Coreboot support for 2 of our boards
> (LiPPERT RoadRunner-LX and SpaceRunner-LX). Now I'd like to add support for 2
> more, based on the code for the previous ones as the hardware is quite similar.
> However in the past 2 years / 2000 revs Coreboot has evolved quite a lot! Even
> though SpaceRunner support still compiles, it doesn't quite seem to work as it
> did back then. Looks like I have to try and bring the 2 older board's code up to
> scratch first before I can base anything on it.
Sorry about the breakage. Things have changed quite a bit.
> The old code defined a config byte (for some GPIOs) in struct
> mainboard_lippert_spacerunner_lx_config (chip.h), which used to be set in
> Config.lb with a simple register "..." = "..." statement and used in
> mainboard.c's init() by casting dev->chip_info to struct
> The current code still has the struct (renamed to mainboard_config), but while
> changing Config.lb to devicetree.cb the register statement got dropped so
> there's no longer any value assigned to the config byte. I tried to re-add the
> register line where it was before (before chip northbridge/...) but this seems
> no longer to be allowed. And more importantly, init() which uses the config byte
> is still there but does not seem to be executed any more. At least I couldn't
> see its debug output.
I think that happened when the devicetree.cb files were created
automatically. There weren't many configuration values for the
> I tried to look at the AMD DB800, which had served as my example at the time,
> but the DB800 code hasn't changed, so probably its init() isn't called now
> either. (Only the DB800 doesn't do anything important there.)
The attached patch calls init() again. It makes it match the comments again.
Signed-off-by: Myles Watson <mylesgw at gmail.com>
I think that the value that was left out of devicetree.cb should move
to the mainboard init() or into the device that's being configured
(cs5536.) It makes sense to use values in the device tree to
parameterize device code for specific mainboards, but I don't see the
point of parameterizing mainboard-specific code from the device tree.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 431 bytes
Desc: not available
More information about the coreboot