Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; version 2 of the License. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 13 | */ |
| 14 | |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 15 | #include <device/device.h> |
| 16 | #include <device/pci.h> |
| 17 | #include <device/pci_ids.h> |
Elyes HAOUAS | bf0970e | 2019-03-21 11:10:03 +0100 | [diff] [blame] | 18 | |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 19 | #include "hudson.h" |
| 20 | |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 21 | static const unsigned short pci_device_ids[] = { |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame] | 22 | PCI_DEVICE_ID_AMD_SB900_HDA, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 23 | PCI_DEVICE_ID_AMD_CZ_HDA, |
| 24 | 0 |
| 25 | }; |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 26 | |
| 27 | static void hda_init(struct device *dev) |
| 28 | { |
| 29 | } |
| 30 | |
| 31 | static struct pci_operations lops_pci = { |
| 32 | .set_subsystem = pci_dev_set_subsystem, |
| 33 | }; |
| 34 | |
| 35 | static struct device_operations hda_audio_ops = { |
| 36 | .read_resources = pci_dev_read_resources, |
| 37 | .set_resources = pci_dev_set_resources, |
| 38 | .enable_resources = pci_dev_enable_resources, |
| 39 | .init = hda_init, |
| 40 | .scan_bus = 0, |
| 41 | .ops_pci = &lops_pci, |
| 42 | }; |
| 43 | |
| 44 | static const struct pci_driver hdaaudio_driver __pci_driver = { |
| 45 | .ops = &hda_audio_ops, |
| 46 | .vendor = PCI_VENDOR_ID_AMD, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 47 | .devices = pci_device_ids, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 48 | }; |