| 106 |
} else { |
} else { |
| 107 |
level = 0; |
level = 0; |
| 108 |
} |
} |
| 109 |
pci_set_irq(&s->dev, 0, level); |
pci_set_irq(&s->dev, 3, level); |
| 110 |
} |
} |
| 111 |
|
|
| 112 |
static void uhci_reset(UHCIState *s) |
static void uhci_reset(UHCIState *s) |
| 642 |
|
|
| 643 |
s = (UHCIState *)pci_register_device(bus, |
s = (UHCIState *)pci_register_device(bus, |
| 644 |
"USB-UHCI", sizeof(UHCIState), |
"USB-UHCI", sizeof(UHCIState), |
| 645 |
-1, |
((PCIDevice *)piix3_state)->devfn + 2, |
| 646 |
NULL, NULL); |
NULL, NULL); |
| 647 |
pci_conf = s->dev.config; |
pci_conf = s->dev.config; |
| 648 |
pci_conf[0x00] = 0x86; |
pci_conf[0x00] = 0x86; |
| 654 |
pci_conf[0x0a] = 0x03; |
pci_conf[0x0a] = 0x03; |
| 655 |
pci_conf[0x0b] = 0x0c; |
pci_conf[0x0b] = 0x0c; |
| 656 |
pci_conf[0x0e] = 0x00; // header_type |
pci_conf[0x0e] = 0x00; // header_type |
| 657 |
pci_conf[0x3d] = 1; // interrupt pin 0 |
pci_conf[0x3d] = 4; // interrupt pin 3 |
| 658 |
|
|
| 659 |
for(i = 0; i < NB_PORTS; i++) { |
for(i = 0; i < NB_PORTS; i++) { |
| 660 |
port = &s->ports[i]; |
port = &s->ports[i]; |