Add subsystemid option to sconfig
Allow user to add 'subsystemid <vendor> <device> [inherit]' to devicetree.cb for PCI and PCI domain devices. Example: device pci 00.0 on subsystemid dead beef end If the user wants to have this ID inherited to all subdevices/functions, he can add 'inherit', like in the following example: device pci 00.0 on subsystemid dead beef inherit end If the user don't want to inherit a Subsystem for a single device, he can specify 'subsystemid 0 0' on this particular device. Signed-off-by: Sven Schnelle <svens@stackframe.org> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6420 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@@ -29,13 +29,14 @@ static struct device *cur_parent, *cur_bus;
|
||||
char *string;
|
||||
int number;
|
||||
}
|
||||
%token CHIP DEVICE REGISTER BOOL BUS RESOURCE END EQUALS HEX STRING PCI PNP I2C APIC APIC_CLUSTER PCI_DOMAIN IRQ DRQ IO NUMBER
|
||||
|
||||
%token CHIP DEVICE REGISTER BOOL BUS RESOURCE END EQUALS HEX STRING PCI PNP I2C APIC APIC_CLUSTER PCI_DOMAIN IRQ DRQ IO NUMBER SUBSYSTEMID INHERIT
|
||||
%%
|
||||
devtree: { cur_parent = cur_bus = head; } chip { postprocess_devtree(); } ;
|
||||
|
||||
chipchildren: chipchildren device | chipchildren chip | chipchildren registers | /* empty */ ;
|
||||
|
||||
devicechildren: devicechildren device | devicechildren chip | devicechildren resource | /* empty */ ;
|
||||
devicechildren: devicechildren device | devicechildren chip | devicechildren resource | devicechildren subsystemid | /* empty */ ;
|
||||
|
||||
chip: CHIP STRING /* == path */ {
|
||||
$<device>$ = new_chip(cur_parent, cur_bus, $<string>2);
|
||||
@@ -65,4 +66,11 @@ resource: RESOURCE NUMBER /* == resnum */ EQUALS NUMBER /* == resval */
|
||||
registers: REGISTER STRING /* == regname */ EQUALS STRING /* == regval */
|
||||
{ add_register(cur_parent, $<string>2, $<string>4); } ;
|
||||
|
||||
subsystemid: SUBSYSTEMID NUMBER NUMBER
|
||||
{ add_pci_subsystem_ids(cur_parent, strtol($<string>2, NULL, 16), strtol($<string>3, NULL, 16), 0); };
|
||||
|
||||
subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT
|
||||
{ add_pci_subsystem_ids(cur_parent, strtol($<string>2, NULL, 16), strtol($<string>3, NULL, 16), 1); };
|
||||
|
||||
|
||||
%%
|
||||
|
Reference in New Issue
Block a user