f940c1f4a82c061ba2accc94d041148b28f7a100
[coreboot.git] / src / drivers / intel / 82551 / intel_nic.c
1 /* Copyright 2003 Tyan */
2
3 /* Author: Yinghai Lu 
4  *
5  */
6
7
8 #include <delay.h>
9 #include <stdlib.h>
10 #include <string.h>
11 #include <arch/io.h>
12
13 #include <console/console.h>
14 #include <device/device.h>
15 #include <device/pci.h>
16 #include <device/pci_ids.h>
17 #include <device/pci_ops.h>
18
19
20 static void intel_nic_init(struct device *dev)
21 {
22         uint16_t word;
23
24         word = pci_read_config16(dev, 0x4);
25         word |= ((1 << 2) |(1<<4)); // Command: 3--> 17
26         pci_write_config16(dev, 0x4, word);
27
28         printk_debug("INTEL_NIC_FIXUP:  done  \n");
29         
30         
31 }
32
33 static struct device_operations intel_nic_ops  = {
34         .read_resources   = pci_dev_read_resources,
35         .set_resources    = pci_dev_set_resources,
36         .enable_resources = pci_dev_enable_resources,
37         .init             = intel_nic_init,
38         .scan_bus         = 0,
39 };
40
41 static struct pci_driver intel_nic_driver __pci_driver = {
42         .ops    = &intel_nic_ops,
43         .vendor = PCI_VENDOR_ID_INTEL,
44         .device = 0x1010,
45 };
46 static struct pci_driver intel_nic2_driver __pci_driver = {
47         .ops    = &intel_nic_ops,
48         .vendor = PCI_VENDOR_ID_INTEL,
49         .device = 0x100f,
50 };
51