Angel Pons | ba38f37 | 2020-04-05 15:46:45 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 2 | |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 3 | #include <soc/pci_devs.h> |
| 4 | #include <soc/ramstage.h> |
| 5 | #include <soc/sata.h> |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 6 | #include <device/device.h> |
| 7 | #include <device/pci.h> |
| 8 | #include <device/pci_ids.h> |
| 9 | |
| 10 | #include "chip.h" |
| 11 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 12 | typedef struct soc_intel_braswell_config config_t; |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 13 | |
| 14 | static void sata_init(struct device *dev) |
| 15 | { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 16 | } |
| 17 | |
Elyes HAOUAS | b13fac3 | 2018-05-24 22:29:44 +0200 | [diff] [blame] | 18 | static void sata_enable(struct device *dev) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 19 | { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 20 | southcluster_enable_dev(dev); |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | static struct device_operations sata_ops = { |
| 24 | .read_resources = pci_dev_read_resources, |
| 25 | .set_resources = pci_dev_set_resources, |
| 26 | .enable_resources = pci_dev_enable_resources, |
| 27 | .init = sata_init, |
| 28 | .enable = sata_enable, |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 29 | .ops_pci = &soc_pci_ops, |
| 30 | }; |
| 31 | |
| 32 | static const unsigned short pci_device_ids[] = { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 33 | AHCI1_DEVID, /* AHCI */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 34 | 0, |
| 35 | }; |
| 36 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 37 | static const struct pci_driver soc_sata __pci_driver = { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 38 | .ops = &sata_ops, |
| 39 | .vendor = PCI_VENDOR_ID_INTEL, |
| 40 | .devices = pci_device_ids, |
| 41 | }; |