Commit bc72a919 authored by Bryan Wu's avatar Bryan Wu Committed by Remy Bohmer

usb: musb: change rxcsr register from write to read/modify/write

The RX Control/Status register has bits that we want to preserve, so don't
just write out a single bit.  Preserve the others bits in the process.

The original code posted to the u-boot list had this behavior, but looks
like it was lost somewhere along the way to merging.
Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
Signed-off-by: default avatarCliff Cai <cliff.cai@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarRemy Bohmer <linux@bohmer.net>
parent 8868fd44
......@@ -604,7 +604,8 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
(len-txlen) : dev->epmaxpacketin[ep];
/* Set the ReqPkt bit */
writew(MUSB_RXCSR_H_REQPKT, &musbr->rxcsr);
csr = readw(&musbr->rxcsr);
writew(csr | MUSB_RXCSR_H_REQPKT, &musbr->rxcsr);
/* Wait until the RxPktRdy bit is set */
if (!wait_until_rxep_ready(dev, MUSB_BULK_EP)) {
......@@ -775,7 +776,8 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe,
(len-txlen) : dev->epmaxpacketin[ep];
/* Set the ReqPkt bit */
writew(MUSB_RXCSR_H_REQPKT, &musbr->rxcsr);
csr = readw(&musbr->rxcsr);
writew(csr | MUSB_RXCSR_H_REQPKT, &musbr->rxcsr);
/* Wait until the RxPktRdy bit is set */
if (!wait_until_rxep_ready(dev, MUSB_INTR_EP)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment