Age | Commit message (Collapse) | Author | Files | Lines |
|
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.
The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107
Signed-off-by: Thomas Meyer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch cares latest USB_SPEED_SUPER support.
renesas_usbhs can not use super-speed, but can use full/high speed.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
current renesas_usbhs is using new style udc_start/stop from
af1d7056a5c1e5eaaf807ddd1423101db84668d0
(usb: gadget: renesas: convert to new style).
But current renesas_usbhs driver didn't care about gadget.dev.driver
when udc_stop. it cause rmmod oops.
This patch care it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
current renesas_usbhs is using new style udc_start/stop from
af1d7056a5c1e5eaaf807ddd1423101db84668d0
(usb: gadget: renesas: convert to new style).
cable disconnected signal was needed.
This patch fixup it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
current renesas_usbhs is using new style udc_start/stop from
af1d7056a5c1e5eaaf807ddd1423101db84668d0
(usb: gadget: renesas: convert to new style).
But bind() function will fail if it was called before
device_register() (or device_add()).
This patch modifies this issue.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch converts the drivers in drivers/usb/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Felipe Balbi <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Kuninori Morimoto <[email protected]>
Cc: Sarah Sharp <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Peter Korsgaard <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
resolved conflicts:
drivers/media/video/mx3_camera.c
|
|
fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves usb/renesas driver to use new enum
Signed-off-by: Vinod Koul <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Kuninori Morimoto <[email protected]>
|
|
new endpoint should start from DATA0,
but mod_host didn't care it.
This patch fix it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
renesas_usbhs is caring pipe type and its direction.
but current usbhs_endpoint_alloc() didn't check direction.
this patch modify it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix up the following section mismatch warnings:
WARNING: drivers/usb/renesas_usbhs/renesas_usbhs.o(.text+0xf5d): Section
mismatch in reference from the function usbhs_mod_probe() to the function
.devinit.text:usbhs_mod_host_probe() The function usbhs_mod_probe() references
the function __devinit usbhs_mod_host_probe(). This is often because
usbhs_mod_probe lacks a __devinit annotation or the annotation of
usbhs_mod_host_probe is wrong.
WARNING: drivers/usb/renesas_usbhs/renesas_usbhs.o(.text+0xfd7): Section
mismatch in reference from the function usbhs_mod_probe() to the function
.devexit.text:usbhs_mod_host_remove() The function usbhs_mod_probe() references
a function in an exit section. Often the function usbhs_mod_host_remove() has
valid usage outside the exit section and the fix is to remove the __devexit
annotation of usbhs_mod_host_remove.
WARNING: drivers/usb/renesas_usbhs/renesas_usbhs.o(.text+0x1005): Section
mismatch in reference from the function usbhs_mod_remove() to the function
.devexit.text:usbhs_mod_host_remove() The function usbhs_mod_remove()
references a function in an exit section. Often the function
usbhs_mod_host_remove() has valid usage outside the exit section and the fix is
to remove the __devexit annotation of usbhs_mod_host_remove.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
this patch fixup bogus conversion of
8a9775ab71218690ac34bed9e237e2b968857d3a
(usb: gadget: renesas_usbhs: fix compile warning)
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Since renesas_usbhs mod_host didn't use
struct completion as static object, the warning of lockdep came out.
This patch fixup this issue.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
usbhs_pkt_push() had inconsistent return under spin lock.
This patch fix it up.
Special thanks to Dan
Cc: Dan Carpenter <[email protected]>
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch tidyup below smatch complaint
drivers/usb/renesas_usbhs/mod_host.c +447 usbhsh_endpoint_free()
warn: variable dereferenced before check 'uep' (see line 444)
Special thanks to Dan
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
| drivers/usb/renesas_usbhs/fifo.c: In function ‘usbhsf_dma_prepare_push’:
| drivers/usb/renesas_usbhs/fifo.c:823:7: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]
| drivers/usb/renesas_usbhs/fifo.c: In function ‘usbhsf_dma_try_pop’:
| drivers/usb/renesas_usbhs/fifo.c:900:7: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]
Signed-off-by: Felipe Balbi <[email protected]>
|
|
that driver can compile cleanly on x86 without
any issues.
Signed-off-by: Felipe Balbi <[email protected]>
|
|
In current renesas-usbhs,
there was inconsistency about the style of kernel module or built-in.
This patch solve it.
[ [email protected] : fix compile issue when building modules ]
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
renesas_usbhs has default callback functions and settings.
And it tried overwrite to platform private data
if platform doesn't have them.
So, if renesas_usbhs was compiled as module,
it will be hung-up on 2nd insmod.
This patch fixup it.
Special thanks to Bastian
Reported-by: Bastian Hecht <[email protected]>
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This is mod_host prototype support for renesas_usbhs driver.
It doesn't support USB-Hub, and USB-DMAC for now.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
CCPL setting is needed on only mod_gadget.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
mod_host needs data/status stage handler
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
mod_host use INTSTS1 interrupt
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
mod_host needs device speed setup function
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
It is enabled to set SOF packet output bit when USBRST bit was set.
And USBRST bit should be set 0 when SOF packet was output.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
some renesas_usbhs device is supporting OTG external device interface.
In that device, it is necessary to control PWEN/EXTLP on DVSTCTR.
This patch support it.
But renesas_usbhs driver doesn't have OTG support for now.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
When data read interrupt happened, the pipe is BUF which means "enable".
then, next un-necessary interrupt/token might be
issued again when all data were popped from fifo.
It will cause un-understandable bug.
This patch decides pipe disable on top of read interrupt.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
renesas_usbhs can manually set DATA0/DATA1.
This patch is prepare for mod_host support
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
pipe name is usefull function for mod_xxx
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
usbhs_pipe_config_update()
device select method will be used on mod_host
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
renesas_usbhs device needs special bit settings
if it was mod_host and dcp pipe.
This patch support it.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
it was possible to get usbhs_mod from usbhs_priv.
this patch remove unneeded parameter.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Pipe type check macro will be used in other files.
This patch move local macro to global macro.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
this patch add DVSTCTR control function for HOST support
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
packet handler had moved to struct usbhs_pipe from struct usbhsg_uep.
it is preparation of mod_host support
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
using udc_start()/udc_stop() as we should.
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This flag is a NOOP and can be removed now.
Signed-off-by: Yong Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|