2 * This file is part of the coreboot project.
4 * Copyright (C) 2010 Advanced Micro Devices, Inc.
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.
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.
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
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>
27 static void pcie_init(struct device *dev)
29 /* Enable pci error detecting */
32 printk(BIOS_INFO, "pcie_init in rs780_ht.c\n");
34 /* System error enable */
35 dword = pci_read_config32(dev, 0x04);
36 dword |= (1 << 8); /* System error enable */
37 dword |= (1 << 30); /* Clear possible errors */
38 pci_write_config32(dev, 0x04, dword);
41 static struct pci_operations lops_pci = {
45 static struct device_operations pci_ops = {
46 .read_resources = pci_bus_read_resources,
47 .set_resources = pci_dev_set_resources,
48 .enable_resources = pci_bus_enable_resources,
50 .scan_bus = pci_scan_bridge,
51 .reset_bus = pci_bus_reset,
55 static const struct pci_driver pciea_driver __pci_driver = {
57 .vendor = PCI_VENDOR_ID_ATI,
58 .device = PCI_DEVICE_ID_ATI_SB800_PCIEA,
61 static const struct pci_driver pcieb_driver __pci_driver = {
63 .vendor = PCI_VENDOR_ID_ATI,
64 .device = PCI_DEVICE_ID_ATI_SB800_PCIEB,
66 static const struct pci_driver pciec_driver __pci_driver = {
68 .vendor = PCI_VENDOR_ID_ATI,
69 .device = PCI_DEVICE_ID_ATI_SB800_PCIEC,
71 static const struct pci_driver pcied_driver __pci_driver = {
73 .vendor = PCI_VENDOR_ID_ATI,
74 .device = PCI_DEVICE_ID_ATI_SB800_PCIED,