summaryrefslogtreecommitdiff
path: root/drivers/usb/renesas_usbhs
AgeCommit message (Collapse)Author
2011-12-12usb: renesas_usbhs: add basic USB_REQ_GET_STATUS supportKuninori Morimoto
This patch adds basic get-status support for chapter 9 test. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: add basic USB_REQ_SET_FEATURE supportKuninori Morimoto
This patch adds basic set-feature support for chapter 9 test. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: add usbhs_pipe_is_stall()Kuninori Morimoto
This is preparation for chapter 9 test Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: remove superfluous usbhs_lock from recip handlerKuninori Morimoto
recip handler will call various functions which are holding usbhs_lock. This patch removes superfluous usbhs_lock from recip handler to escape double lock. [ balbi@ti.com : brushed up commit log a bit ] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: rename usb_gadget_driver::speed to max_speedMichal Nazarewicz
This commit renames the “speed” field of the usb_gadget_driver structure to “max_speed”. This is so that to make it more apparent that the field represents the maximum speed gadget driver can support. This also make the field look more like fields with the same name in usb_gadget and usb_composite_driver structures. All of those represent the *maximal* speed given entity supports. After this commit, there are the following fields in various structures: * usb_gadget::speed - the current connection speed, * usb_gadget::max_speed - maximal speed UDC supports, * usb_gadget_driver::max_speed - maximal speed gadget driver supports, and * usb_composite_driver::max_speed - maximal speed composite gadget supports. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: replace usb_gadget::is_dualspeed with max_speedMichal Nazarewicz
This commit replaces usb_gadget's is_dualspeed field with a max_speed field. [ balbi@ti.com : Fixed DWC3 driver ] Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_device_xx()Kuninori Morimoto
current mod_host used usbhs_device_alloc/free(), but allocated variable was attached to each xx->hcpriv. The intuitively clear name was not xxx_alloc/free() but xxx_attach/detach(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_endpoint_xx()Kuninori Morimoto
current mod_host used usbhs_endpoint_alloc/free(), but allocated variable was attached to each xx->hcpriv. The intuitively clear name was not xxx_alloc/free() but xxx_attach/detach(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_xx_queue_push()Kuninori Morimoto
This patch remove unneeded parameter from usbhsh_xx_queue_push() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: cleanup usbhsh_endpoint_xxx()Kuninori Morimoto
this patch cleanup - make sure static function - remove unneeded label - useless local variable were removed Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: adds spin lock area on mod_hostKuninori Morimoto
spin lock was needed in mod_host. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: check device0 status when allocKuninori Morimoto
device0 was treated without checking in usbhsh_device_alloc(). but "udev->usbv" and "dev_set_drvdata()" will be overwritten if device0 was multi-allocated. This patch fixes this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: remove usbhsh_request listKuninori Morimoto
mod_host had usbhsh_request active/free list. it was almost meaningless, and vainly complicated. This patch remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: usbhs_set_device_config() care upphub/hubportKuninori Morimoto
current usbhs_set_device_config() didn't care upphub/hubport. This patch adds its value. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: cleanup usbhs_endpoint_disable()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: modify function name of usbhs_set_device_xx()Kuninori Morimoto
it was device configuration setting function, not only speed. This patch modify function name usbhs_set_device_speed() -> usbhs_set_device_config() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: usbhsh_ureq_alloc/free() care urb->hcprivKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: cleanup complicated ureq alloc/freeKuninori Morimoto
DCP data/status stage needs ureq to usbhs_pkt_push(), but sometimes, there is no data stage. In that case, allocated ureq was not freed, Current ureq alloc/free pair were difficult to understand. This patch removed unnecessary/un-understandable ureq alloc from usbhsh_urb_enqueue(), and create simpler alloc/free pair. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: unified callback functionKuninori Morimoto
renesas_usbhs needs callback for notify hotplug. but it were 2 methods which are almost same. This patch unified these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: add platform power control functionKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: tidyup the unit of detection_delayKuninori Morimoto
detection_delay was assumed as msec Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: tidyup mod_host request variable nameKuninori Morimoto
renesas_usbhs driver use "req" for struct usb_ctrlrequest, and "ureq" for struct usbhsh_request Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: tidyup usbhs_sys_clock_ctrl() was local functionKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: remove usbhs_sys_usb_ctrl()Kuninori Morimoto
usbhs_sys_usb_ctrl() can collect into usbhs_sys_host/function_ctrl(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: remove usbhs_sys_hispeed_ctrl()Kuninori Morimoto
usbhs_sys_hispeed_ctrl() can collect into usbhs_sys_host/function_ctrl(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-10usb: gadget: renesas_usbhs: Use kcalloc instead of kzalloc to allocate arrayThomas Meyer
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 <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-29usb: renesas_usbhs: fixup driver speedKuninori Morimoto
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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-29usb: renesas_usbhs: fixup gadget.dev.driver when udc_stop.Kuninori Morimoto
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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-29usb: renesas_usbhs: fixup signal the driver that cable was disconnectedKuninori Morimoto
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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-29usb: renesas_usbhs: fixup device_register timingKuninori Morimoto
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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-27usb: convert drivers/usb/* to use module_platform_driver()Axel Lin
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 <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-17Merge branch 'dma_slave_direction' into next_test_dirnVinod Koul
resolved conflicts: drivers/media/video/mx3_camera.c
2011-11-17USB-renesas: move to dma_transfer_directionVinod Koul
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 <vinod.koul@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
2011-11-14usb: gadget: renesas_usbhs: bugfix: set DATA0 when usbhsh_endpoint_alloc()Kuninori Morimoto
new endpoint should start from DATA0, but mod_host didn't care it. This patch fix it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14usb: gadget: renesas_usbhs: bugfix: disable irq when device stopKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14usb: gadget: renesas_usbhs: bugfix: care pipe directionKuninori Morimoto
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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14usb: gadget: renesas_usbhs: fixup section mismatch warningKuninori Morimoto
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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14usb: gadget: renesas_usbhs: fixup bogus conversionKuninori Morimoto
this patch fixup bogus conversion of 8a9775ab71218690ac34bed9e237e2b968857d3a (usb: gadget: renesas_usbhs: fix compile warning) Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14usb: gadget: renesas_usbhs: fixup struct completion usageKuninori Morimoto
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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19usb: renesas_usbhs: fixup inconsistent return from usbhs_pkt_push()Kuninori Morimoto
usbhs_pkt_push() had inconsistent return under spin lock. This patch fix it up. Special thanks to Dan Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-18usb: renesas_usbhs: tidyup for smatch warningsKuninori Morimoto
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 <dan.carpenter@oracle.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-13usb: gadget: renesas_usbhs: fix compile warningFelipe Balbi
| 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 <balbi@ti.com>
2011-10-13usb: gadget: renesas_usbhs: drop dependencyFelipe Balbi
that driver can compile cleanly on x86 without any issues. Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-10-13usb: gadget: renesas_usbhs: fixup driver compile styleKuninori Morimoto
In current renesas-usbhs, there was inconsistency about the style of kernel module or built-in. This patch solve it. [ balbi@ti.com : fix compile issue when building modules ] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-10-13usb: gadget: renesas_usbhs: bugfix: don't modify platform dataKuninori Morimoto
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 <hechtb@googlemail.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-10-13usb: gadget: renesas_usbhs: add mod_host supportKuninori Morimoto
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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-10-13usb: gadget: renesas_usbhs: usbhs_dcp_control_transfer_done() cares mod_hostKuninori Morimoto
CCPL setting is needed on only mod_gadget. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-10-13usb: gadget: renesas_usbhs: add data/status stage handlerKuninori Morimoto
mod_host needs data/status stage handler Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-10-13usb: gadget: renesas_usbhs: add INTSTS1 interrupt supportKuninori Morimoto
mod_host use INTSTS1 interrupt Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-10-13usb: gadget: renesas_usbhs: add usbhs_set_device_speed() support for hostKuninori Morimoto
mod_host needs device speed setup function Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>