2 * (C) 2004 Linux Networx
4 #include <console/console.h>
5 #include <device/device.h>
6 #include <device/pci.h>
7 #include <device/pci_ids.h>
8 #include <device/pci_ops.h>
9 #include <device/smbus.h>
14 static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
16 pci_write_config32(dev, 0x44,
17 ((device & 0xffff) << 16) | (vendor & 0xffff));
20 static struct smbus_bus_operations lops_smbus_bus = {
21 /* I haven't seen the 2.0 SMBUS controller used yet. */
23 static struct pci_operations lops_pci = {
24 .set_subsystem = lpci_set_subsystem,
26 static struct device_operations smbus_ops = {
27 .read_resources = pci_dev_read_resources,
28 .set_resources = pci_dev_set_resources,
29 .enable_resources = pci_dev_enable_resources,
31 .scan_bus = scan_static_bus,
32 .enable = amd8111_enable,
34 .ops_smbus_bus = &lops_smbus_bus,
37 static const struct pci_driver smbus_driver __pci_driver = {
39 .vendor = PCI_VENDOR_ID_AMD,
40 .device = PCI_DEVICE_ID_AMD_8111_SMB,