summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* pinctrl: rockchip: add support for new DT bindingsBeniamino Galvani2014-09-012-36/+18
| | | | | | | | | This patch modifies the Rockchip pinctrl driver to comply with the new DT bindings, which use two syscon nodes to specify the address of memory resources. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: add device tree supportBeniamino Galvani2014-09-011-0/+6
| | | | | | | | This patch defines a OF compatible property for the syscon driver to allow it to be probed from device tree. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb-host'Sascha Hauer2014-08-0714-591/+4227
|\ | | | | | | | | Conflicts: drivers/usb/core/Makefile
| * usb: ehci: use linux-way ehci_readl and ehci_writelAntony Pavlov2014-07-281-8/+11
| | | | | | | | | | | | | | Also drop nowhere defined CONFIG_EHCI_DESC_BIG_ENDIAN. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: add xHCI PCI driverSebastian Hesselbarth2014-07-283-0/+53
| | | | | | | | | | | | | | This adds a driver for PCI-attached xHCI controllers. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: add xHCI HCD, Hub, and platform driverSebastian Hesselbarth2014-07-285-0/+3447
| | | | | | | | | | | | | | | | | | | | This adds support for xHCI USB 3.0 host controllers found on various SoCs and PCI devices. Currently, the driver only supports the virtual USB 2.0 ports of the host controller, so if you plan to use USB 3.0 devices, put a USB 2.0 cable in between. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: EHCI: use min3 from LinuxSebastian Hesselbarth2014-07-281-11/+1
| | | | | | | | | | | | | | | | | | EHCI HCD has a private version of min3() determining the smallest number out of 3. We already have min()/max() imported from Linux, also get min3()/max3() and use it instead of EHCI's private one. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: improve error paths and tear-downSebastian Hesselbarth2014-07-283-27/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB core isn't too strict about allocation/deallocation and add/remove sequences of usb devices. Especially, error paths and device tear-down are kind of broken and cause hangs on failing usb device detect. This patch improves the situation by introducing a usb_free_device() that tears down allocated resources by usb_alloc_new_device(). usb_remove_device() now only deals with resources that have been added by usb_new_device(). Also, error handling is fixed or improved to ensure that no devices are unregistered that have not been previously registered. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: Count detected USB devices independent of dev_indexSebastian Hesselbarth2014-07-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding a usb device increases dev_index every time a new device is allocated. Removing a usb device does not decrease again, of course. As we print the number of detected usb devices after each usb bus scan based on dev_index, we cannot trust dev_index here. Keep track of the correct number of (currently) detected usb devices by introducing an independent dev_count that gets increased on detect and decreased on remove. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: Fix stale usb devices in usb_device_listSebastian Hesselbarth2014-07-281-0/+1
| | | | | | | | | | | | | | | | | | New usb devices are added to a list of usb devices, but when removing the corresponding usb_device it was not removed from that list. Fix it by deleting it properly from the usb_device_list. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: Use descriptors from ch11.hSebastian Hesselbarth2014-07-242-7/+7
| | | | | | | | | | | | | | | | | | Use the descriptors from ch11.h instead of duplicating them in usb.h. usb_hub_descriptor now contains a union .u to differentiate HS hub descriptor from SS hub descriptor. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: EHCI: use descriptor length fieldsSebastian Hesselbarth2014-07-241-3/+3
| | | | | | | | | | | | | | | | Instead of hard-coding descriptor length, pick it from the corresponding descriptor. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: EHCI: make use of defines for descriptorsSebastian Hesselbarth2014-07-241-52/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have a full set of defines for each descriptor field, make use of it for the EHCI HCD descriptors. This fixes endianess issues for .device.bcdUSB, .device.bcdDevice, .config.wTotalLength, and .endpoint.wMaxPacketSize. Also, .endpoint.bInterval was set to 0 instead of 255 due to a copy-and-paste error while assigning u8[] to usb_endpoint_descriptor. This also is a preparation for including ch11.h later, which has a modified usb_hub_descriptor for USB 3.0. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: EHCI: reuse ch9.h config and interface descriptorsSebastian Hesselbarth2014-07-242-27/+2
| | | | | | | | | | | | | | | | | | Now that usb_config_descriptor and usb_interface_descriptor are clean of any additional fields, drop the duplication in EHCI code and use the default ones. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: Move FooRequest defines and add class requestsSebastian Hesselbarth2014-07-241-16/+0
| | | | | | | | | | | | | | | | | | {Device,Interface,Endpoint}Requests are currently defined in private ehci.h but are also useful for other drivers than ehci-hcd. Move them to usb/usb_defs.h and also add some more class requests. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: fix PowerPowerCtrlMask assignmentSebastian Hesselbarth2014-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | usb_hub_configure() gets the hub descriptor and copies its values over to a local descriptor. While copying PortPowerCtrlMask it erroneously overwrites DeviceRemovable due to a copy-and-paste error. Fix it up. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: drop force rescanSascha Hauer2014-07-182-28/+13
| | | | | | | | | | | | | | | | We can now detect changes in the USB device hierarchy properly, so the 'force' option to the usb command is no longer necessary. We just scan the busses each time the usb command is called. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: detect port change only once in usb_hub_configure_portSascha Hauer2014-07-181-2/+8
| | | | | | | | | | | | | | Otherwise a device may be registered/unregistered multiple times during scanning the hub ports. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: implement usb_remove_deviceSascha Hauer2014-07-183-0/+21
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: hub: only configure hub onceSascha Hauer2014-07-181-1/+8
| | | | | | | | | | | | | | | | | | | | We had a single function which configures the hub and scans the ports. Split this up and configure the hub only once and scan the ports during detect() time. This allows to plug in additional devices into a hub while continuing to use the already existing devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: factor out port configuration to separate functionSascha Hauer2014-07-181-51/+74
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: hub: Use usb_hub_power_on from U-BootSascha Hauer2014-07-181-1/+18
| | | | | | | | | | | | | | | | U-Boots power good delay function is more conservative than ours. Use it to be on the safe side. The U-Boot guys have discussed a lot about it, let's hope they got it right. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: hub: Use dev_dbgSascha Hauer2014-07-181-48/+40
| | | | | | | | | | | | | | Now that a hub is a driver use dev_dbg rather than plain printf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: fixup USB device hierarchySascha Hauer2014-07-182-2/+2
| | | | | | | | | | | | | | Make all USB devices children to the hub device they are attached to. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: hub: Turn into a driverSascha Hauer2014-07-185-415/+460
| | | | | | | | | | | | | | | | Since we have a driver model we can make the hub driver a real driver model driver. Put it into a new file to separate the hub from the USB core stuff. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: host: simplify usb_new_deviceSascha Hauer2014-07-181-18/+5
| | | | | | | | | | | | | | | | | | usb_new_device tries to find the port number it is attached to by iterating over the parents children and using the loop counter index as port number. Instead, just use the portnr field in struct usb_device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: usb: add tree view capabilityAntony Pavlov2014-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds U-Boot 'usb tree' command functionality to barebox. Here is an example output: 1 ID 0000:0000 | u-boot EHCI Host Controller | +-2 ID 05e3:0606 | USB2.0 Hub | +-3 ID 10c4:ea60 | Silicon Labs CP2102 USB to UART Bridge Contr P-00-00669 | +-4 ID 05e3:0606 | | USB2.0 Hub | | | +-5 ID 05e3:0608 | | | USB2.0 Hub | | | | | +-6 ID 0d8c:000c | | C-Media USB Headphone Set | | | +-7 ID 0d8c:000c | C-Media USB Headphone Set | +-8 ID 0846:1040 NETGEAR NETGEAR FA120 Adapter The tree view is enabled with 'usb -t' Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: i.MX chipidea: Implement OTG support for the poorSascha Hauer2014-07-181-9/+92
| | | | | | | | | | | | | | | | For situations when we don't know the desired mode for the OTG port we register a otg device which has a mode parameter to specifiy the desired mode on the command line. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb-gadget'Sascha Hauer2014-08-0722-1082/+3887
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * | USB: gadget: fsl_udc: Be more tolerant in fsl_ep_dequeueSascha Hauer2014-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When an endpoint hasn't been enabled ep->desc is NULL and fsl_ep_dequeue crashes with a NULL pointer dereference. Check ep->desc before continuing. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: Add a multi function gadgetSascha Hauer2014-07-242-1/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the Kernel multi function this gadget driver is used for creating a USB device with multiple functions. This is created and removed with the newly created 'usbgadget' command. Based on the options it creates combinations of DFU, fastboot and serial USB functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: Add Android fastboot supportSascha Hauer2014-07-243-1/+895
| | | | | | | | | | | | | | | | | | | | | | | | The Android fastboot protocol Can be used to update firmware and to issue other lowlevel commands to the bootloader. This adds a fastboot implementation based on the U-Boot fatboot code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: drop app idle stateSascha Hauer2014-07-221-40/+2
| | | | | | | | | | | | | | | | | | | | | | | | The app idle state hasn't been correctly implemented. It isn't useful for barebox anyway since in barebox there is no app running we have to stop first. We can just start in DFU mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: register as USB functionSascha Hauer2014-07-221-45/+96
| | | | | | | | | | | | | | | | | | | | | | | | Register DFU as usb_function_instance to make it work with composite gadgets. Also use this internally for registering as DFU device (with the 'dfu' command). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: return -EINTR when interruptedSascha Hauer2014-07-221-1/+8
| | | | | | | | | | | | | | | | | | | | | Instead of returning succesfully when ctrl-c is pressed return with -EINTR. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: free resources when usb_gadget_poll failsSascha Hauer2014-07-221-1/+1
| | | | | | | | | | | | | | | | | | Make sure usb_composite_unregister() is called after usb_composite_probe() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: use usb_gstrings_attachSascha Hauer2014-07-221-10/+10
| | | | | | | | | | | | | | | | | | | | | Instead of allocating string ids one by one use usb_gstrings_attach() to simplify things. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: Move stuff to dfu_bindSascha Hauer2014-07-221-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we want to create a composite device dfu_bind_config will not be called for a composite device. Move the initialisation needed by both the composite device and the single function device from dfu_bind_config to dfu_bind. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add function to parse a string in dfu formatSascha Hauer2014-07-222-26/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | The dfu command parses a string which contains a list of devices and flags. This format is useful for other users aswell, so add common helper functions to parse it and let the dfu command use this format. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: Move locally used defines/structs to dfu driverSascha Hauer2014-07-221-0/+66
| | | | | | | | | | | | | | | | | | There's no reason to have them under include/ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: Use usb_assign_descriptors/usb_free_all_descriptorsSascha Hauer2014-07-221-15/+7
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: remove unused codeSascha Hauer2014-07-221-14/+0
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: specify vendor/product id with device parametersSascha Hauer2014-07-223-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the device parameters: usbgadget.product usbgadget.vendor usbgadget.manufacturer usbgadget.productname These variables are used to configure the USB vendor id, product id, manufacturer name and product name. Previously these were configured with arguments to the usbserial and dfu command. The parameters are device static, so it's nice to configure it somewhere in the environment instead of when calling dfu/usbserial. Also when other gadget drivers are added we do not have to duplicate the option parsing further. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: usbserial: Always enable consoleSascha Hauer2014-07-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | When a USB console is registered on the command line it doesn't make much sense to disable it in the core. Always enable the USB console to make it usable without additional commands when registered. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: fsl_udc: Warn about freeing queued descriptorsSascha Hauer2014-07-221-0/+5
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: composite: Break out of potential endless loopSascha Hauer2014-07-221-1/+6
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: dequeue descriptor before freeing itSascha Hauer2014-07-221-0/+1
| | | | | | | | | | | | | | | | | | The same patch has been sent for the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: Update to 3.15Sascha Hauer2014-07-2220-903/+2451
| | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the USB Gadget stack to Linux-3.15. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Conflicts: drivers/usb/core/Makefile
| * | Merge branch 'for-next/console' into for-next/usb-gadgetSascha Hauer2014-07-222-1/+10
| |\ \
| * \ \ Merge branch 'for-next/misc' into for-next/usb-gadgetSascha Hauer2014-07-224-12/+20
| |\ \ \ | | |_|/ | |/| |