summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-10-08 09:51:48 -0400
committerTom Rini <trini@ti.com>2013-10-08 09:51:48 -0400
commit9f3fe6da27e2328285aa37149fce845da4e57560 (patch)
tree26fdeff18bd1c7bddc7fadb969a4c12ad9bc863c /drivers/usb
parent968294bd7b9b540f53c1fb3c809da464623a4362 (diff)
parent572886af5984febafa6f083e6b8af0465f4f5764 (diff)
downloadu-boot-imx-9f3fe6da27e2328285aa37149fce845da4e57560.zip
u-boot-imx-9f3fe6da27e2328285aa37149fce845da4e57560.tar.gz
u-boot-imx-9f3fe6da27e2328285aa37149fce845da4e57560.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_hcd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 3dc5d6a..41a8126 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -267,7 +267,7 @@ static int wait_until_ep0_ready(struct usb_device *dev, u32 bit_mask)
/*
* waits until tx ep is ready. Returns 1 when ep is ready and 0 on error.
*/
-static u8 wait_until_txep_ready(struct usb_device *dev, u8 ep)
+static int wait_until_txep_ready(struct usb_device *dev, u8 ep)
{
u16 csr;
int timeout = CONFIG_MUSB_TIMEOUT;
@@ -299,7 +299,7 @@ static u8 wait_until_txep_ready(struct usb_device *dev, u8 ep)
/*
* waits until rx ep is ready. Returns 1 when ep is ready and 0 on error.
*/
-static u8 wait_until_rxep_ready(struct usb_device *dev, u8 ep)
+static int wait_until_rxep_ready(struct usb_device *dev, u8 ep)
{
u16 csr;
int timeout = CONFIG_MUSB_TIMEOUT;
@@ -1009,7 +1009,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
writew(csr | MUSB_TXCSR_TXPKTRDY, &musbr->txcsr);
/* Wait until the TxPktRdy bit is cleared */
- if (!wait_until_txep_ready(dev, MUSB_BULK_EP)) {
+ if (wait_until_txep_ready(dev, MUSB_BULK_EP) != 1) {
readw(&musbr->txcsr);
usb_settoggle(dev, ep, dir_out,
(csr >> MUSB_TXCSR_H_DATATOGGLE_SHIFT) & 1);
@@ -1044,7 +1044,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
writew(csr | MUSB_RXCSR_H_REQPKT, &musbr->rxcsr);
/* Wait until the RxPktRdy bit is set */
- if (!wait_until_rxep_ready(dev, MUSB_BULK_EP)) {
+ if (wait_until_rxep_ready(dev, MUSB_BULK_EP) != 1) {
csr = readw(&musbr->rxcsr);
usb_settoggle(dev, ep, dir_out,
(csr >> MUSB_S_RXCSR_H_DATATOGGLE) & 1);
@@ -1217,7 +1217,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe,
writew(csr | MUSB_RXCSR_H_REQPKT, &musbr->rxcsr);
/* Wait until the RxPktRdy bit is set */
- if (!wait_until_rxep_ready(dev, MUSB_INTR_EP)) {
+ if (wait_until_rxep_ready(dev, MUSB_INTR_EP) != 1) {
csr = readw(&musbr->rxcsr);
usb_settoggle(dev, ep, dir_out,
(csr >> MUSB_S_RXCSR_H_DATATOGGLE) & 1);