summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2017.12.0v2017.12.0Sascha Hauer2017-12-141-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: dts: bcm2835-rpi: re-enable booting from SD cardRoland Hieber2017-12-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Kernel commit a19adf8d86e822eba502486524127595372c85f6 [0] changed the RPi1 device tree from &sdhci to &sdhost, which was imported in barebox commit d14b844b08635c717fb52a294ed8d6872e260315. It seems that barebox does not have a driver for brcm,bcm2835-sdhost (yet), which resulted in barebox unable to boot from SD card. However, the driver for brcm,bcm2835-sdhci worked fine in the past. Although the upstream change was made for good reasons, the simplest change for barebox for now is to revert to using &sdhci and disable &sdhost. Thanks to Alexander Dahl for raising this issue on the DistroKit mailing list! [0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a19adf8d86e822eba502486524127595372c85f6 Cc: Alexander Dahl <post@lespocky.de> Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: globalvar: fix removing multiple nvvars with wildcardsSascha Hauer2017-11-301-2/+3
| | | | | | | | | | | nvvar_remove takes wildcards, so it can remove multiple variables. This means we cannot return after the first loop iteration, but instead must continue. Fixes: 609d3edc3ad9 (common: globvar: let nvvar_remove() report non-existing variable) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc:
* usbgadget: fastboot: select FILE_LISTLucas Stach2017-11-211-0/+1
| | | | | | | | | The file list functions are used by the fastboot gadget since a3976c3a84f2 (usbgadget: fastboot: Use function to find file_list entry by name). Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-bbu-nand-fcb: fix build on MX28 onlyLucas Stach2017-11-211-3/+15
| | | | | | | | | This code may be compiled without ARCH_IMX6 present, so it must not depend on any functions provided by the architecture support. Fixes: a2618c215bff (imx-bbu-nand-fcb: add support for imx6ul) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: imx: santaro: select i2cLucas Stach2017-11-211-0/+2
| | | | | | | | The board support tries to access a i2c bus to find out which touchscreen is connected. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: boards: phytec-som-am335x: Fix SPI boot scriptDaniel Schultz2017-11-211-1/+1
| | | | | | | | | | | | Because our SPI NOR flashes are too small, we require a root filesystem in a NAND media. The kernel bootargs has a wrong parameter and lead to: VFS: Cannot open root device "ubi0:root" or unknown-block(0,0): Changed 'ubi.mtd=nand0.root' to 'ubi.mtd=root'. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Fix can_lseek_backward()Andrey Smirnov2017-11-171-1/+1
| | | | | | | | | | | | | | | | To quote corresponding man page: "... Upon successful completion, lseek() returns the resulting offset location as measured in bytes from the beginning of the file." Which for lseek(fd, 0, SEEK_SET) would be 0, so returning 'ret' as final step of the function would mean it'd never return anything but 0 as well. Change the code to explicitly return '1' to fix the problem. Fixes: 7c3f8d366 ("uimage: fix: add can_lseek_backward and use in uimage_open") Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: esdhc: wait until SDSTB is asserted, not other way arroundOleksij Rempel2017-11-171-1/+1
| | | | | | | this added 10msec on each sd/mmc clock switch request. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/omap'Sascha Hauer2017-11-1317-45/+433
|\
| * ARM: phytec-som-am335x: Add autoenableDaniel Schultz2017-11-073-0/+28
| | | | | | | | | | | | | | | | Add autoenable for components, which can be populated on an AM335x phyCORE SoM. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: oftree: Add autoenable functionalityDaniel Schultz2017-11-072-0/+103
| | | | | | | | | | | | | | | | | | | | This patch adds an API to automatically enable either hardware components with existing device drivers or i2c clients. All functions take a device tree path to find the hardware and will fix up the node status in the kernel device tree, if it's accessible. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: AM335x: Add dummy i2c nodesDaniel Schultz2017-11-071-0/+14
| | | | | | | | | | | | | | | | | | These i2c nodes are needed for autoenable of i2c clients, because the autoenable API searches for device tree nodes to get the client address. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: phytec-som-am335x: Set MAC addresses from stateDaniel Schultz2017-11-071-0/+21
| | | | | | | | | | | | | | | | If a state with the name 'am335x_phytec_mac_state' is available, valid MAC addresses from this state get registerd to their ethernet device. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: state: Add function to read state MACDaniel Schultz2017-11-072-0/+23
| | | | | | | | | | | | | | | | This API function allows to receive a copy of a MAC address from variables in a state. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: state: Add variable type as enumDaniel Schultz2017-11-072-0/+27
| | | | | | | | | | | | | | | | | | | | | | The variable_type struct holds a name of its type. Checking the type of a variable with this string needs much resources. This patch introduce a enum of the variable type for better type checking. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: state: Add variable_type to state_variableDaniel Schultz2017-11-073-9/+21
| | | | | | | | | | | | | | | | Add a pointer in state_variable to the corresponding variable_type array element. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: configs: am335x_defconfig: Add state configDaniel Schultz2017-11-071-0/+3
| | | | | | | | | | | | Enable the state framework for all AM335x boards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: AM335x: Add state frameworkDaniel Schultz2017-11-074-0/+55
| | | | | | | | | | | | | | | | | | This patch adds the state framework with an EEPROM partition and two nodes for MAC addresses. It will be available for all phycore AM335x images with EEPROMs. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: boards: phytec-som-am335x: Add unified MLODaniel Schultz2017-11-072-36/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCM-060 modules only have one-bank RAMs populated, which allows us to find out the populated RAM size at run-time. Therefore, a new entry point was create 'PHYTEC_ENTRY_UNIFIED_MLO'. This creates a MLO for all modules of one family and all existing PCM-060 MLOs were replaced with this new entry point. To provide backward compatibility for older modules, these were not affected. In the first step generic RAM timings for the module family get loaded, because RAM accesses are only possible with an initialized controller. After that, the RAM size will be calculated and the RAM controller gets reinitialized with the correct RAM timings. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/nv'Sascha Hauer2017-11-132-17/+32
|\ \
| * | command: nv: rewrap help text linesEnrico Jorns2017-11-031-3/+3
| | | | | | | | | | | | | | | | | | | | | Just let the help text appear a bit more aligned. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: nv: adjust command helpEnrico Jorns2017-11-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Help did not point out that -r option requires n arguments and did not mention support for removing variables in help text. Also introduce and consistently reuse 'NV' as abbreviation for 'non volatile'. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: globvar: let nvvar_remove() report non-existing variableEnrico Jorns2017-11-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The former implementation did not allow to detect whether the call to nvvar_remove() succeeded or failed and always returned 0. This changes the implementation to return 0 only if a variable with the given name was found and return ENOENT otherwise. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: nv: assure error code will be returned when an error occurredEnrico Jorns2017-11-031-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to iteration over possibly multiple variables, the return value of an individual call to nvvar_remove() / nvvar_add() gets lost. This will result in do_nv() returning success (0) if any variable processing failed as long as processing of the last variable succeeded. Processing will not be aborted on individual errors, such as the 'cp' handles it for invalid files. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: nv: call nvvar_print() only if no argument is givenEnrico Jorns2017-11-031-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Printing the nv variables (before performing any modification!) is useless and irritating. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: nv: fail with verbose message if invoked without argsEnrico Jorns2017-11-031-1/+3
| |/ | | | | | | | | Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-11-133-5/+5
|\ \
| * | 2d-primitives: fix typos in function names in commentsNikita Yushchenko2017-11-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This fixes gl_* -> gu_* in several places. Reported-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: spi: do not restrict spi's data to be hex-formattedUlrich Ölmann2017-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default base to 0 to be consistent with the "mw" command and particularly allow decimally formatted data. The price to pay is needing the usual prefix "0x" for each hex-formatted number. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: i2c: do not restrict i2c_write's data to be hex-formattedUlrich Ölmann2017-10-231-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Change the default base to 0 to be consistent with the "mw" command and particularly allow decimally formatted data. The price to pay is needing the usual prefix "0x" for each hex-formatted number. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2017-11-135-18/+119
|\ \
| * | usb: imx: implement support for "over-current-active-high" propertyUwe Kleine-König2017-10-272-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property is already documented in the bindings and supported by Linux. As on i.MX25 the HW default is active high and up to now barebox didn't force this to low (which is the default for e.g. i.MX6), add the property to barebox' imx25.dtsi to keep existing behaviour. If on a board the OC pin is active low, you need to add /delete-property/ over-current-active-high; in the board.dts. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: i.MX: bbu-internal: update tqma6x to make use of new bbu handlerUwe Kleine-König2017-10-241-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: i.MX: bbu-internal: new handler to make use of mmc boot partitionsUwe Kleine-König2017-10-241-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | This handler updates the non-active MMC boot partition and after a successful update makes the updated partition the active one. This way the machine should continue to be bootable when the update fails. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: i.MX: bbu-internal: make filename for device to write to adaptableUwe Kleine-König2017-10-242-17/+30
| |/ | | | | | | | | | | | | | | | | | | | | | | This is a preparatory for the next patch that autodetects the device to write to. To not have to modify the callback data for each call, some static functions get an additional parameter to allow that. This doesn't affect boards making use of the file's function and doesn't change behaviour. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/efi'Sascha Hauer2017-11-136-1/+32
|\ \
| * | efi-block: detect when the block device is a USB DiskJean-Christophe PLAGNIOL-VILLARD2017-10-271-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use usbdisk as a basename This will be usefull as example when we want to search for a usb disk for failsafe update or install. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | efi-gui: add USB IO Protocol GUID definitionJean-Christophe PLAGNIOL-VILLARD2017-10-272-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | EFI: add poweroff supportJean-Christophe PLAGNIOL-VILLARD2017-10-273-0/+12
| |/ | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Release v2017.11.0v2017.11.0Sascha Hauer2017-11-131-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | uimage: fix: add can_lseek_backward and use in uimage_openMichael Grzeschik2017-11-103-4/+24
|/ | | | | | | | | | Since commit ce0cc7fe we support forward seek on tftpfs. This feature breaks the condition to check rather we open an uimage over tftp. Since backward seeking is the problem here, we add the function can_lseek_backward and check for it instead of the simple lseek. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: bootm: don't fall over if image is padded with less than 40 bytesLucas Stach2017-10-231-1/+3
| | | | | | | | | | | If the zImage has a padding, which is less than 40 bytes (sizeof struct fdt_header) the amount of read bytes would be propagated as an error code. Fix this by only propagating real errors and treating failure to read less than the expected amount as no concatenated DT being present. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usbgadget'Sascha Hauer2017-10-199-27/+159
|\
| * usbgadget autostart: add usbgadget.fastboot_bbu to automatically export bbu ↵Sascha Hauer2017-09-271-0/+7
| | | | | | | | | | | | handlers Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fastboot command: Add -b option to export bbu handlersSascha Hauer2017-09-271-2/+7
| | | | | | | | | | | | | | When -b is given the usbgadget command will automatically export the registered bbu handlers via fastboot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: fastboot: Allow to automatically export the bbu handlersSascha Hauer2017-09-273-0/+26
| | | | | | | | | | | | | | | | | | | | We have a list of registered handlers which take a barebox update. Do the next step and allow to automatically export them via fastboot so that barebox can be updated via fastboot without manually exporting the partition. Since this may not be desirable in all cases this behaviour is configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget command: catch errors when parsing the file listSascha Hauer2017-09-271-0/+11
| | | | | | | | | | | | | | file_list_parse() can fail. Print an error message in this case instead of crashing. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bbu: Add function to iterate over registered handlersSascha Hauer2017-09-272-0/+17
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: fastboot: Use function to find file_list entry by nameSascha Hauer2017-09-271-7/+4
| | | | | | | | | | | | | | We have file_list_entry_by_name() now, so use it rather than open coding it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>