diff options
author | Tony Lindgren <tony@atomide.com> | 2014-11-24 14:05:04 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-25 09:47:07 -0500 |
commit | 8a77f05aa39be879535f22a9757e703581fa1392 (patch) | |
tree | a85728ec2d5a625c438e1d91de6ce90aa6f8c66b | |
parent | d026e9c76aac3632af174cf02d5c94defa5e6026 (diff) |
usb: musb: Pass fifo_mode in platform data
This allows setting the correct fifo_mode when multiple
MUSB glue layers are built-in.
Cc: Fabio Baltieri <fabio.baltieri@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Apelete Seketeli <apelete@seketeli.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/musb/blackfin.c | 1 | ||||
-rw-r--r-- | drivers/usb/musb/da8xx.c | 1 | ||||
-rw-r--r-- | drivers/usb/musb/jz4740.c | 1 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 21 | ||||
-rw-r--r-- | drivers/usb/musb/ux500.c | 1 |
5 files changed, 10 insertions, 15 deletions
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 77f9f5535a88..a441a2de8619 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -474,6 +474,7 @@ static const struct musb_platform_ops bfin_ops = { | |||
474 | .writew = bfin_writew, | 474 | .writew = bfin_writew, |
475 | .readl = bfin_readl, | 475 | .readl = bfin_readl, |
476 | .writel = bfin_writel, | 476 | .writel = bfin_writel, |
477 | .fifo_mode = 2, | ||
477 | .read_fifo = bfin_read_fifo, | 478 | .read_fifo = bfin_read_fifo, |
478 | .write_fifo = bfin_write_fifo, | 479 | .write_fifo = bfin_write_fifo, |
479 | .enable = bfin_musb_enable, | 480 | .enable = bfin_musb_enable, |
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index 9a6171300931..9a9c82a4d35d 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c | |||
@@ -462,6 +462,7 @@ static const struct musb_platform_ops da8xx_ops = { | |||
462 | .init = da8xx_musb_init, | 462 | .init = da8xx_musb_init, |
463 | .exit = da8xx_musb_exit, | 463 | .exit = da8xx_musb_exit, |
464 | 464 | ||
465 | .fifo_mode = 2, | ||
465 | .enable = da8xx_musb_enable, | 466 | .enable = da8xx_musb_enable, |
466 | .disable = da8xx_musb_disable, | 467 | .disable = da8xx_musb_disable, |
467 | 468 | ||
diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c index 40e98747d17f..bb7b26325a74 100644 --- a/drivers/usb/musb/jz4740.c +++ b/drivers/usb/musb/jz4740.c | |||
@@ -107,6 +107,7 @@ static int jz4740_musb_exit(struct musb *musb) | |||
107 | 107 | ||
108 | static const struct musb_platform_ops jz4740_musb_ops = { | 108 | static const struct musb_platform_ops jz4740_musb_ops = { |
109 | .quirks = MUSB_INDEXED_EP, | 109 | .quirks = MUSB_INDEXED_EP, |
110 | .fifo_mode = 2, | ||
110 | .init = jz4740_musb_init, | 111 | .init = jz4740_musb_init, |
111 | .exit = jz4740_musb_exit, | 112 | .exit = jz4740_musb_exit, |
112 | }; | 113 | }; |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 1ff944a07359..1388d99b39e0 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1116,21 +1116,7 @@ static void musb_shutdown(struct platform_device *pdev) | |||
1116 | * We don't currently use dynamic fifo setup capability to do anything | 1116 | * We don't currently use dynamic fifo setup capability to do anything |
1117 | * more than selecting one of a bunch of predefined configurations. | 1117 | * more than selecting one of a bunch of predefined configurations. |
1118 | */ | 1118 | */ |
1119 | #if defined(CONFIG_USB_MUSB_TUSB6010) \ | 1119 | static ushort fifo_mode; |
1120 | || defined(CONFIG_USB_MUSB_TUSB6010_MODULE) \ | ||
1121 | || defined(CONFIG_USB_MUSB_OMAP2PLUS) \ | ||
1122 | || defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE) \ | ||
1123 | || defined(CONFIG_USB_MUSB_AM35X) \ | ||
1124 | || defined(CONFIG_USB_MUSB_AM35X_MODULE) \ | ||
1125 | || defined(CONFIG_USB_MUSB_DSPS) \ | ||
1126 | || defined(CONFIG_USB_MUSB_DSPS_MODULE) | ||
1127 | static ushort fifo_mode = 4; | ||
1128 | #elif defined(CONFIG_USB_MUSB_UX500) \ | ||
1129 | || defined(CONFIG_USB_MUSB_UX500_MODULE) | ||
1130 | static ushort fifo_mode = 5; | ||
1131 | #else | ||
1132 | static ushort fifo_mode = 2; | ||
1133 | #endif | ||
1134 | 1120 | ||
1135 | /* "modprobe ... fifo_mode=1" etc */ | 1121 | /* "modprobe ... fifo_mode=1" etc */ |
1136 | module_param(fifo_mode, ushort, 0); | 1122 | module_param(fifo_mode, ushort, 0); |
@@ -2043,6 +2029,11 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
2043 | musb->io.ep_select = musb_flat_ep_select; | 2029 | musb->io.ep_select = musb_flat_ep_select; |
2044 | } | 2030 | } |
2045 | 2031 | ||
2032 | if (musb->ops->fifo_mode) | ||
2033 | fifo_mode = musb->ops->fifo_mode; | ||
2034 | else | ||
2035 | fifo_mode = 4; | ||
2036 | |||
2046 | if (musb->ops->fifo_offset) | 2037 | if (musb->ops->fifo_offset) |
2047 | musb->io.fifo_offset = musb->ops->fifo_offset; | 2038 | musb->io.fifo_offset = musb->ops->fifo_offset; |
2048 | else | 2039 | else |
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index 06e8b3523a0a..abf72728825f 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c | |||
@@ -191,6 +191,7 @@ static const struct musb_platform_ops ux500_ops = { | |||
191 | .quirks = MUSB_INDEXED_EP, | 191 | .quirks = MUSB_INDEXED_EP, |
192 | .init = ux500_musb_init, | 192 | .init = ux500_musb_init, |
193 | .exit = ux500_musb_exit, | 193 | .exit = ux500_musb_exit, |
194 | .fifo_mode = 5, | ||
194 | 195 | ||
195 | .set_vbus = ux500_musb_set_vbus, | 196 | .set_vbus = ux500_musb_set_vbus, |
196 | }; | 197 | }; |