Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 1 | /* |
| 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älkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #include <console/console.h> |
| 17 | #include <device/device.h> |
| 18 | #include <device/pci.h> |
| 19 | #include <device/pci_ids.h> |
| 20 | #include <device/pci_ops.h> |
| 21 | #include <arch/io.h> |
| 22 | #include <delay.h> |
| 23 | #include "hudson.h" |
| 24 | |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 25 | static const unsigned short pci_device_ids[] = { |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame^] | 26 | PCI_DEVICE_ID_AMD_SB900_HDA, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 27 | PCI_DEVICE_ID_AMD_CZ_HDA, |
| 28 | 0 |
| 29 | }; |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 30 | |
| 31 | static void hda_init(struct device *dev) |
| 32 | { |
| 33 | } |
| 34 | |
| 35 | static struct pci_operations lops_pci = { |
| 36 | .set_subsystem = pci_dev_set_subsystem, |
| 37 | }; |
| 38 | |
| 39 | static struct device_operations hda_audio_ops = { |
| 40 | .read_resources = pci_dev_read_resources, |
| 41 | .set_resources = pci_dev_set_resources, |
| 42 | .enable_resources = pci_dev_enable_resources, |
| 43 | .init = hda_init, |
| 44 | .scan_bus = 0, |
| 45 | .ops_pci = &lops_pci, |
| 46 | }; |
| 47 | |
| 48 | static const struct pci_driver hdaaudio_driver __pci_driver = { |
| 49 | .ops = &hda_audio_ops, |
| 50 | .vendor = PCI_VENDOR_ID_AMD, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 51 | .devices = pci_device_ids, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 52 | }; |