aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-23usb: renesas: fix extcon dependencyArnd Bergmann1-0/+1
The renesas usbhs driver calls extcon_get_edev_by_phandle(), which is defined in drivers/extcon/extcon-class.c, and that can be a loadable module. If the extcon-class support is disabled, usbhs will work correctly for all devices that do not need extcon. However, if extcon-class is a loadable module, and usbhs is built-in, the kernel fails to link. In order to solve that, we need a Kconfig dependency that allows extcon to be disabled but does not allow usbhs built-in if extcon is a module. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel()Yoshihiro Shimoda1-0/+4
This patch fixes an issue that the following commit causes NULL pointer dereference in dma_release_channel(). "usb: renesas_usbhs: add support for requesting DT DMA" (commit id abd2dbf6bb1b5f3a03a8c76b1a8879da1dd30caa) The usbhsf_dma_init_dt() should set fifo->{t,r}x_chan to NULL if dma_request_slave_channel_reason() returns IS_ERR value. Otherwise, usbhsf_dma_quit() will call dma_release_channel(), and then NULL pointer dereference happens. Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Simon Horman <horms+renesas@verge.net.au> Reported-by: Simon Horman <horms@verge.net.au> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: renesas_usbhs: gadget: set value for common is_selfpoweredPeter Chen1-0/+2
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: renesas_usbhs: add support for requesting DT DMAYoshihiro Shimoda1-1/+10
This patch adds dma_request_slave_channel_reason() calling to request dma slave channels for multiplatform environment. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: renesas_usbhs: add usbhsf_dma_init_pdev() functionYoshihiro Shimoda1-3/+9
To add support for requesting DT DMA in the future, this patch adds usbhsf_dma_init_pdev() function. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: renesas_usbhs: mod_host: use HUB_CHAR_*Sergei Shtylyov1-1/+2
Fix using the bare number to set the 'wHubCharacteristics' field of the Hub Descriptor while the values are #define'd in <linux/usb/ch11.h>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12usb: renesas_usbhs: add OTG ID signal sensingSergei Shtylyov2-0/+20
On the Renesas R8A7791 SoC based boards there's MAX3355 USB OTG chip and mini-AB USB connector corresponding to USB port 0 driven either by EHCI/OHCI or Renesas USBHS gadget controller. And we'd like the host/gadget drivers to work based on the cable type connected. An 'extcon' driver for MAX3355 has been written, so we only need to bind to it via device tree which I'm doing in this patch. (Perhaps, it would also make sense to use OTG HNP when the USBHS host mode is active and a B-cable is connected but I don't have access to host-capable USBHS, so wouldn't be able to test it.) Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12usb: renesas_usbhs: fix platform init error messageSergei Shtylyov1-1/+1
There is a typo ("prove" instead of "probe") in the error message printed when the platform initialization fails. Replace that word with more fitting "init". Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12usb: renesas_usbhs: kill dead code in usbhs_probe()Sergei Shtylyov1-5/+1
usbhsc_drvcllbck_notify_hotplug() always returns 0, so it's rather pointless to store and check its result for being < 0. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-12usb: renesas_usbhs: expand USB-DMAC channels for R-Car Gen2Yoshihiro Shimoda3-1/+7
This patch expands USB-DMAC channels for R-Car Gen2 SoCs. The SoCs have 4 channels. If d{2,3}_{t,x}x_id are not set, this driver never uses the expanded USB-DMAC channels. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-12usb: renesas_usbhs: add a new macro for extending DnFIFOsYoshihiro Shimoda1-2/+7
To extend DnFIFOs in the future, this patch adds a new macro because some SoCs don't the "port" address for DnFIFOs. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-12usb: renesas_usbhs: standardize d{0,1}fifo controlYoshihiro Shimoda2-38/+37
To expand DnFIFOs in the future, this patch standardizes the d{0,1}fifo control using new macros. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-12usb: renesas_usbhs: change d{0,1}fifo to dfifo arrayYoshihiro Shimoda2-4/+4
To extend DnFIFOs in the future, this patch changes d{0,1}fifo of usbhs_fifo_info to dfifo array. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-05usb: renesas_usbhs: fix usbhs_pipe_clear() for DCP PIPEYoshihiro Shimoda5-4/+27
Since the DCPCTR doesn't have the ACLRM bit, the usbus_pipe_clear() should not call the usbhsp_pipectrl_set() with ACLRM. So, this patch fixes this issue to add the usbhs_fifo_clear_dcp() in fifo.c because the controller needs the CFIFO to clear the the DCP PIPE. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-05usb: renesas_usbhs: fix the timing of dcp_control_transfer_doneYoshihiro Shimoda2-16/+3
According to the datasheet, this driver should clear the INTSTS0.CTRT bit before this controller detects the next stage transition. Otherwise, the driver may not be able to clear the bit after the controller went to the next stage transition. After that, the driver will not be able to clear the INTSTS0.VALID, and a usb control transfer will not finish finally. If we use the testusb tool, it is easy to reproduce this issue: # testusb -a -t 10 Since the previous code handled a data stage and a status stage in the usbhsf_pio_try_push(), it may not clear the INTSTS0.CTRT at the right timing. So, this patch change the timing of usbhs_dcp_control_transfer_done() to the usbhsg_irq_ctrl_stage(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-05usb: renesas_usbhs: gadget: fix the behavior of pullupTakeshi Kihara2-3/+33
This patch fixes an issue that this driver always enable the D+ pullup after it detected the VBUS connection even though this usb controller can control the D+ pullup timing by software. So, this driver should enable the D+ pullup after a gadget driver called usb_gadget_connect(). Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com> Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-05usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()Kazuya Mizuguchi1-0/+3
This patch fixes an issue that the NULL pointer dereference happens when we uses g_audio driver. Since the g_audio driver will call usb_ep_disable() in afunc_set_alt() before it calls usb_ep_enable(), the uep->pipe of renesas usbhs driver will be NULL. So, this patch adds a condition to avoid the oops. Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Fixes: 2f98382dc (usb: renesas_usbhs: Add Renesas USBHS Gadget) Cc: <stable@vger.kernel.org> # v3.0+ Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: renesas_usbhs: common: remove duplicate check on resourceVarka Bhadram1-2/+2
Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: remove unnecessary 'driver' argumentFelipe Balbi1-2/+1
now that no UDC driver relies on the extra 'driver' argument to ->udc_stop(), we can safely remove it. This commit is based on previous work by Robert Baldyga <r.baldyga@samsung.com> which can be found at [1]; however that patch turned out to have a high probability of regressing many UDC drivers because of a blind search & replace s/driver/$udc->driver/ which caused the 'driver' argument to stop_activity() to be a valid non-NULL pointer when it should be NULL, thus causing UDCs to mistakenly call gadget driver's ->disconnect() callback. [1] http://markmail.org/message/x5zneg4xea4zntab Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: renesas_usbhs: delete unnecessary 'out of memory' messagesPeter Chen1-3/+1
The memory subsystem has already had similar message for it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: renesas_usbhs: add support for generic PHYYoshihiro Shimoda2-0/+30
This patch adds support for the generic PHY. The generic PHY will be used in multiplatform environment. Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: renesas_usbhs: clean up rcar2.c to support a generic PHYYoshihiro Shimoda1-22/+26
To support both usb PHY and generic PHY, this patch cleans up rcar2.c. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: renesas_usbhs: rename phy to usb_phy in usbhs_privYoshihiro Shimoda2-14/+14
To support a generic phy driver in this driver later, this patch renames "struct usb_phy *phy" to "struct usb_phy *usb_phy". Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-09-25usb: gadget: Refactor request completionMichal Sojka1-1/+1
Use the recently introduced usb_gadget_giveback_request() in favor of direct invocation of the completion routine. All places in drivers/usb/ matching "[-.]complete(" were replaced with a call to usb_gadget_giveback_request(). This was compile-tested with all ARM drivers enabled and runtime-tested for musb. Signed-off-by: Michal Sojka <sojka@merica.cz> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23usb: renesas_usbhs: fix driver dependenciesBartlomiej Zolnierkiewicz1-0/+1
Renesas USBHS controller support should be available only on Renesas ARM SoCs and SuperH architecture. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Magnus Damm <magnus.damm@gmail.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-16Merge tag 'v3.17-rc5' into nextFelipe Balbi4-6/+88
Linux 3.17-rc5 Signed-off-by: Felipe Balbi <balbi@ti.com> Conflicts: Documentation/devicetree/bindings/usb/mxs-phy.txt drivers/usb/phy/phy-mxs-usb.c
2014-09-05usb: renesas_usbhs: Add device tree support for R-Car H2 and M2Yoshihiro Shimoda1-0/+44
This driver supports other SoCs, but they need boards/Soc depend code. So, this patch adds device tree support for R-Car H2 and M2 initially. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-09-03usb: renesas_usbhs: fix the usb_pkt_pop()Yoshihiro Shimoda1-3/+27
This patch fixes the usb_pkt_pop(). If a gadget driver calls usb_ep_dequeue(), this driver will call the usb_pkt_pop(). So, the usb_pkt_pop() should cancel the transaction. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-09-03usb: renesas_usbhs: fix the condition of is_done in usbhsf_dma_push_doneYoshihiro Shimoda1-2/+15
This patch fixes the condition of is_done in usbhsf_dma_push_done(). This function will be called after a transmission finished by DMAC. So, the function should check if the transmission packet is short packet or not. Also the function should call try_run to send the zero packet by the pio handler if the "*is_done" is not set. Otherwize, the transaction will not finish if a gadget driver sets the "zero" flag in a transmission. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-09-03usb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lockYoshihiro Shimoda1-0/+5
This patch protects the mod->irq_bempsts and mod->irq_brdysts by spin lock in the usbhs_status_get_each_irq() because other functions will write them during spin lock. Otherwise, the driver will clears the BRDYSTS and/or BEMPSTS wrongly, and then, the transaction will not finish. Also since the driver should use the INTSTS0 and BRDYSTS and BEMPSTS as the same timing, the patch protects them. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-09-03usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handleYoshihiro Shimoda3-1/+41
Some gadget drivers will call usb_ep_queue() more than once before the first queue doesn't finish. However, this driver didn't handle it correctly. So, this patch fixes the behavior of some usbhs_pkt_handle using the "running" flag. Otherwise, the oops below happens if we use g_ncm driver and when the "iperf -u -c host -b 200M" is running. Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: Oops: 80000007 [#1] SMP ARM Modules linked in: usb_f_ncm g_ncm libcomposite u_ether CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.17.0-rc1-00008-g8b2be8a-dirty #20 task: c051c7e0 ti: c0512000 task.ti: c0512000 PC is at 0x0 LR is at usbhsf_pkt_handler+0xa8/0x114 pc : [<00000000>] lr : [<c0278fb4>] psr: 60000193 sp : c0513ce8 ip : c0513c58 fp : c0513d24 r10: 00000001 r9 : 00000193 r8 : eebec4a0 r7 : eebec410 r6 : eebe0c6c r5 : 00000000 r4 : ee4a2774 r3 : 00000000 r2 : ee251e00 r1 : c0513cf4 r0 : ee4a2774 Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-21Merge tag 'usb-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-nextGreg Kroah-Hartman8-6/+159
Felipe writes: usb: patches for v3.17 merge window Surprisingly enough, while a big set of patches, the majority is composed of cleanups (using devm_*, fixing sparse errors, moving code around, adding const, etc). The highlights are addition of new support for PLX USB338x devices, and support for USB 2.0-only configurations of the DWC3 IP core. Signed-of-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: renesas_usbhs: add R-Car Gen. 2 init and power controlUlrich Hecht5-6/+145
In preparation for DT conversion to reduce reliance on platform device callbacks. Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: renesas_usbhs: gadget: fix re-enabling pipe without re-connectingYoshihiro Shimoda3-0/+13
This patch fixes an issue that the renesas_usbhs driver in gadget mode cannot work correctly even if I disabled DMAC of the driver when I used the g_zero driver and the testusb tool. When a usb cable is re-connected, the renesas_usbhs driver calls the usbhsp_flags_init() (via usbhs_hotplug() --> usbhs_mod_call(start) --> usbhsg_try_start() --> usbhs_pipe_init()). However, the driver doesn't call the usbhsp_flags_init() when usbhsg_ep_disable() is called. So, if a gadget driver calls usb_ep_enable() and usb_ep_disable() again and again, the renesas_usbhs driver will output the following log: renesas_usbhs renesas_usbhs: can't get pipe (BULK) renesas_usbhs renesas_usbhs: wrong recip request Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: renesas_usbhs: fix usbhs_pipe_malloc() to re-enable a pipe.Yoshihiro Shimoda1-0/+1
This patch fixes an issue that the driver cannot push a new data when a pipe is re-enabled after the pipe is queued. Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-19usb: renesas: gadget: fixup: complete STATUS stage after receivingKuninori Morimoto1-0/+8
Current usbhs gadget driver didn't complete STATUS stage after receiving. It wasn't problem for us before, because some USB class doesn't use DATA OUT stage in control transfer. But, it is required on some device. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-01-03Merge tag 'usb-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-nextGreg Kroah-Hartman2-16/+6
Felipe writes: usb: changes for v3.14 merge window This pull request is quite extensive, containing 105 non-merge commits. Because of that, we describe the changes in sections below: New drivers: - Keystone PHY driver and DWC3 Glue Layer - Aeroflex Gaisler GRUSBDC - Tahvo PHY driver for N770 - JZ4740 MUSB gluer Layer - Broadcom PHY Driver Important new features: - MUSB DSPS learned about suspend/resume - New quirk_ep_out_aligned_size flag added to struct usb_gadget - DWC3 initializes the new quirk flag so gadget drivers can use it. - AM335x PHY Driver learns about remote wakeup - Renesas USBHS now requests DMA Engine only once - s3c-hsotg is now re-used on Broadcom devices - USB PHY layer now makes sure to initialize the notifier for all drivers - omap-control learned about TI's new AM437x devices - few other usb gadget/function drivers learned about the new configfs-based binding. Misc Fixes and Clean Ups: - Several sparse fixes all over the place - Removal of redundant of_match_ptr() - r-car gen2 phy now uses usb_add_phy_dev() - removal of DEFINE_PCI_DEVICE_TABLE() from a few drivers - conversion to clk_prepare/clk_unprepare on r8a66597-udc - some randconfig errors and build warnings were fixed - removal of unnecessary lock on dwc3-omap.c Signed-of-by: Felipe Balbi <balbi@ti.com>
2013-12-17usb: gadget: add "maxpacket_limit" field to struct usb_epRobert Baldyga1-2/+2
This patch adds "maxpacket_limit" to struct usb_ep. This field contains maximum value of maxpacket supported by driver, and is set in driver probe. This value should be used by autoconfig() function, because value of field "maxpacket" is set to value from endpoint descriptor when endpoint becomes enabled. So when autoconfig() function will be called again for this endpoint, "maxpacket" value will contain wMaxPacketSize from descriptior instead of maximum packet size for this endpoint. For this reason this patch adds new field "maxpacket_limit" which contains value of maximum packet size (which defines maximum endpoint capabilities). This value is used in ep_matches() function used by autoconfig(). Value of "maxpacket_limit" should be set in UDC driver probe function, using usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function set choosen value to both "maxpacket_limit" and "maxpacket" fields. This patch modifies UDC drivers by adding support for maxpacket_limit. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-12-12usb: renesas_usbhs: fifo: request DMAEngine onceKuninori Morimoto1-14/+4
DMAEngine uses IRQ if dma_request_channel() was called, and it is using devm_request_irq() today, OTOH, dma_request_channel() will be called when each USB connection happened on this driver. This means same IRQ will be requested many times whenever each USB connected, and this IRQ isn't freed when USB disconnected. Request DMAEngine once. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-12-08usb: hcd: move controller wakeup setting initialization to individual driverPeter Chen1-0/+1
Individual controller driver has different requirement for wakeup setting, so move it from core to itself. In order to align with current etting the default wakeup setting is enabled (except for chipidea host). Pass compile test with below commands: make O=outout/all allmodconfig make -j$CPU_NUM O=outout/all drivers/usb Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-13Remove GENERIC_HARDIRQ config optionMartin Schwidefsky1-1/+1
After the last architecture switched to generic hard irqs the config options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code for !CONFIG_GENERIC_HARDIRQS can be removed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-08-27usb: renesas_usbhs: use platform_{get,set}_drvdata()Libo Chen1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-30usb: renesas: use dev_get_platdata()Jingoo Han1-2/+2
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-07-29usb: renesas_usbhs: tidyup original usbhsx_for_each_xxx macroKuninori Morimoto3-9/+9
Current usbhsx_for_each_xxx macro will read out-of-array's memory after last loop operation. It was not good C language operation, and the binary which was compiled by (at least) gcc 4.8.1 is broken This patch tidyup these issues Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com> Reviewed-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-07-15usb: renesas_usbhs: gadget: remove extra check on udc_stopKuninori Morimoto1-4/+0
usb_gadget_ops :: udc_stop might be called with driver = NULL since 511f3c5326eabe1ece35202a404c24c0aeacc246 (usb: gadget: udc-core: fix a regression during gadget driver unbinding) Because of that, 2nd times insmod goes fail. This patch fixes it up. Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-09USB: regroup all depends on USB within an if USB blockFlorian Fainelli1-1/+1
This patch removes the depends on USB from all config symbols in drivers/usb/host/Kconfig and replace that with an if USB / endif block as suggested by Alan Stern. Some source ... Kconfig lines have been shuffled around to permit a better regroupment of the Kconfig files depending on "config USB" item. No functionnal change is introduced. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02usb: renesas_usbhs: fixup sparse errors for common.cKuninori Morimoto1-3/+3
This patch fixup below sparse errors CHECK ${RENESAS_USB}/common.c ${RENESAS_USB}/common.c:313:17: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:322:17: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:384:17: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:524:9: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:545:9: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:574:9: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:606:9: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/mod_gadget.c:233:28: warning: symbol 'req_clear_feature' was not declared. Should it be static? ${RENESAS_USB}/mod_gadget.c:274:28: warning: symbol 'req_set_feature' was not declared. Should it be static? ${RENESAS_USB}/mod_gadget.c:375:28: warning: symbol 'req_get_status' was not declared. Should it be static? [ balbi@ti.com : added three sparse fixes to mod_gadget.c ] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18usb: renesas: remove unused DMA_ADDR_INVALIDFelipe Balbi2-3/+0
DMA_ADDR_INVALID isn't used anymore, it's safe to remove it. Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18usb: renesas: gadget: don't assign gadget.dev.release directlyFelipe Balbi1-6/+0
udc-core provides a better way to handle release methods, let's use it. Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18usb: renesas: gadget: don't touch gadget.dev.driverFelipe Balbi1-2/+0
udc-core now handles that for us, which means we can remove it from our driver. Signed-off-by: Felipe Balbi <balbi@ti.com>