WS cleanup: remove SPACE(s) followed by TAB
[platform/kernel/u-boot.git] / drivers / usb / musb / musb_hcd.c
index 4947936..1790170 100644 (file)
@@ -1,19 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Mentor USB OTG Core host controller driver.
  *
  * Copyright (c) 2008 Texas Instruments
  *
- * SPDX-License-Identifier:    GPL-2.0+
- *
  * Author: Thomas Abraham t-abraham@ti.com, Texas Instruments
  */
 
 #include <common.h>
+#include <log.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include "musb_hcd.h"
 
 /* MSC control transfers */
-#define USB_MSC_BBB_RESET      0xFF
+#define USB_MSC_BBB_RESET      0xFF
 #define USB_MSC_BBB_GET_MAX_LUN        0xFE
 
 /* Endpoint configuration information */
@@ -326,11 +327,9 @@ static int ctrlreq_out_data_phase(struct usb_device *dev, u32 len, void *buffer)
 
                /* Set TXPKTRDY bit */
                csr = readw(&musbr->txcsr);
-                       
+
                csr |= MUSB_CSR0_TXPKTRDY;
-#if !defined(CONFIG_SOC_DM365)
                csr |= MUSB_CSR0_H_DIS_PING;
-#endif
                writew(csr, &musbr->txcsr);
                result = wait_until_ep0_ready(dev, MUSB_CSR0_TXPKTRDY);
                if (result < 0)
@@ -353,9 +352,7 @@ static int ctrlreq_out_status_phase(struct usb_device *dev)
        /* Set the StatusPkt bit */
        csr = readw(&musbr->txcsr);
        csr |= (MUSB_CSR0_TXPKTRDY | MUSB_CSR0_H_STATUSPKT);
-#if !defined(CONFIG_SOC_DM365)
        csr |= MUSB_CSR0_H_DIS_PING;
-#endif
        writew(csr, &musbr->txcsr);
 
        /* Wait until TXPKTRDY bit is cleared */
@@ -373,9 +370,7 @@ static int ctrlreq_in_status_phase(struct usb_device *dev)
 
        /* Set the StatusPkt bit and ReqPkt bit */
        csr = MUSB_CSR0_H_REQPKT | MUSB_CSR0_H_STATUSPKT;
-#if !defined(CONFIG_SOC_DM365)
        csr |= MUSB_CSR0_H_DIS_PING;
-#endif
        writew(csr, &musbr->txcsr);
        result = wait_until_ep0_ready(dev, MUSB_CSR0_H_REQPKT);
 
@@ -913,11 +908,6 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
                        nextlen = ((len-txlen) < dev->epmaxpacketout[ep]) ?
                                        (len-txlen) : dev->epmaxpacketout[ep];
 
-#ifdef CONFIG_USB_BLACKFIN
-                       /* Set the transfer data size */
-                       writew(nextlen, &musbr->txcount);
-#endif
-
                        /* Write the data to the FIFO */
                        write_fifo(MUSB_BULK_EP, nextlen,
                                        (void *)(((u8 *)buffer) + txlen));
@@ -1061,8 +1051,8 @@ int usb_lowlevel_stop(int index)
  * This function supports usb interrupt transfers. Currently, usb interrupt
  * transfers are not supported.
  */
-int submit_int_msg(struct usb_device *dev, unsigned long pipe,
-                               void *buffer, int len, int interval)
+int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
+                  int len, int interval, bool nonblock)
 {
        int dir_out = usb_pipeout(pipe);
        int ep = usb_pipeendpoint(pipe);