ece7e794eb7c61a7eee141de41843ea00f13f3ac
[coreboot.git] / src / southbridge / broadcom / bcm5780 / bcm5780_pcix.c
1 /*
2  * Copyright  2005 AMD
3  *  by yinghai.lu@amd.com
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
12 static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
13 {
14         pci_write_config32(dev, 0x40,
15                 ((device & 0xffff) << 16) | (vendor & 0xffff));
16 }
17 static struct pci_operations lops_pci = {
18         .set_subsystem = lpci_set_subsystem,
19 };
20
21 static struct device_operations ht_ops  = {
22         .read_resources   = pci_bus_read_resources,
23         .set_resources    = pci_dev_set_resources,
24         .enable_resources = pci_bus_enable_resources,
25         .init             = 0 ,
26         .scan_bus         = pci_scan_bridge,
27         .reset_bus        = pci_bus_reset,
28         .ops_pci          = &lops_pci,
29
30 };
31
32 static const struct pci_driver ht_driver __pci_driver = {
33         .ops    = &ht_ops,
34         .vendor = PCI_VENDOR_ID_SERVERWORKS,
35         .device = PCI_DEVICE_ID_SERVERWORKS_BCM5780_PXB,
36 };
37