diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2012-07-26 19:48:23 +0200 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2012-07-26 22:25:10 +0200 |
commit | efff733ad83acf8502561a9cadc9202c6974e510 (patch) | |
tree | b81785cd64f750ac790c5b4306dc4b0b16ca641c /src/northbridge/intel/sandybridge | |
parent | 8730bf8aad995bf105454ac1a93dee4c7b5565d5 (diff) | |
download | coreboot-efff733ad83acf8502561a9cadc9202c6974e510.tar.xz |
Refactor driver structs
Our driver infrastructure became more flexible recently.
Make use of it.
These are the low hanging fruits (files with 5 device
variants or more), but there are still lots of files
with less potential for deduplication.
Change-Id: If6b7be5046581f81485a511b150f99b029b95c3b
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/1358
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/northbridge/intel/sandybridge')
-rw-r--r-- | src/northbridge/intel/sandybridge/gma.c | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c index 9a8b6317ef..c2bb2eae21 100644 --- a/src/northbridge/intel/sandybridge/gma.c +++ b/src/northbridge/intel/sandybridge/gma.c @@ -659,50 +659,12 @@ static struct device_operations gma_func0_ops = { .ops_pci = &gma_pci_ops, }; -static const struct pci_driver gma_gt1_desktop __pci_driver = { - .ops = &gma_func0_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x0102, -}; - -static const struct pci_driver gma_gt1_mobile __pci_driver = { - .ops = &gma_func0_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x0106, +static const unsigned short gma_ids[] = { + 0x0102, 0x0106, 0x010a, 0x0112, 0x0116, 0x0122, 0x0126, 0x166, + 0, }; - -static const struct pci_driver gma_gt1_server __pci_driver = { - .ops = &gma_func0_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x010a, -}; - -static const struct pci_driver gma_gt2_desktop __pci_driver = { - .ops = &gma_func0_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x0112, -}; - -static const struct pci_driver gma_gt2_mobile __pci_driver = { - .ops = &gma_func0_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x0116, -}; - -static const struct pci_driver gma_gt2_desktop_fast __pci_driver = { - .ops = &gma_func0_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x0122, -}; - -static const struct pci_driver gma_gt2_mobile_fast __pci_driver = { +static const struct pci_driver gma_gt1_desktop __pci_driver = { .ops = &gma_func0_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x0126, -}; - -static const struct pci_driver gma_func0_driver_3 __pci_driver = { - .ops = &gma_func0_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x0166, + .devices= gma_ids, }; |