Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 3 | |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 4 | #include <device/device.h> |
| 5 | #include <device/pci.h> |
| 6 | #include <device/pci_ids.h> |
Elyes HAOUAS | bf0970e | 2019-03-21 11:10:03 +0100 | [diff] [blame] | 7 | |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 8 | #include "hudson.h" |
| 9 | |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 10 | static const unsigned short pci_device_ids[] = { |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame] | 11 | PCI_DEVICE_ID_AMD_SB900_HDA, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 12 | PCI_DEVICE_ID_AMD_CZ_HDA, |
| 13 | 0 |
| 14 | }; |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 15 | |
| 16 | static void hda_init(struct device *dev) |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | static struct pci_operations lops_pci = { |
| 21 | .set_subsystem = pci_dev_set_subsystem, |
| 22 | }; |
| 23 | |
| 24 | static struct device_operations hda_audio_ops = { |
| 25 | .read_resources = pci_dev_read_resources, |
| 26 | .set_resources = pci_dev_set_resources, |
| 27 | .enable_resources = pci_dev_enable_resources, |
| 28 | .init = hda_init, |
| 29 | .scan_bus = 0, |
| 30 | .ops_pci = &lops_pci, |
| 31 | }; |
| 32 | |
| 33 | static const struct pci_driver hdaaudio_driver __pci_driver = { |
| 34 | .ops = &hda_audio_ops, |
| 35 | .vendor = PCI_VENDOR_ID_AMD, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 36 | .devices = pci_device_ids, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 37 | }; |