summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tools: binman: Open all binary files in binary modeSimon Glass2019-07-101-15/+15
| | | | | | | | | At present some files are opened in text mode despite containing binary data. This works on Python 2 but not always on Python 3, due to unicode problems. BC&D are not my favourite people. Adjust the affected open() statements to use binary mode. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Use items() instead of iteritems()Simon Glass2019-07-105-6/+6
| | | | | | | Python 3 requires this, and Python 2 allows it. Convert the code over to ensure compatibility with Python 3. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Use items() instead of iteritems()Simon Glass2019-07-101-1/+1
| | | | | | | Python 3 requires this, and Python 2 allows it. Convert the code over to ensure compatibility with Python 3. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Remove use of Set()Simon Glass2019-07-103-9/+6
| | | | | | | A new built-in set() is used in both Python 2 and 3 now. Move it to use that instead of Set(). Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Don't show errors for failed testsSimon Glass2019-07-101-0/+12
| | | | | | | | An unfortunate new feature in Python 3.5 causes binman to print errors for non-existent tests, when the test filter is used. Work around this by detecting the unwanted tests and removing them from the result. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Convert print statements to Python 3Simon Glass2019-07-102-8/+12
| | | | | | Update all print statements to be functions, as required by Python 3. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Convert print statements to Python 3Simon Glass2019-07-103-15/+14
| | | | | | Update all print statements to be functions, as required by Python 3. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Update cros_subprocess to use bytesSimon Glass2019-07-102-20/+29
| | | | | | | | At present this function uses lists and strings. This does not work so well with Python 3, and testing against '' does not work for a bytearray. Update the code to fix these issues. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge https://gitlab.denx.de/u-boot/custodians/u-boot-i2cTom Rini2019-07-103-22/+89
|\
| * rtc: pcf2127: Fixed bug with rtc settings and getting error timeChuanhua Han2019-07-091-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous pcf2127 RTC chip could not read and set the correct time. When reading the data of internal registers, the read address was the value of register plus 1. This is because this chip requires the host to send a stop signal after setting the register address and before reading the register data. This patch sets the register address using dm_i2c_write and reads the register data using the original dm_i2c_xfer in order to generate a stop signal after the register address is set, and fixes the bug of the original read and write time. Signed-off-by: Biwen Li <biwen.li@nxp.com> Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
| * xilinx_xiic: Fix transfer initialisationMelin Tomas2019-07-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to starting a new transfer, conditionally wait for bus to not be busy. Reinitialise controller as otherwise operation is not stable. For reference, see linux kernel commit 9656eeebf3f1 ("i2c: Revert i2c: xiic: Do not reset controller before every transfer") hs: Fixed DOS line endings added missing '\n' Fixed git commit description style Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
| * xilinx_xiic: Fix fill tx fifo loopMelin Tomas2019-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Comparison should be against the actual message length, not loop index. len is used for stopping while loop, pos is position in message. stop should be sent when entire message is sent, not when len and pos meet. hs: fixed DOS line endings Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
| * i2c: designware: Get clock rate from clock DMLey Foon Tan2019-07-091-10/+45
| | | | | | | | | | | | | | | | Get clock rate from clock DM if CONFIG_CLK is enabled. Otherwise, uses IC_CLK define. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> Acked-by: Marek Vasut <marex@denx.de>
| * i2c: designware_i2c: Restore enable state after set speedJun Chen2019-07-091-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before calling __dw_i2c_set_bus_speed(), the I2C could already be set as ether enable or disable, we should restore the original setting instead of enable i2c anyway. This patch fix a bug happened in init function: __dw_i2c_init(){ /* Disable i2c */ ... __dw_i2c_set_bus_speed(i2c_base, NULL, speed); writel(slaveaddr, &i2c_base->ic_sar); /* Enable i2c */ } In this case, enable i2c inside __dw_i2c_set_bus_speed() function will cause ic_sar write fail. Signed-off-by: Jun Chen <ptchentw@gmail.com>
* | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-ubiTom Rini2019-07-10157-195/+628
|\ \ | | | | | | | | | | | | | | | [trini: Migrate sama5d27_som1_ek_qspiflash/sama5d2_xplained_qspiflash for CONFIG_ENV_SECT_SIZE] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | ubispl: introduce separate CONFIG_UBI_SPL_SILENCE_MSGMarkus Klotzbuecher2019-07-092-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | This allows to silence ubi and ubispl individually. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org>
| * | ubispl: add support for loading volumes by nameHamish Guthrie2019-07-095-2/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation is to use the UBI atomic volume rename functionality to allow double copy software updates on UBI. To that end the SPL is configured to always load the same volume name (e.g. "u-boot"), whereas a software updater always installs into the secondary volume "u-boot_r". After successful installation, these two volume names are switched. This extension is protected by #ifdefs as it will somewhat slow down loading of volumes by id. This is because the code needs to disable the optimization of ignoring all volume ids which are not to-be-loaded, since these can only be resolved after attaching. This adds two vtbl related functions from Linux, which are taken from the same kernel version as the current main U-Boot UBI code (Linux 4.2 64291f7db5bd8). Signed-off-by: Hamish Guthrie <hamish.guthrie@kistler.com> Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org>
| * | configs: migrate ubispl boards to KConfigMarkus Klotzbuecher2019-07-094-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate the ubispl configuration for the omap3_igep00x0 and am335x_igep003x boards to KConfig. Both boards were built with SOURCE_DATE_EPOCH=0 and found to be equal before and after. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Cc: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org> Cc: Javier Martínez Canillas <javier@dowhile0.org> Cc: Enric Balletbo i Serra <eballetbo@gmail.com> Acked-by: Enric Balletbo i Serra <eballetbo@gmail.com>
| * | ubispl: migrate configuration to KconfigMarkus Klotzbuecher2019-07-092-12/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the ubispl configuration to KConfig and drop them from the whitelist. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Cc: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org> Cc: Javier Martínez Canillas <javier@dowhile0.org> Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
| * | ubi: fix UBI_SILENCE_MSGMarkus Klotzbuecher2019-07-092-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | - drop CONFIG_ prefix from kconfig entry - fix small compilation issue with CONFIG_UBI_SILENCE_MSG Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org>
| * | env: ubi: support configurable VID offsetHamish Guthrie2019-07-092-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce KConfig CONFIG_ENV_UBI_VID_OFFSET to allow providing custom VID header offsets for the environment on UBI. Signed-off-by: Hamish Guthrie <hamish.guthrie@kistler.com> Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org>
| * | at91, omap2plus: configs: migrate CONFIG_ENV_ to defconfigsMarkus Klotzbuecher2019-07-09142-139/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the extended ENV options for AT91 and OMAP2PLUS in order to be able to use CONFIG_ENV_UBI_* on these architectures. As this change also makes the configs ENV_SIZE, ENV_SECT_SIZE, ENV_OFFSET visible to AT91 and OMAP2PLUS, migrate users of these to KConfig. This migration was run using an extended moveconfig.py which evaluates expressions such as "(512 << 10)". See patch ("moveconfig: expand simple expressions"). All modified boards were built with SOURCE_DATE_EPOCH=0 before and after the change and successfully confirmed that the identical binary is generated (the only exception was igep00x0, which does not define CONFIG_ENV_IS_IN_UBI in the original board header. Once that is defined, the test passes too). hs: rebased patch to: 68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT" Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Cc: Heiko Schocher <hs@denx.de> Cc: Eugen Hristev <eugen.hristev@microchip.com> Cc: Tom Rini <trini@konsulko.com>
| * | env: ubi: KConfig: add CONFIG_ENV_UBI_VOLUME_REDUNDMarkus Klotzbuecher2019-07-095-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the KConfig option CONFIG_ENV_UBI_VOLUME_REDUND for defining the name of the UBI volume used to store the redundant environment. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Reviewed-by: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org> hs: get rid of stm32mp1* build errors
| * | moveconfig: expand simple expressionsMarkus Klotzbuecher2019-07-091-0/+41
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for expanding simple expressions and sizes such as "(4 * 1024)", "(512 << 10)" or "(SZ_256K)". This can help to significantly reduce the number of "suspicious" moves, such as 'CONFIG_ENV_SIZE="(64 << 10)"' was removed by savedefconfig. If the expansion fails, it falls back to the original string. Signed-off-by: Markus Klotzbuecher <markus.klotzbuecher@kistler.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Heiko Schocher <hs@denx.de>
* | Merge tag 'u-boot-atmel-2019.10-a' of ↵Tom Rini2019-07-0916-26/+804
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-atmel First set of u-boot-atmel features and fixes for 2019.10 cycle This includes the Atmel QSPI driver and support for the at91 boards. This is the port of the driver from Linux, mostly done by Tudor Ambarus.
| * | configs: sama5d2_xplained: add support QSPI flash bootEugen Hristev2019-07-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spi-nor flash resides on spi bus 1. Update the CONFIG_ENV_SPI_CS and CONFIG_BOOTCOMMAND accordingly. Based on original work by Wenyou Yang. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> [tudor.ambarus@microchip.com: amend the commit message.] Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * | configs: sama5d27_som1_ek: qspi: use common memory layoutTudor Ambarus2019-07-091-7/+0
| | | | | | | | | | | | | | | | | | | | | Use the qspi memory layout defined in at91-sama5_common - it aligns with the 8 Mbyte flash (sst26vf064b-104i/sn) available in sama5d27_som1_ek. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * | configs: sama5d27_som1_ek: add qspiflash_defconfigTudor Ambarus2019-07-092-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | Add the default config file of QSPI media. The config is based on sama5d27_som1_ek_mmc_defconfig. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
| * | configs: sama5d2_xplained: add qspiflash_defconfigTudor Ambarus2019-07-092-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | Add the default config file of QSPI media. The config is based on sama5d2_xplained_mmc_defconfig. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
| * | ARM: at91: sama5: add common environment for QSPICyrille Pitchen2019-07-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same memory layout as we use for the NAND boot on the other boards. QSPI flashes are present on the following boards: sama5d2_xplained RevB: 32 Mbyte flash (mx25l3273fm2i-08g) sama5d2_xplained RevC: 8 Mbyte flash (sst26vf064b-104i/sn) sama5d27_som1_ek: 8 Mbyte flash (sst26vf064b-104i/sn) sama5d2_ptc_ek: 8 Mbyte flash (sst26vf064b-104i/sn) The 8 Mbyte limit is enough to cope with the memory layout used in the NAND boot. rootfs exceeds the 8 Mbyte limit and will stay in eMMC in the sama5d2_xplained case. The final scope is to use a single memory layout for all boot medias. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@microchip.com> [tudor.ambarus@microchip.com: change memory layout, add commit message] Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * | ARM: dts: at91: sama5d2_xplained: fix QSPI0 nodeCyrille Pitchen2019-07-091-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following: - use "jedec,spi-nor" binding, we use jedec compatible flashes - set bus width to 4, we use quad capable flashes - differentiate bewteen data and clk and cs pins - drop partions as we don't use them in u-boot. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@microchip.com> [tudor.ambarus@microchip.com: use "jedec,spi-nor", edit commit message] Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * | configs: sama5d27_som1_ek: enable qspi controller and flashesTudor Ambarus2019-07-092-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | We use a sst spi-nor flash memory on sama5d27_som1_ek. Select the others for testing purposes. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
| * | configs: sama5d2_xplained: enable qspi controller and flashesTudor Ambarus2019-07-093-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | We have a macronix spi-nor flash on sama5d2_xplained RevB and a sst spi-nor flash on RevC. Select the rest for testing purposes. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
| * | spi: Add Atmel QuadSPI driverTudor Ambarus2019-07-093-0/+545
| |/ | | | | | | | | | | | | | | Backport the driver from linux v5.1-rc5 and adapt it for u-boot. Tested on sama5d2_xplained Rev B with mx25l25635e spi-nor flash. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
* | Merge tag 'efi-2019-10-rc1' of ↵Tom Rini2019-07-0812-159/+332
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for v2019.10-rc1 Fix a possible overflow for GUID partition tables. For some runtime services we only have implementations valid at boottime. So we replace them when leaving boottime. Move this from SetVirtualAddressMap() to ExitBootServices() as SetVirtualAddressMap() is not called by all operating systems. Adjust the Python tests accordingly. Bump the supported UEFI specification version to 2.8.
| * | efi_loader: detach runtime in ExitBootServices()Heinrich Schuchardt2019-07-063-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux can be called with a command line parameter efi=novamap, cf. commit 4e46c2a95621 ("efi/arm/arm64: Allow SetVirtualAddressMap() to be omitted"). In this case SetVirtualAddressMap() is not called after ExitBootServices(). OpenBSD 32bit does not call SetVirtualAddressMap() either. Runtime services must be set to an implementation supported at runtime in ExitBootServices(). Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Suggested-by: Alexander Graf <agraf@csgraf.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: simplify detachingHeinrich Schuchardt2019-07-061-32/+8
| | | | | | | | | | | | | | | | | | | | | We do not need any array typed detach list. Let's simply update the pointers directly. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: decision on EFI_RT_SUPPORTED_RESET_SYSTEMHeinrich Schuchardt2019-07-062-4/+7
| | | | | | | | | | | | | | | | | | Move the logic determining which board supports reset at runtime to Kconfig. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | test/py: not all boards support UEFI runtime resetHeinrich Schuchardt2019-07-061-4/+0
| | | | | | | | | | | | | | | | | | | | | As not all boards support resets at runtime do not test for it in the Python tests. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: bump UEFI specification number to 2.8Heinrich Schuchardt2019-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are implementing UEFI variable RuntimeServicesSupported and set the unimplemented runtime functions return EFI_UNSUPPORTED as described in UEFI specification 2.8. So let's also advertise this specification version in our system table. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Alexander Graf <agraf@csgraf.de>
| * | efi_loader: split off detaching SetVirtualAddress()Heinrich Schuchardt2019-07-061-11/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The runtime services SetVirtualAddress() and ConvertPointer() become unavailable after SetVirtualAddress(). Other runtime services become unavailable after ExitBootServices. Move the update of SetVirtualAddress() and ConvertPointer() to efi_relocate_runtime_table(). Use functions with the correct signature when detaching. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_selftest: test variable services at runtimeHeinrich Schuchardt2019-07-062-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a unit test for the variable services at runtime. Currently we expect EFI_UNSUPPORTED to be returned as the runtime implementation is still missing. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: unimplemented runtime servicesHeinrich Schuchardt2019-07-061-32/+2
| | | | | | | | | | | | | | | | | | | | | Unimplemented runtime services should always return EFI_UNSUPPORTED as described in the UEFI 2.8 spec. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: let the variable driver patch out the runtimeHeinrich Schuchardt2019-07-064-10/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Our variable services are only provided at boottime. Therefore when leaving boottime the variable function are replaced by dummy functions returning EFI_UNSUPPORTED. Move this patching of the runtime table to the variable services implementation. Executed it in ExitBootServices(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: clean up runtime detachingHeinrich Schuchardt2019-07-061-23/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The detaching of the runtime will have to move to ExitBootServices() to encompass operating system that do not call SetVirtualAddressMap(). This patch changes the logic for the relocation of the pointers in the runtime table such that the relocation becomes independent of the entries in the detach list. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: remove NULL entries from runtime detach listHeinrich Schuchardt2019-07-062-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some entries in the system table are set to NULL in ExitBootServices(). We had them in the runtime detach list to avoid relocation of NULL. Let's instead assign the pointers dynamically in efi_initialize_system_table() to avoid the relocation entry. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: initialization of variable servicesHeinrich Schuchardt2019-07-063-0/+17
| | | | | | | | | | | | | | | | | | Provide an initialization routine for variable services. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: move efi_query_variable_info()Heinrich Schuchardt2019-07-063-27/+32
| | | | | | | | | | | | | | | | | | | | | | | | Let's keep similar things together. Move efi_query_variable_info() to lib/efi_loader/efi_variable.c Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | efi_loader: remove superfluous spaces in commentsHeinrich Schuchardt2019-07-061-4/+4
| | | | | | | | | | | | | | | | | | Leave only a single space after * if not aligning. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | test/py: error message test_efi_selftest_device_treeHeinrich Schuchardt2019-07-061-1/+1
| | | | | | | | | | | | | | | | | | Correct the error message in test_efi_selftest_device_tree(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>