coreboot/src/southbridge/intel/i82801ax/pci.c
<<
>>
Prefs
   1/*
   2 * This file is part of the coreboot project.
   3 *
   4 * Copyright (C) 2005 Tyan Computer
   5 * (Written by Yinghai Lu <yinghailu@gmail.com> for Tyan Computer)
   6 *
   7 * This program is free software; you can redistribute it and/or modify
   8 * it under the terms of the GNU General Public License as published by
   9 * the Free Software Foundation; either version 2 of the License, or
  10 * (at your option) any later version.
  11 *
  12 * This program is distributed in the hope that it will be useful,
  13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15 * GNU General Public License for more details.
  16 *
  17 * You should have received a copy of the GNU General Public License
  18 * along with this program; if not, write to the Free Software
  19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  20 */
  21
  22#include <console/console.h>
  23#include <device/device.h>
  24#include <device/pci.h>
  25#include <device/pci_ids.h>
  26
  27static void pci_init(struct device *dev)
  28{
  29        u16 reg16;
  30
  31        /* Clear possible errors. */
  32        reg16 = pci_read_config16(dev, PCI_STATUS);
  33        reg16 |= 0xf900;
  34        pci_write_config16(dev, PCI_STATUS, reg16);
  35}
  36
  37static struct device_operations pci_ops = {
  38        .read_resources         = pci_bus_read_resources,
  39        .set_resources          = pci_dev_set_resources,
  40        .enable_resources       = pci_bus_enable_resources,
  41        .init                   = pci_init,
  42        .scan_bus               = pci_scan_bridge,
  43};
  44
  45/* 82801AA (ICH) */
  46static const struct pci_driver i82801aa_pci __pci_driver = {
  47        .ops    = &pci_ops,
  48        .vendor = PCI_VENDOR_ID_INTEL,
  49        .device = 0x2418,
  50};
  51
  52/* 82801AB (ICH0) */
  53static const struct pci_driver i82801ab_pci __pci_driver = {
  54        .ops    = &pci_ops,
  55        .vendor = PCI_VENDOR_ID_INTEL,
  56        .device = 0x2428,
  57};
  58
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.