summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_gadget.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-03-09 19:37:54 +0300
committerArnd Bergmann <arnd@arndb.de>2018-03-26 16:57:12 +0300
commita9762b704f5d5e167bbc261573621782b90efbc4 (patch)
tree28bfb99ac7c73aa508701c4d9b361998e87f439b /drivers/usb/musb/musb_gadget.c
parent03f4c9abd73284193f70e64da1a266d393650530 (diff)
downloadlinux-a9762b704f5d5e167bbc261573621782b90efbc4.tar.xz
usb: musb: remove blackfin port
The blackfin architecture is getting removed, so we can clean up all the special cases in the musb driver. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Aaron Wu <aaron.wu@analog.com> Acked-by: Bin Liu <b-liu@ti.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> [arnd: adding in fixups from Aaron and Stephen] Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r--drivers/usb/musb/musb_gadget.c56
1 files changed, 7 insertions, 49 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 293e5b8da565..e564695c6c8d 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -995,15 +995,11 @@ static int musb_gadget_enable(struct usb_ep *ep,
/* Set TXMAXP with the FIFO size of the endpoint
* to disable double buffering mode.
*/
- if (musb->double_buffer_not_ok) {
- musb_writew(regs, MUSB_TXMAXP, hw_ep->max_packet_sz_tx);
- } else {
- if (can_bulk_split(musb, musb_ep->type))
- musb_ep->hb_mult = (hw_ep->max_packet_sz_tx /
- musb_ep->packet_sz) - 1;
- musb_writew(regs, MUSB_TXMAXP, musb_ep->packet_sz
- | (musb_ep->hb_mult << 11));
- }
+ if (can_bulk_split(musb, musb_ep->type))
+ musb_ep->hb_mult = (hw_ep->max_packet_sz_tx /
+ musb_ep->packet_sz) - 1;
+ musb_writew(regs, MUSB_TXMAXP, musb_ep->packet_sz
+ | (musb_ep->hb_mult << 11));
csr = MUSB_TXCSR_MODE | MUSB_TXCSR_CLRDATATOG;
if (musb_readw(regs, MUSB_TXCSR)
@@ -1038,11 +1034,8 @@ static int musb_gadget_enable(struct usb_ep *ep,
/* Set RXMAXP with the FIFO size of the endpoint
* to disable double buffering mode.
*/
- if (musb->double_buffer_not_ok)
- musb_writew(regs, MUSB_RXMAXP, hw_ep->max_packet_sz_tx);
- else
- musb_writew(regs, MUSB_RXMAXP, musb_ep->packet_sz
- | (musb_ep->hb_mult << 11));
+ musb_writew(regs, MUSB_RXMAXP, musb_ep->packet_sz
+ | (musb_ep->hb_mult << 11));
/* force shared fifo to OUT-only mode */
if (hw_ep->is_shared_fifo) {
@@ -1680,40 +1673,6 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
return 0;
}
-#ifdef CONFIG_BLACKFIN
-static struct usb_ep *musb_match_ep(struct usb_gadget *g,
- struct usb_endpoint_descriptor *desc,
- struct usb_ss_ep_comp_descriptor *ep_comp)
-{
- struct usb_ep *ep = NULL;
-
- switch (usb_endpoint_type(desc)) {
- case USB_ENDPOINT_XFER_ISOC:
- case USB_ENDPOINT_XFER_BULK:
- if (usb_endpoint_dir_in(desc))
- ep = gadget_find_ep_by_name(g, "ep5in");
- else
- ep = gadget_find_ep_by_name(g, "ep6out");
- break;
- case USB_ENDPOINT_XFER_INT:
- if (usb_endpoint_dir_in(desc))
- ep = gadget_find_ep_by_name(g, "ep1in");
- else
- ep = gadget_find_ep_by_name(g, "ep2out");
- break;
- default:
- break;
- }
-
- if (ep && usb_gadget_ep_match_desc(g, ep, desc, ep_comp))
- return ep;
-
- return NULL;
-}
-#else
-#define musb_match_ep NULL
-#endif
-
static int musb_gadget_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
static int musb_gadget_stop(struct usb_gadget *g);
@@ -1727,7 +1686,6 @@ static const struct usb_gadget_ops musb_gadget_operations = {
.pullup = musb_gadget_pullup,
.udc_start = musb_gadget_start,
.udc_stop = musb_gadget_stop,
- .match_ep = musb_match_ep,
};
/* ----------------------------------------------------------------------- */