summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | 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>
| * | | | | move file helper functions to separate fileSascha Hauer2014-08-073-21/+15
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have our file helper functions in several places. Move them all to lib/libfile.c. With this we no longer have file helpers in fs/fs.c which contains the core fs functions and no functions in lib/libbb.c which are not from busybox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/marvell'Sascha Hauer2014-08-073-9/+22
|\ \ \ \ \
| * | | | | of: pci: import of_pci_get_devfn()Sebastian Hesselbarth2014-07-311-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marvell MVEBU PCIe driver requires of_pcie_get_devfn(), import it from Linux. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | pci: set auto-incremented bus numberSebastian Hesselbarth2014-07-311-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using more than one PCI bus, we have to assign unique numbers to each bus. Use an auto-incremented bus index and assign it to each registered bus. Also, allow the PCI host controller to update internal registers by calling set_busno with assigned bus number. While at it, add pci_controller struct to set_busno callback, add a back reference to pci_controller to pci_bus, and clean up unused left-overs from Linux import. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: mvebu: allow to fixup mbus rangesSebastian Hesselbarth2014-07-251-0/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Marvell MVEBU SoCs internal registers are usually remapped from reset default. While Dove and Kirkwood always had their registers remapped, some Armada 370 and XP where shipped with bootloaders that did not remap them. On Barebox these registers are remapped early and on all MVEBU SoCs, so provided DTs should always reflect that in their mbus ranges property. This patch registers a fixup for DTBs and allows individual SoCs to add specific remap ranges to the fixup list. The fixup is registered on pure_initcall to even allow to fixup pbl or appended DTBs. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/i2c'Sascha Hauer2014-08-072-0/+84
|\ \ \ \ \ | | |_|/ / | |/| | |
| * | | | gpio: add driver for PCA95[357]x, PCA9698, TCA64xx, and MAX7310 SMBus I/O ↵Antony Pavlov2014-07-141-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expanders Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | i2c: import SMBus stuff from linuxAntony Pavlov2014-07-141-0/+57
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch imports i2c_smbus_{read,write}* functions from linux-3.15. Here is a quote from linux.git/Documentation/i2c/smbus-protocol: If you write a driver for some I2C device, please try to use the SMBus commands if at all possible (if the device uses only that subset of the I2C protocol). This makes it possible to use the device driver on both SMBus adapters and I2C adapters (the SMBus command set is automatically translated to I2C on I2C adapters, but plain I2C commands can not be handled at all on most pure SMBus adapters). So having i2c_smbus_{read,write}* functions in barebox makes porting of linux i2c client drivers much easier as many drivers rely on these smbus functions. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/env'Sascha Hauer2014-08-071-1/+2
|\ \ \ \
| * | | | envfs: change API to be able to forward special flags into the envfs superblockJuergen Borleis2014-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to mark an stored envfs image with special features (intentional ignore for example), we now can feed forward these flags. By forwarding a '0' for the flags nothing changes because the envfs superblock was already allocated with xzalloc. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | envfs: provide an intentional way to ignore an existing external environmentJuergen Borleis2014-08-011-0/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple flag to envfs to be able to mark an external environment as "not to be used". This change should not affect existing systems, because the current envfs implementation ensures the 'flags' member in the envfs master block is always zeroed. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/efi'Sascha Hauer2014-08-078-549/+665
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Conflicts: .gitignore Makefile drivers/serial/Makefile
| * | | EFI: introduce efi_strguid to convert GUID to human readable namesJean-Christophe PLAGNIOL-VILLARD2014-07-161-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use in devinfo Protocols Tested today on qemu with all the GUID translated Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Add initial EFI architecture supportSascha Hauer2014-07-161-265/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for running barebox in an EFI environment on X86 PC hardware. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | efi: Add more error codesSascha Hauer2014-07-141-7/+34
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | filetype: Add DOS EXE file detection supportSascha Hauer2014-07-141-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Move efi.h to include/Sascha Hauer2014-07-141-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With upcoming EFI payload support the efi.h file will diverge from the kernel, so move it from include/linux/ to include/ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | block: Add flush callbackSascha Hauer2014-07-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some block devices need an explicit callback for flushing written blocks. Add this callback. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Add beginning wchar supportSascha Hauer2014-07-141-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EFI uses 16 bit character strings. Add beginning support for this. Since barebox uses 8 bit strings internally we need conversion functions to convert between 16 bit and 8 bit strings. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Add hex_byte_pack and hex_byte_pack_upper from kernelSascha Hauer2014-07-111-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | Utility functions needed by the UUID/GUID printf support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: Add puts callback to console devicesSascha Hauer2014-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices may have a much more efficient way to output strings rather than single characters. Let console devices implement a callback for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Make IPaddr_t a 32bit typeSascha Hauer2014-07-111-1/+1
| |/ / | | | | | | | | | | | | | | | | | | unsigned long is 64bit wide on some architectures. Make IPaddr_t a typedef to uint32_t to make sure it's 32bit wide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / console: Allow persistent device namesSascha Hauer2014-07-111-0/+2
|/ / | | | | | | | | | | | | | | Add a devname field to struct console_device so that the device name can be set by the driver. This makes it possible to have persistent device names. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / barebox: common: added new filetypesWadim Egorov2014-07-091-0/+2
|/ | | | | | | | | - Added omap CH image header recognition * filetype_ch_image * filetype_ch_image_be Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rtc.h: drop unused U-Boot stuff; fix whitespaceAntony Pavlov2014-07-071-5/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/net'Sascha Hauer2014-07-041-3/+5
|\