1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6
disable_aspm(struct device * const dev)7 static void disable_aspm(struct device *const dev)
8 {
9 printk(BIOS_INFO, "Disabling ASPM for %s [%04x/%04x]\n",
10 dev_path(dev), dev->vendor, dev->device);
11 dev->disable_pcie_aspm = 1;
12 }
13
14 static struct device_operations asmedia_noaspm_ops = {
15 .read_resources = pci_dev_read_resources,
16 .set_resources = pci_dev_set_resources,
17 .enable_resources = pci_dev_enable_resources,
18 .enable = disable_aspm,
19 };
20
21 static const unsigned short pci_device_ids[] = {
22 0x0611, /* ASM1061 SATA IDE Controller */
23 0
24 };
25
26 static const struct pci_driver asmedia_noaspm __pci_driver = {
27 .ops = &asmedia_noaspm_ops,
28 .vendor = 0x1b21,
29 .devices = pci_device_ids,
30 };
31