0b4f4c9881060fd918f6ad2461b1f33e94a74a04
[coreboot.git] / src / southbridge / amd / sb600 / ac97.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2008 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
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18  */
19
20 #include <types.h>
21 #include <lib.h>
22 #include <console.h>
23 #include <device/pci.h>
24 #include <msr.h>
25 #include <legacy.h>
26 #include <device/pci_ids.h>
27 #include <statictree.h>
28 #include <config.h>
29 #include "sb600.h"
30
31 static struct pci_operations lops_pci = {
32         .set_subsystem = pci_dev_set_subsystem,
33 };
34
35 struct device_operations ac97audio = {
36         .id = {.type = DEVICE_ID_PCI,
37                 {.pci = {.vendor = PCI_VENDOR_ID_AMD,
38                               .device = PCI_DEVICE_ID_ATI_SB600_ACI}}},
39         .constructor             = default_device_constructor,
40         .phase3_scan             = 0,
41         .phase4_read_resources   = pci_dev_read_resources,
42         .phase4_set_resources    = pci_dev_set_resources,
43         .phase5_enable_resources = pci_dev_enable_resources,
44         .phase6_init             = NULL,
45         .ops_pci                 = &lops_pci,
46 };
47
48 struct device_operations ac97modem = {
49         .id = {.type = DEVICE_ID_PCI,
50                 {.pci = {.vendor = PCI_VENDOR_ID_AMD,
51                               .device = PCI_DEVICE_ID_ATI_SB600_MCI}}},
52         .constructor             = default_device_constructor,
53         .phase3_scan             = 0,
54         .phase4_read_resources   = pci_dev_read_resources,
55         .phase4_set_resources    = pci_dev_set_resources,
56         .phase5_enable_resources = pci_dev_enable_resources,
57         .phase6_init             = NULL,
58         .ops_pci                 = &lops_pci,
59 };
60