first round name simplification. drop the <component>_ prefix.
[coreboot.git] / src / southbridge / intel / i82801dx / pci.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2004 Ronald G. Minnich
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 <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 "i82801dx.h"
26
27 static void pci_init(struct device *dev)
28 {
29         /* Enable pci error detecting */
30         uint32_t dword;
31         /* System error enable */
32         dword = pci_read_config32(dev, 0x04);
33         dword |= (1 << 8);      /* SERR# Enable */
34         dword |= (1 << 6);      /* Parity Error Response */
35         pci_write_config32(dev, 0x04, dword);
36 }
37
38 static struct device_operations pci_ops = {
39         .read_resources = pci_bus_read_resources,
40         .set_resources = pci_dev_set_resources,
41         .enable_resources = pci_bus_enable_resources,
42         .init = pci_init,
43         .scan_bus = pci_scan_bridge,
44 };
45
46 /* 82801DB */
47 static const struct pci_driver pci_driver_db __pci_driver = {
48         .ops = &pci_ops,
49         .vendor = PCI_VENDOR_ID_INTEL,
50         .device = PCI_DEVICE_ID_INTEL_82801DB_PCI,
51 };
52
53 /* 82801DBM/DBL */
54 static const struct pci_driver pci_driver_dbm __pci_driver = {
55         .ops = &pci_ops,
56         .vendor = PCI_VENDOR_ID_INTEL,
57         .device = PCI_DEVICE_ID_INTEL_82801DBM_PCI,
58 };