aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2015-04-27 11:40:44 +0530
committerAlexey Kardashevskiy <aik@ozlabs.ru>2015-05-07 16:52:51 +1000
commitd5c4b4710459a9b6e883b6c87cc795b8ad52cc66 (patch)
tree378a29a1d650aaeceaf7d004ab572aca1822ab1e
parentcb4e9e99ebe5d63bc57b518b7de026ee62a21688 (diff)
downloadSLOF-d5c4b4710459a9b6e883b6c87cc795b8ad52cc66.zip
SLOF-d5c4b4710459a9b6e883b6c87cc795b8ad52cc66.tar.gz
SLOF-d5c4b4710459a9b6e883b6c87cc795b8ad52cc66.tar.bz2
usb: support 64-bit pci bars
With the addition of 64-bit bar ranges (commit: 9fbfed08 - pci: use 64bit bar ranges), the usb-setup-hcidev needs to handle 64-bit addresses. For example, QEMU provided NEC USB XHCI device requests 64-bit memory address. Added code to check the memory type before address translation. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r--slof/fs/devices/pci-class_0c.fs10
1 files changed, 8 insertions, 2 deletions
diff --git a/slof/fs/devices/pci-class_0c.fs b/slof/fs/devices/pci-class_0c.fs
index 9c47325..39453fb 100644
--- a/slof/fs/devices/pci-class_0c.fs
+++ b/slof/fs/devices/pci-class_0c.fs
@@ -25,8 +25,14 @@ CONSTANT /hci-dev
: usb-setup-hcidev ( num hci-dev -- )
>r
- 10 config-l@ translate-my-address
- 3 not AND
+ 10 config-l@ F AND case
+ 0 OF 10 config-l@ translate-my-address ENDOF \ 32-bit memory space
+ 4 OF \ 64-bit memory space
+ 14 config-l@ 20 lshift \ Read two bars
+ 10 config-l@ OR translate-my-address
+ ENDOF
+ ENDCASE
+ F not AND
( io-base ) r@ hcd>base !
08 config-l@ 8 rshift 0000000F0 AND 4 rshift
( usb-type ) r@ hcd>type !