diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2016-04-08 09:25:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-13 14:55:56 -0400 |
commit | 5ad3b03e4910f9f62342956ecdc758c7af6b8699 (patch) | |
tree | 231db0f9f12baab215a8820977089bcafbc4c187 | |
parent | 0a380be8233dbf8dd20795b801c5d5d5ef3992f7 (diff) |
usb: host: xhci-plat: fix cannot work if R-Car Gen2/3 run on above 4GB phys
This patch fixes an issue that cannot work if R-Car Gen2/3 run on
above 4GB physical memory environment to use a quirk XHCI_NO_64BIT_SUPPORT.
Cc: <stable@vger.kernel.org>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/xhci-plat.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 5c15e9bc5f7a..474b5fa14900 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c | |||
@@ -39,12 +39,25 @@ static const struct xhci_driver_overrides xhci_plat_overrides __initconst = { | |||
39 | 39 | ||
40 | static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) | 40 | static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) |
41 | { | 41 | { |
42 | struct usb_hcd *hcd = xhci_to_hcd(xhci); | ||
43 | |||
42 | /* | 44 | /* |
43 | * As of now platform drivers don't provide MSI support so we ensure | 45 | * As of now platform drivers don't provide MSI support so we ensure |
44 | * here that the generic code does not try to make a pci_dev from our | 46 | * here that the generic code does not try to make a pci_dev from our |
45 | * dev struct in order to setup MSI | 47 | * dev struct in order to setup MSI |
46 | */ | 48 | */ |
47 | xhci->quirks |= XHCI_PLAT; | 49 | xhci->quirks |= XHCI_PLAT; |
50 | |||
51 | /* | ||
52 | * On R-Car Gen2 and Gen3, the AC64 bit (bit 0) of HCCPARAMS1 is set | ||
53 | * to 1. However, these SoCs don't support 64-bit address memory | ||
54 | * pointers. So, this driver clears the AC64 bit of xhci->hcc_params | ||
55 | * to call dma_set_coherent_mask(dev, DMA_BIT_MASK(32)) in | ||
56 | * xhci_gen_setup(). | ||
57 | */ | ||
58 | if (xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2) || | ||
59 | xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_RENESAS_RCAR_GEN3)) | ||
60 | xhci->quirks |= XHCI_NO_64BIT_SUPPORT; | ||
48 | } | 61 | } |
49 | 62 | ||
50 | /* called during probe() after chip reset completes */ | 63 | /* called during probe() after chip reset completes */ |