diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-03-20 15:11:14 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-05-26 11:47:13 -0400 |
commit | 47a82730b54c2757ca5c89a82a9727ca0129af9d (patch) | |
tree | 7603a178dcef2e7d959573d55c10a1e184f28461 /drivers/usb | |
parent | be780381772909ba4a89805945995b9f10c59ca8 (diff) |
usb: musb: Fix platform code being unable to override ep access ops
musb-core was setting the ops to the default indexed or flat handlers after
checking for platform overrides. Reverse the order of this so that platform
overrides actually work.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 575a1f8135ae..d878aee404bf 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2032,13 +2032,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
2032 | if (musb->ops->quirks) | 2032 | if (musb->ops->quirks) |
2033 | musb->io.quirks = musb->ops->quirks; | 2033 | musb->io.quirks = musb->ops->quirks; |
2034 | 2034 | ||
2035 | /* At least tusb6010 has it's own offsets.. */ | 2035 | /* Set default ep access to indexed offset or flat offset ops */ |
2036 | if (musb->ops->ep_offset) | ||
2037 | musb->io.ep_offset = musb->ops->ep_offset; | ||
2038 | if (musb->ops->ep_select) | ||
2039 | musb->io.ep_select = musb->ops->ep_select; | ||
2040 | |||
2041 | /* ..and some devices use indexed offset or flat offset */ | ||
2042 | if (musb->io.quirks & MUSB_INDEXED_EP) { | 2036 | if (musb->io.quirks & MUSB_INDEXED_EP) { |
2043 | musb->io.ep_offset = musb_indexed_ep_offset; | 2037 | musb->io.ep_offset = musb_indexed_ep_offset; |
2044 | musb->io.ep_select = musb_indexed_ep_select; | 2038 | musb->io.ep_select = musb_indexed_ep_select; |
@@ -2046,6 +2040,11 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
2046 | musb->io.ep_offset = musb_flat_ep_offset; | 2040 | musb->io.ep_offset = musb_flat_ep_offset; |
2047 | musb->io.ep_select = musb_flat_ep_select; | 2041 | musb->io.ep_select = musb_flat_ep_select; |
2048 | } | 2042 | } |
2043 | /* And override them with platform specific ops if specified. */ | ||
2044 | if (musb->ops->ep_offset) | ||
2045 | musb->io.ep_offset = musb->ops->ep_offset; | ||
2046 | if (musb->ops->ep_select) | ||
2047 | musb->io.ep_select = musb->ops->ep_select; | ||
2049 | 2048 | ||
2050 | if (musb->ops->fifo_mode) | 2049 | if (musb->ops->fifo_mode) |
2051 | fifo_mode = musb->ops->fifo_mode; | 2050 | fifo_mode = musb->ops->fifo_mode; |