summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/r8a66597-udc.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: r8a66597-udc: remove unnecessary OOM messagesJingoo Han2014-05-141-1/+0
| | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: add "maxpacket_limit" field to struct usb_epRobert Baldyga2013-12-171-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>
* usb: gadget: r8a66597-udc: convert to clk_prepare/unprepareLaurent Pinchart2013-11-261-3/+3
| | | | | | | | | | | Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework. Cc: Felipe Balbi <balbi@ti.com> Cc: linux-usb@vger.kernel.org Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: use dev_get_platdata()Jingoo Han2013-07-301-1/+1
| | | | | | | | 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>
* usb: gadget: r8a66597-udc: do not unlock unheld spinlock in ↵Alexey Khoroshilov2013-06-101-2/+2
| | | | | | | | | | | | | | | r8a66597_sudmac_irq() r8a66597_irq() processes sudmac part (r8a66597_sudmac_irq()) before locking r8a66597->lock. But transfer_complete(), that is called inside (r8a66597_sudmac_irq()->sudmac_finish()->transfer_complete()), expects r8a66597->lock is locked. As a result unheld spinlock can be unlocked. The patch just moves locking before calling r8a66597_sudmac_irq(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: use platform_{get,set}_drvdata()Jingoo Han2013-05-281-2/+2
| | | | | | | | | 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: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: fix error return code in r8a66597_probe()Wei Yongjun2013-05-151-1/+3
| | | | | | | | Fix to return -ENOMEM in the request alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: don't assign gadget.dev.release directlyFelipe Balbi2013-03-181-1/+0
| | | | | | | udc-core provides a better way to handle release methods, let's use it. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: remove unnecessary initializationsFelipe Balbi2013-03-181-2/+0
| | | | | | | udc-core now sets dma-related and parent fields for us, we don't need to do it ourselves. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: drop now unnecessary flagFelipe Balbi2013-03-181-1/+0
| | | | | | | | | | We don't need the ->register_my_device flag anymore because all UDC drivers have been properly converted. Let's remove every history of it. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: let udc-core manage gadget->devFelipe Balbi2013-03-181-10/+2
| | | | | | | By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge tag 'usb-3.9-rc1' of ↵Linus Torvalds2013-02-211-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB patches from Greg Kroah-Hartman: "Here's the big USB merge for 3.9-rc1 Nothing major, lots of gadget fixes, and of course, xhci stuff. All of this has been in linux-next for a while, with the exception of the last 3 patches, which were reverts of patches in the tree that caused problems, they went in yesterday." * tag 'usb-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (190 commits) Revert "USB: EHCI: make ehci-vt8500 a separate driver" Revert "USB: EHCI: make ehci-orion a separate driver" Revert "USB: update host controller Kconfig entries" USB: update host controller Kconfig entries USB: EHCI: make ehci-orion a separate driver USB: EHCI: make ehci-vt8500 a separate driver USB: usb-storage: unusual_devs update for Super TOP SATA bridge USB: ehci-omap: Fix autoloading of module USB: ehci-omap: Don't free gpios that we didn't request USB: option: add Huawei "ACM" devices using protocol = vendor USB: serial: fix null-pointer dereferences on disconnect USB: option: add Yota / Megafon M100-1 4g modem drivers/usb: add missing GENERIC_HARDIRQS dependencies USB: storage: properly handle the endian issues of idProduct testusb: remove all mentions of 'usbfs' usb: gadget: imx_udc: make it depend on BROKEN usb: omap_control_usb: fix compile warning ARM: OMAP: USB: Add phy binding information ARM: OMAP2: MUSB: Specify omap4 has mailbox ARM: OMAP: devices: create device for usb part of control module ...
| * usb: gadget: constify all struct usb_gadget_opsFelipe Balbi2013-01-241-1/+1
| | | | | | | | | | | | | | Add the missing 'const' keyword to all struct usb_gadget_ops in the gadget framework. Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: converto drivers/usb/* to use module_platform_driver_probe()Fabio Porcedda2013-01-171-13/+2
|/ | | | | | | | | | | | | | This patch converts the drivers in drivers/usb/* to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* gadget/r8a66597: remove conditional compilation of clk codeViresh Kumar2012-07-301-8/+3
| | | | | | | | | | | | | | | With addition of dummy clk_*() calls for non CONFIG_HAVE_CLK cases in clk.h, there is no need to have clk code enclosed in #ifdef CONFIG_HAVE_CLK, #endif macros. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Mike Turquette <mturquette@linaro.org> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: viresh kumar <viresh.linux@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usb: gadget: r8a66597-udc: add support for set_selfpoweredShimoda, Yoshihiro2012-05-041-1/+14
| | | | | | | | The previous code always set to USB_DEVICE_SELF_POWERED in GET_STATUS. So, this patch adds set_selfpowered(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: Update r8a66597-udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2012-05-041-7/+7
| | | | | | | | | struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597: use generic map/unmap routinesFelipe Balbi2012-02-281-8/+2
| | | | | | | those routines have everything we need to map/unmap USB requests and it's better to use them. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: rename usb_gadget_driver::speed to max_speedMichal Nazarewicz2011-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* usb: gadget: replace usb_gadget::is_dualspeed with max_speedMichal Nazarewicz2011-12-121-1/+1
| | | | | | | | | | 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>
* usb: udc: Fix gadget driver's speed check in various UDC driversMichal Nazarewicz2011-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several UDC drivers had a gadget driver's speed sanity check of the form of: driver->speed != USB_SPEED_HIGH or: driver->speed != USB_SPEED_HIGH && driver->speed != USB_SPEED_FULL As more and more gadget drivers support USB SuperSpeed, driver->speed may be set to USB_SPEED_SUPER and UDC driver should handle such gadget correctly. The above checks however fail to recognise USB_SPEED_SUPER as a valid speed. This commit changes the two checks to: driver->speed < USB_SPEED_HIGH or: driver->speed < USB_SPEED_FULL respectively. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Reported-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: r8a66597-udc: fix flush fifo handlingYoshihiro Shimoda2011-11-141-0/+2
| | | | | | | | | The "BCLR" in CFIFOCTR/DnFIFOCTR can flush the fifo of "CPU side" only. To flush the fifo of "SIE side", we have to use the "ACLRM" in PIPEnCTR. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: r8a66597-udc: fix for udc-newstyleYoshihiro Shimoda2011-11-141-19/+9
| | | | | | | | | | | | The udc-newstyle needs device_register in probe() of platform_device. If it doesn't call, kernel panic happens in the sysfs_create_dir() when we run modprobe a gadget driver. [ balbi@ti.com : fix compile warning introduced by this patch ] Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* 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: r8a66597-udc: add support for SUDMACYoshihiro Shimoda2011-10-131-19/+345
| | | | | | | | | 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-131-40/+59
| | | | | | | 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: change prototype of r8a66597_write_fifoYoshihiro Shimoda2011-10-131-2/+2
| | | | | Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* USB: irq: Remove IRQF_DISABLEDYong Zhang2011-09-181-1/+1
| | | | | | | This flag is a NOOP and can be removed now. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb gadget: clean up FSF boilerplate textKlaus Schwarzkopf2011-09-091-10/+0
| | | | | | | | | | | | | | | | remove the following two paragraphs as they are not needed: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Signed-off-by: Klaus Schwarzkopf <schwarzkopf@sensortherm.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: use usb_endpoint_maxp() instead of le16_to_cpu()Kuninori Morimoto2011-08-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size instead of le16_to_cpu(desc->wMaxPacketSize). This patch fix it up Cc: Armin Fuerst <fuerst@in.tum.de> Cc: Pavel Machek <pavel@ucw.cz> Cc: Johannes Erdfelt <johannes@erdfelt.com> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Oliver Neukum <oliver@neukum.name> Cc: David Kubicek <dave@awk.cz> Cc: Johan Hovold <jhovold@gmail.com> Cc: Brad Hards <bhards@bigpond.net.au> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de> Cc: David Brownell <david-b@pacbell.net> Cc: David Lopo <dlopo@chipidea.mips.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Xie Xiaobo <X.Xie@freescale.com> Cc: Li Yang <leoli@freescale.com> Cc: Jiang Bo <tanya.jiang@freescale.com> Cc: Yuan-hsin Chen <yhchen@faraday-tech.com> Cc: Darius Augulis <augulis.darius@gmail.com> Cc: Xiaochen Shen <xiaochen.shen@intel.com> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: OKI SEMICONDUCTOR, <toshiharu-linux@dsn.okisemi.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Ben Dooks <ben@simtec.co.uk> Cc: Thomas Abraham <thomas.ab@samsung.com> Cc: Herbert Pötzl <herbert@13thfloor.at> Cc: Arnaud Patard <arnaud.patard@rtp-net.org> Cc: Roman Weissgaerber <weissg@vienna.at> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Tony Olech <tony.olech@elandigitalsystems.com> Cc: Florian Floe Echtler <echtler@fs.tum.de> Cc: Christian Lucht <lucht@codemercs.com> Cc: Juergen Stuber <starblue@sourceforge.net> Cc: Georges Toth <g.toth@e-biz.lu> Cc: Bill Ryder <bryder@sgi.com> Cc: Kuba Ober <kuba@mareimbrium.org> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: r8a66597-udc: add pullup functionYoshihiro Shimoda2011-07-091-0/+16
| | | | | Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: add support for TEST_MODEYoshihiro Shimoda2011-07-081-1/+22
| | | | | | | | | | The USB high speed device must support the TEST_MODE, but the driver didn't support it. When we sent the SET_FEATURE for TEST_MODE to the driver, the request was successful, but the module didn't enter the TEST_MODE. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: Make BUSWAIT configurable through platform dataYoshihiro Shimoda2011-07-081-1/+5
| | | | | | | | | | | | | | | | | | BUSWAIT is a 4-bit-wide value that controls the number of access waits from the CPU to on-chip USB module. b'0000 inserts 0 wait (2 access cycles) and b'1111 inserts 15 waits (17 access cycles, hardware initial value), respectively. BUSWAIT value depends on peripheral clock frequency supplied to on-chip of each CPU, hence should be configurable through platform data. Note that this patch assumes that b'0000 (0 wait, 2 access cycles) is rerely used and considered as invalid. If valid 'buswait' data is not provided by platform, initial b'1111 (15 waits, 17 access cycles) will be applied as a safe default. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: fix cannot connect after rmmod gadget driverYoshihiro Shimoda2011-07-081-7/+3
| | | | | | | | | | | | When we run rmmod a gadget driver, the driver will call disable_controller(). Then, because the bit of USBE in SYSCFG0 was cleared in on_chip=1 mode, we could not connect the usb when we run insmod a gadget driver next time. This patch also cleans up probe() and ->stop() about unnecessary init_controller(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: update email address in r8a66597-udc and m66592-udcYoshihiro Shimoda2011-07-081-1/+1
| | | | | Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: add platform module alias where it is missingSebastian Andrzej Siewior2011-07-011-0/+1
| | | | | | | | | Without it udev won't be able to load the driver once it notices the device unbound. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: convert all users to the new udc infrastructureSebastian Andrzej Siewior2011-06-281-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | peripheral drivers are using usb_add_gadget()/usb_del_gadget() to register/unregister to the udc-core. The udc-core will take the first available gadget driver and attach function driver which is calling usb_gadget_register_driver(). This is the same behaviour we have right now. Only dummy_hcd was tested, the others were compiled tested. Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Anton Tikhomirov <av.tikhomirov@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Dan Carpenter <error27@gmail.com> Cc: Darius Augulis <augulis.darius@gmail.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Jingoo Han <jg1.han@samsung.com> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Li Yang <leoli@freescale.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Pavankumar Kondeti <pkondeti@codeaurora.org> Cc: Roy Huang <roy.huang@analog.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> Cc: Xiaochen Shen <xiaochen.shen@intel.com> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Cc: Yuan-Hsin Chen <yhchen@faraday-tech.com> Cc: cxie4 <cxie4@marvell.com> Cc: linux-geode@lists.infradead.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: r8a66597-udc: fix spinlock usageYoshihiro Shimoda2011-04-131-0/+2
| | | | | | | | Because the disconnect function in the composite driver will call spin_lock, this driver has to call spin_unlock before calling driver->disconnet(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: r8a66597-udc: Fixed bufnum of BulkYusuke Goda2011-02-031-1/+1
| | | | | | | Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com> Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: r8a66597-udc: Add processing when USB was removed.Yusuke Goda2010-10-221-0/+3
| | | | | | | | | | When USB was removed, this patch prepares for the next insertion. Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com> Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: Remove pr_<level> uses of KERN_<level>Joe Perches2010-10-221-1/+1
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb gadget: don't save bind callback in struct usb_gadget_driverUwe Kleine-König2010-10-221-4/+5
| | | | | | | | | | | | | | | | | | | | | | To accomplish this the function to register a gadget driver takes the bind function as a second argument. To make things clearer rename the function to resemble platform_driver_probe. This fixes many section mismatches like WARNING: drivers/usb/gadget/g_printer.o(.data+0xc): Section mismatch in reference from the variable printer_driver to the function .init.text:printer_bind() The variable printer_driver references the function __init printer_bind() All callers are fixed. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [m.nazarewicz@samsung.com: added dbgp] Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: r8a66597-udc: return -ENOMEM if kzalloc() failsAxel Lin2010-08-231-0/+1
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: r8a66597-udc pio to mmio accessor conversion.Paul Mundt2010-06-021-2/+2
| | | | | | | | | | | | r8a66597-udc is erroneously using PIO routines on MMIO registers, which presently blows up for any platform that elects to either override or do away with PIO routines. This managed to work for the common cases since the PIO routines were simply wrapped to their MMIO counterparts. This switches over to using the MMIO routines directly, and enables us to kill off a lot of superfluous casting in the process. Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'master' into export-slabhTejun Heo2010-04-051-1/+0
|\
| * USB gadget r8a66597-udc.c: duplicated includeAndrea Gelmini2010-03-261-1/+0
| | | | | | | | | | | | | | drivers/usb/gadget/r8a66597-udc.c: linux/err.h is included more than once. Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* usb/gadget: fix compile error on r8a66597-udc.cGrant Likely2010-03-191-0/+1
| | | | | | | | C file uses IS_ERR and PTR_ERR, but doesn't include <linux/err.h> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: r8a66597-udc: Prototype IS_ERR() and PTR_ERR()Mark Brown2010-02-161-0/+1
| | | | | | | | | | | The build of r8a66597-udc was failing on ARM since IS_ERR() and PTR_ERR() weren't protyped. Presumably err.h is being pulled in by another header on other platforms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: r8a66597-udc: implement the set_wedge methodYoshihiro Shimoda2009-08-211-2/+26
| | | | | | | fix the problem that MSC Tests of USBCV detects some warnings. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud