device: Rework bus master option
As an intermediate step for CB:45150, add an additional Kconfig option which is used to configure bus mastering for any devices and use PCI_ALLOW_BUS_MASTER to allow coreboot setting the bus mastering bit in general. Change-Id: I33b37a79022007a16e97350db61575b63fa8256b Signed-off-by: Felix Singer <felix.singer@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45149 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
d7511f8054
commit
3d9fa08bf1
@ -532,6 +532,17 @@ config PCI_ALLOW_BUS_MASTER
|
|||||||
instance, for libpayload based payloads as the drivers don't enable
|
instance, for libpayload based payloads as the drivers don't enable
|
||||||
bus mastering for PCI bridges.
|
bus mastering for PCI bridges.
|
||||||
|
|
||||||
|
if PCI_ALLOW_BUS_MASTER
|
||||||
|
|
||||||
|
config PCI_ALLOW_BUS_MASTER_ANY_DEVICE
|
||||||
|
bool "Any devices"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Allow coreboot to enable PCI bus mastering for any device. The actual
|
||||||
|
selection of devices depends on the various PCI drivers in coreboot.
|
||||||
|
|
||||||
|
endif # PCI_ALLOW_BUS_MASTER
|
||||||
|
|
||||||
endif # PCI
|
endif # PCI
|
||||||
|
|
||||||
if PCIEXP_PLUGIN_SUPPORT
|
if PCIEXP_PLUGIN_SUPPORT
|
||||||
|
@ -144,7 +144,7 @@ void pci_dev_request_bus_master(pci_devfn_t dev)
|
|||||||
void pci_dev_request_bus_master(struct device *dev)
|
void pci_dev_request_bus_master(struct device *dev)
|
||||||
#endif /* ENV_PCI_SIMPLE_DEVICE */
|
#endif /* ENV_PCI_SIMPLE_DEVICE */
|
||||||
{
|
{
|
||||||
if (CONFIG(PCI_ALLOW_BUS_MASTER))
|
if (CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE))
|
||||||
pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER);
|
pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user