When initializing a UHCI controller, ensure that the interrupts are disabled
before routing them from the BIOS. Also clear pending SMIs when disabling legacy support. Might help with some legacy support issues and probably introduces others instead... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24728 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a93bd0c452
commit
111522f174
|
@ -332,13 +332,14 @@ UHCI::UHCI(pci_info *info, Stack *stack)
|
|||
sPCIModule->write_pci_config(fPCIInfo->bus, fPCIInfo->device,
|
||||
fPCIInfo->function, PCI_command, 2, command);
|
||||
|
||||
// make sure we gain control of the UHCI controller instead of the BIOS
|
||||
sPCIModule->write_pci_config(fPCIInfo->bus, fPCIInfo->device,
|
||||
fPCIInfo->function, PCI_LEGSUP, 2, PCI_LEGSUP_USBPIRQDEN);
|
||||
|
||||
// disable interrupts
|
||||
WriteReg16(UHCI_USBINTR, 0);
|
||||
|
||||
// make sure we gain control of the UHCI controller instead of the BIOS
|
||||
sPCIModule->write_pci_config(fPCIInfo->bus, fPCIInfo->device,
|
||||
fPCIInfo->function, PCI_LEGSUP, 2, PCI_LEGSUP_USBPIRQDEN
|
||||
| PCI_LEGSUP_CLEAR_SMI);
|
||||
|
||||
// do a global and host reset
|
||||
GlobalReset();
|
||||
if (ControllerReset() < B_OK) {
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
// ** -- Only writable with words!
|
||||
|
||||
// PCI register
|
||||
#define PCI_LEGSUP 0xC0
|
||||
#define PCI_LEGSUP_USBPIRQDEN 0x2000
|
||||
#define PCI_LEGSUP 0xC0
|
||||
#define PCI_LEGSUP_USBPIRQDEN 0x2000
|
||||
#define PCI_LEGSUP_CLEAR_SMI 0x8f00
|
||||
|
||||
// Registers
|
||||
#define UHCI_USBCMD 0x00 // USB Command - word - R/W
|
||||
|
|
Loading…
Reference in New Issue