From: Kevin O'Connor Date: Sun, 12 Dec 2010 19:01:47 +0000 (-0500) Subject: ahci: enable io/mem/dma X-Git-Tag: rel-0.6.2~50 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7eb0222835c2bc01e1927db5ae344a64f5fd7fba;p=seabios.git ahci: enable io/mem/dma Make sure IO, MMIO and DMA are enabled in pci config space before using the device. Signed-off-by: Gerd Hoffmann --- diff --git a/src/ahci.c b/src/ahci.c index ee50e8f..a03d8be 100644 --- a/src/ahci.c +++ b/src/ahci.c @@ -447,6 +447,9 @@ ahci_init_controller(int bdf) dprintf(1, "AHCI controller at %02x.%x, iobase %x, irq %d\n", bdf >> 3, bdf & 7, ctrl->iobase, ctrl->irq); + pci_config_maskw(bdf, PCI_COMMAND, 0, + PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); + val = ahci_ctrl_readl(ctrl, HOST_CTL); ahci_ctrl_writel(ctrl, HOST_CTL, val | HOST_CTL_AHCI_EN);