Commit 3a8aab5e authored by Felipe Balbi's avatar Felipe Balbi Committed by Tony Lindgren

USB: MUSB: checkpatch.pl fixed to musb_host.c

Misc cleanup patch.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 7861dcfe
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
static void musb_ep_program(struct musb *musb, u8 epnum, static void musb_ep_program(struct musb *musb, u8 epnum,
struct urb *urb, unsigned int nOut, struct urb *urb, unsigned int nOut,
u8 * buf, u32 len); u8 *buf, u32 len);
/* /*
* Clear TX fifo. Needed to avoid BABBLE errors. * Clear TX fifo. Needed to avoid BABBLE errors.
...@@ -210,7 +210,7 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) ...@@ -210,7 +210,7 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
case USB_ENDPOINT_XFER_BULK: s = "-bulk"; break; case USB_ENDPOINT_XFER_BULK: s = "-bulk"; break;
case USB_ENDPOINT_XFER_ISOC: s = "-iso"; break; case USB_ENDPOINT_XFER_ISOC: s = "-iso"; break;
default: s = "-intr"; break; default: s = "-intr"; break;
}; s;}), }; s; }),
epnum, buf, len); epnum, buf, len);
/* Configure endpoint */ /* Configure endpoint */
...@@ -244,7 +244,7 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) ...@@ -244,7 +244,7 @@ musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh)
} else { } else {
qh->frame = urb->start_frame; qh->frame = urb->start_frame;
/* enable SOF interrupt so we can count down */ /* enable SOF interrupt so we can count down */
DBG(1,"SOF for %d\n", epnum); DBG(1, "SOF for %d\n", epnum);
#if 1 /* ifndef CONFIG_ARCH_DAVINCI */ #if 1 /* ifndef CONFIG_ARCH_DAVINCI */
musb_writeb(mbase, MUSB_INTRUSBE, 0xff); musb_writeb(mbase, MUSB_INTRUSBE, 0xff);
#endif #endif
...@@ -439,10 +439,9 @@ static inline u16 musb_h_flush_rxfifo(struct musb_hw_ep *hw_ep, u16 csr) ...@@ -439,10 +439,9 @@ static inline u16 musb_h_flush_rxfifo(struct musb_hw_ep *hw_ep, u16 csr)
* leave toggle alone (may not have been saved yet) * leave toggle alone (may not have been saved yet)
*/ */
csr |= MUSB_RXCSR_FLUSHFIFO | MUSB_RXCSR_RXPKTRDY; csr |= MUSB_RXCSR_FLUSHFIFO | MUSB_RXCSR_RXPKTRDY;
csr &= ~( MUSB_RXCSR_H_REQPKT csr &= ~(MUSB_RXCSR_H_REQPKT
| MUSB_RXCSR_H_AUTOREQ | MUSB_RXCSR_H_AUTOREQ
| MUSB_RXCSR_AUTOCLEAR | MUSB_RXCSR_AUTOCLEAR);
);
/* write 2x to allow double buffering */ /* write 2x to allow double buffering */
musb_writew(hw_ep->regs, MUSB_RXCSR, csr); musb_writew(hw_ep->regs, MUSB_RXCSR, csr);
...@@ -614,7 +613,7 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep) ...@@ -614,7 +613,7 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep)
*/ */
static void musb_ep_program(struct musb *musb, u8 epnum, static void musb_ep_program(struct musb *musb, u8 epnum,
struct urb *urb, unsigned int is_out, struct urb *urb, unsigned int is_out,
u8 * buf, u32 len) u8 *buf, u32 len)
{ {
struct dma_controller *dma_controller; struct dma_controller *dma_controller;
struct dma_channel *dma_channel; struct dma_channel *dma_channel;
...@@ -1270,7 +1269,7 @@ void musb_host_tx(struct musb *musb, u8 epnum) ...@@ -1270,7 +1269,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
if (qh->segsize < qh->maxpacket) if (qh->segsize < qh->maxpacket)
done = true; done = true;
else if (qh->offset == urb->transfer_buffer_length else if (qh->offset == urb->transfer_buffer_length
&& !(urb-> transfer_flags && !(urb->transfer_flags
& URB_ZERO_PACKET)) & URB_ZERO_PACKET))
done = true; done = true;
if (!done) { if (!done) {
...@@ -1945,13 +1944,12 @@ static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh, int is_in) ...@@ -1945,13 +1944,12 @@ static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh, int is_in)
} else { } else {
musb_h_tx_flush_fifo(ep); musb_h_tx_flush_fifo(ep);
csr = musb_readw(epio, MUSB_TXCSR); csr = musb_readw(epio, MUSB_TXCSR);
csr &= ~( MUSB_TXCSR_AUTOSET csr &= ~(MUSB_TXCSR_AUTOSET
| MUSB_TXCSR_DMAENAB | MUSB_TXCSR_DMAENAB
| MUSB_TXCSR_H_RXSTALL | MUSB_TXCSR_H_RXSTALL
| MUSB_TXCSR_H_NAKTIMEOUT | MUSB_TXCSR_H_NAKTIMEOUT
| MUSB_TXCSR_H_ERROR | MUSB_TXCSR_H_ERROR
| MUSB_TXCSR_TXPKTRDY | MUSB_TXCSR_TXPKTRDY);
);
musb_writew(epio, MUSB_TXCSR, csr); musb_writew(epio, MUSB_TXCSR, csr);
/* REVISIT may need to clear FLUSHFIFO ... */ /* REVISIT may need to clear FLUSHFIFO ... */
musb_writew(epio, MUSB_TXCSR, csr); musb_writew(epio, MUSB_TXCSR, csr);
...@@ -2139,7 +2137,7 @@ static int musb_bus_resume(struct usb_hcd *hcd) ...@@ -2139,7 +2137,7 @@ static int musb_bus_resume(struct usb_hcd *hcd)
const struct hc_driver musb_hc_driver = { const struct hc_driver musb_hc_driver = {
.description = "musb-hcd", .description = "musb-hcd",
.product_desc = "MUSB HDRC host driver", .product_desc = "MUSB HDRC host driver",
.hcd_priv_size = sizeof (struct musb), .hcd_priv_size = sizeof(struct musb),
.flags = HCD_USB2 | HCD_MEMORY, .flags = HCD_USB2 | HCD_MEMORY,
/* not using irq handler or reset hooks from usbcore, since /* not using irq handler or reset hooks from usbcore, since
......
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