blob: 3c98c66b6797eaabff09cef2d65c5ebdd903b2eb [file] [log] [blame]
Angel Pons182dbde2020-04-02 23:49:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03002
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03003#include <device/device.h>
4#include <device/pci.h>
5#include <device/pci_ids.h>
Elyes HAOUASbf0970e2019-03-21 11:10:03 +01006
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03007#include "hudson.h"
8
WANG Siyuanf2dfef02015-05-20 14:41:01 +08009static const unsigned short pci_device_ids[] = {
Kyösti Mälkki9d9a5522016-11-19 22:14:59 +020010 PCI_DEVICE_ID_AMD_SB900_HDA,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080011 PCI_DEVICE_ID_AMD_CZ_HDA,
12 0
13};
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030014
15static void hda_init(struct device *dev)
16{
17}
18
19static struct pci_operations lops_pci = {
20 .set_subsystem = pci_dev_set_subsystem,
21};
22
23static struct device_operations hda_audio_ops = {
24 .read_resources = pci_dev_read_resources,
25 .set_resources = pci_dev_set_resources,
26 .enable_resources = pci_dev_enable_resources,
27 .init = hda_init,
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030028 .ops_pci = &lops_pci,
29};
30
31static const struct pci_driver hdaaudio_driver __pci_driver = {
32 .ops = &hda_audio_ops,
33 .vendor = PCI_VENDOR_ID_AMD,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080034 .devices = pci_device_ids,
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030035};