aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-08-08dfu: Fix data abort in dfu_free_entities()Sam Protsenko1-1/+1
Commit 5d8fae79163e ("dfu: avoid memory leak") brings a regression which described below. This patch is effectively reverting that commit, adding corresponding comment to avoid such regressions in future. In case of error in dfu_config_entities(), it frees "dfu" array, which leads to "data abort" in dfu_free_entities(), which tries to free the same array (and even tries to access it from linked list first). The issue occurs e.g. when partition table on device does not match $dfu_alt_info layout: => dfu 0 mmc 1 Couldn't find part #2 on mmc device #1 DFU entities configuration failed! data abort To fix this issue, do not free "dfu" array in dfu_config_entities(). It will be freed later in dfu_free_entities(). Tested on BeagleBone Black (where this regression was originally found). Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2018-08-08usb: rockchip: on K_FW_LBA_WRITE_10 remove magic block size of 512 bytesAlberto Panizzo1-18/+21
As well as in K_FW_LBA_READ_10 and K_FW_LBA_ERASE_10 take device's block size from f_rkusb->desc->blksz instead of the fixed 512 bytes. Keep original behaviour of retry probing assigned block device on every host request to manage late SDCard plugs. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08usb: rockchip: fix printing csw debug infoAlberto Panizzo1-1/+1
Workstation tool was happy while console on device were printing random numbers.. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08usb: rockchip: be quiet on serial port while transferring dataAlberto Panizzo1-2/+2
While downloading or uploading megabytes of data we had thousands of printf in console like: transfer 0x10000 bytes done OR Uploading 0x1000 bytes This because transfers are chunked and there is no way on target side to know the overall transfer size (to print one string per overall transfer). All these prints on serial console do slow down significantly the transfer and does not offer a significant information to the developer: rkdeveloptool and Rockchip original tool do use small chunks read/writes on big transfers. This allows on workstation to print percentage of transfer complete and as well offers to developer the information about: transfer is running OK. On error, either the percentage will stop or an error will be shown on workstation console. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08usb: rockchip: implement K_FW_LBA_ERASE_10 commandAlberto Panizzo3-0/+50
This command is part of the write partition sequence performed by rkdeveloptool: one partition is first completely erased and than wrote. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08usb: rockchip: implement K_FW_LBA_READ_10 commandAlberto Panizzo3-1/+107
This patch implement reading blocks form selected device with LBA addressing. Corresponding command on workstation is: rkdeveloptool rl <start_blk> <blk_cnt> <file> While we support reading more than one blocks per K_FW_LBA_READ_10 request, rkdeveloptool and original rockchip tool do perform chunk reads limiting the maximum size per chunk far lower than max int values. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-08usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER commandAlberto Panizzo2-4/+49
Chip Version is a string saved in BOOTROM address space Little Endian. Ex for rk3288: 0x33323041 0x32303134 0x30383133 0x56323030 which brings: 320A20140813V200 Note that memory version do invert MSB/LSB so printing the char buffer would show: A02341023180002V Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08usb: rockchip: fix command failed on host side due to missing dataAlberto Panizzo1-2/+20
Two consecutive rockusb_tx_write without waiting for request complete do results in transfer reset of first request and thus no or incomplete data transfer. This because rockusb_tx_write do use just one USB request to keep serialization. So calls like: rockusb_tx_write_str(emmc_id); rockusb_tx_write_csw(cbw->tag, cbw->data_transfer_length, CSW_GOOD); was succeeding only when DEBUG was defined because the time spent printing debug info was enough for transfer to complete. This patch fixes the issue adding a simple request complete handler called rockusb_tx_write_csw to be set as complete handler of in_req when sending back simple payload + CSW replies to commands. This new handler will always send CSW_GOOD replies because in case of error the command callback itself must send back an error CSW as unique reply to command. This patch fixes execution of: $ rkdeveloptool rfi when DEBUG is not defined. Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
2018-08-08gadget: f_thor: fix hang-up with ctrl-cSeung-Woo Kim1-2/+2
After the commit 6aae84769a0b ("gadget: f_thor: Fix memory leaks of usb request and its buffer"), there is hang-up with ctrl-c in some udc. It is because req of out_ep is freed before out_ep is disabled. Fix hang-up with ctrl-c by disabling ep before free req of the ep. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2018-08-07zynqmp: Add avnet_ultra96_rev1_defconfig to the lits of boardsTom Rini1-0/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-08-07Merge tag 'xilinx-for-v2018.09-rc2' of git://git.denx.de/u-boot-microblazeTom Rini40-408/+703
Xilinx fixes for v2018.09-rc2 xilinx: - Add support for zybo z7 and ultra96 - Tune zynq and zynqmp mini configurations - Move SYS_MALLOC_LEN to Kconfig fdt - make static funcs gpio: - Fix soft gpio driver - Fix Zynq gpio driver by using platdata microblaze: - Fix Kconfig entry spi - Move ISSI to Kconfig
2018-08-07Merge git://git.denx.de/u-boot-marvellTom Rini50-558/+772
2018-08-07Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini3-1/+29
2018-08-07Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingTom Rini9-9/+100
2018-08-07arm: zynq: dts: add spi flash node to zedboardLuis Araneda1-0/+7
Add a flash node to fix the detection of the memory IC. With the changes introduced with commit 8fee8845e754 ("enf_sf: reuse setup_flash_device instead of open coding it") the SPI speed is now read from device-tree or a default value is applied. This replaced the old behavior of setting the SPI speed to CONFIG_ENV_SPI_MAX_HZ. As this board didn't have a flash node, the default value was applied to the SPI speed, producing an error when probing the flash memory (speed too slow). Signed-off-by: Luis Araneda <luaraneda@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-07gpio: xilinx: Add support for using label propertyMichal Simek2-2/+18
Add support for reading label property from DT and set up bank name based on that. If label property is not present full device node name is used. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Return 0 from xilinx_gpio_set_valueMichal Simek1-1/+1
.set_value functions have no specified return value and gpio_uclass is not working with it too. But this patch is returning 0 to be in sync with others DM gpio drivers. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Not read output values via regsMichal Simek1-4/+32
Reading registers for finding out output value is not working because input value is read instead in case of tristate. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07common: fdt: Make fdt_del_subnodes/fdt_del_partition staticMichal Simek1-2/+2
These functions are only called in this file that's why make them static to keep static analysers happy. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-07gpio: xilinx: Simplify logic in xilinx_gpio_set_valueMichal Simek1-7/+6
There is no reason to do read/write for if/else separately. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Set value before changing directionMichal Simek1-2/+2
Set a value before changing gpio direction. This will ensure that the old value is not propagated when direction has changed but new value is not written yet. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Remove !DM driverMichal Simek1-336/+2
There is no user for !DM driver that's why remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-07gpio: xilinx: Find out bank before use in xilinx_gpio_get_function()Michal Simek1-4/+4
Call xilinx_gpio_get_bank_pin() before use. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07arm64: a37xx: add CONFIG_MTD_DEVICE and CONFIG_MTD_PARTITIONSVladimir Vid1-0/+2
CONFIG_MTD_DEVICE is required for the mtdparts command and but it is missing from the mvebu_armada-37xx.h CONFIG_MTD_PARTITIONS is needed for the ubi support. Some of the Marvell based devices may require this as well. Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr> Signed-off-by: Luka Perkov <luka.perkov@sartura.hr> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07tools: kwboot: properly quit when read() returns 0Willy Tarreau1-2/+2
When kwboot is attached to a terminal which disappears such as one connected via an unplugged USB cable, read() returns 0, making kwboot loop until a key is pressed in the terminal. The only case where read() may return 0 here is when the terminal is closed anyway, so let's properly handle this one and report is similar to other errors. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07tools: kwboot: unbreak terminal-only modeWilly Tarreau1-1/+1
Commit 84899e2 ("tools/kwboot: Sync with latest barebox version to support Armada XP") accidently broke the terminal-only mode (-t) by removing the test on the bootmsg. Thus even when trying to use kwboot as a plain terminal, it asks to reboot the target. This commit simply reintroduces the lost test so that it is possible again to use kwboot to attach to the target system's console. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07ARM: kirkwood: add SBx81LIFXCAT boardChris Packham9-0/+516
This is a series of line cards for Allied Telesis's SBx8100 chassis switch. The CPU block is common to the SBx81GP24 and SBx81GT24 cards cards collectively referred to as SBx81LIFXCAT in u-boot. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07arm: mvebu: clearfog: add u-boot, dm-spl tag for spiJon Nettleton1-0/+9
This is required so SPL and u-boot can boot from spi flash devices that use the dm drivers. Signed-off-by: Jon Nettleton <jon@solid-run.com> [baruch: use -u-boot.dtsi] Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07arm: mvebu: helios4: remove duplicate sdhci pins nodeBaruch Siach1-7/+1
The same pinctrl node appears in the solidrun-microsom dtsi. Use that instead. Cc: Dennis Gilmore <dennis@ausil.us> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Dennis Gilmore <dennis@ausil.us> Tested-by: Dennis Gilmore <dennis@ausil.us> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07arm: mvebu: Better align Clearfog dts file with Linux kernelJon Nettleton1-235/+151
This makes changes so the u-boot dts file is structured more similar to the mainline linux dtsi file. It provides a minimal common dts that can work for most boards based on the ClearFog platform. Ethernet support is only supported for eth0 however all devices are left enabled so u-boot can generate and provide mac addresses for all of the network interfaces. Signed-off-by: Jon Nettleton <jon@solid-run.com> [baruch: rebase on recent changes] Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Dennis Gilmore <dennis@ausil.us> Tested-by: Dennis Gilmore <dennis@ausil.us> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07arm: mvebu: clearfog: use the microsom .dtsiBaruch Siach1-57/+6
Use hardware description from the recently introduced microsom .dtsi file to reduce duplication. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Dennis Gilmore <dennis@ausil.us> Tested-by: Dennis Gilmore <dennis@ausil.us> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07arm: mvebu: solidrun-microsom: update SPI flash compatibleBaruch Siach1-1/+1
Add the "spi-flash" compatible string so that the generic sf_probe driver can probe the SPI flash on the SolidRun SOM. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07configs: kirkwood: Move RTC_MV to DM and KconfigChris Packham16-49/+30
Now that there is DM support in the RTC_MV driver update board configs to use it. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07configs: move RTC_MV config from mv-plug-common.h to boardsChris Packham5-7/+16
To aid in migrating CONFIG_RTC_MV to Kconfig move the definition of it from mv-plug-common.h to the board config headers that nest it. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-07configs: kirkwood: ds109: switch to DM_I2CChris Packham1-0/+2
Enable DM_I2C and I2C_MVTSWI for the ds109 board. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-06i2c: imx_lpi2c: add uclass api supportPeng Fan2-7/+43
Use uclass clk api to get per clk when CONFIG_CLK enabled. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-08-06i2c-mux: pca954x: support pca9646 i2c switchPeng Fan1-1/+8
Add the PCA9646 support, which is 2-wire bus switch and buffered 4-channel. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-08-06mvebu: clearfog: use kconfig symbols to select boot deviceBaruch Siach1-14/+2
This allows selection of the boot device at build time without source code modification. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-06mvebu: support UART boot imageBaruch Siach2-0/+6
The kwboot utility can use the generated image to boot mvebu SoCs from UART. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-06mvebu: select boot device at SoC levelBaruch Siach17-155/+34
Move the gdsys Controlcenter DC specific build time kwbimage.cfg generation code into the mach-mvebu/ directory to be shared by all 32bit mvebu platforms. Remove board specific kwbimage.cfg files, and use the generated one instead. These files are all identical, with two exceptions. Clearfog and Helios4 use the sdio boot device, whereas all others use spi. Update the defconfigs for the exceptional boards to generate the same kwbimage.cfg as before. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-06mvebu: consolidate SPL boot device config symbolsBaruch Siach5-36/+8
Use MVEBU_SPL_BOOT_DEVICE_* to select between SPI and MMC, instead of board specific symbols. This commit enables the boot device selection menu to all mvebu platforms, but it is only effective on Turris Omnia and gdsys Controlcenter DC platforms. A following commit will enable boot selection for other platforms. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-06mvebu: a38x: drop duplicate platform id symbolsBaruch Siach2-12/+3
Use generic mvebu Kconfig symbols like all other mvebu boards. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-06mvebu: turris_omnia: use u-boot-spl-dtb.binBaruch Siach1-1/+1
u-boot-spl.bin and u-boot-spl-dtb.bin are identical when building the turris_omnia_defconfig. This commit makes Turris Omnia consistent with all other mvebu boards. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-08-06dm: power-domain: query power domain after get devicePeng Fan1-0/+2
This is to test power_domain_on in device_probe. If the device has a power-domain property, enable it when probe the device. So add the test to check whether it is powered on or not. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-06dm: core: device: enable power domain in probePeng Fan1-0/+7
Enable power domain associated with the device when probe. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-06power: Add CONFIG_SPL_POWER_DOMAIN configPeng Fan3-1/+11
Add CONFIG_SPL_POWER_DOMAIN config entry. Build drivers/power/domain if this config is selected. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-06power-domain: add dummy functions when CONFIG_POWER_DOMAIN not definedPeng Fan1-0/+29
Add dummy functions when CONFIG_POWER_DOMAIN not defined. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2018-08-06arm64: zynqmp: Add support for Avnet Ultra96Michal Simek5-0/+114
Avnet Ultra96 is rebranded Xilinx zcu100 revC/D. Add new defconfig files and point to origin internal board name. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-06arm: zynq: add support for the zybo z7 boardLuis Araneda4-1/+448
The board is manufactured by Digilent Main features: - Soc: XC7Z010 (Z7-10) or XC7Z020 (Z7-20) - RAM: 1 GB DDR3L - FLASH: 16 MB QSPI - 1 Gbps Ethernet - USB 2.0 - microSD slot - Pcam camera connector - HDMI Tx and Rx - Audio codec: stereo out, stereo in, mic - 5 (Z7-10) or 6 (Z7-20) Pmod ports - 6 push-buttons, 4 switches, 5 LEDs - 1 (Z7-10) or 2 (Z7-20) RGB LEDs Signed-off-by: Luis Araneda <luaraneda@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-06Kconfig: Move config SYS_MALLOC_LEN to Kconfig for zynqSiva Durga Prasad Paladugu7-5/+13
This patch moves the the config SYS_MALLOC_LEN to Kconfig. It will be just for Zynq arch and to do will be for all other archs. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>