summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2020-08-27 02:51:11 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-08-31 06:38:53 +0000
commitd7468bfb27033964e5a23e78b4c9d4b6dc952c00 (patch)
tree440080a5cc16c4a3aaa5a7df972c95e2a2c13618 /payloads/libpayload/drivers
parent551216a4d1a52a56a9de4859873694cbcb0e6109 (diff)
xhci: Do not set the CRCR_CS bit
We do not need to set the CS (Command Stop) bit in the Command Ring Control Register. CS is implied by CA (Command Abort). I'm not sure if there is a defined execution order for these command bits, so it's safer to only use the CA bit as it includes the CS function. Ref: xHCI spec 1.2 (May 2019), Section 5.4.5, Table 5-24. BUG=b:160354585,b:157123390 TEST=able to boot into recovery using USB stick on servo v2 on volteer as well as HooToo 8-1 hub Change-Id: Iaeba98b6da8da49f529358ca6d68270440ea0f42 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44876 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/usb/xhci_commands.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci_commands.c b/payloads/libpayload/drivers/usb/xhci_commands.c
index d633cc5762..a4078030c6 100644
--- a/payloads/libpayload/drivers/usb/xhci_commands.c
+++ b/payloads/libpayload/drivers/usb/xhci_commands.c
@@ -75,7 +75,13 @@ xhci_wait_for_command(xhci_t *const xhci,
/* Abort command on timeout */
xhci_debug("Aborting command (@%p), CRCR: 0x%"PRIx32"\n",
cmd_trb, xhci->opreg->crcr_lo);
- xhci->opreg->crcr_lo |= CRCR_CS | CRCR_CA;
+ /*
+ * Ref. xHCI Specification Revision 1.2, May 2019.
+ * Section 5.4.5, Table 5-24.
+ *
+ * Abort the command and stop the ring.
+ */
+ xhci->opreg->crcr_lo |= CRCR_CA;
xhci->opreg->crcr_hi = 0;
cc = xhci_wait_for_command_aborted(xhci, cmd_trb);