aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-10-13TEST: Make lack of DM_I2C migration fatalTEST/failure-on-lack-of-DM_I2C-conversionTom Rini1-1/+12
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-10-12Merge branch '2022-10-12-additional-fixes'Tom Rini14-13/+101
- Add "ubi list", Nokia RX51 fixes, other assorted fixes
2022-10-12Nokia RX-51: Fix double space key pressPali Rohár1-1/+5
Space key is indicated by two different bits. Some HW models indicate press of space key only by the first bit. Qemu indicates it by both bits at the same time, which is currently interpreted by u-boot as double key press. Fix this issue by setting first bit when only second is set (to support HW models which indicate press only by second bit) and always clearing second bit before processing to not report double space key press. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-10-12Nokia RX-51: Remove CONFIG_UBI_SIZEPali Rohár1-2/+0
CONFIG_UBI_SIZE option is not used, so remove it. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-10-12Fix typo in CONFIG_USBNET_DEVADDRIgnacio Zamora3-4/+2
Fix typo that was caused by the same feature being split in to 2 different configuration options. Replace CONFIG_USBNET_DEVADDR with CONFIG_USBNET_DEV_ADDR Signed-off-by: Ignacio Zamora <nachopitt@gmail.com>
2022-10-12tools: k3_gen_x509_cert: Do not print SWRV on buildAndrew Davis1-1/+1
This matches the others here. Signed-off-by: Andrew Davis <afd@ti.com>
2022-10-12smem: msm: add missing <linux/sizes.h>Robert Marko1-0/+1
MSM SMEM driver is currently missing <linux/sizes.h> header and throws the following compile error: drivers/smem/msm_smem.c: In function ‘qcom_smem_get_ptable’: drivers/smem/msm_smem.c:635:71: error: ‘SZ_4K’ undeclared (first use in this function) 635 | ptable = smem->regions[0].virt_base + smem->regions[0].size - SZ_4K; Signed-off-by: Robert Marko <robert.marko@sartura.hr> Cc: luka.perkov@sartura.hr
2022-10-12test: run setexpr test only on sandboxHeinrich Schuchardt2-1/+3
The test relies on memory being available at 0x0. This in not valid for many boards. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-12firmware: scmi: fix the multi channel support with CCFPatrick Delaunay4-4/+4
When the CCF is activated, the dev->parent is not necessary the reference to SCMI transport and the function devm_scmi_of_get_channel failed for the registered SCMI clock, child for protocol@14, the channel is null and the SCMI clock driver crash for any operations. This patch changes the first parameter of the ops of_get_channel(), aligned with other process_msg() to pass directly the good reference, i.e. parent result of find_scmi_transport_device(dev) which return the reference of the scmi transport device. Fixes: 8e96801aa6a ("firmware: scmi: add multi-channel support") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-10-12cmd: ubi: Add 'ubi list' command for printing list of all UBI volumesPali Rohár1-0/+85
To allow easily iterate over all UBI volumes, add a new command which either print all user UBI volumes on output or set them into env variable. As UBI volumes can have arbitrary name/label, in most cases it is useful to iterate them by their numbers. This can be achieved by -numeric flag. This functionality is similar to already existing 'part list' command which prints partitions on formatted block device. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-10-11Merge branch '2022-10-11-assorted-fixes-and-updates'Tom Rini37-57/+749
- Assorted code cleanups and fixes, along with two new commands.
2022-10-11test: cmd: add test for temperature commandRobert Marko2-0/+40
Add simple test for the temperature command. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11thermal: add sandbox driverRobert Marko9-0/+55
Provide a simple sandbox driver for the thermal uclass. It simply registers and returns 100 degrees C if requested. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11doc: cmd: temperature: add documentationRobert Marko2-0/+51
Add documentation for the temperature command. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11cmd: add temperature commandRobert Marko3-0/+92
Currently, there is no way for users to check the readings from thermal sensors from U-boot console, only some boards print it during boot. So, lets add a simple "temperature" command that allows listing thermal uclass devices and getting their value. Note that the thermal devices are intenionally probed if list is used as almost always they will not get probed otherwise and there is no way for users to manually call probe on a certain device from console. Assumption is made that temperature is returned in degrees C and not milidegrees like in Linux as this is what most drivers seem to return. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11cmd: xxd: add new commandRoger Knecht10-0/+209
Add xxd command to print file content as hexdump to standard out Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Roger Knecht <rknecht@pm.me>
2022-10-11cmd: cat: add new commandRoger Knecht10-0/+203
Add cat command to print file content to standard out Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Roger Knecht <rknecht@pm.me>
2022-10-11pinctrl: fix buffer size for pinctrl_generic_set_state_prefix()John Keeping1-1/+1
This buffer has the concatenated prefix and name written into it, so it must be large enough to cover both strings plus the terminating NUL. Fixes: 92c4a95ec7 ("pinctrl: Add new function pinctrl_generic_set_state_prefix()") Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11pinctrl: nuvoton: fix set persist errorJim Liu1-4/+4
CA9C is cortex A9 watchdog reset control bit. if device set persist mode, it shouldn't set this bit. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2022-10-11boot: image-pre-load: Check environment for location of signature infoSteven Lawrance1-1/+6
Setting an alternative signature info node in "pre_load_sig_info_path" allows verification of an image using the bootm pre-load mechanism with a different key, e.g.: setenv pre_load_sig_info_path "/alt/sig" ; bootm preload [addr] Signed-off-by: Steven Lawrance <steven.lawrance@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11image-pre-load: Move macros/definitions to image.hSteven Lawrance3-45/+43
Putting these definitions in a header will allow signatures to be validated independently of bootm. Signed-off-by: Steven Lawrance <steven.lawrance@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11bootcount: pmic: Correct misleading commentPhilip Oberfichtner2-2/+2
Fix a copy-paste error I did when inserting the comment. Signed-off-by: Philip Oberfichtner <pro@denx.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-10-11lib: crypt: fix selecting a non-existent optionOleksandr Suvorov1-1/+0
The option SHA256_ALGO does not exist. Remove selecting it. Fixes: 26dd9936574 ("lib: add crypt subsystem") Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2022-10-11cmd: pxe: add alias devicetree-overlay for fdtoverlaysEdoardo Tomelleri3-3/+43
This adds keyword devicetree-overlay as an alias for fdtoverlays in extlinux (sysboot) and pxe to better follow the Boot Loader Specification [1], improves documentation around them by adding an example for both fdtoverlays and devicetree-overlay and the environment variable required for this feature. The link for the spec is updated to the current one. [1] https://systemd.io/BOOT_LOADER_SPECIFICATION/ Signed-off-by: Edoardo Tomelleri <e.tomell@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-10-11Merge tag 'xilinx-for-v2023.01-rc1-v3' of ↵WIP/11Oct2022Tom Rini35-242/+310
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2023.01-rc1 (round 3) fpga: - Create new uclass - Get rid of FPGA_DEBUG and use logging infrastructure zynq: - Enable early EEPROM decoding - Some DT updates zynqmp: - Use OCM_BANK_0 to check config loading permission - Change config object loading in SPL - Some DT updates net: - emaclite: Enable driver for RISC-V xilinx: - Fix static checker warnings - Fix GCC12 warning sdhci: - Read PD id from DT
2022-10-11Merge branch '2022-10-10-LLVM-related-improvements'Tom Rini3-3/+3
- A few patches to make building with LLVM/LLD easier
2022-10-10spl: atf: Fix clang -Wasm-operand-widths warningWIP/2022-10-10-LLVM-related-improvementsAlistair Delva1-1/+1
common/spl/spl_atf.c:187:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory"); ^ common/spl/spl_atf.c:187:34: note: use constraint modifier "w" __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory"); ^~ %w0 Use %x0 to match what Linux does in <asm/sysreg.h> write_sysreg(). Signed-off-by: Alistair Delva <adelva@google.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Michael Walle <michael@walle.cc> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Nick Desaulniers <ndesaulniers@google.com>
2022-10-10Makefile: apply dynamic relocations for LLDNick Desaulniers1-1/+1
It seems that for aarch64, unless we apply dynamic relocations to the location being relocated, we fail to boot. As Fangrui notes: For dynamic relocations using the RELA format (readelf -Wr), GNU ld sets the initial content to r_addend; ld.lld doesn't do that by default (needs --apply-dynamic-relocs). Otherwise .rodata appears to be full of NUL-bytes before relocation, causing crashes when trying to invoke the function pointers in init_sequence_f from initcall_run_list(). Link: https://reviews.llvm.org/D42797 Suggested-by: Fangrui Song <maskray@google.com> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Alistair Delva <adelva@google.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Nick Desaulniers <ndesaulniers@google.com>
2022-10-10examples: standalone: Fix build with LLVM toolchainAlistair Delva1-1/+1
When building the standalone example with llvm, the link step fails: examples/standalone/libstubs.o: In function `dummy': include/_exports.h:10: undefined reference to `jt' include/_exports.h:11: undefined reference to `jt' include/_exports.h:12: undefined reference to `jt' include/_exports.h:13: undefined reference to `jt' include/_exports.h:14: undefined reference to `jt' examples/standalone/libstubs.o:include/_exports.h:15: more undefined references to `jt' follow Indeed, the standalone libstubs.o does use the jt symbol, but it was marked 'static' in stubs.c. It's strange how gcc builds are working. Signed-off-by: Alistair Delva <adelva@google.com> Cc: Rick Chen <rick@andestech.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Nick Desaulniers <ndesaulniers@google.com>
2022-10-10Merge https://source.denx.de/u-boot/custodians/u-boot-usbWIP/10Oct2022Tom Rini13-145/+97
2022-10-10Merge tag 'efi-2023-01-rc1-2' of ↵Tom Rini12-93/+152
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-01-rc1-2 Documentation: * man-page for cls command * update build requirements UEFI * Fix bugs in the Stop() function of the EFi Driver Binding protocol for block devices * Avoid EFI_CALL() when invoking CloseProtocol()
2022-10-10usb: gadget: fastboot: detach usb on reboot commandsMattijs Korpershoek2-1/+2
When host issues "fastboot reboot fastboot", it's expected that the board drops the USB connection before resetting. On some boards, such as Khadas VIM3L and SEI610, this is not the case. We observe the following error: $ fastboot reboot fastboot Rebooting into fastboot OKAY [ 0.004s] fastboot: error: Failed to boot into userspace fastboot; one or more components might be unbootable. This does not happen when we use the RST button on the board. It can be reproduced in linux with: # echo b > /proc/sysrq-trigger In this case, we hit a undefined hardware behavior, where D+ and D- are in an unknown state. Therefore the host can't detect usb disconnection. Make sure we always call usb_gadget_release() when a "fastboot reboot" command is issued. Note: usb_gadget_release() should be called before g_dnl_unregister() because g_dnl_unregister() triggers a complete() call on each endpoint (thus calling do_reset()). Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2022-10-10usb: ehci: Remove unused ehci_{setup,shutdown}_phy() helpersPatrice Chotard2-70/+0
Remove unused ehci_{setup,shutdown}_phy() helpers now replaced by generic_{setup,shutdown}_phy(). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org>
2022-10-10usb: ehci: Make usage of generic_{setup,shutdown}_phy() helpersPatrice Chotard4-10/+10
Replace ehci_setup_phy() and ehci_shutdown_phy () by respectively generic_setup_phy() and generic_shutdown_phy(). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org>
2022-10-10usb: ohci: Make usage of generic_{setup,shutdown}_phy() helpersPatrice Chotard1-53/+3
Replace ohci_setup_phy() and ohci_shutdown_phy () by respectively generic_setup_phy() and generic_shutdown_phy(). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org>
2022-10-10phy: Add generic_{setup,shutdown}_phy() helpersPatrice Chotard2-0/+72
In drivers usb/host/{ehci,ohci}-generic.c, {ehci,ohci}_setup_phy() and {ehci,ohci}_shutdown_phy() shares 95% of common code. Factorize this code in new generic_{setup,shudown}_phy() functions. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org>
2022-10-10usb: gadget: Clean up Makefile ifdefferyMarek Vasut1-10/+7
Take the USB_ETHER ifdef block apart and make use of obj-$(VAR) instead to include the source files in build. The duplicate CI_UDC entry is now removed, the USB_DEVICE ifdef is now reduced to core.o ep.o addition, the ether.o can be conditionally compiled in using USB_ETHER. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-10-10usb: Add missing guard around env_get() in usb_hubMarek Vasut1-1/+3
The env_get() might be undefined in case ENV_SUPPORT is disabled, which may happen e.g. in SPL. Add missing ifdef guard around the env_get() to prevent build failure. Signed-off-by: Marek Vasut <marex@denx.de> Tested-by: Fabio Estevam <festevam@denx.de>
2022-10-10efi_loader: reformat efi_disk_add_dev()Heinrich Schuchardt1-8/+12
Make it clearer why InstallMultipleProtocolInterfaces is invoked with two NULLs: * rename guid to esp_guid * put protocol GUIDs and the related interfaces on same lines * add comment Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-10efi_loader: simplify efi_set_load_options()Heinrich Schuchardt1-9/+4
* Replace the OpenProtocol() call by efi_search_protocol(). * Remove the CloseProtocol() call. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-10efi_driver: use efi_close_protocolHeinrich Schuchardt1-14/+11
Avoid EFI_CALL() by using efi_close_protocol(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-10efi_loader: internal CloseProtocolHeinrich Schuchardt2-38/+61
Allow avoiding using EFI_CALL() when closing a protocol by providing an internal function. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-10efi_loader: CloseProtocol in efi_fmp_findHeinrich Schuchardt1-8/+6
The CloseProtocol() boot service requires a handle as first argument. Passing the protocol interface is incorrect. CloseProtocol() only has an effect if called with a non-zero value for agent_handle. HandleProtocol() uses an opaque agent_handle when invoking OpenProtocol() (currently NULL). Therefore HandleProtocol() should be avoided. * Replace the LocateHandle() call by efi_search_protocol(). * Remove the CloseProtocol() call. Fixes: 8d99026f0697 ("efi_loader: capsule: support firmware update") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-10efi_loader: CloseProtocol in tcg2_measure_gpt_dataHeinrich Schuchardt1-7/+3
The CloseProtocol() boot service requires a handle as first argument. Passing the protocol interface is incorrect. CloseProtocol() only has an effect if called with a non-zero value for agent_handle. HandleProtocol() uses an opaque agent_handle when invoking OpenProtocol() (currently NULL). Therefore HandleProtocol() should be avoided. * Replace the LocateHandle() call by efi_search_protocol(). * Remove the CloseProtocol() call. * Remove a superfluous goto. Fixes: ce3dbc5d080d ("efi_loader: add UEFI GPT measurement") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-10efi_driver: fix efi_uc_stop()Heinrich Schuchardt1-2/+3
We must always call EFI_EXIT() when returning from an EFIAPI function. Fixes: 05ef48a2484b ("efi_driver: EFI block driver") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-10efi_loader: don't export efi_remove_all_protocolsHeinrich Schuchardt1-2/+0
This function is only used inside efi_boottime.c and is not safe to use outside of this context. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-10efi_loader: printf code in efi_disk_get_device_name()Heinrich Schuchardt1-1/+2
part is unsigned. So it must be printed with %u. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-10doc: describe usage of virt-make-fs for testingHeinrich Schuchardt1-0/+19
We want tests to avoid the usage of sudo. Describe that virt-make-fs can generate disk images without being root. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-10doc: add python3-filelock python3-pytest-xdistHeinrich Schuchardt1-3/+4
Packages python3-filelock python3-pytest-xdist as required to run 'make tests'. Add them to the required packages list in the documentation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-10doc: man-page for clsHeinrich Schuchardt2-0/+27
Provide a man-page for the cls command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>