Skip to content

Commit 57f3ffd

Browse files
shimodaygregkh
authored andcommitted
usb: host: xhci-rcar: Don't reload firmware after the completion
According to the datasheet, "Upon the completion of FW Download, there is no need to write or reload FW.". Otherwise, it's possible to cause unexpected behaviors. So, adds such a condition. Fixes: 4ac8918 ("usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers") Cc: [email protected] # v3.17+ Signed-off-by: Yoshihiro Shimoda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b7d509a commit 57f3ffd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/usb/host/xhci-rcar.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ static int xhci_rcar_download_firmware(struct usb_hcd *hcd)
134134
const struct soc_device_attribute *attr;
135135
const char *firmware_name;
136136

137+
/*
138+
* According to the datasheet, "Upon the completion of FW Download,
139+
* there is no need to write or reload FW".
140+
*/
141+
if (readl(regs + RCAR_USB3_DL_CTRL) & RCAR_USB3_DL_CTRL_FW_SUCCESS)
142+
return 0;
143+
137144
attr = soc_device_match(rcar_quirks_match);
138145
if (attr)
139146
quirks = (uintptr_t)attr->data;

0 commit comments

Comments
 (0)