1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#include <device/device.h>
22#include <device/pci_def.h>
23#include <device/pci.h>
24#include <device/pci_ids.h>
25#include <console/console.h>
26
27static void dec_21143_enable(device_t dev)
28{
29 printk(BIOS_DEBUG, "Initializing DECchip 21143\n");
30
31
32
33#if 0
34
35 pci_write_config32(dev, 0x04, 0x02800107);
36 printk(BIOS_DEBUG, "0x04 = %08x (07 01 80 02)\n",
37 pci_read_config32(dev, 0x04));
38
39
40 pci_write_config8(dev, 0x0C, 0x00);
41 printk(BIOS_DEBUG, "0x0c = %08x (00)\n",
42 pci_read_config8(dev, 0x0C));
43#endif
44}
45
46static struct device_operations dec_21143_ops = {
47 .read_resources = pci_dev_read_resources,
48 .set_resources = pci_dev_set_resources,
49 .enable_resources = pci_dev_enable_resources,
50 .init = dec_21143_enable,
51 .scan_bus = 0,
52};
53
54static const struct pci_driver dec_21143_driver __pci_driver = {
55 .ops = &dec_21143_ops,
56 .vendor = PCI_VENDOR_ID_DEC,
57 .device = PCI_DEVICE_ID_DEC_21142,
58};
59