blob: 1eb77593ea4e873fbf3dc03f38a1324935cad69c [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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
Patrick Georgib890a122015-03-26 15:17:45 +010017 * Foundation, Inc.
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030018 */
19
20#include <console/console.h>
21#include <device/device.h>
22#include <device/pci.h>
23#include <device/pci_ids.h>
24#include <device/pci_ops.h>
25#include <arch/io.h>
26#include <delay.h>
27#include "hudson.h"
28
WANG Siyuanf2dfef02015-05-20 14:41:01 +080029static const unsigned short pci_device_ids[] = {
30 PCI_DEVICE_ID_ATI_SB900_HDA,
31 PCI_DEVICE_ID_AMD_CZ_HDA,
32 0
33};
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030034
35static void hda_init(struct device *dev)
36{
37}
38
39static struct pci_operations lops_pci = {
40 .set_subsystem = pci_dev_set_subsystem,
41};
42
43static struct device_operations hda_audio_ops = {
44 .read_resources = pci_dev_read_resources,
45 .set_resources = pci_dev_set_resources,
46 .enable_resources = pci_dev_enable_resources,
47 .init = hda_init,
48 .scan_bus = 0,
49 .ops_pci = &lops_pci,
50};
51
52static const struct pci_driver hdaaudio_driver __pci_driver = {
53 .ops = &hda_audio_ops,
54 .vendor = PCI_VENDOR_ID_AMD,
WANG Siyuanf2dfef02015-05-20 14:41:01 +080055 .devices = pci_device_ids,
Kyösti Mälkkie8b4da22014-10-21 18:22:32 +030056};