blob: e8d890ab9530c508cbedce3793af7eb2d0b5d747 [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{
Stefan Reinauerc269d232010-03-30 21:48:23 +000011 u32 dword;
12 u8 byte;
Yinghai Lu70093f72004-07-01 03:55:03 +000013
Stefan Reinauerc269d232010-03-30 21:48:23 +000014 /* The purpose of changes to HCCR, ACNF, and MTT is to speed
15 * up the PCI bus for cards having high speed transfers.
16 */
Yinghai Lu70093f72004-07-01 03:55:03 +000017 dword = 0xc2040002;
18 pci_write_config32(dev, HCCR, dword);
19 dword = 0x0000c3bf;
20 pci_write_config32(dev, ACNF, dword);
21 byte = 0x08;
22 pci_write_config8(dev, MTT, byte);
23
24}
25static struct device_operations pcix_ops = {
Elyes HAOUASba28e8d2016-08-31 19:22:16 +020026 .read_resources = pci_bus_read_resources,
27 .set_resources = pci_dev_set_resources,
28 .enable_resources = pci_bus_enable_resources,
29 .init = p64h2_pcix_init,
30 .scan_bus = pci_scan_bridge,
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000031 .reset_bus = pci_bus_reset,
Yinghai Lu70093f72004-07-01 03:55:03 +000032};
33
Stefan Reinauerf1cf1f72007-10-24 09:08:58 +000034static const struct pci_driver pcix_driver __pci_driver = {
Elyes HAOUASba28e8d2016-08-31 19:22:16 +020035 .ops = &pcix_ops,
36 .vendor = PCI_VENDOR_ID_INTEL,
37 .device = PCI_DEVICE_ID_INTEL_82870_1F0,
Stefan Reinauer14e22772010-04-27 06:56:47 +000038};