From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org, thuth@redhat.com
Cc: aik@ozlabs.ru, nikunj@linux.vnet.ibm.com, david@gibson.dropbear.id.au
Subject: [PATCH v2 3/4] usb: support 64-bit pci bars
Date: Mon, 27 Apr 2015 13:32:32 +0530 [thread overview]
Message-ID: <1430121753-24818-4-git-send-email-nikunj@linux.vnet.ibm.com> (raw)
In-Reply-To: <1430121753-24818-1-git-send-email-nikunj@linux.vnet.ibm.com>
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>
---
slof/fs/devices/pci-class_0c.fs | 10 ++++++++--
1 file 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 !
--
1.8.3.1
next prev parent reply other threads:[~2015-04-27 8:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 8:02 [PATCH v2 0/4] PCI: Generic fixes and moving enumeration back to QEMU Nikunj A Dadhania
2015-04-27 8:02 ` [PATCH v2 1/4] pci: program correct bridge limit registers during probe Nikunj A Dadhania
2015-04-27 8:17 ` Thomas Huth
2015-04-27 8:02 ` [PATCH v2 2/4] pci: Support 64-bit address translation Nikunj A Dadhania
2015-04-27 9:32 ` Thomas Huth
2015-04-27 9:57 ` Benjamin Herrenschmidt
2015-04-27 10:12 ` Thomas Huth
2015-04-27 8:02 ` Nikunj A Dadhania [this message]
2015-04-27 8:26 ` [PATCH v2 3/4] usb: support 64-bit pci bars Thomas Huth
2015-04-27 8:02 ` [PATCH v2 4/4] pci: Use QEMU created PCI device nodes Nikunj A Dadhania
2015-04-27 8:38 ` Thomas Huth
2015-04-27 9:56 ` Nikunj A Dadhania
2015-04-27 10:14 ` Thomas Huth
2015-04-29 3:12 ` [PATCH v2 0/4] PCI: Generic fixes and moving enumeration back to QEMU Alexey Kardashevskiy
2015-04-29 5:22 ` Nikunj A Dadhania
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430121753-24818-4-git-send-email-nikunj@linux.vnet.ibm.com \
--to=nikunj@linux.vnet.ibm.com \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).