diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-03-01 19:58:15 +0000 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2011-03-01 19:58:15 +0000 |
commit | 270a908646273461b41e591739d778d3d675ff6f (patch) | |
tree | 10feb74c6b2a27c943b3fd4fd642daa51977abc7 /util/sconfig/sconfig.y | |
parent | e38d0a6743aab8bde432e97c48c147fea5b30363 (diff) | |
download | coreboot-270a908646273461b41e591739d778d3d675ff6f.tar.xz |
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
Diffstat (limited to 'util/sconfig/sconfig.y')
-rwxr-xr-x | util/sconfig/sconfig.y | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/util/sconfig/sconfig.y b/util/sconfig/sconfig.y index 1c5db2ab5f..f97850ff69 100755 --- a/util/sconfig/sconfig.y +++ b/util/sconfig/sconfig.y @@ -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); }; + + %% |