|
@@ -4948,6 +4948,16 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
|
|
return retval;
|
|
|
xhci_dbg(xhci, "Reset complete\n");
|
|
|
|
|
|
+ /*
|
|
|
+ * On some xHCI controllers (e.g. R-Car SoCs), the AC64 bit (bit 0)
|
|
|
+ * of HCCPARAMS1 is set to 1. However, the xHCs don't support 64-bit
|
|
|
+ * address memory pointers actually. So, this driver clears the AC64
|
|
|
+ * bit of xhci->hcc_params to call dma_set_coherent_mask(dev,
|
|
|
+ * DMA_BIT_MASK(32)) in this xhci_gen_setup().
|
|
|
+ */
|
|
|
+ if (xhci->quirks & XHCI_NO_64BIT_SUPPORT)
|
|
|
+ xhci->hcc_params &= ~BIT(0);
|
|
|
+
|
|
|
/* Set dma_mask and coherent_dma_mask to 64-bits,
|
|
|
* if xHC supports 64-bit addressing */
|
|
|
if (HCC_64BIT_ADDR(xhci->hcc_params) &&
|