On 02/26/2011 11:16 PM, Peter Stuge wrote:
> Alex G. wrote:
>> Moves the inclusion of the superio early code from romstage.c in 
>> the mainboard directory to Makefile.inc in the superio directory.
> 
> Will it work also for boards with more than one superio?
> 
I'm very tempted (and sure) to say "no". That's why this is largely a
proposal, and you are welcome to extend it. I can only do one superio at
a time, and I definitely cannot do it all by myself.

A:
One other solution I had considered was to put the include in the
board's Makefile.inc, but, as you might have imagined, proved too messy.

B:
A fuzzy extension of this option is to declare
superio_enable_early_serial() as weak, and have the board select which
superio to use for serial output.

C:
Or, besides SUPERIO_VENDOR_NAME we can also have a Kconfig option
SUPERIO_VENDOR_NAME_HAS_EARLY_SERIAL, and base our decision of including
the early serial code in romstage based on the latter.

======================================================================
config BOARD_SPECIFIC_OPTIONS # dummy
        def_bool y
        [...]
        select SUPERIO_FINTEK_F81865F
        select SUPERIO_OTHERVENDOR_OTHERMODEL
        select SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL
        [...]
======================================================================

romstage-$(CONFIG_SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL) += early_serial.c

If the board has two identical superios, then the same file will get
included (only once). In this case, handling both superios will have to
be done in mainboard logic anyways.

D:
Just forget about it and never again worry about .c includes.

Alex

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to