blob: ef2a341ea63c8ae4f00cf12145fce34d1f16cdda [file] [log] [blame]
Angel Pons182dbde2020-04-02 23:49:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03003
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03004#include <device/device.h>
5#include <device/pci.h>
6#include <device/pci_ids.h>
Elyes HAOUASbf0970e2019-03-21 11:10:03 +01007
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03008#include "hudson.h"
9
WANG Siyuanf2dfef02015-05-20 14:41:01 +080010static const unsigned short pci_device_ids[] = {
Kyösti Mälkki9d9a5522016-11-19 22:14:59 +020011 PCI_DEVICE_ID_AMD_SB900_HDA,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080012 PCI_DEVICE_ID_AMD_CZ_HDA,
13 0
14};
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030015
16static void hda_init(struct device *dev)
17{
18}
19
20static struct pci_operations lops_pci = {
21 .set_subsystem = pci_dev_set_subsystem,
22};
23
24static 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
33static const struct pci_driver hdaaudio_driver __pci_driver = {
34 .ops = &hda_audio_ops,
35 .vendor = PCI_VENDOR_ID_AMD,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080036 .devices = pci_device_ids,
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030037};