[SeaBIOS] [PATCH 2/4] ahci: enable io/mem/dma
Kevin O'Connor
kevin at koconnor.net
Wed Dec 8 14:30:47 CET 2010
On Wed, Dec 08, 2010 at 11:24:12AM +0100, Gerd Hoffmann wrote:
> Make sure IO, MMIO and DMA are enabled in pci config space
> before using the device.
[...]
> + cmd = pci_config_readw(bdf, PCI_COMMAND);
> + cmd |= PCI_COMMAND_IO;
> + cmd |= PCI_COMMAND_MEMORY;
> + cmd |= PCI_COMMAND_MASTER;
> + pci_config_writew(bdf, PCI_COMMAND, cmd);
One can use pci_config_maskw() for this.
-Kevin
More information about the SeaBIOS
mailing list