diff options
author | Bill Richardson <wfrichar@chromium.org> | 2016-03-24 19:14:16 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-03-25 18:51:43 -0700 |
commit | a76eb92cc2e92fdb5c91570b264241e51a72ab42 (patch) | |
tree | 6919f2529f749b5340d251d45e54a1cfd546372a | |
parent | 7fcd0590eb730fab8ff75c6e684b5aee36174775 (diff) | |
download | chrome-ec-a76eb92cc2e92fdb5c91570b264241e51a72ab42.tar.gz |
Cr50: Fix subtle USB error in clearing global NAKs
We clear global NAKs by writing bits in the USB_DCTL register.
However, prior to this CL we were overwriting the entire
register, not just touching individual bits.
Since we've never actually set any global NAKs, this mistake
didn't have any noticeable effects. But we should still do the
right thing in case we need it later.
BUG=chrome-os-partner:50721
BRANCH=none
TEST=make buildall; test on Cr50
No visible change; everything continues to work.
Change-Id: Ia25d95dc6211e5460132622ac005723f43b00e24
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/335190
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | chip/g/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/g/usb.c b/chip/g/usb.c index f9ce50725e..4912b0d7ad 100644 --- a/chip/g/usb.c +++ b/chip/g/usb.c @@ -1103,10 +1103,10 @@ void usb_interrupt(void) } if (status & GINTSTS(GOUTNAKEFF)) - GR_USB_DCTL = DCTL_CGOUTNAK; + GR_USB_DCTL |= DCTL_CGOUTNAK; if (status & GINTSTS(GINNAKEFF)) - GR_USB_DCTL = DCTL_CGNPINNAK; + GR_USB_DCTL |= DCTL_CGNPINNAK; GR_USB_GINTSTS = status; |