blob: 0c88bf28273f22d79328bad3e06a8130ec8a2751 [file] [log] [blame]
Ronald G. Minnich182615d2004-08-24 16:20:46 +00001#include <console/console.h>
2#include <device/device.h>
3#include <device/pci.h>
4#include <device/pci_ids.h>
5#include <device/pci_ops.h>
Stefan Reinauer138be832010-02-27 01:50:21 +00006#include "i82801dx.h"
Ronald G. Minnich182615d2004-08-24 16:20:46 +00007
8static void pci_init(struct device *dev)
9{
10 /* Enable pci error detecting */
11 uint32_t dword;
12 /* System error enable */
13 dword = pci_read_config32(dev, 0x04);
14 dword |= (1<<8); /* SERR# Enable */
15 dword |= (1<<6); /* Parity Error Response */
16 pci_write_config32(dev, 0x04, dword);
17
18}
19
20static struct device_operations pci_ops = {
21 .read_resources = pci_bus_read_resources,
22 .set_resources = pci_dev_set_resources,
23 .enable_resources = pci_bus_enable_resources,
24 .init = pci_init,
25 .scan_bus = pci_scan_bridge,
26};
27
Stefan Reinauerf1cf1f72007-10-24 09:08:58 +000028static const struct pci_driver pci_driver __pci_driver = {
Ronald G. Minnich182615d2004-08-24 16:20:46 +000029 .ops = &pci_ops,
30 .vendor = PCI_VENDOR_ID_INTEL,
Uwe Hermanna29ec062007-11-04 03:21:37 +000031 .device = PCI_DEVICE_ID_INTEL_82801DBM_PCI,
Ronald G. Minnich182615d2004-08-24 16:20:46 +000032};
33