blob: cb6ace8dab5f896a52983092d7093f22561cae1d [file] [log] [blame]
Martin Rothebace9f2018-05-26 18:56:17 -06001/*
2 * This file is part of the coreboot project.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
Yinghai Lu70093f72004-07-01 03:55:03 +000014#include <device/device.h>
15#include <device/pci.h>
16#include <device/pci_ids.h>
17#include <device/pci_ops.h>
Yinghai Lu70093f72004-07-01 03:55:03 +000018#include "82870.h"
19
Elyes HAOUAS17c59f52018-05-13 13:38:38 +020020static void p64h2_pcix_init(struct device *dev)
Yinghai Lu70093f72004-07-01 03:55:03 +000021{
Stefan Reinauerc269d232010-03-30 21:48:23 +000022 u32 dword;
23 u8 byte;
Yinghai Lu70093f72004-07-01 03:55:03 +000024
Stefan Reinauerc269d232010-03-30 21:48:23 +000025 /* The purpose of changes to HCCR, ACNF, and MTT is to speed
26 * up the PCI bus for cards having high speed transfers.
27 */
Yinghai Lu70093f72004-07-01 03:55:03 +000028 dword = 0xc2040002;
29 pci_write_config32(dev, HCCR, dword);
30 dword = 0x0000c3bf;
31 pci_write_config32(dev, ACNF, dword);
32 byte = 0x08;
33 pci_write_config8(dev, MTT, byte);
34
35}
36static struct device_operations pcix_ops = {
Elyes HAOUASba28e8d2016-08-31 19:22:16 +020037 .read_resources = pci_bus_read_resources,
38 .set_resources = pci_dev_set_resources,
39 .enable_resources = pci_bus_enable_resources,
40 .init = p64h2_pcix_init,
41 .scan_bus = pci_scan_bridge,
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000042 .reset_bus = pci_bus_reset,
Yinghai Lu70093f72004-07-01 03:55:03 +000043};
44
Stefan Reinauerf1cf1f72007-10-24 09:08:58 +000045static const struct pci_driver pcix_driver __pci_driver = {
Elyes HAOUASba28e8d2016-08-31 19:22:16 +020046 .ops = &pcix_ops,
47 .vendor = PCI_VENDOR_ID_INTEL,
48 .device = PCI_DEVICE_ID_INTEL_82870_1F0,
Stefan Reinauer14e22772010-04-27 06:56:47 +000049};
Kyösti Mälkki08c76e12019-08-25 13:05:46 +030050
51struct chip_operations southbridge_intel_i82870_ops = {
52 CHIP_NAME("Intel 82870")
53};