Yinghai Lu | 70093f7 | 2004-07-01 03:55:03 +0000 | [diff] [blame] | 1 | #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> |
| 6 | #include <pc80/mc146818rtc.h> |
| 7 | #include "82870.h" |
| 8 | |
| 9 | static void p64h2_pcix_init(device_t dev) |
| 10 | { |
| 11 | uint32_t dword; |
| 12 | uint16_t word; |
| 13 | uint8_t byte; |
| 14 | |
| 15 | |
| 16 | /* The purpose of changes to HCCR, ACNF, and MTT is to speed up the |
| 17 | PCI bus for cards having high speed transfers. */ |
| 18 | dword = 0xc2040002; |
| 19 | pci_write_config32(dev, HCCR, dword); |
| 20 | dword = 0x0000c3bf; |
| 21 | pci_write_config32(dev, ACNF, dword); |
| 22 | byte = 0x08; |
| 23 | pci_write_config8(dev, MTT, byte); |
| 24 | |
| 25 | } |
| 26 | static struct device_operations pcix_ops = { |
| 27 | .read_resources = pci_bus_read_resources, |
| 28 | .set_resources = pci_dev_set_resources, |
| 29 | .enable_resources = pci_bus_enable_resources, |
| 30 | .init = p64h2_pcix_init, |
| 31 | .scan_bus = pci_scan_bridge, |
Yinghai Lu | 13f1c2a | 2005-07-08 02:49:49 +0000 | [diff] [blame] | 32 | .reset_bus = pci_bus_reset, |
Yinghai Lu | 70093f7 | 2004-07-01 03:55:03 +0000 | [diff] [blame] | 33 | }; |
| 34 | |
Stefan Reinauer | f1cf1f7 | 2007-10-24 09:08:58 +0000 | [diff] [blame^] | 35 | static const struct pci_driver pcix_driver __pci_driver = { |
Yinghai Lu | 70093f7 | 2004-07-01 03:55:03 +0000 | [diff] [blame] | 36 | .ops = &pcix_ops, |
| 37 | .vendor = PCI_VENDOR_ID_INTEL, |
| 38 | .device = PCI_DEVICE_ID_INTEL_82870_1F0, |
| 39 | }; |
| 40 | |