usbohci, usbuhci, usbehci: use physical address of registers for matching controllers and printing
This commit is contained in:
parent
ffb28698bf
commit
f0217d2c3f
|
@ -180,7 +180,7 @@ scanpci(void)
|
||||||
p->vid, p->did);
|
p->vid, p->did);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dprint("usbehci: %#x %#x: port %#p size %#x irq %d\n",
|
print("usbehci: %#x %#x: port %#p size %#x irq %d\n",
|
||||||
p->vid, p->did, io, p->mem[0].size, p->intl);
|
p->vid, p->did, io, p->mem[0].size, p->intl);
|
||||||
|
|
||||||
ctlr = malloc(sizeof(Ctlr));
|
ctlr = malloc(sizeof(Ctlr));
|
||||||
|
@ -239,7 +239,7 @@ reset(Hci *hp)
|
||||||
for(i = 0; i < Nhcis && ctlrs[i] != nil; i++){
|
for(i = 0; i < Nhcis && ctlrs[i] != nil; i++){
|
||||||
ctlr = ctlrs[i];
|
ctlr = ctlrs[i];
|
||||||
if(ctlr->active == 0)
|
if(ctlr->active == 0)
|
||||||
if(hp->port == 0 || hp->port == (uintptr)ctlr->capio){
|
if(hp->port == 0 || hp->port == PADDR(ctlr->capio)){
|
||||||
ctlr->active = 1;
|
ctlr->active = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ reset(Hci *hp)
|
||||||
|
|
||||||
p = ctlr->pcidev;
|
p = ctlr->pcidev;
|
||||||
hp->aux = ctlr;
|
hp->aux = ctlr;
|
||||||
hp->port = (uintptr)ctlr->capio;
|
hp->port = PADDR(ctlr->capio);
|
||||||
hp->irq = p->intl;
|
hp->irq = p->intl;
|
||||||
hp->tbdf = p->tbdf;
|
hp->tbdf = p->tbdf;
|
||||||
|
|
||||||
|
|
|
@ -2571,7 +2571,7 @@ reset(Hci *hp)
|
||||||
for(i = 0; i < Nhcis && ctlrs[i] != nil; i++){
|
for(i = 0; i < Nhcis && ctlrs[i] != nil; i++){
|
||||||
ctlr = ctlrs[i];
|
ctlr = ctlrs[i];
|
||||||
if(ctlr->active == 0)
|
if(ctlr->active == 0)
|
||||||
if(hp->port == 0 || hp->port == (uintptr)ctlr->ohci){
|
if(hp->port == 0 || hp->port == PADDR(ctlr->ohci)){
|
||||||
ctlr->active = 1;
|
ctlr->active = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2585,7 +2585,7 @@ reset(Hci *hp)
|
||||||
|
|
||||||
p = ctlr->pcidev;
|
p = ctlr->pcidev;
|
||||||
hp->aux = ctlr;
|
hp->aux = ctlr;
|
||||||
hp->port = (uintptr)ctlr->ohci;
|
hp->port = PADDR(ctlr->ohci);
|
||||||
hp->irq = p->intl;
|
hp->irq = p->intl;
|
||||||
hp->tbdf = p->tbdf;
|
hp->tbdf = p->tbdf;
|
||||||
ctlr->nports = hp->nports = ctlr->ohci->rhdesca & 0xff;
|
ctlr->nports = hp->nports = ctlr->ohci->rhdesca & 0xff;
|
||||||
|
|
|
@ -2144,7 +2144,7 @@ scanpci(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
dprint("uhci: %#x %#x: port %#ux size %#x irq %d\n",
|
print("uhci: %#x %#x: port %#ux size %#x irq %d\n",
|
||||||
p->vid, p->did, io, p->mem[4].size, p->intl);
|
p->vid, p->did, io, p->mem[4].size, p->intl);
|
||||||
|
|
||||||
ctlr = malloc(sizeof(Ctlr));
|
ctlr = malloc(sizeof(Ctlr));
|
||||||
|
|
Loading…
Reference in a new issue