On Mon, Aug 11, 2008 at 09:03:14AM -0700, ron minnich wrote:
On Mon, Aug 11, 2008 at 3:20 AM, Carl-Daniel Hailfinger
Maybe move the hunk above into an extra function so we can use the generic subsystem ID infrastructure?
It's gone. There is not one on v3 and I see no need to add it. The propagation of subsystem stuff can be done by the dtc, AFAICS. We do this:
- add subsystem info to dts and device struct
- allow users to specify subsystem to any node in the dts. All nodes
under that node will inherit that id unless they similarly set it. 3. at the root, we set subsystem to (I assume) mainboard VID and DID 4. at flatten tree time, we walk the tree and propagate subsystem VID and DID to children. This ensures that all devices have it at compile time 5. In a final pass at runtime (probably phase6) we walk the tree and, for devices that set 'support subsystem VID/DID', we set it into the hardware .
Done. Run time mess becomes compile time mess. Unless I'm missing something.
If I am, let me know.
Sounds good, but will need some testing on actual hardware, of course.
I think we'll also need a mechanism to 'not set' or 'unset' subsystem IDs for certain devices. Some (PCI) devices on some chipsets just can't have subsystem IDs at all, for some we don't know _how_ to set them (missing datasheets) and some inherit their IDs from other devices and don't have a mechanism to set their own (e.g. some Intel audio inherits the subsystem IDs of IDE and similar stuff).
Uwe.