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