[coreboot] subsystem IDs

Peter Stuge peter at stuge.se
Wed Nov 19 07:32:24 CET 2008


Uwe Hermann wrote:
> > +++ mainboard/amd/serengeti/dts	(working copy)
> > @@ -22,6 +22,8 @@
> >  	device_operations="serengeti";
> >  	mainboard_vendor = "AMD";
> >  	mainboard_name = "Serengeti";
> > +	subsystem_vendor = "PCI_VENDOR_ID_AMD";
> 
> Nice, I didn't know that #defines could be used in dts.

This is a good example of why NOT to use #defines for IDs:

1. The value could change unexpectedly
 * If the #define is changed in the source a new ID can end up being
   used even though the dts is unchanged. This is not obvious and IMO
   not acceptable.

2. It is redundant
 * mainboard_vendor already provides a friendly name for the vendor.


//Peter




More information about the coreboot mailing list