2 * Copyright 2004 Tyan Computer
6 #include <console/console.h>
7 #include <device/device.h>
8 #include <device/pci.h>
9 #include <device/pci_ids.h>
10 #include <device/pci_ops.h>
13 static void pcie_init(struct device *dev)
17 /* Enable PCI error detecting. */
18 dword = pci_read_config32(dev, 0x04);
19 dword |= (1 << 8); /* System error enable */
20 dword |= (1 << 30); /* Clear possible errors */
21 pci_write_config32(dev, 0x04, dword);
24 static struct pci_operations lops_pci = {
28 static struct device_operations pcie_ops = {
29 .read_resources = pci_bus_read_resources,
30 .set_resources = pci_dev_set_resources,
31 .enable_resources = pci_bus_enable_resources,
33 .scan_bus = pci_scan_bridge,
34 // .enable = ck804_enable,
38 static const struct pci_driver pcie_driver __pci_driver = {
40 .vendor = PCI_VENDOR_ID_NVIDIA,
41 .device = PCI_DEVICE_ID_NVIDIA_CK804_PCI_E,