summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fs: Fix can_lseek_backward()stable/v2017.11Andrey 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>
* 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>
| * 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
|\ \ \