diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2012-04-24 12:53:19 -0700 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2012-05-01 20:02:21 +0200 |
commit | 8049fc91ded9d780b9f6d5c40bc43ad3242b7a3b (patch) | |
tree | a2e4295afbe11c4838d1ec303a78b778eab154df /src/southbridge/intel | |
parent | 599e204efc5a55eb388a2ff11afb0e2196c21875 (diff) | |
download | coreboot-8049fc91ded9d780b9f6d5c40bc43ad3242b7a3b.tar.xz |
Allow device ID arrays in the PCI driver structure
Many PCI devices share the very same driver despite having different
PCI device IDs, which causes a lot of copy and paste of driver
definitions.
This change introduces a way to specify the array of acceptable
device IDs in a single driver entry. As an example the Intel
{Sandy|Ivy} Bridge SATA driver is being modified to use a single
driver structure for all different SATA controller flavors, a few
more Ivy Bridge IDs are being added as well.
BUG=none
TEST=manual
. modified coreboot brought up an Ivy Bridge platform all the
way to Linux login screen.
Change-Id: I761c5611b93ef946053783f7a755e6c456dd6991
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/982
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/southbridge/intel')
-rw-r--r-- | src/southbridge/intel/bd82x6x/sata.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/southbridge/intel/bd82x6x/sata.c b/src/southbridge/intel/bd82x6x/sata.c index 057b8825b0..fef12cd80b 100644 --- a/src/southbridge/intel/bd82x6x/sata.c +++ b/src/southbridge/intel/bd82x6x/sata.c @@ -215,32 +215,13 @@ static struct device_operations sata_ops = { .ops_pci = &sata_pci_ops, }; +static const unsigned short all_dev_ids[] = { 0x1c00, 0x1c01, 0x1c02, 0x1c03, + 0x1e00, 0x1e01, 0x1e02, 0x1e03, + 0 }; /* Non-AHCI and Non-RAID Mode */ static const struct pci_driver pch_sata_normal_driver __pci_driver = { .ops = &sata_ops, .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x1c00, -}; -static const struct pci_driver pch_sata_mobile_normal_driver __pci_driver = { - .ops = &sata_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x1c01, -}; - -/* AHCI Mode */ -static const struct pci_driver pch_sata_ahci_driver __pci_driver = { - .ops = &sata_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x1c02, -}; -static const struct pci_driver pch_sata_mobile_ahci_driver __pci_driver = { - .ops = &sata_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x1c03, -}; -static const struct pci_driver pch_sata_mobile_ahci_driver_a __pci_driver = { - .ops = &sata_ops, - .vendor = PCI_VENDOR_ID_INTEL, - .device = 0x1e03, + .devices = all_dev_ids, }; |