From aa67defafd09979081d2269cb1ab060417525816 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Fri, 3 May 2019 16:10:34 -0600 Subject: soc/amd/stoneyridge: Move sata to common Relocate generic sata support from stoneyridge to common/block. BUG=b:131682806 Change-Id: I4e9eddaa291e5e03f4f8d88826973c5b8ee9a1c5 Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/c/coreboot/+/32661 Reviewed-by: Martin Roth Tested-by: build bot (Jenkins) --- src/soc/amd/stoneyridge/sata.c | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'src/soc/amd/stoneyridge/sata.c') diff --git a/src/soc/amd/stoneyridge/sata.c b/src/soc/amd/stoneyridge/sata.c index f0dabe046b..6740698dd2 100644 --- a/src/soc/amd/stoneyridge/sata.c +++ b/src/soc/amd/stoneyridge/sata.c @@ -18,9 +18,10 @@ #include #include #include +#include #include -static void soc_enable_sata_features(struct device *dev) +void soc_enable_sata_features(struct device *dev) { u8 *ahci_ptr; u32 misc_ctl, cap_cfg; @@ -45,32 +46,3 @@ static void soc_enable_sata_features(struct device *dev) temp &= ~SATA_MISC_SUBCLASS_WREN; pci_write_config32(dev, SATA_MISC_CONTROL_REG, temp); }; - -static void sata_init(struct device *dev) -{ - soc_enable_sata_features(dev); -} - -static struct pci_operations lops_pci = { - /* .set_subsystem = pci_dev_set_subsystem, */ -}; - -static struct device_operations sata_ops = { - .read_resources = pci_dev_read_resources, - .set_resources = pci_dev_set_resources, - .enable_resources = pci_dev_enable_resources, - .init = sata_init, - .ops_pci = &lops_pci, -}; - -static const unsigned short pci_device_ids[] = { - PCI_DEVICE_ID_AMD_CZ_SATA, - PCI_DEVICE_ID_AMD_CZ_SATA_AHCI, - 0 -}; - -static const struct pci_driver sata0_driver __pci_driver = { - .ops = &sata_ops, - .vendor = PCI_VENDOR_ID_AMD, - .devices = pci_device_ids, -}; -- cgit v1.2.3