[PATCH] libpayload: Add pci_set_bus_master() function

Allow the payload to enable a PCI device as a bus master.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3672 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Jordan Crouse
2008-10-20 16:51:20 +00:00
parent 17f6a87788
commit 369a5f6c7a
2 changed files with 13 additions and 1 deletions

View File

@@ -112,3 +112,11 @@ u32 pci_read_resource(pcidev_t dev, int bar)
{
return pci_read_config32(dev, 0x10 + (bar * 4));
}
void pci_set_bus_master(pcidev_t dev)
{
u16 val = pci_read_config16(dev, REG_COMMAND);
val |= REG_COMMAND_BM;
pci_write_config16(dev, REG_COMMAND, val);
}