final rename orgy. sorry for the inconvenience. This should fix it again
[coreboot.git] / src / southbridge / intel / i82371eb / i82371eb_smbus.c
1 /*
2  * (C) 2004 Linux Networx
3  * (C) 2005 Bitworks
4 */
5
6 #include <console/console.h>
7 #include <device/device.h>
8 #include <device/pci.h>
9 #include <device/pci_ids.h>
10 #include <device/pci_ops.h>
11 #include <device/smbus.h>
12 #include <arch/io.h>
13 #include "i82371eb.h"
14
15
16 static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
17 {
18         pci_write_config32(dev, 0x44, 
19                 ((device & 0xffff) << 16) | (vendor & 0xffff));
20 }
21
22 static struct smbus_bus_operations lops_smbus_bus = {
23 };
24
25 static struct pci_operations lops_pci = {
26         .set_subsystem = lpci_set_subsystem,
27 };
28 static struct device_operations smbus_ops = {
29         .read_resources   = pci_dev_read_resources,
30         .set_resources    = pci_dev_set_resources,
31         .enable_resources = pci_dev_enable_resources,
32         .init             = 0,
33         .scan_bus         = scan_static_bus,
34         .enable           = i82371eb_enable,
35         .ops_pci          = &lops_pci,
36         .ops_smbus_bus    = &lops_smbus_bus,
37 };
38
39 static struct pci_driver smbus_driver __pci_driver = {
40         .ops = &smbus_ops,
41         .vendor = PCI_VENDOR_ID_INTEL,
42         .device = PCI_DEVICE_INTEL_440BX_SMB,
43 };