change from USB Debugger branch by Ben, rename variable
This commit is contained in:
parent
cc87b23738
commit
77bbdca17a
@ -1275,8 +1275,8 @@ bool bx_usb_xhci_c::read_handler(bx_phy_address addr, unsigned len, void *data,
|
||||
}
|
||||
}
|
||||
// Register Port Sets
|
||||
else if ((offset >= PORT_SET_OFFSET) && (offset < (PORT_SET_OFFSET + (BX_XHCI_THIS hub.n_ports * 16)))) {
|
||||
unsigned port = (((offset - PORT_SET_OFFSET) >> 4) & 0x3F); // calculate port number
|
||||
else if ((offset >= XHCI_PORT_SET_OFFSET) && (offset < (XHCI_PORT_SET_OFFSET + (BX_XHCI_THIS hub.n_ports * 16)))) {
|
||||
unsigned port = (((offset - XHCI_PORT_SET_OFFSET) >> 4) & 0x3F); // calculate port number
|
||||
if (BX_XHCI_THIS hub.usb_port[port].portsc.pp) {
|
||||
// the speed field is only valid for USB3 before a port reset. If a reset has not
|
||||
// taken place after the port is powered, the USB2 ports don't show a valid speed field.
|
||||
@ -1749,8 +1749,8 @@ bool bx_usb_xhci_c::write_handler(bx_phy_address addr, unsigned len, void *data,
|
||||
}
|
||||
}
|
||||
// Register Port Sets
|
||||
else if ((offset >= PORT_SET_OFFSET) && (offset < (PORT_SET_OFFSET + (BX_XHCI_THIS hub.n_ports * 16)))) {
|
||||
unsigned port = (((offset - PORT_SET_OFFSET) >> 4) & 0x3F); // calculate port number
|
||||
else if ((offset >= XHCI_PORT_SET_OFFSET) && (offset < (XHCI_PORT_SET_OFFSET + (BX_XHCI_THIS hub.n_ports * 16)))) {
|
||||
unsigned port = (((offset - XHCI_PORT_SET_OFFSET) >> 4) & 0x3F); // calculate port number
|
||||
switch (offset & 0x0000000F) {
|
||||
case 0x00:
|
||||
if (value & (1<<9)) { // port power
|
||||
|
@ -120,7 +120,7 @@
|
||||
|
||||
#define RUNTIME_OFFSET 0x600
|
||||
|
||||
#define PORT_SET_OFFSET (0x400 + OPS_REGS_OFFSET)
|
||||
#define XHCI_PORT_SET_OFFSET (0x400 + OPS_REGS_OFFSET)
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user