mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
usb: musb: fix order of conditions for assigning end point operations
Currently we always assign one of the two common implementations of
ep_offset and ep_select operations, overwriting any platform-specific
implementations.
Fixes: d026e9c76a
("usb: musb: Change end point selection to use ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
ca4de53c52
commit
da96cfc133
1 changed files with 7 additions and 7 deletions
|
@ -2021,13 +2021,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
|
||||||
if (musb->ops->quirks)
|
if (musb->ops->quirks)
|
||||||
musb->io.quirks = musb->ops->quirks;
|
musb->io.quirks = musb->ops->quirks;
|
||||||
|
|
||||||
/* At least tusb6010 has it's own offsets.. */
|
/* Most devices use indexed offset or flat offset */
|
||||||
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 */
|
|
||||||
if (musb->io.quirks & MUSB_INDEXED_EP) {
|
if (musb->io.quirks & MUSB_INDEXED_EP) {
|
||||||
musb->io.ep_offset = musb_indexed_ep_offset;
|
musb->io.ep_offset = musb_indexed_ep_offset;
|
||||||
musb->io.ep_select = musb_indexed_ep_select;
|
musb->io.ep_select = musb_indexed_ep_select;
|
||||||
|
@ -2036,6 +2030,12 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
|
||||||
musb->io.ep_select = musb_flat_ep_select;
|
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)
|
if (musb->ops->fifo_mode)
|
||||||
fifo_mode = musb->ops->fifo_mode;
|
fifo_mode = musb->ops->fifo_mode;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue