summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* EFI: add missing includeMichael Olbrich2014-09-031-0/+1
| | | | | | | | | | | | | | Otherwise building produces these warnings: [...] arch/efi/efi/efi-image.c:48:2: warning: implicit declaration of function 'read_file' [-Wimplicit-function-declaration] arch/efi/efi/efi-image.c:48:6: warning: assignment makes pointer from integer without a cast [enabled by default] [...] And bootm fails for x86_64. The implicit declaration has an int as return value, so half of the returned address is lost. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>
* scripts: gitignore: update based on MakefileAndreas Pretzsch2014-09-012-12/+11
| | | | | | | | | Create up-to-date list of hostprogs and targetprogs based on Makefile. Have this list sorted like the targets in the Makefile to ease maintenance. Also move some leftovers from root .gitignore over here. Signed-off-by: Andreas Pretzsch <apr@cn-eng.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: add bareboximd{,-target} to .gitignoreAntony Pavlov2014-09-011-0/+2
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* openrisc: add barebox.lds to .gitignoreAntony Pavlov2014-09-011-0/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: nitrogen6x: new memory setup from BD u-bootLucas Stach2014-09-018-105/+136
| | | | | | | | This fixes various stability issues seen on new boards with the old setup. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: mach-imx: add MMDC and CCM register defines for use in DCDLucas Stach2014-09-014-0/+205
| | | | | | | Makes .imxcfg files a lot more readable. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-image: add input validation to mwLucas Stach2014-09-011-3/+18
| | | | | | | | | | Stop and print a helpful message if we encounter an illegal token while parsing the DCD config, instead of silently swallowing the error and pushing random stuff into the DCD. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile.lib: imxcfg: fix include pathLucas Stach2014-09-011-1/+1
| | | | | | | | | MACH is not defined in this context, also it's very unlikely that we will use the imximg tool with an other arch than IMX, so just hardcode the path. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: tqma53: remove cpu_to_be32( from imx scriptSascha Hauer2014-09-011-54/+54
| | | | | | | Remove leftovers from previous conversion from C code to imxcfg script. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* EFI: fix error handling in efi_get_boot()Michael Olbrich2014-09-011-1/+1
| | | | | | | efi_get_global_var() returns an error code, not NULL when it fails. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* readline: Fix history prev when history is emptySascha Hauer2014-09-011-1/+5
| | | | | | | | | | | | | | | | We cannot use list_entry() on an empty list. Without history we have to return an empty line. This fixes a crash when the cursor up button is pressed and no command has been entered previously. Broken since: commit ada160a34a1ec8421d5bb7b9dd746294668a5130 Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Tue Jul 29 11:54:26 2014 +0200 readline: reimplement history functions Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Teresa Gamez <t.gamez@phytec.de>
* Merge branch 'for-next/usb-host'Sascha Hauer2014-08-0722-739/+4705
|\ | | | | | | | | 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-286-0/+3480
| | | | | | | | | | | | | | | | | | | | 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>
| * include: import {lower,upper}_32_bits helpersSebastian Hesselbarth2014-07-281-0/+16
| | | | | | | | | | | | | | | | This imports {lower,upper}_32_bits defines to allow to get upper and lower 32b part of a 64b number. 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-282-11/+19
| | | | | | | | | | | | | | | | | | 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: remove redundant defines from usb_defs.hSebastian Hesselbarth2014-07-241-117/+0
| | | | | | | | | | | | | | | | | | We imported a bunch of defines with ch9.h and ch11.h that are now duplicated in usb_defs.h. Get rid of each duplicate in usb_defs.h and prefer the ones from ch9.h and ch11.h. 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-243-33/+8
| | | | | | | | | | | | | | | | | | 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-242-16/+26
| | | | | | | | | | | | | | | | | | {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: fixup usb_hub_descriptor length nameSebastian Hesselbarth2014-07-241-1/+1
| | | | | | | | | | | | | | | | | | All other descriptors have their length field named bLength, except imported usb_hub_descriptor from Linux uses bDescLength. Adjust the name to match the others. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: reduce USB_MAXCHILDREN on imported ch11.hSebastian Hesselbarth2014-07-241-1/+3
| | | | | | | | | | | | | | | | | | Barebox supports up to 8 USB devices attached on a Hub, Linux does 31. Reduce the USB_MAXCHILDREN define in ch11.h to the Barebox one and put a comment above. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: import ch11.h from LinuxSebastian Hesselbarth2014-07-241-0/+277
| | | | | | | | | | | | | | | | | | | | Linux has an extra include for chapter 11 (Hub Specification) of USB 2.0 spec. We already have a ch9.h, so import the one from Linux. Barebox specific changes will be patched up later. 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-184-37/+19
| | | | | | | | | | | | | | | | 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-183-4/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-182-9/+93
| | | | | | | | | | | | | | | | 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-0743-1454/+4950
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * | Documentation: Add documentation for Fastboot and Composite Multifunction GadgetSascha Hauer2014-07-241-0/+48
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Documentation: Add documentation for USB serial consoleSascha Hauer2014-07-241-0/+7
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | 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-246-1/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-244-1/+908
| | | | | | | | | | | | | | | | | | | | | | | | 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>