Subrata Banik | 41934bf | 2020-08-08 12:34:25 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <device/device.h> |
| 4 | #include <device/pci.h> |
| 5 | #include <device/pci_ids.h> |
| 6 | |
Subrata Banik | 41934bf | 2020-08-08 12:34:25 +0530 | [diff] [blame] | 7 | static struct device_operations sata_ops = { |
| 8 | .read_resources = pci_dev_read_resources, |
| 9 | .set_resources = pci_dev_set_resources, |
| 10 | .enable_resources = pci_dev_enable_resources, |
Subrata Banik | 7ad46df | 2020-09-13 17:05:04 +0530 | [diff] [blame] | 11 | .final = pci_dev_request_bus_master, |
Subrata Banik | 41934bf | 2020-08-08 12:34:25 +0530 | [diff] [blame] | 12 | .ops_pci = &pci_dev_ops_pci, |
| 13 | }; |
| 14 | |
| 15 | static const unsigned short pci_device_ids[] = { |
| 16 | PCI_DEVICE_ID_INTEL_SPT_U_SATA, |
| 17 | PCI_DEVICE_ID_INTEL_SPT_U_Y_PREMIUM_SATA, |
| 18 | PCI_DEVICE_ID_INTEL_SPT_KBL_SATA, |
| 19 | PCI_DEVICE_ID_INTEL_LWB_SATA_AHCI, |
| 20 | PCI_DEVICE_ID_INTEL_LWB_SSATA_AHCI, |
| 21 | PCI_DEVICE_ID_INTEL_LWB_SATA_RAID, |
| 22 | PCI_DEVICE_ID_INTEL_LWB_SSATA_RAID, |
| 23 | PCI_DEVICE_ID_INTEL_LWB_SATA_AHCI_SUPER, |
| 24 | PCI_DEVICE_ID_INTEL_LWB_SSATA_AHCI_SUPER, |
| 25 | PCI_DEVICE_ID_INTEL_LWB_SATA_RAID_SUPER, |
| 26 | PCI_DEVICE_ID_INTEL_LWB_SSATA_RAID_SUPER, |
| 27 | PCI_DEVICE_ID_INTEL_LWB_SATA_ALT, |
| 28 | PCI_DEVICE_ID_INTEL_LWB_SATA_ALT_RST, |
| 29 | PCI_DEVICE_ID_INTEL_LWB_SSATA_ALT, |
| 30 | PCI_DEVICE_ID_INTEL_LWB_SSATA_ALT_RST, |
| 31 | PCI_DEVICE_ID_INTEL_CNL_SATA, |
| 32 | PCI_DEVICE_ID_INTEL_CNL_PREMIUM_SATA, |
| 33 | PCI_DEVICE_ID_INTEL_CNP_CMP_COMPAT_SATA, |
| 34 | PCI_DEVICE_ID_INTEL_CNP_H_SATA, |
Erik van den Bogaert | 246289c | 2021-01-27 15:36:36 +0100 | [diff] [blame^] | 35 | PCI_DEVICE_ID_INTEL_CNP_H_HALO_SATA, |
Subrata Banik | 41934bf | 2020-08-08 12:34:25 +0530 | [diff] [blame] | 36 | PCI_DEVICE_ID_INTEL_CNP_LP_SATA, |
| 37 | PCI_DEVICE_ID_INTEL_ICP_U_SATA, |
| 38 | PCI_DEVICE_ID_INTEL_CMP_SATA, |
| 39 | PCI_DEVICE_ID_INTEL_CMP_PREMIUM_SATA, |
| 40 | PCI_DEVICE_ID_INTEL_CMP_LP_SATA, |
| 41 | PCI_DEVICE_ID_INTEL_CMP_H_SATA, |
| 42 | PCI_DEVICE_ID_INTEL_CMP_H_HALO_SATA, |
| 43 | PCI_DEVICE_ID_INTEL_CMP_H_PREMIUM_SATA, |
| 44 | PCI_DEVICE_ID_INTEL_TGP_LP_SATA, |
| 45 | PCI_DEVICE_ID_INTEL_TGP_SATA, |
| 46 | PCI_DEVICE_ID_INTEL_TGP_PREMIUM_SATA, |
| 47 | PCI_DEVICE_ID_INTEL_TGP_COMPAT_SATA, |
| 48 | PCI_DEVICE_ID_INTEL_MCC_AHCI_SATA, |
| 49 | PCI_DEVICE_ID_INTEL_JSP_SATA_1, |
| 50 | PCI_DEVICE_ID_INTEL_JSP_SATA_2, |
| 51 | PCI_DEVICE_ID_INTEL_ADP_P_SATA_1, |
| 52 | PCI_DEVICE_ID_INTEL_ADP_P_SATA_2, |
| 53 | PCI_DEVICE_ID_INTEL_ADP_P_SATA_3, |
| 54 | PCI_DEVICE_ID_INTEL_ADP_P_SATA_4, |
| 55 | PCI_DEVICE_ID_INTEL_ADP_P_SATA_5, |
| 56 | PCI_DEVICE_ID_INTEL_ADP_P_SATA_6, |
| 57 | PCI_DEVICE_ID_INTEL_ADP_S_SATA_1, |
| 58 | PCI_DEVICE_ID_INTEL_ADP_S_SATA_2, |
| 59 | PCI_DEVICE_ID_INTEL_ADP_S_SATA_3, |
| 60 | PCI_DEVICE_ID_INTEL_ADP_S_SATA_4, |
| 61 | PCI_DEVICE_ID_INTEL_ADP_S_SATA_5, |
| 62 | PCI_DEVICE_ID_INTEL_ADP_S_SATA_6, |
Varshit Pandya | f4d98fdd2 | 2021-01-17 18:39:29 +0530 | [diff] [blame] | 63 | PCI_DEVICE_ID_INTEL_ADP_M_SATA_1, |
| 64 | PCI_DEVICE_ID_INTEL_ADP_M_SATA_2, |
| 65 | PCI_DEVICE_ID_INTEL_ADP_M_SATA_3, |
Subrata Banik | 41934bf | 2020-08-08 12:34:25 +0530 | [diff] [blame] | 66 | 0 |
| 67 | }; |
| 68 | |
| 69 | static const struct pci_driver pch_sata __pci_driver = { |
| 70 | .ops = &sata_ops, |
| 71 | .vendor = PCI_VENDOR_ID_INTEL, |
| 72 | .devices = pci_device_ids, |
| 73 | }; |