46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
From: Ben Hutchings <ben@decadent.org.uk>
|
|
Date: Sun, 24 May 2015 04:21:46 +0100
|
|
Subject: USB: musb: Fix order of conditions for assigning end point operations
|
|
Forwarded: http://mid.gmane.org/1432438052.12412.98.camel@decadent.org.uk
|
|
|
|
Currently we always assign one of the two common implementations of
|
|
ep_offset and ep_select operations, overwriting any platform-specific
|
|
implementations.
|
|
|
|
Fixes: d026e9c76aac ("usb: musb: Change end point selection to use new IO access")
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
---
|
|
drivers/usb/musb/musb_core.c | 14 +++++++-------
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/usb/musb/musb_core.c
|
|
+++ b/drivers/usb/musb/musb_core.c
|
|
@@ -2026,13 +2026,7 @@ musb_init_controller(struct device *dev,
|
|
if (musb->ops->quirks)
|
|
musb->io.quirks = musb->ops->quirks;
|
|
|
|
- /* At least tusb6010 has it's own offsets.. */
|
|
- if (musb->ops->ep_offset)
|
|
- musb->io.ep_offset = musb->ops->ep_offset;
|
|
- if (musb->ops->ep_select)
|
|
- musb->io.ep_select = musb->ops->ep_select;
|
|
-
|
|
- /* ..and some devices use indexed offset or flat offset */
|
|
+ /* Most devices use indexed offset or flat offset */
|
|
if (musb->io.quirks & MUSB_INDEXED_EP) {
|
|
musb->io.ep_offset = musb_indexed_ep_offset;
|
|
musb->io.ep_select = musb_indexed_ep_select;
|
|
@@ -2041,6 +2035,12 @@ musb_init_controller(struct device *dev,
|
|
musb->io.ep_select = musb_flat_ep_select;
|
|
}
|
|
|
|
+ /* At least tusb6010 has its own offsets */
|
|
+ if (musb->ops->ep_offset)
|
|
+ musb->io.ep_offset = musb->ops->ep_offset;
|
|
+ if (musb->ops->ep_select)
|
|
+ musb->io.ep_select = musb->ops->ep_select;
|
|
+
|
|
if (musb->ops->fifo_mode)
|
|
fifo_mode = musb->ops->fifo_mode;
|
|
else
|