summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-12test: Make test_bind_unbind_with_uclass() single-threadedSimon Glass
This test seems to rely on the other test in this file. Mark it single-threaded to avoid any problems. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-12test/py: Allow tests to be marked single-threaded onlySimon Glass
Add a new 'singlethread' marker to allow tests to be skipped when running in parallel. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-12test: Fix bootm_test_subst_var() running independentlySimon Glass
This test relies on the silent_linux env variable being set. Add this to the code so it can run without relying on other bootm tests having been run first. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-12test: Fix test_pinmux to run in parallelSimon Glass
At present test_pinmux_status() assumes that test_pinmux_dev() has run beforehand. Drop this assumption so we can run the tests in parallel. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02Merge branch '2022-09-02-assorted-improvements' into nextTom Rini
- DM RTC improvements that should help in CI, allow disabling LTO from the make line, add extension (cape, etc) support to distro bootcmd, add a pause command and re-enable ARM v4T support.
2022-09-02dm: rtc: Try to handle the localtime() raceSimon Glass
At present the sandbox timer uses localtime() which can jump around twice a year when daylight-saving time changes. It would be tricky to make use of gmtime() since we still need to present the time in local time, as seems to be required by U-Boot's RTC interface. The problem can only happen once, so use a loop to detect it and try again. This should be sufficient to detect either a change in the 'second' value, or a daylight-saving change. We can assume that the latter also incorporates a 'second' change, so there is no need to loop more than twice. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02dm: rtc: Try to avoid a race in rtc_set_get testSimon Glass
It seems that the time can change in between getting it and reading the offset. Check for this and try again if this happens. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02dm: rtc: Avoid a race in the rtc_reset testSimon Glass
Since resetting the RTC on sandbox causes it to read the base time from the system, we cannot rely on this being unchanged since it was last read. Allow for a one-second delay. Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Fixes: https://source.denx.de/u-boot/u-boot/-/issues/4 Reported-by: Bin Meng <bmeng.cn@gmail.com> Reported-by: Tom Rini <trini@konsulko.com> Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02test: Allow running tests multiple timesSimon Glass
Some tests can have race conditions which are hard to detect on a single one. Add a way to run tests more than once, to help with this. Each individual test is run the requested number of times before moving to the next test. If any runs failed, a message is shown. This is most useful when running a single test, since running all tests multiple times can take a while. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02dm: rtc: Make use of ut_assertnonnull()Simon Glass
Use this (newish) macro since it is designed for the purpose of making sure things are non-NULL. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02ci: Add a test for a non-LTO buildSimon Glass
Check that sandbox builds and runs tests OK with LTO disabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02Makefile: Allow LTO to be disabled for a buildSimon Glass
LTO (Link-Time Optimisation) is an very useful feature which can significantly reduce the size of U-Boot binaries. So far it has been made available for selected ARM boards and sandbox. However, incremental builds are much slower when LTO is used. For example, an incremental build of sandbox takes 2.1 seconds on my machine, but 6.7 seconds with LTO enabled. Add a NO_LTO parameter to the build, similar to NO_SDL, so it can be disabled during development if needed, for faster builds. Add some documentation about LTO while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02arm: ARMv4 assembly compatibilitySergei Antonov
There is currently a problem that U-Boot can not work on ARMv4 because assembly imlementations of memcpy() and some other functions use "bx lr" instruction that is not available on ARMv4 ("mov pc, lr" should be used instead). A working preprocessor-based solution to this problem is found in arch/arm/lib/relocate.S. Move it to the "ret" macro in arch/arm/include/asm/assembler.h and change all "bx lr" code to "ret lr" in functions that may run on ARMv4. Linux source code deals with this problem in the same manner. v1 -> v2: Comment update. Pointed out by Andre Przywara. Signed-off-by: Sergei Antonov <saproj@gmail.com> CC: Samuel Holland <samuel@sholland.org> CC: Ye Li <ye.li@nxp.com> CC: Simon Glass <sjg@chromium.org> CC: Andre Przywara <andre.przywara@arm.com> CC: Marek Vasut <marex@denx.de> CC: Sean Anderson <sean.anderson@seco.com> CC: Tom Rini <trini@konsulko.com>
2022-09-02cmd: Add pause commandSamuel Dionne-Riel
This command is being introduced with the goal of allowing user-friendly "generic use case" U-Boot builds to pause until user input under some situations. The main use case would be when a boot failure happens, to pause until the user has had time to acknowledge the current state. Tested using: make && ./u-boot -v -T -c 'ut lib lib_test_hush_pause' Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com> Cc: Simon Glass <sjg@chromium.org>
2022-09-02distro_bootcmd: Introduce support for extension commandMatwey V. Kornilov
Try to load required DTB overlays if the board supports extensions and CONFIG_CMD_EXTENSION is enabled. Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
2022-09-02Merge branch '2022-09-01-assorted-Kconfig-migrations' into nextTom Rini
- Assorted Kconfig migrations
2022-09-01ARM: imx6: dh-imx6: Enable d-cache early in SPLMarek Vasut
Enable d-cache early in SPL right after DRAM is started up. This reduces U-Boot proper load time by 650ms when loaded from SPI NOR. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Philip Oberfichtner <pro@denx.de>
2022-09-01ARM: cache: Allow SPL to build cache-pl310.cPhilip Oberfichtner
Introduce the new Kconfig symbol CONFIG_SPL_SYS_L2_PL310 to allow the SPL to build cache-pl310.c. Before this commit, the SPL could enable the PL310 L2 cache [1], but the cache maintenance functions from cache-pl310.c were only useable for non-SPL builds. After enabling the cache one must be able to flush it, too. Thus this commit allows cache-pl310.c to be included in the SPL build. [1] See for example arch/arm/mach-imx/cache.c: v7_outer_cache_enable() Signed-off-by: Philip Oberfichtner <pro@denx.de>
2022-09-01Convert CONFIG_SYS_L2_PL310 to KconfigPhilip Oberfichtner
This converts CONFIG_SYS_L2_PL310 to Kconfig. For omap2 and mvebu the 'select SYS_L2_PL310' locations were determined using ./tools/moveconfig -i CONFIG_SYS_L2_PL310. For mx6 I manually chose ARCH_MX6 as 'select' location. The correctness has been verified using $ ./tools/moveconfig.py -f ARCH_MX6 ~SYS_L2_PL310 ~SYS_L2CACHE_OFF 0 matches That means whenever an ARCH_MX6 board had SYS_L2_PL310 disabled, this was correctly reflected in SYS_L2CACHE_OFF. Thus it's safe to insert the 'select' statement under ARCH_MX6. Signed-off-by: Philip Oberfichtner <pro@denx.de>
2022-09-01Remove CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS et alTom Rini
This removes the following symbols: CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS CONFIG_SYS_I2C_LDI_ADDR CONFIG_SYS_I2C_DVI_ADDR CONFIG_SYS_I2C_DVI_BUS_NUM They are unused by any code in tree at this time. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-01Convert CONFIG_SYS_I2C_EEPROM_CCID et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_I2C_EEPROM_CCID CONFIG_SYS_I2C_EEPROM_NXID CONFIG_SYS_EEPROM_BUS_NUM Signed-off-by: Tom Rini <trini@konsulko.com>
2022-08-26Merge branch '2022-08-26-assorted-platform-updates' into nextTom Rini
- Assorted Arm, TI and Qualcomm platform updates
2022-08-26firmware: ti_sci: Move ACK checking to ti_sci_do_xfer() functionAndrew Davis
We can check if the message was acknowledged in the common ti_sci_do_xfer() which lets us remove it from after each call to this function. This simplifies the code and reduces binary size. Signed-off-by: Andrew Davis <afd@ti.com>
2022-08-26firmware: ti_sci: Remove inline keyword from functionsAndrew Davis
The inline hint is not needed here, the compiler will do the right thing based on if we are compiling for speed or for code size. In this case the inline causes this function to be placed inside each callsite which is not the right thing to do for either speed nor size. There is no performance benefit to this due to the larger function size reducing cache locality, but there is a huge size penalty. Remove inline keyword. Signed-off-by: Andrew Davis <afd@ti.com>
2022-08-26firmware: ti_sci: Factor out message alloc failed messageAndrew Davis
We don't need to print the same message in every location, just print it in the function that fails and remove all the extra message printouts. Signed-off-by: Andrew Davis <afd@ti.com>
2022-08-26firmware: ti_sci: Reduce output on ti_sci_do_xfer errorAndrew Davis
This ti_sci_do_xfer() function already prints out the reason for the failure, and the caller of each of these functions should also notify the user of the failed task. Remove this extra level of error message. Signed-off-by: Andrew Davis <afd@ti.com>
2022-08-26arm: dts: qcom: Sync pinctrl DT nodes with Linux bindingsSumit Garg
Currently for all Qcom SoCs/boards there are separate compatibles for GPIO and pinctrl. But this is inconsistent with official (upstream) Linux bindings which requires only a single compatible "qcom,<SoC name>-pinctrl" and there is no such compatible property as "qcom,tlmm-<SoC name>". So fix this inconsistency for Qcom SoCs in order to comply with upstream DT bindings. This is done via removing compatibles from "msm_gpio" driver and via binding to "msm_gpio" driver from pinctrl driver in case "gpio-controller" property is specified for pinctrl node. Suggested-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26pinctrl: sdm845: Remove redundant CONFIG_SDM845 checkSumit Garg
DT compatible is sufficient to make platform specific differentiation, so remove redundant CONFIG_SDM845 check. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-08-26qcs404evb_defconfig: Enable USB configsSumit Garg
Enable USB config options along with its dependencies like PHY, RESET, PMIC GPIO etc. config options. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26board: qcs404-evb: Enable USB3 specific PMIC GPIOSumit Garg
For USB3 host controller to detect devices on the bus it is required to enable a PMIC GPIO: usb_vbus_boost_pin. So enable that during board specific initialization. And since this PMIC GPIO parsing is quite u-boot specific, so add a DT override to qcs404-evb-uboot.dtsi to represent usb_vbus_boost_pin. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26dts: qcs404-evb: Add PMIC GPIO controller nodeSumit Garg
PMIC GPIOs are special GPIOs which are accessible through SPMI bus. So add corresponding DT nodes. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26gpio: qcom_pmic: Add support for GPIO LV/MV subtypeSumit Garg
GPIO LV (low voltage)/MV (medium voltage) subtypes have different features and register mappings than 4CH/8CH subtypes. Add support for LV and MV subtypes. With GPIO LV/MV subtype available, add "qcom,pms405-gpio" compatible which requires support for GPIO MV subtype. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26pmic: Convert pm8916 driver to a generic Qcom PMIC driverSumit Garg
Since both pm8916.c and pm8916_gpio.c are already supporting multiple Qcom SoCs, it makes sense to rename these drivers to pmic_qcom.c and qcom_pmic_gpio.c respectively. Also, these driver can be extended to support additional functionality if required for other Qcom SoCs. Along with this import latest DT binding: qcom,spmi-pmic.txt from Linux kernel and thereby remove pm8916.txt. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26dts: qcs404-evb: Add USB controller and PHY nodesSumit Garg
QCS404 SoC provides support for two USB controllers: one USB3 and the other one being USB2. The USB3 controller supports further 2 PHY: one high speed PHY and the other super speed PHY. The USB2 controller supports a single high speed PHY. So add corresponding DT nodes. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26clocks: qcs404: Add support for USB clocksSumit Garg
Add support for USB controller and PHY clocks for QCS404 SoC. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26clocks: qcom: Add clock enable callback supportSumit Garg
Drivers like USB, ethernet etc. uses ".enable" hook to enable clocks. So add corresponding support for Qcom clock drivers. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26dts: qcs404-evb: Add reset controller nodeSumit Garg
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26reset: qcom: Add support for QCS404 SoC reset tableSumit Garg
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26reset: Convert ipq4019 driver to a generic Qcom driverSumit Garg
Since the base functionality remains the same for a reset driver on Qcom SoCs, so leverage that to convert ipq4019 specific reset driver to a generic Qcom reset driver. With that one just need to provide SoC specific reset table. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26phy: Add support for drivers to enable USB on QCS404 SoCSumit Garg
QCS404 SoC supports two types of PHY, one supports high speed mode or USB2 PHY and the other supports super speed mode or USB3 PHY. So add corresponding PHY drivers. Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26phy: Move qcom SoCs specific phy drivers to qcom folderSumit Garg
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26arm: total_compute: enable psciDavidson K
psci is used for system reset Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2022-08-26configs: j721s2_evm_a72_defconfig: fix the bootcmdJayesh Choudhary
Remove the main_cpsw0_qsgmii_phyinit variable from the boot command as there is no ethernet firmware in j721s2. Fixes: 8886341aa670 ('configs: j721s2_evm_a72_defconfig: Add A72 specific defconfig') Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2022-08-24Merge commit 'ac30d240dbb520d0980f0687630feb702a14f51a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-nand-flash into next Re-sync again on some linux part, add some fixes for fsl_elbc from Pali and switch imx8mn bsh to use nand base ident For nand subsystem tested on: - imx8mn Macronix MX30LF4G18AC - P2020 based board Turris 1.1 for fsl_elbc
2022-08-23Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- kirkwood: pogo_v4 & nsa310s: Add distro boot (Tony) - kirkwood: add DM timer support and use it on lsxl boards (Michael) - kirkwood: convert the Buffalo Linkstation LS-CHLv2 and XHL boards to DM (Michael) - mvebu: turris_mox/omnia: misc improments (Pali) - mvebu: mbus: Fix mbus driver to work also after U-Boot relocation (Pali)
2022-08-23configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-08-23board: lsxl: update the READMEMichael Walle
Update the board's README to reflect all the recent changes. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23board: lsxl: disable eth0Michael Walle
The board has only one network interface. The linux kernel will gracefully skip a the ethernet interface if no connected PHY could be probed. u-boot on the other hand will throw an error message. The kernel device tree is about to be fixed. For now, just disable the ethernet interface in our -u-boot.dtsi. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23board: lsxl: convert to CONFIG_TIMERMichael Walle
Enable the orion timer driver and we are good. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23board: lsxl: convert to DM_SERIALMichael Walle
DM_SERIAL needs early malloc. The on-chip RAM is pretty tight, it's only 2kiB, with DM_SERIAL enabled, this doesn't work anymore. Fortunately for us, we don't need the on-chip RAM because the DRAM is already initialized before u-boot starts. Just put the early malloc area there and use the default early malloc size. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Stefan Roese <sr@denx.de>