summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/usb-host'Sascha Hauer2014-08-077-142/+376
|\ | | | | | | | | Conflicts: drivers/usb/core/Makefile
| * USB: host: add xHCI HCD, Hub, and platform driverSebastian Hesselbarth2014-07-281-0/+33
| | | | | | | | | | | | | | | | | | | | 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-281-0/+18
| | | | | | | | | | | | | | | | | | 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: 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-241-26/+1
| | | | | | | | | | | | | | | | | | 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: Move FooRequest defines and add class requestsSebastian Hesselbarth2014-07-241-0/+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: 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-181-3/+3
| | | | | | | | | | | | | | | | 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>
| * commands: usb: add tree view capabilityAntony Pavlov2014-07-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+1
| | | | | | | | | | | | | | | | 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-0710-205/+681
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * | USB: gadget: Add a multi function gadgetSascha Hauer2014-07-241-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-241-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Add release stringSascha Hauer2014-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we only have version_string which contains information about the date the binary was compiled and by whom it has been compiled. This adds a release_string which only contains the plain release version. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: DFU: register as USB functionSascha Hauer2014-07-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Add function to parse a string in dfu formatSascha Hauer2014-07-222-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-67/+0
| | | | | | | | | | | | | | | | | | There's no reason to have them under include/ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: specify vendor/product id with device parametersSascha Hauer2014-07-223-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | param: Add dev_add_param_stringSascha Hauer2014-07-221-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | This function allows drivers to create a string parameter and provides access to it via a pointer. Using regular dev_add_param only allows access via dev_get_param(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: composite: Break out of potential endless loopSascha Hauer2014-07-221-0/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: Update to 3.15Sascha Hauer2014-07-224-115/+598
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-221-0/+2
| |\ \
| * \ \ Merge branch 'for-next/misc' into for-next/usb-gadgetSascha Hauer2014-07-228-18/+571
| |\ \ \ | | |_|/ | |/| |
* | | | Merge branch 'for-next/usb'Sascha Hauer2014-08-072-83/+15
|\| | |
| * | | USB: Remove conflicting USB_SPEED_* definitionsSascha Hauer2014-07-182-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have USB_SPEED_* definitions as macros in usb_defs.h and as an enum in ch9.h. The defines in usb.h correspond to hardware bits in the ehci controller. Get rid of them and keep the hardware independent enums. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | USB: Use descriptors from ch9.hSascha Hauer2014-07-181-62/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the descriptors from ch9.h instead of duplicating them in usb.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | USB: introduce usb_interface/usb_configuration structsSascha Hauer2014-07-181-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have two conflicting definitions of struct usb_config_descriptor and struct usb_interface_descriptor in the tree. This is because the USB code uses additional fields in the structs for internal housekeeping. Add struct usb_interface and struct struct usb_configuration with the housekeeping data and embed the corresponding hardware structs into them. This frees the way to use the definitions from ch9.h in the next step. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/rtc'Sascha Hauer2014-08-073-0/+71
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/mips/dts/jz4755.dtsi commands/Makefile
| * | | | rtc-lib: import rtc_time_to_tm() from linux-3.15Antony Pavlov2014-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | Merge branch 'for-next/i2c' into HEADSascha Hauer2014-08-022-0/+84
| |\ \ \ \
| * | | | | Add a simple rtc frameworkAntony Pavlov2014-07-312-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a simple rtc framework for reading and setting board's RTC time. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | lib: import 'bcd' from linux-3.15Antony Pavlov2014-07-311-0/+22
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/net'Sascha Hauer2014-08-071-0/+1
|\ \ \ \ \
| * | | | | net: phy: Add minimal support for QSGMII PHYEzequiel Garcia2014-07-311-0/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Linux's support by Thomas Petazzoni: commit b9d12085f2f531fdea67f0361564e0812696227c Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Date: Tue Apr 15 15:50:19 2014 +0200 net: phy: add minimal support for QSGMII PHY This commit adds the necessary definitions for the PHY layer to recognize "qsgmii" as a valid PHY interface. A QSMII interface, as defined at http://en.wikipedia.org/wiki/Media_Independent_Interface#Quad_Serial_Gigabit_Media_Independent_Interface, is "is a method of combining four SGMII lines into a 5Gbit/s interface. QSGMII, like SGMII, uses LVDS signalling for the TX and RX data and a single LVDS clock signal. QSGMII uses significantly fewer signal lines than four SGMII busses." This type of MAC <-> PHY connection might require special handling on the MAC driver side, so it should be possible to express this type of MAC <-> PHY connection, for example in the Device Tree. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: devicetree@vger.kernel.org Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/misc'Sascha Hauer2014-08-079-18/+573
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/Makefile
| * | | | | include/bbu: Add missing include errno.hMarkus Pargmann2014-07-291-0/+2
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | lib: Add bitmap functions from kernelSascha Hauer2014-07-171-0/+285
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | include: update bitop functions from kernelSascha Hauer2014-07-172-1/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the bitop functions from v3.16-rc4 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | include: Add foreign endianess adding functions from kernelSascha Hauer2014-07-171-0/+29
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | include: Add round_up/round_down macros from kernelSascha Hauer2014-07-171-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yes, we already have roundup/rounddown. Unlike these macros round_up/round_down are optimized to (and only work with) power-of-2 arguments. It's a poor name, but kernel code needs it, so add it to barebox aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | include: Add DECLARE_BITMAP from kernelSascha Hauer2014-07-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some code operating on bitmaps needs it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | introduce verbose debugSascha Hauer2014-07-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During debugging it sometimes helps to me even more verbose. This adds an additional debug level for this. Also we remove an already existing pr_vdebug definition in the USB gadget u_serial driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | malloc.h: fix codingstyleSascha Hauer2014-07-091-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove trailing newline - use void *fn instead of void* fn Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | dlmalloc: remove unused functionsSascha Hauer2014-07-091-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove unused function declarations and definitions: - vallocc is #if 0 in source code - pvalloc is defined but not used - cfree is defined but not used - malloc_usable_size is unused - mallopt is not defined - mallinfo is not defined Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/metadata'Sascha Hauer2014-08-075-21/+141
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/dts/Makefile common/Makefile lib/Makefile
| * | | | | Add support for metadata in barebox imagesSascha Hauer2014-08-072-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's often useful to get some information about a barebox image before starting or flashing it. This patch introduces barebox Image MetaData (IMD). When enabled a barebox image will contain a list of tags containing the desired information. We have tags for: - the barebox release (2014.07.0-00160-g035de50-dirty) - the build timestamp (#741 Mon Jul 28 15:08:54 CEST 2014) - the board model the image is intended for - the device tree toplevel compatible property Also there is an additional generic key-value store which stores parameters for which no dedicated tag exists. In this patch it is used for the memory size an image supports. Since there is no fixed offset in a barebox image which can be used for storing the information, the metadata is stored somewhere in the image and found by iterating over the image. This works for most image types, but obviously not for SoC images which are encoded or encrypted in some way. There is a 'imd' tool compiled from the same sources for barebox, for the compile host and for the target, so the metadata information is available whereever needed. For device tree boards the model and of_compatible tags are automatically generated. Example output of the imd tool for a Phytec phyFLEX image: build: #889 Wed Jul 30 16:08:54 CEST 2014 release: 2014.07.0-00167-g6b2070d-dirty parameter: memsize=1024 of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | read_file: introduce read_file_2Sascha Hauer2014-08-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_file has some limitations: - It is not possible to check the error code since read_file returns NULL for failure - It is not possible to limit the buffer size to sensible limits. This patch introduces read_file_2 which doesn't have these limitations. read_file becomes a wrapper around read_file_2. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>