From 7ad46df850516217a4c63e73c2d42f44819c2833 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sun, 13 Sep 2020 17:05:04 +0530 Subject: soc/intel/common/block: Use pci_dev_request_bus_master for BM enabling Enabling Bus Master isn't required by the hardware, so we shouldn't need to enable it at all. However, some payloads do not set this bit before attempting DMA transfers, which results in boot failures. Replace static sata_final() implementation for BM enabling with generic pci_dev_request_bus_master() function. This allows the user to control through Kconfig whether Bus Master should be enabled. TEST=Able to boot to OS from SATA device on CML platform. Signed-off-by: Subrata Banik Change-Id: Icd086184fd6fa9c03c806c857f13fad5a9e78a3e Reviewed-on: https://review.coreboot.org/c/coreboot/+/45320 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/soc/intel/common/block/sata/sata.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/soc/intel/common/block/sata/sata.c b/src/soc/intel/common/block/sata/sata.c index 18897000b3..7b234a9500 100644 --- a/src/soc/intel/common/block/sata/sata.c +++ b/src/soc/intel/common/block/sata/sata.c @@ -4,17 +4,11 @@ #include #include -static void sata_final(struct device *dev) -{ - /* Set Bus Master */ - pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); -} - static struct device_operations sata_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, - .final = sata_final, + .final = pci_dev_request_bus_master, .ops_pci = &pci_dev_ops_pci, }; -- cgit v1.2.3