summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * file_list: Add error messagesSascha Hauer2017-09-271-4/+9
| | | | | | | | | | | | | | Add error messages when file list parsing fails. Also, forward the error from file_list_parse_one() instead of using -EINVAL for every error. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * file_list: Add GPL header to fileSascha Hauer2017-09-271-0/+11
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * file_list: Fix memory leak in failure pathSascha Hauer2017-09-271-1/+1
| | | | | | | | | | | | | | In case of a parse error not only the list header has to be freed, but also the entries. Use file_list_free() for this purpose. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * file_list: Allow only unique names on listSascha Hauer2017-09-271-1/+7
| | | | | | | | | | | | The key to a file_list is it's name, so ensure it's unique. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * file_list: Add function to get entry by its nameSascha Hauer2017-09-272-0/+14
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * file_list: Add function to add an entry to the listSascha Hauer2017-09-272-9/+22
| | | | | | | | | | | | | | | | Add file_list_add_entry() to add a single entry to a file_list. Then use it in file_list_parse_one() instead of open coding adding a new entry. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: unregister when usb_composite_probe() failsSascha Hauer2017-09-271-1/+9
| | | | | | | | | | | | | | When usb_multi_register() returns an error it can't be called again as we do not unregister the driver properly. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: only set to peripheral mode when error checking is doneSascha Hauer2017-09-271-2/+2
| | | | | | | | | | | | | | Only begin to modify the hardware when the obious errors have been checked. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: do not register when no functions presentSascha Hauer2017-09-271-0/+4
| | | | | | | | | | | | | | registering a multifunction device makes only sense when there's at least one function configured. Just return otherwise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: autostart: Handle errors in file list gracefullySascha Hauer2017-09-271-1/+9
| | | | | | | | | | | | | | | | file_list_parse() can fail and returns an error pointer. Print an error message when it fails and also set to NULL again so that usb_multi_register() does not stumble upon the error pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-10-1935-69/+147
|\ \
| * | regmap: port regmap_update_bits from linuxSteffen Trumtrar2017-10-162-1/+31
| | | | | | | | | | | | | | | | | | | | | Port the regmap_update_bits function from linux v4.14-rc1 to barebox. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | elf.h: Use EI_NIDENT instead of numeric valueAntony Pavlov2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an adoption of the linux kernel commit | commit eb6900fbfa43cb50391b80b38608e25280705693 | Author: Cyrill Gorcunov <gorcunov@gmail.com> | Date: Tue Apr 29 01:01:17 2008 -0700 | | ELF: Use EI_NIDENT instead of numeric value | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Marvell: implement marvell_of_reg_initClément Leger2017-10-161-4/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From ed1cbcd05d5efeb4012d77a9a4ab9c1da0449bdc Mon Sep 17 00:00:00 2001 From: Clement Leger <clement.leger@kalray.eu> Date: Tue, 10 Oct 2017 14:29:49 +0200 Subject: [PATCH] Marvell: implement marvell_of_reg_init Implement marvell_of_reg_init in order to use marvell,reg-init property from device-tree. The code is taken from Linux kernel and slighlty modify to fit barebox structures. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: m25p80: make it possible to use 4K erase blockAntony Pavlov2017-10-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have the MTD_SPI_NOR_USE_4K_SECTORS option handling in C code for 4K erase block support. Alas this 4K erase block support code can't be used because the MTD_SPI_NOR_USE_4K_SECTORS option support is missed in Kconfig. This patch imports necessary Kconfig MTD_SPI_NOR_USE_4K_SECTORS option declaration from linux v4.11-rc8. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: attach: add missing newline at end of pr_err()Marc Kleine-Budde2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the missing newline at the end of the pr_err() statement. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mmc: allow skipping SD card initializationPhilipp Zabel2017-09-262-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to skip SD card initialization for eMMCs by setting the "no-sd" property in the host controller device tree node. Avoiding two SD command timeouts speeds up detection time by well over 200 ms. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remove checks for xzalloc() returning NULLUwe Kleine-König2017-09-2622-49/+0
| | | | | | | | | | | | | | | | | | | | | xzalloc() either returns memory or panics, so checking for NULL is useless. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pinctrl: mxs: fix error message to mention right property nameUwe Kleine-König2017-09-261-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | imx-bbu-nand-fcb: read_firmware_all(): Spell "Secondary firmware" with a ↵Marc Kleine-Budde2017-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | capital "S" "Primary firmware" is writte with a capital "P" so adjust "Secondary firmware" to use a capital "S". Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | console_countdown: ignore errors in getchar()Aleksander Morgado2017-09-261-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The getchar() call may return an error reported as a -1, e.g. when the console detects a RATP message and switches to RATP mode. In general it probably is a good idea to ignore these errors in the console countdown operation; and in particular for the RATP usecase, this also prevents from interfering with the countdown and menu just when switching one of the consoles to RATP mode. As a hint, this is what the standard console was printing due to this issue when the RATP console was activated: Hit m for menu or any other key to stop autoboot: [: missing `]' Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpiolib: check validity for gpio_info in *_active()Uwe Kleine-König2017-09-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gpio_set_active, gpio_is_active and gpio_direction_active are public functions, accordingly there should be error checking. If an invalid gpio number is given to these functions without checking gpio_adjust_value is called with gi == NULL which then dereferences this pointer. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib,ratp: avoid too verbose info messagesAleksander Morgado2017-09-201-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a cli-based RATP that opens and closes the RATP channel for each command sent/received, it gets annoying to get the "Closed" message printed all the time in console after each RATP channel close operation. Just demote it to debug level. E.g.: barebox@barebox sandbox:/ ratp: Closed ratp: Closed ratp: Closed ratp: Closed ... Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mips'Sascha Hauer2017-10-1914-21/+1214
|\ \
| * | MIPS: dts: ar9344: add pll nodeOleksij Rempel2017-10-061-0/+11
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: add ar9344 clock driverOleksij Rempel2017-10-062-1/+150
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: ag71xx: define parent devicesOleksij Rempel2017-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | | without it we are not able to set mac address from other driver. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: ag71xx: disable eth interface on barebox shutdownOleksij Rempel2017-09-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | If not disable, DMA RX engine will keep to write in to allocated memory area. As soon as some code or data of target OS will be placed to this area it will be overwritten by incoming network package. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: dts: ar9344: add APB busOleksij Rempel2017-09-201-17/+25
| | | | | | | | | | | | | | | | | | | | | and move nodes which belong to APB. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: tplink-wdr4300_defconfig: add network supportOleksij Rempel2017-09-201-3/+7
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: dts: tl_wdr4300: rename it to tl_wdr4300 v1.7Oleksij Rempel2017-09-202-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The minor version of TP-Link are usually big enough that it need extra vendor partition on the flash with additional configurations like PLL, CPU and RAM freqs. Visually I was able to confirm at least different SPI Flash and RAM chips. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: add ar8327 driverOleksij Rempel2017-09-203-0/+286
| | | | | | | | | | | | | | | | | | | | | | | | The Atheros ar8327 is a seven port gigabit ethernet switch. This patch adds a driver for the phys in it. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: dts: tl_wdr4300: remove RO flag from barebox partitionOleksij Rempel2017-09-181-1/+0
| | | | | | | | | | | | | | | | | | | | | we need it RW for barebox updates. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: dts: tl_wdr4300: add alias for spiflashOleksij Rempel2017-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | to unify the naming with TP-Link TL-MR3020. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: dts: tl_wdr4300: enable mac0Oleksij Rempel2017-09-181-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: dts: ar9344: add mac0 nodeOleksij Rempel2017-09-181-0/+10
| | | | | | | | | | | | | | | | | | | | | this node is supported by ag71xx driver Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | add ar9331.dtsi and enable mac0Oleksij Rempel2017-09-182-0/+17
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: ath79: add ag71xx Ethernet driverYegor Yefremov2017-09-184-0/+693
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2017-10-1924-30/+284
|\ \ \
| * | | ARM: Add i.MX6ull evk supportSascha Hauer2017-10-1710-0/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i.MX6ull-EVK is a evaluation board for the i.MX6ull from NXP. The upstream DTS is used, support should be fairly complete: - 2x fec ethernet - 1x USB Host - 1x USB OTG - 2x SD Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: i.MX6ul: Add SoC specific lowlevel_init functionSascha Hauer2017-10-176-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On i.MX6ul(l) (Cortex A7) We have to set the SMP bit before enabling the caches, otherwise they won't work. Add a SoC specific lowlevel_init function to be called by the i.MX6ul(l) boards. Since this is a quirk of the Cortex A7 core we put the functionality into a separate function to be reused by other Cortex A7 cores. Change existing i.MX6ul(l) boards to use the new initialisation function. It seems this is only needed when booting from USB, in other boot modes the ROM will already have done the initialisation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rename flush_icache to icache_invalidateSascha Hauer2017-09-275-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | flush_icache is a misnomer since the icache is invalidated, not flushed. Rename the function accordingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>