Submitter | Arne Georg Gleditsch |
---|---|
Date | 2010-05-26 10:18:34 |
Message ID | <87ocg3kltx.fsf@taniquetil.gledits.ch> |
Download | mbox | patch |
Permalink | /patch/1389/ |
State | Not Applicable |
Headers | show |
Comments
On 5/26/10 12:18 PM, Arne Georg Gleditsch wrote: > + u16 class = pci_config_readw(bdf, PCI_CLASS_DEVICE); > + if (class != PCI_CLASS_STORAGE_IDE && class != PCI_CLASS_STORAGE_RAID) > continue; > What S-ATA controller is that? We have a SIL 3114 driver which sets the class ID from RAID to IDE in coreboot. Maybe something like that would work here, too? Not sure which is the better approach though. Stefan
Stefan Reinauer <stefan.reinauer@coresystems.de> writes: > What S-ATA controller is that? We have a SIL 3114 driver which sets the > class ID from RAID to IDE in coreboot. Maybe something like that would > work here, too? > > Not sure which is the better approach though. This is the onboard BCM5785/HT1000 SATA controller.
Patch
--- a/src/ata.c +++ b/src/ata.c @@ -967,7 +967,8 @@ ata_init(void) int bdf, max; foreachpci(bdf, max) { pcicount++; - if (pci_config_readw(bdf, PCI_CLASS_DEVICE) != PCI_CLASS_STORAGE_IDE) + u16 class = pci_config_readw(bdf, PCI_CLASS_DEVICE); + if (class != PCI_CLASS_STORAGE_IDE && class != PCI_CLASS_STORAGE_RAID) continue; u8 pciirq = pci_config_readb(bdf, PCI_INTERRUPT_LINE); @@ -983,7 +984,7 @@ ata_init(void) } u32 port1, port2, irq; - if (prog_if & 1) { + if ((prog_if & 1) || (class != PCI_CLASS_STORAGE_IDE)) { port1 = pci_config_readl(bdf, PCI_BASE_ADDRESS_0) & ~3; port2 = pci_config_readl(bdf, PCI_BASE_ADDRESS_1) & ~3; irq = pciirq; @@ -995,7 +996,7 @@ ata_init(void) init_controller(count, bdf, irq, port1, port2, master); count++; - if (prog_if & 4) { + if ((prog_if & 4) || (class != PCI_CLASS_STORAGE_IDE)) { port1 = pci_config_readl(bdf, PCI_BASE_ADDRESS_2) & ~3; port2 = pci_config_readl(bdf, PCI_BASE_ADDRESS_3) & ~3; irq = pciirq;