1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/pci.h>
4 #include <device/pci_ids.h>
5 #include <device/pci_ops.h>
10 static void init(struct device *dev)
13 unsigned devNic = PCI_DEVFN(0xd, 0);
14 unsigned devUsb = PCI_DEVFN(0xf, 4);
15 device_t usb = NULL, nic = NULL;
16 unsigned char irqUsb = 0xa, irqNic = 0xb;
18 printk_debug("DIGITALLOGIC MSM800SSEV ENTER %s\n", __FUNCTION__);
20 // FIXME: do we need to initialize USB OHCI this way?
21 printk_debug("%s (%x,%x) set USB PCI interrupt line to %d\n",
22 __FUNCTION__, bus, devUsb, irqUsb);
24 // initialize the USB controller
25 usb = dev_find_slot(bus, devUsb);
26 if (!usb) printk_err("Could not find USB\n");
27 else pci_write_config8(usb, PCI_INTERRUPT_LINE, irqUsb);
29 printk_debug("%s (%x,%x) set NIC PCI interrupt line to %d\n",
30 __FUNCTION__, bus, devNic, irqNic);
32 // initialize theEEPRO 100
33 nic = dev_find_slot(bus, devNic);
34 if (!nic) printk_err("Could not find USB\n");
35 else pci_write_config8(nic, PCI_INTERRUPT_LINE, irqNic);
37 printk_debug("DIGITALLOGIC MSM800SSEV EXIT %s\n", __FUNCTION__);
40 static void enable_dev(struct device *dev)
42 dev->ops->init = init;
45 struct chip_operations mainboard_digitallogic_msm800sev_ops = {
46 CHIP_NAME("digitallogip msm800sev mainboard ")
47 .enable_dev = enable_dev,