summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/usbehcipc.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-07-31 17:36:56 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2017-07-31 17:36:56 +0200
commit5f23d78f068fcc33555705ee43933fc8ed8b4fc0 (patch)
tree72e76902a083cf5e231e732579603c92ac15f1a3 /sys/src/9/pc/usbehcipc.c
parent48352be82574e39a54e44b5ed38d407dcb66a0bb (diff)
usbohci, usbehci, usbxhci: save mmio base address in ctlr, cant PADDR() on 386...
Diffstat (limited to 'sys/src/9/pc/usbehcipc.c')
-rw-r--r--sys/src/9/pc/usbehcipc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/src/9/pc/usbehcipc.c b/sys/src/9/pc/usbehcipc.c
index 35744e93c..ed8eafab7 100644
--- a/sys/src/9/pc/usbehcipc.c
+++ b/sys/src/9/pc/usbehcipc.c
@@ -175,11 +175,9 @@ scanpci(void)
default:
continue;
}
- if(io == 0){
- print("usbehci: %x %x: failed to map registers\n",
- p->vid, p->did);
+ if(io == 0)
continue;
- }
+
print("usbehci: %#x %#x: port %#p size %#x irq %d\n",
p->vid, p->did, io, p->mem[0].size, p->intl);
@@ -189,6 +187,7 @@ scanpci(void)
continue;
}
ctlr->pcidev = p;
+ ctlr->base = io;
capio = ctlr->capio = vmap(io, p->mem[0].size);
ctlr->opio = (Eopio*)((uintptr)capio + (capio->cap & 0xff));
pcisetbme(p);
@@ -239,7 +238,7 @@ reset(Hci *hp)
for(i = 0; i < Nhcis && ctlrs[i] != nil; i++){
ctlr = ctlrs[i];
if(ctlr->active == 0)
- if(hp->port == 0 || hp->port == PADDR(ctlr->capio)){
+ if(hp->port == 0 || hp->port == ctlr->base){
ctlr->active = 1;
break;
}
@@ -250,7 +249,7 @@ reset(Hci *hp)
p = ctlr->pcidev;
hp->aux = ctlr;
- hp->port = PADDR(ctlr->capio);
+ hp->port = ctlr->base;
hp->irq = p->intl;
hp->tbdf = p->tbdf;