blob: 6438be15831d254001fb19f519a81ef7482306bb [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 <device/pci_ehci.h>
26#include <arch/io.h>
27#include "hudson.h"
28
29static struct pci_operations lops_pci = {
30 .set_subsystem = pci_dev_set_subsystem,
31};
32
33static void usb_init(struct device *dev)
34{
35}
36
37static struct device_operations usb_ops = {
38 .read_resources = pci_ehci_read_resources,
39 .set_resources = pci_dev_set_resources,
40 .enable_resources = pci_dev_enable_resources,
41 .init = usb_init,
42 .scan_bus = 0,
43 .ops_pci = &lops_pci,
44};
45
46static const struct pci_driver usb_0_driver __pci_driver = {
47 .ops = &usb_ops,
48 .vendor = PCI_VENDOR_ID_AMD,
49 .device = PCI_DEVICE_ID_ATI_SB900_USB_18_0,
50};
51static const struct pci_driver usb_1_driver __pci_driver = {
52 .ops = &usb_ops,
53 .vendor = PCI_VENDOR_ID_AMD,
54 .device = PCI_DEVICE_ID_ATI_SB900_USB_18_2,
55};
56
57/* the pci id of usb ctrl 0 and 1 are the same. */
58/*
59 * static const struct pci_driver usb_3_driver __pci_driver = {
60 * .ops = &usb_ops,
61 * .vendor = PCI_VENDOR_ID_AMD,
62 * .device = PCI_DEVICE_ID_ATI_HUDSON_USB_19_0,
63 * };
64 * static const struct pci_driver usb_4_driver __pci_driver = {
65 * .ops = &usb_ops,
66 * .vendor = PCI_VENDOR_ID_AMD,
67 * .device = PCI_DEVICE_ID_ATI_HUDSON_USB_19_1,
68 * };
69 */
70
71static const struct pci_driver usb_4_driver __pci_driver = {
72 .ops = &usb_ops,
73 .vendor = PCI_VENDOR_ID_AMD,
74 .device = PCI_DEVICE_ID_ATI_SB900_USB_20_5,
75};
76
77/*
78static struct device_operations usb_ops2 = {
79 .read_resources = pci_ehci_read_resources,
80 .set_resources = pci_dev_set_resources,
81 .enable_resources = pci_dev_enable_resources,
82 .init = usb_init2,
83 .scan_bus = 0,
84 .ops_pci = &lops_pci,
85};
86*/
87/*
88static const struct pci_driver usb_5_driver __pci_driver = {
89 .ops = &usb_ops2,
90 .vendor = PCI_VENDOR_ID_AMD,
91 .device = PCI_DEVICE_ID_ATI_HUDSON_USB_18_2,
92};
93*/
94/*
95 * static const struct pci_driver usb_5_driver __pci_driver = {
96 * .ops = &usb_ops2,
97 * .vendor = PCI_VENDOR_ID_AMD,
98 * .device = PCI_DEVICE_ID_ATI_HUDSON_USB_19_2,
99 * };
100 */