blob: 49d1ddf9ff618d75068307b0fc2b4b4708a5ece8 [file] [log] [blame]
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03001/*
2 * This file is part of the coreboot project.
3 *
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03004 *
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älkkie8b4da22014-10-21 18:22:32 +030013 */
14
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030015#include <device/device.h>
16#include <device/pci.h>
17#include <device/pci_ids.h>
Elyes HAOUASbf0970e2019-03-21 11:10:03 +010018
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030019#include "hudson.h"
20
WANG Siyuanf2dfef02015-05-20 14:41:01 +080021static const unsigned short pci_device_ids[] = {
Kyösti Mälkki9d9a5522016-11-19 22:14:59 +020022 PCI_DEVICE_ID_AMD_SB900_HDA,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080023 PCI_DEVICE_ID_AMD_CZ_HDA,
24 0
25};
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030026
27static void hda_init(struct device *dev)
28{
29}
30
31static struct pci_operations lops_pci = {
32 .set_subsystem = pci_dev_set_subsystem,
33};
34
35static 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
44static const struct pci_driver hdaaudio_driver __pci_driver = {
45 .ops = &hda_audio_ops,
46 .vendor = PCI_VENDOR_ID_AMD,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080047 .devices = pci_device_ids,
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030048};