| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
s/DEFULT/DEFAULT/, no functional changes.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
|
| |
convert to new style UDC registration and remove
the global 'the_controller' pointer.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
| |
using udc_start()/udc_stop() as we should.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
|
| |
with this patch we can finally remove the global
"the_controller" pointer.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
|
| |
with this patch we can finally remove the global
"the controller" pointer.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
|
| |
with this patch we can finally remove the global
"the_controller" pointer.
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
|
| |
in most cases, we can fetch our structure by
calling dev_get_drvdata().
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|