blob: 3c1d418fb580c0e1929d24658ec2f34710bc9525 [file] [log] [blame]
Yinghai Lu70093f72004-07-01 03:55:03 +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>
6#include <pc80/mc146818rtc.h>
7#include "82870.h"
8
9static 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}
26static 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 Lu13f1c2a2005-07-08 02:49:49 +000032 .reset_bus = pci_bus_reset,
Yinghai Lu70093f72004-07-01 03:55:03 +000033};
34
Stefan Reinauerf1cf1f72007-10-24 09:08:58 +000035static const struct pci_driver pcix_driver __pci_driver = {
Yinghai Lu70093f72004-07-01 03:55:03 +000036 .ops = &pcix_ops,
37 .vendor = PCI_VENDOR_ID_INTEL,
38 .device = PCI_DEVICE_ID_INTEL_82870_1F0,
39};
40