diff options
author | Bryan Wu <bryan.wu@analog.com> | 2009-12-16 22:04:01 -0500 |
---|---|---|
committer | Remy Bohmer <linux@bohmer.net> | 2010-01-09 10:25:09 +0100 |
commit | bc72a919e037782f64e3ac45c91bc60408e57e85 (patch) | |
tree | 7dfa44613a88935e9c3c7c080ff74570e6c1db6f /drivers/usb/musb | |
parent | 8868fd443b7a52bf433903cc9527403ad055acb9 (diff) | |
download | u-boot-imx-bc72a919e037782f64e3ac45c91bc60408e57e85.zip u-boot-imx-bc72a919e037782f64e3ac45c91bc60408e57e85.tar.gz u-boot-imx-bc72a919e037782f64e3ac45c91bc60408e57e85.tar.bz2 |
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: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_hcd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index 5481600..adb8c38 100644 --- a/drivers/usb/musb/musb_hcd.c +++ b/drivers/usb/musb/musb_hcd.c @@ -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)) { |