blob: 9cdc1b4cd7cd3388699f12cc55dba1cfae4a27b8 [file] [log] [blame]
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +03001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2010 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030014 */
15
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030016#include <device/device.h>
17#include <device/pci.h>
18#include <device/pci_ids.h>
19#include <device/pci_ops.h>
Elyes HAOUASbf0970e2019-03-21 11:10:03 +010020
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030021#include "hudson.h"
22
WANG Siyuanf2dfef02015-05-20 14:41:01 +080023static const unsigned short pci_device_ids[] = {
Kyösti Mälkki9d9a5522016-11-19 22:14:59 +020024 PCI_DEVICE_ID_AMD_SB900_HDA,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080025 PCI_DEVICE_ID_AMD_CZ_HDA,
26 0
27};
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030028
29static void hda_init(struct device *dev)
30{
31}
32
33static struct pci_operations lops_pci = {
34 .set_subsystem = pci_dev_set_subsystem,
35};
36
37static struct device_operations hda_audio_ops = {
38 .read_resources = pci_dev_read_resources,
39 .set_resources = pci_dev_set_resources,
40 .enable_resources = pci_dev_enable_resources,
41 .init = hda_init,
42 .scan_bus = 0,
43 .ops_pci = &lops_pci,
44};
45
46static const struct pci_driver hdaaudio_driver __pci_driver = {
47 .ops = &hda_audio_ops,
48 .vendor = PCI_VENDOR_ID_AMD,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080049 .devices = pci_device_ids,
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030050};