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>
This commit is contained in:
Vadim Bendebury
2012-04-24 12:53:19 -07:00
committed by Patrick Georgi
parent 599e204efc
commit 8049fc91de
3 changed files with 28 additions and 24 deletions

View File

@ -42,6 +42,7 @@ struct pci_driver {
const struct device_operations *ops;
unsigned short vendor;
unsigned short device;
const unsigned short *devices;
};
#define __pci_driver __attribute__ ((used,__section__(".rodata.pci_driver")))