2 * This file is part of the coreboot project.
4 * Copyright (C) 2005 Tyan Computer
5 * (Written by Yinghai Lu <yinghailu@gmail.com> for Tyan Computer)
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include <console/console.h>
23 #include <device/device.h>
24 #include <device/pci.h>
25 #include <device/pci_ids.h>
27 static void pci_init(struct device *dev)
31 /* Clear system errors */
32 reg16 = pci_read_config16(dev, 0x06);
33 reg16 |= 0xf900; /* Clear possible errors */
34 pci_write_config16(dev, 0x06, reg16);
36 reg16 = pci_read_config16(dev, 0x1e);
37 reg16 |= 0xf800; /* Clear possible errors */
38 pci_write_config16(dev, 0x1e, reg16);
41 static struct device_operations pci_ops = {
42 .read_resources = pci_bus_read_resources,
43 .set_resources = pci_dev_set_resources,
44 .enable_resources = pci_bus_enable_resources,
46 .scan_bus = pci_scan_bridge,
49 static const struct pci_driver i82801aa_pci __pci_driver = {
51 .vendor = PCI_VENDOR_ID_INTEL,
55 static const struct pci_driver i82801ab_pci __pci_driver = {
57 .vendor = PCI_VENDOR_ID_INTEL,
61 /* 82801BA, 82801CA, 82801DB, 82801EB, and 82801ER */
62 static const struct pci_driver i82801misc_pci __pci_driver = {
64 .vendor = PCI_VENDOR_ID_INTEL,
68 static const struct pci_driver i82801dbm_pci __pci_driver = {
70 .vendor = PCI_VENDOR_ID_INTEL,