summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/udc/aspeed-vhub
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: fix various indentation issuesColin Ian King2019-02-071-1/+1
| | | | | | | There are a bunch of various indentation issues, clean these up. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: gadget: aspeed: fix typoMatteo Croce2019-01-281-1/+1
| | | | | | | Fix spelling mistake: "lenght" -> "length" Signed-off-by: Matteo Croce <mcroce@redhat.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: gadget: aspeed-vhub: constify usb_gadget_ops structureJulia Lawall2018-11-261-1/+1
| | | | | | | | | | | The usb_gadget_ops structure can be const as it is only stored in the ops field of a usb_gadget structure and this field is const. Done with the help of Coccinelle. Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: gadget: fix spelling mistakeis "[En]queing" -> "[En]queuing"Colin Ian King2018-10-021-1/+1
| | | | | | | Trivial fix to spelling mistakes in debug warning messages Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: gadget: aspeed: Workaround memory ordering issueBenjamin Herrenschmidt2018-07-173-3/+46
| | | | | | | | | | The Aspeed SoC has a memory ordering issue that (thankfully) only affects the USB gadget device. A read back is necessary after writing to memory and before letting the device DMA from it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb: gadget: aspeed-vhub: Fix SETUP packets with OUT data phaseBenjamin Herrenschmidt2018-07-171-1/+8
| | | | | | | | | | | | | | | | | A couple of bugs in the driver are preventing SETUP packets with an OUT data phase from working properly. Interestingly those are incredibly rare (RNDIS typically uses them and thus is broken without this fix). The main problem was an incorrect register offset being applied for arming RX on EP0. The other problem relates to stalling such a packet before the data phase, in which case we don't get an ACK cycle, and get the next SETUP packet directly, so we shouldn't reject it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
* usb/gadget: aspeed-vhub: add USB_LIBCOMPOSITE dependencyArnd Bergmann2018-07-061-0/+1
| | | | | | | | | | | | Without that option, we run into a link failure: drivers/usb/gadget/udc/aspeed-vhub/hub.o: In function `ast_vhub_std_hub_request': hub.c:(.text+0x5b0): undefined reference to `usb_gadget_get_string' Fixes: 7ecca2a4080c ("usb/gadget: Add driver for Aspeed SoC virtual hub") Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb/gadget: Add driver for Aspeed SoC virtual hubBenjamin Herrenschmidt2018-05-158-0/+3697
The Aspeed BMC SoCs support a "virtual hub" function. It provides some HW support for a top-level USB2 hub behind which sit 5 gadget "ports". This driver adds support for the full functionality, emulating the hub standard requests and exposing 5 UDC gadget drivers corresponding to the ports. The hub itself has HW provided dedicated EP0 and EP1 (the latter for hub interrupts). It also has dedicated EP0s for each function. For other endpoints, there's a pool of 15 "generic" endpoints that are shared among the ports. The driver relies on my previous patch adding a "dispose" EP op to handle EP allocation between ports. EPs are allocated from the shared pool in the UDC "match_ep" callback and assigned to the UDC instance (added to the gadget ep_list). When the composite driver gets unbound, the new hook will allow the UDC to clean things up and return those EPs to the shared pool. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>