[coreboot] Moved 'pci_set_subsystem' to a weak function: Support for Siemens Mainboard

Georgi, Patrick Patrick.Georgi at secunet.com
Tue Jan 25 13:24:59 CET 2011


Am Dienstag, den 25.01.2011, 12:03 +0000 schrieb Joseph Kellermann:
> Yes, I can do, but how can I implement these requirement:
> > board comes with two hardware variants so I have to set up subvendor/device ids accordingly.
> that's, in 'mainboard.c' I check for 'PLX device present' and set up subdevice ids accordingly.
Hm.. we could route the CONFIG_* values through weak functions, that
default to identity functions.

This way, we don't intermix one issue (different register numbers to
program subsystem IDs) with another (different IDs depending on what
hardware the build runs on).

This mixing things has two disadvantages:
1. Devices that override pci_dev_set_subsystem with their own function
won't see your subsystem ID modification,
2. We have to copy&paste the register ID change between boards to have
them all benefit from it (or suffer #1).

I'm not quite sure if using weak functions to wrap the subsystem
CONFIG_* values is actually the right approach, I'll work on a patch to
discuss.

Will the subvendor/subdevice ids be the same for all devices or is that
modification special for certain devices (eg. gfx only)?


Regards,
Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20110125/57156017/attachment.sig>


More information about the coreboot mailing list