summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: renesas_usbhs: modify pipe sequence settingsKuninori Morimoto2011-10-134-7/+14
| | | | | | | | renesas_usbhs can manually set DATA0/DATA1. This patch is prepare for mod_host support Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: disable auto paket start on usbhs_pkt_push()Kuninori Morimoto2011-10-132-2/+1
| | | | | | | | | | | | | Automatically packet start by usbhs_pkt_push() was useful. But the pushed packet will be called twice if new packet was pushed on usbhs_pkt :: done callback. (1st is called by usbhs_pkt_push(), 2nd is called by usbhsf_pkt_handler()) This patch disables automatic packet start, and clarified packet start timing. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: move done callback to struct usbhs_pktKuninori Morimoto2011-10-135-33/+32
| | | | | | | | | transfer done function was registered in struct struct usbhs_pipe_info. It was good for mod_gadget, but not good for mod_host. This function move it to struct usbhs_pkt. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: add usbhs_pipe_name()Kuninori Morimoto2011-10-132-1/+7
| | | | | | | pipe name is usefull function for mod_xxx Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: add device select support in ↵Kuninori Morimoto2011-10-133-5/+18
| | | | | | | | | usbhs_pipe_config_update() device select method will be used on mod_host Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: add struct usbhs_priv to packet done functionKuninori Morimoto2011-10-134-5/+7
| | | | | | | | | There was no method to get struct usbhs_priv when packet transfer done function was called. This patch allow that callback function receive it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: add usbhs_dcp_dir_for_host()Kuninori Morimoto2011-10-133-1/+12
| | | | | | | | | renesas_usbhs device needs special bit settings if it was mod_host and dcp pipe. This patch support it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: remove unneeded parameter from usbhs_mod_is_host()Kuninori Morimoto2011-10-133-4/+4
| | | | | | | | it was possible to get usbhs_mod from usbhs_priv. this patch remove unneeded parameter. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: move usbhs_usbreq_get/set_val() to common.cKuninori Morimoto2011-10-134-30/+33
| | | | | | | | | usbhs_usbreq_get/set_val() functions were in pipe.c file, but it is irrelevant to pipe. this patch move it to common.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: move usbhsp_type() to usbhs_pipe_type()Kuninori Morimoto2011-10-132-18/+20
| | | | | | | | Pipe type check macro will be used in other files. This patch move local macro to global macro. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: add usbhs_bus_get_speed()Kuninori Morimoto2011-10-135-19/+18
| | | | | | | | | | | | | | | current mod_gadget had got usb speed on usbhsg_irq_dev_state() which is status change interrupt callback function. And the usb speed data was included in its parameter. But this style works for mod_gadget, but doesn't work for mod_host which isn't interrupted when device status was changed. This patch add usbhs_bus_get_speed() to solve this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: add bus control functionsKuninori Morimoto2011-10-133-1/+50
| | | | | | | this patch add DVSTCTR control function for HOST support Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: change usbhsc_bus_ctrl() to usbsc_set_buswait()Kuninori Morimoto2011-10-132-10/+7
| | | | | | | | | renesas_usbhs will have register DVSTCTR control function for HOST support. This patch changes usbhsc_bus_ctrl() to usbsc_set_buswait(), to remove DVSTCTR access from it, Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: tidyup INTENB0 methodKuninori Morimoto2011-10-131-1/+10
| | | | | | | | | | | This patch tidyup Interrupt Enable Register 0 (INTENB0) which has relationship with picky BEMPENB/BRDYENB. - add explain comment - ignore nonsense 0 write case Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: struct usbhs_pipe hold handlerKuninori Morimoto2011-10-134-13/+16
| | | | | | | | packet handler had moved to struct usbhs_pipe from struct usbhsg_uep. it is preparation of mod_host support Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: each pipe hold maxpacket sizeKuninori Morimoto2011-10-132-21/+10
| | | | | | | | | | | | | Current renesas_usbhs pipe accessed DCPMAXP/PIPEMAXP register to get own maxpacket size every time. But maxpacket size isn't changed after pipe start, and register access is too slow. This patch adds new maxp variable to keep own maxpacket. And un-used function are removed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: remove desc from usbhs_pipe_mallocKuninori Morimoto2011-10-133-38/+45
| | | | | | | | | | | Current usbhs_pipe_malloc() used usb_endpoint_descriptor to get necessary information. It was very good for mod_gadget which allocate pipe in runtime, but is not good for mod_host which allocate pipe in initial timing. This patch remove usb_endpoint_descriptor from usbhs_pipe_malloc() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: move USBHSF_PKT_xxx to pipe.cKuninori Morimoto2011-10-132-15/+16
| | | | | | | | | There is no longer necessity that USBHSF_PKT_xxx are in fifo.h. it are used in only fifo.c now. This patch move it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas_usbhs: add suspend/resume supportKuninori Morimoto2011-10-131-5/+64
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: storage: add superspeed supportFelipe Balbi2011-10-134-13/+190
| | | | | | | | | this patch adds superspeed descriptors for the storage gadgets. Acked-by: Michal Nazarewicz <mina86@mina86.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: fix typo for default U1/U2 exit latenciesFelipe Balbi2011-10-132-4/+4
| | | | | | s/DEFULT/DEFAULT/, no functional changes. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597: convert to new styleFelipe Balbi2011-10-131-29/+8
| | | | | | | convert to new style UDC registration and remove the global 'the_controller' pointer. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: renesas: convert to new styleFelipe Balbi2011-10-131-52/+9
| | | | | | using udc_start()/udc_stop() as we should. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: net2280: convert to new styleFelipe Balbi2011-10-131-53/+17
| | | | | | | with this patch we can finally remove the global "the_controller" pointer. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: net2272: convert to new styleFelipe Balbi2011-10-131-53/+19
| | | | | | | with this patch we can finally remove the global "the controller" pointer. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: langwell: convert to new styleFelipe Balbi2011-10-132-48/+21
| | | | | | | with this patch we can finally remove the global "the_controller" pointer. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: langwell: don't use the_controller when it's not neededFelipe Balbi2011-10-131-8/+8
| | | | | | | in most cases, we can fetch our structure by calling dev_get_drvdata(). Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: at91_udc: change french comments to englishRobert Schwebel2011-10-131-8/+8
| | | | | | | | | While being there, change C++ style comments to /* */. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: linux-usb@vger.kernel.org Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: pxa25x: is_vbus_present is goneArnd Bergmann2011-10-131-7/+1
| | | | | | | | A recent commit obsoleted the is_vbus_present function, so we must not use it any more. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: storage: fix mass storage gadgets to work with Synopsys UDCPaul Zimmerman2011-10-132-18/+18
| | | | | | | | | | | | | | | | | The Synopsys USB device controller requires all OUT transfer request lengths to be aligned to max packet size. The mass storage gadgets do not meet this requirement for Super Speed. The gadgets already have a function which performs this alignment for CBW packets, so use it for data packets too. The alternative would be to implement bounce buffers in the DWC3 driver, but that could have a significant impact on performance. This version is based upon a more-correct patch written by Alan Stern. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* USB: gadget: f_midi: allow a dynamic number of input and output portsDaniel Mack2011-10-132-108/+191
| | | | | | | | | | | | | | The code in the MIDI gadget was already sort of prepared for multi-port configuration, so the streaming logic itself didn't need much tweaking. However, the descriptors change when the number of ports do, and so some rework of the the preparation algorithms were necessary. Successfully tested on Linux and Max OS X hosts for both input and output streams. Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* USB: gadget: midi: refactor the device codeDaniel Mack2011-10-132-1197/+80
| | | | | | | | | | | | | | | Make use of the newly added MIDI function in f_midi.c and strip down the MIDI gadget code radically. Also use the generic framework function to avoid code duplication and rename some symbols to bring them in sync with other code in the gadget framework. [ balbi@ti.com : fix Section mismatch warnings. rebased on top of usb_speed_string() patch to avoid conflicts. ] Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* USB: gadget: midi: add midi function driverDaniel Mack2011-10-131-0/+923
| | | | | | | | | | | | | | | | This patch adds f_midi.c to implement a USB gadget function that works with the composite framework, so it can be combined with other USB functions. The code for the ALSA/MIDI logic was taken from the midi device gadget, other parts have been rewritten to benefit from the dynamic descriptor allocation features. This was successfully tested on an OMAP3 board. Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb gadget: fix langwell_udc.c build errorRandy Dunlap2011-10-131-14/+14
| | | | | | | | | | | | | | Move function to fix langwell_udc.c build error: drivers/usb/gadget/langwell_udc.c: In function 'show_langwell_udc': drivers/usb/gadget/langwell_udc.c:1693:3: error: implicit declaration of function 'lpm_device_speed' drivers/usb/gadget/langwell_udc.c: At top level: drivers/usb/gadget/langwell_udc.c:2637:37: error: conflicting types for 'lpm_device_speed' drivers/usb/gadget/langwell_udc.c:1693:20: note: previous implicit declaration of 'lpm_device_speed' was here Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Felipe Balbi <balbi@ti.com> Cc: linux-usb@vger.kernel.org
* usb: gadget: r8a66597-udc: add support for SUDMACYoshihiro Shimoda2011-10-133-20/+430
| | | | | | | | | SH7757 has a USB function with internal DMA controller (SUDMAC). This patch supports the SUDMAC. The SUDMAC is incompatible with general-purpose DMAC. So, it doesn't use dmaengine. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: use dev_*() instead of printk()Yoshihiro Shimoda2011-10-132-40/+60
| | | | | | | This patch also fix the balance of braces. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: add function for external controllerYoshihiro Shimoda2011-10-131-15/+19
| | | | | | | | | | R8A66597 has the pin of WR0 and WR1. So, if one write-pin of CPU connects to the pins, we have to change the setting of FIFOSEL register in the controller. If we don't change the setting, the controller cannot send the data of odd length. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: change prototype of r8a66597_write_fifoYoshihiro Shimoda2011-10-132-4/+4
| | | | | Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* USB: fix ehci alignment errorHarro Haan2011-10-101-1/+1
| | | | | | | | | | | The Kirkwood gave an unaligned memory access error on line 742 of drivers/usb/host/echi-hcd.c: "ehci->last_periodic_enable = ktime_get_real();" Signed-off-by: Harro Haan <hrhaan@gmail.com> Cc: stable <stable@kernel.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi_sio: add PID for Sony Ericsson UrbanHakan Kvist2011-10-042-2/+6
| | | | | | | | | Add PID 0xfc8a, 0xfc8b for device Sony Ericsson Urban Signed-off-by: Hakan Kvist <hakan.kvist@sonyericsson.com> Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: Add module.h to various dwc3 driversPaul Gortmaker2011-10-042-0/+2
| | | | | | | | These files uses the full set of MODULE_ macros and so need to include module.h directly. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: convert structures into bitshiftsFelipe Balbi2011-10-043-137/+48
| | | | | | | | | our parameter structures need to be written to HW, so instead of assuming little endian, we convert those into bit shifts. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: gadget: allow clock gating to workFelipe Balbi2011-10-042-0/+14
| | | | | | | | | | The dwc3 core has internal clock gating support. Let's allow that to happen by clearing the disable bit in GCTL register. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: core: cache GHWPARAMS* registersFelipe Balbi2011-10-041-0/+17
| | | | | | | | cache the contents of GHWPARAMS* registers in our device structure for easy access. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: add struct dwc3_hwparamsFelipe Balbi2011-10-041-0/+26
| | | | | | | | | That structure will hold a copy of readonly GHWPARAMS* registers for ease accessing by the driver. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: gadget: implement streams supportFelipe Balbi2011-10-043-12/+36
| | | | | | | | | | | | | The following patch adds support for streams to dwc3 driver. While at that, also fix one small issue on endpoint disable where we should clear all flags not only ENABLED. Reviewied-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: gadget: add support for BurstsFelipe Balbi2011-10-041-0/+1
| | | | | | | | We already have the value from gadget drivers, just need to pass it to our controller. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: gadget: fix DMA offset calculationPaul Zimmerman2011-10-041-1/+1
| | | | | | | | Fix offset calculation in dwc3_trb_dma_offset() Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: gadget: make DWC3_EP_WEDGE do the right thingPaul Zimmerman2011-10-041-1/+5
| | | | | | | | | | | | | This makes DWC3_EP_WEDGE do the right thing, which is prevent DWC3_EP_WEDGE from ever being cleared by a ClearFeature(HALT) command. [ balbi@ti.com : allowed set_wedge to send SetHalt command to controller ] Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: gadget: driver should not wait for RxFIFO to drainPaul Zimmerman2011-10-041-19/+0
| | | | | | | | | | | | | | | An older version of the databook said to wait for the FIFO to drain, but that has been removed from the newer databooks. Waiting for RxFIFO to drain caused problems when testing against one of the host controllers available in the market. After talking to one of the RTL engineers, he stated that we should _not_ wait for RxFIFO to drain. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud