1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#include <console/console.h>
22#include <device/device.h>
23#include <device/pci.h>
24#include <device/pci_ids.h>
25#include <device/pci_ops.h>
26
27static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
28{
29 pci_write_config32(dev, 0x40,
30 ((device & 0xffff) << 16) | (vendor & 0xffff));
31}
32
33static struct pci_operations lops_pci = {
34 .set_subsystem = lpci_set_subsystem,
35};
36
37static struct device_operations ht_ops = {
38 .read_resources = pci_bus_read_resources,
39 .set_resources = pci_dev_set_resources,
40 .enable_resources = pci_bus_enable_resources,
41 .init = 0 ,
42 .scan_bus = pci_scan_bridge,
43 .reset_bus = pci_bus_reset,
44 .ops_pci = &lops_pci,
45
46};
47
48static const struct pci_driver ht_driver __pci_driver = {
49 .ops = &ht_ops,
50 .vendor = PCI_VENDOR_ID_SERVERWORKS,
51 .device = PCI_DEVICE_ID_SERVERWORKS_BCM5780_PXB,
52};
53