aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
AgeCommit message (Collapse)Author
2008-07-30USB: m66592-udc: Fix up dev_set_name() badness.Paul Mundt
Commit 0031a06e2f07ab0d1bc98c31dbb6801f95f4bf01 converted all of the USB drivers to use dev_set_name(), though there was a typo on the m66592-udc conversion that handed off the wrong pointer (we want the struct device here obviously, not the struct usb_gadget). Signed-off-by: Paul Mundt <lethal@linux-sh.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25Rename WARN() to WARNING() to clear the namespaceArjan van de Ven
We want to use WARN() as a variant of WARN_ON(), however a few drivers are using WARN() internally. This patch renames these to WARNING() to avoid the namespace clash. A few cases were defining but not using the thing, for those cases I just deleted the definition. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Greg KH <greg@kroah.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-23Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (85 commits) [ARM] pxa: add base support for PXA930 Handheld Platform (aka SAAR) [ARM] pxa: add base support for PXA930 Evaluation Board (aka TavorEVB) [ARM] pxa: add base support for PXA930 (aka Tavor-P) [ARM] Update mach-types [ARM] pxa: make littleton to use the new smc91x platform data [ARM] pxa: make zylonite to use the new smc91x platform data [ARM] pxa: make mainstone to use the new smc91x platform data [ARM] pxa: make lubbock to use new smc91x platform data [NET] smc91x: prepare SMC_USE_PXA_DMA to be specified in platform data [NET] smc91x: prepare for SMC_IO_SHIFT to be a platform configurable variable [NET] smc91x: add SMC91X_NOWAIT flag to platform data [NET] smc91x: favor the use of SMC91X_USE_* instead of SMC_CAN_USE_* [NET] smc91x: remove "irq_flags" from "struct smc91x_platdata" [ARM] 5146/1: pxa2xx: convert all boards to call pxa2xx_transceiver_mode helper Support for LCD on e740 e750 e400 and e800 e-series PDAs E-series UDC support PXA UDC - allow use of inverted GPIO for pullup Add e350 support Fix broken e-series build E-series GPIO / IRQ definitions. ...
2008-07-21device create: usb: convert device_create to device_create_drvdataGreg Kroah-Hartman
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb_gadget: composite cdc gadget fault handlingDavid Brownell
These two fixes ensure the new "CDC Composite Device" gadget fails cleanly when it's loaded on hardware that can't support this particular gadget driver. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget: minor USBCV fix for composite frameworkDavid Lopo
Fill in a reserved/unused device qualifier field to ensure that the USBCV tests will always pass. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21USB: remove board-specific UP2OCR configuration from pxa27x-udcDaniel Ribeiro
Remove the board-specific UP2OCR configuration from the pxa27x-udc driver. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget: g_cdc dependso on NETRandy Dunlap
g_cdc needs to depend on NET, otherwise net-related build errors happen: ERROR: "netif_carrier_on" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "netif_carrier_off" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "netif_rx" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "alloc_etherdev_mq" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "free_netdev" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "register_netdev" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "print_mac" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "dev_kfree_skb_any" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "__alloc_skb" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "eth_type_trans" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "unregister_netdev" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "__netif_schedule" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "skb_put" [drivers/usb/gadget/g_cdc.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21USB: gadget: Push BKL down into driversAlan Cox
This keeps the gadget ioctl method wrapped but pushes the BKL down into the gadget code so we can use unlocked_ioctl(). Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb ethernet gadget: use composite gadget frameworkDavid Brownell
Building on the previous patches which took code from this driver and pakaged it in more-reusable network "function" components, this patch gets rid of the original code and uses those components instead. As seen with the other gadget driver conversions, the resulting code is much easier to understand and (presumably) work with. In this case that's especially true, since the Ethernet gadget had grown to handle three (!) different Ethernet-over-USB protocols. This modularization should make it much easier to add a fourth option for the newish CDC "Ethernet Emulation Model" (or EEM). Lightly tested, primarily at full speed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget: new "CDC Composite" gadget driverDavid Brownell
This is a simple example of a composite gadget, combining two Communications Class Device (CDC) functions: ECM and ACM. This provides a clear example of how the composite gadget framework is intended to work. It's surprising that MS-Windows (or at least, XP and previous) won't "just work" with something this simple... One /proc/bus/usb/devices listing looks like: T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 46 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0525 ProdID=a4aa Rev= 3.01 S: Manufacturer=Linux 2.6.26-rc6-pnut with net2280 S: Product=CDC Composite Gadget C:* #Ifs= 4 Cfg#= 1 Atr=c0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm E: Ad=86(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Not all USB peripheral controller hardware can support this driver. All the highspeed-capable peripheral controllers with drivers now in the mainline kernel seem to support this, as does omap_udc. But many full speed controllers don't have enough endpoints, or (as with the PXA controllers) don't support altsettings. Lightly tested. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb ethernet gadget: split RNDIS functionDavid Brownell
This is a RNDIS function driver, extracted from the all-in-one Ethernet gadget driver. Lightly tested ... there seems to be a pre-existing problem when talking to Windows XP SP2, not quite sure what's up with that yet. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb ethernet gadget: split CDC Ethernet functionDavid Brownell
This is a "CDC Ethernet" (ECM) function driver, extracted from the all-in-one Ethernet gadget driver. This is a good example of how to implement interface altsettings. In fact it's currently the only such example in the gadget stack, pending addition of OBEX support. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb ethernet gadget: split CDC Subset functionDavid Brownell
This is a simple "CDC Subset" (and MCCI "SAFE") function driver, extracted from the all-in-one Ethernet gadget driver. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb ethernet gadget: split out network coreDavid Brownell
Abstract the peripheral side Ethernet-over-USB link layer code from the all-in-one Ethernet gadget driver into a component that can be called by various functions, so the various flavors can be split apart and selectively reused. A notable difference from the approach taken with the serial link layer code (beyond talking to NET not TTY) is that because of the initialization requirements, this only supports one network link. (And one set of Ethernet link addresses.) That is, each configuration may have only one instance of a network function. This doesn't change behavior; the current code has that same restriction. If you want multiple logical links, that can easily be done using network layer tools. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget: RNDIS cleanupsDavid Brownell
Some cleanup to the RNDIS code: - Minor bugfix: rndis_unit() is supposed to put the link into the RNDIS_UNINITIALIZED state, which does not mean "unused". There's a separate method to stop using the link. (Bug doesn't affect anything right now because of how the code is used.) - Reduce coupling between RNDIS code and its user(s), in preparation for updates in that code: * Decouple RNDIS_RESPONSE_AVAILABLE notifications from net_device by passing just a void* handle. (Also, remove the unused return value of the notification callback.) * When it needs a copy of net_device stats, just ask for it - Remove unused/untested code backing various never-used OIDs: * RNDIS_PM, RNDIS_WAKEUP ... "should" get implemented, but the relevant docs were unclear, ambguous, and incomplete. Someone with access to the Hidden Gospels (maybe in the EU?) might be able to figure out what this should do. * RNDIS_OPTIONAL_STATS ... as the name suggests, optional. Never implemented in part because not all the semantics were clear. * OID_GEN_RNDIS_CONFIG_PARAMETER, which has been #if 0 forever. - A few small whitespace fixes Plus switch the VERBOSE symbol over to the newer VERBOSE_DEBUG style. There should be no functional changes because of this patch; it's a net source code shrink (because of the dead/unused code removal) and a small object code shrink (a couple hundred bytes on ARMv5). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget serial: use composite gadget frameworkDavid Brownell
This switches the serial gadget over to using the new "function" versions of the serial port interfacing code. The remaining code in the main source file is quite small... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget serial: split out generic serial functionDavid Brownell
Split out the generic serial support into a "function driver". This closely mimics the ACM support, but with a MUCH simpler control model. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget serial: split out CDC ACM functionDavid Brownell
Split out CDC ACM parts of "gadget serial" to a "function driver". Some key structural differences from the previous ACM support, shared with with the generic serial function (next patch): - As a function driver, it can be combined with other functions. One gadget configuration could offer both serial and network links, as an example. - One serial port can be exposed in multiple configurations; the /dev/ttyGS0 node could be exposed regardless of which config the host selected. - One configuration can expose multiple serial ports, such as ttyGS0, ttyGS1, ttyGS2, and ttyGS3. This code should be a lot easier to understand than the previous all-in-one-big-file version of the driver. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget zero: use composite gadget frameworkDavid Brownell
Update Gadget Zero to use the more modular versions of the loopback and source/sink configuration drivers which build on the new gadget framework code. The core code is a LOT simpler, and it should be much easier now to understand how the parts fit together. The conversion is an overall source shrink in terms of this gadget, since it uses more midlayer support. However, it's an overall increase in object size because there's less sharing between the two configurations (improves code clarity) and because the midlayer is a bit more functional than this driver actually needs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget zero: split out loopback configDavid Brownell
This splits the gadget zero "loopback" configuration into a standalone "configuration driver", building on the composite gadget framework code. It doesn't yet pull the original code out of gadget zero or update how that driver is built. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget zero: split out source/sink configDavid Brownell
This splits the gadget zero "source/sink" configuration into a standalone "configuration driver", building on the composite gadget framework code. It doesn't yet pull the original code out of gadget zero or update how that driver is built. Neither this, nor its sibling "loopback" configuration, is a function driver that can be combined with other functions. (The host "usbtest" driver wouldn't know how to deal with that!) However the code becomes simpler because of this conversion, so it's a net win. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget: composite gadget coreDavid Brownell
Add <linux/usb/composite.h> interfaces for composite gadget drivers, and basic implementation support behind it: - struct usb_function ... groups one or more interfaces into a function managed as one unit within a configuration, to which it's added by usb_add_function(). - struct usb_configuration ... groups one or more such functions into a configuration managed as one unit by a driver, to which it's added by usb_add_config(). These operate at either high or full/low speeds and at a given bMaxPower. - struct usb_composite_driver ... groups one or more such configurations into a gadget driver, which may be registered or unregistered. - struct usb_composite_dev ... a usb_composite_driver manages this; it wraps the usb_gadget exposed by the controller driver. This also includes some basic kerneldoc. How to use it (the short version): provide a usb_composite_driver with a bind() that calls usb_add_config() for each of the needed configurations. The configurations in turn have bind() calls, which will usb_add_function() for each function required. Each function's bind() allocates resources needed to perform its tasks, like endpoints; sometimes configurations will allocate resources too. Separate patches will convert most gadget drivers to this infrastructure. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget: descriptor copying supportDavid Brownell
Define three new descriptor manipulation utilities, for use when setting up functions that may have multiple instances: usb_copy_descriptors() to copy a vector of descriptors usb_free_descriptors() to free the copy usb_find_endpoint() to find a copied version These will be used as follows. Functions will continue to have static tables of descriptors they update, now used as __initdata templates. When a function creates a new instance, it patches those tables with relevant interface and string IDs, plus endpoint assignments. Then it copies those morphed descriptors, associates the copies with the new function instance, and records the endpoint descriptors to use when activating the endpoints. When initialization is done, only the copies remain in memory. The copies are freed on driver removal. This ensures that each instance has descriptors which hold the right instance-specific data. Two instances in the same configuration will obviously never share the same interface IDs or use the same endpoints. Instances in different configurations won't do so either, which means this is slightly less memory-efficient in some cases. This also includes a bugfix to the epautoconf code that shows up with this usage model. It must replace the previous endpoint number when updating the template descriptors, not just mask in a few more bits. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget: use new serial coreDavid Brownell
Teach "gadget serial" to use the new abstracted (and bugfixed) TTY glue, and remove all the orignal tangled-up code. Update the documentation accordingly. This is a net object code shrink and cleanup; it should make it a lot easier to see how the TTY glue should accomodate updates to the TTY layer, be bugfixed, etc. Notable behavior changes include: it can now support getty even when there's no USB connection; it fits properly into the mdev/udev world; and RX handling is better (throttling works, and low latency). Configurations with scripts setting up the /dev/ttygserial device node (with "experimental" major number) may want to change that to be a symlink pointing to the /dev/ttyGS0 file, as a migration aid; else, just switch entirely over to mdev/udev. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21usb gadget: split out serial coreDavid Brownell
This abstracts the "gadget serial" driver TTY glue into a separate component, cleaning it up and disentangling it from connection state. It also changed some behaviors for the better: - Stops using "experimental" major #127, and switches over to having the TTY layer allocate the dev_t numbers. - Provides /sys/class/tty/ttyGS* nodes, thus mdev/udev support. (Note "mdev" hotplug bug in Busybox v1.7.2: /dev/ttyGS0 will be a *block* device without CONFIG_SYSFS_DEPRECATED_V2.) - The tty nodes no longer reject opens when there's no host. Now they can support normal getty configs in /etc/inttab... - Now implements RX throttling. When the line discipline says it doesn't want any more data, only packets in flight will be delivered (currently, max 1K/8K at full/high speeds) until it unthrottles the data. - Supports low_latency. This is a good policy for all USB serial adapters, since it eliminates scheduler overhead on RX paths. This also includes much cleanup including better comments, fixing memory leaks and other bugs (including some locking fixes), messaging cleanup, and an interface audit and tightening. This added up to a significant object code shrinkage, on the order of 20% (!) depending on CPU and compiler. A separate patch actually kicks in this new code, using the functions declared in this new header, and removes the previous glue. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21USB: at91_udc: updated fifo sizesDavid Brownell
It turns out newer versions of the AT91 UDC hardware have increased sizes of some of the FIFOs. Reporting that is a Good Thing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21USB: rndis: switch to seq_filesAlexey Dobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21USB: remove CVS keywordsAdrian Bunk
This patch removes CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21USB: usb dev_set_name() instead of dev->bus_idKay Sievers
The bus_id field is going away, use the dev_set_name() function to set it properly. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21USB: usb dev_name() instead of dev->bus_idKay Sievers
The bus_id field is going away, use the dev_name() function instead. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-14Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (241 commits) [ARM] 5171/1: ep93xx: fix compilation of modules using clocks [ARM] 5133/2: at91sam9g20 defconfig file [ARM] 5130/4: Support for the at91sam9g20 [ARM] 5160/1: IOP3XX: gpio/gpiolib support [ARM] at91: Fix NAND FLASH timings for at91sam9x evaluation kits. [ARM] 5084/1: zylonite: Register AC97 device [ARM] 5085/2: PXA: Move AC97 over to the new central device declaration model [ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers [ARM] 5147/1: pxaficp_ir: drop pxa_gpio_mode calls, as pin setting [ARM] 5145/1: PXA2xx: provide api to control IrDA pins state [ARM] 5144/1: pxaficp_ir: cleanup includes [ARM] pxa: remove pxa_set_cken() [ARM] pxa: allow clk aliases [ARM] Feroceon: don't disable BPU on boot [ARM] Orion: LED support for HP mv2120 [ARM] Orion: add RD88F5181L-FXO support [ARM] Orion: add RD88F5181L-GE support [ARM] Orion: add Netgear WNR854T support [ARM] s3c2410_defconfig: update for current build [ARM] Acer n30: Minor style and indentation fixes. ...
2008-07-14[ARM] Merge most of the PXA work for initial mergeRussell King
This includes PXA work up to the SPI changes for the initial merge, since e172274ccc55d20536fbdceb6131f38e288541e0 depends on the SPI tree being merged. Conflicts: arch/arm/configs/em_x270_defconfig arch/arm/configs/xm_x270_defconfig
2008-07-14Merge commit 'v2.6.26' into bkl-removalJonathan Corbet
2008-07-13Merge branch 'pxa' into develRussell King
Conflicts: arch/arm/configs/em_x270_defconfig arch/arm/configs/xm_x270_defconfig
2008-07-12Merge branch 'eseries' into pxaRussell King
Conflicts: arch/arm/mach-pxa/Makefile
2008-07-10PXA UDC - allow use of inverted GPIO for pullupIan Molton
Signed-off-by: Ian Molton <spyro@f2s.com>
2008-07-10Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', ↵Russell King
'omap-reviewed', 'rpc', 'rtc' and 's3c' into devel
2008-07-10[ARM] 5130/4: Support for the at91sam9g20sedji gaouaou
Support for the at91sam9g20 : Atmel 400Mhz ARM 926ej-s SOC. AT91sam9g20 is an evolution of the at91sam9260 with a faster clock speed. We created a new board for this device but based the chip support directly on 9260 files with little updates. Here is the chip page on Atmel wabsite: http://atmel.com/dyn/products/product_card.asp?part_id=4337 Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com> Signed-off-by: Justin Waters <justin.waters@timesys.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-09Merge branch 'machtypes' into pxa-palmRussell King
2008-07-09[ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC ↵Philipp Zabel
drivers The pxa2xx_udc.c driver is renamed to pxa25x_udc.c (the platform driver name changes from pxa2xx-udc to pxa25x-udc) and the platform driver name of pxa27x_udc.c is fixed to pxa27x-udc. pxa_device_udc in devices.c is split into pxa25x and pxa27x flavors and the pxa27x_device_udc is enabled in pxa27x.c. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Nicolas Pitre <nico@cam.org> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Including from Ian Molton: Fixes for mistakes left over from the PXA2{5,7}X UDC split. Signed-off-by: Ian Molton <spyro@f2s.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-03ARM: OMAP: USB: Change omap USB code to use omap_read/write instead of __REGTony Lindgren
Change omap USB code to use omap_read/write instead of __REG for multi-omap Cc: David Brownell <david-b@pacbell.net> Cc: linux-usb@vger.kernel.org Cc: i2c@lm-sensors.org Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-07-03ARM: OMAP: DMA: Remove __REG accessTony Lindgren
Remove __REG access in DMA code, use dma_read/write instead: - dynamically set the omap_dma_base based on the omap type - omap_read/write becomes dma_read/write - dma channel registers are read with dma_ch_read/write Cc: David Brownell <david-b@pacbell.net> Cc: linux-usb@vger.kernel.org Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-06-20printer gadget: BKL pushdownJonathan Corbet
Add explicit lock_kernel() calls to printer_open() Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-15[ARM] 5080/1: touch PSSR_OTGPH only on pxa27x in ohci-pxa27x and pxa27x_udcPhilipp Zabel
and include pxa2xx-regs.h as build fix since PSSR definitions moved from pxa-regs.h into pxa2xx-regs.h. Note: This change is temporary as pxa27x processor specific code will be finally moved elsewhere (both drivers should support pxa3xx, too). Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-06-02[ARM] 4940/1: AT91: UDPHS driver: SAM9RL board and cpu integration.Nicolas Ferre
Adds support for the USB High Speed Device Port on the AT91SAM9RL system on chip. The AT91SAM9RL uses the same UDPHS IP as the AVR32 and the AT91CAP9 (atmel_usba_udc driver). Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-05-29USB: fsl_usb2_udc: fix recursive lockLi Yang
UDC needs to release lock before calling out to gadget driver, since it may need to reenter. The change fixes kernel BUG observed on rt kernel. > kernel BUG at kernel/rtmutex.c:683! > stopped custom tracer. > Oops: Exception in kernel mode, sig: 5 [#1] > PREEMPT MPC834x ITX > NIP: c021629c LR: c0216270 CTR: 00000000 > REGS: df761d70 TRAP: 0700 Not tainted (2.6.23.9-rt13) > MSR: 00021032 <ME,IR,DR> CR: 28000022 XER: 00000000 > TASK = df632080[241] 'IRQ-38' THREAD: df760000 > GPR00: 00000001 df761e20 df632080 00000000 11111111 00000000 df761e6c > 00000000 > GPR08: df761e48 00000000 df761e50 00000000 80000000 ede5cdde 1fffd000 > 00800000 > GPR16: ffffffff 00000000 007fff00 00000040 00000000 007ffeb0 00000000 > 1fff8b08 > GPR24: 00000000 00000026 00000000 df79a320 c026b2e8 c02240bc 00009032 > df79a320 > NIP [c021629c] rt_spin_lock_slowlock+0x9c/0x200 > LR [c0216270] rt_spin_lock_slowlock+0x70/0x200 > Call Trace: > [df761e20] [c0216270] rt_spin_lock_slowlock+0x70/0x200 (unreliable) > [df761e90] [c0182828] fsl_ep_disable+0xcc/0x154 > [df761eb0] [c0184d30] eth_reset_config+0x88/0x1d0 > [df761ed0] [c0184ec0] eth_disconnect+0x48/0x64 > [df761ef0] [c01831a4] reset_queues+0x60/0x78 > [df761f00] [c0183b74] fsl_udc_irq+0x9b8/0xa58 > [df761f50] [c003ef30] handle_IRQ_event+0x64/0x100 > [df761f80] [c003f758] thread_simple_irq+0x6c/0xc8 > [df761fa0] [c003f888] do_irqd+0xd4/0x2e4 > [df761fd0] [c0032284] kthread+0x50/0x8c > [df761ff0] [c000f9b4] kernel_thread+0x44/0x60 Signed-off-by: Li Yang <leoli@freescale.com> Cc: Eugene T. Bordenkircher <Eugene_Bordenkircher@selinc.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-20USB: pxa27x_udc - Fix Oopskarl beldan
udc_disable oopses dereferencing udc_command. Signed-off-by: Karl Beldan <karl.beldan@gmail.com> Acked-by: Robert Jarzmik <rjarzmik@free.fr> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-19[ARM] pxa: separate PXA25x and PXA27x UDC register definitionsRussell King
The PXA25x and PXA27x USB device controller register definitions are different. Currently, they live side by side in pxa-regs.h, but only one set is available depending on the setting of PXA25x or PXA27x. This means that if we build to support both PXA25x and PXA27x, the PXA27x definitions are unavailable, even to PXA27x specific code. Remove these definitions from pxa-regs.h, and place them in separate files. Include these files where appropriate. Note: according to the dependencies in drivers/usb/gadget/Kconfig, we do not support the UDC on PXA27x nor PXA3xx CPUs, so remove the platform devices from pxa27x.c and pxa3xx.c. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-05-14USB: atmel_usba_udc fixes, mostly disconnect()David Brownell
Various fixes to Atmel's high speed UDC driver. * Issue some missing disconnect() calls. Currently they are only made when VBUS power goes away (on boards where the driver can sense such changes), but that's not enough for gadget drivers to clean out all the state that's needed. Missing calls were: - After USB reset, before starting enumeration. - When unregistering a gadget driver, before unbind(). * Don't assume gadget drivers provide disconnect callbacks; make sure to not call through a null pointer! * When the driver doesn't provide an unbind() callback, refuse to unregister it. Also remove two bogus "error" messages: * Related to mis-handling of disconnect() ... don't emit error messages for disconnect() handlers that disable endpoints. All of them should be doing that; the problem is (unfixed) oddness in atmel_usba_udc. * Don't emit a diagnostic for a curious and transient nonfatal error that shows up sometimes with EP0. Those messages spammed syslog, for no good reason. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>