summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-26binman: Provide a way to set the symbol base addressSimon Glass
The base address of the ELF containing symbols is normally added to any symbols written, so that the value points to the correct address in memory when everything is loaded. When the binary resides on disk, a different offset may be needed, typically 0. Provide a way to specify this. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Add minor improvements to symbol-writingSimon Glass
Add a clarification to the documentation and add a missing comment. Also update the test so that when it fails it is easier to see what is going on, rather than having to decode hex strings. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Adjust naming for reading symbolsSimon Glass
These functions get the value of a symbol. The reference to ELF files is confusing since they are reading the position/size of entries, not ELF symbols. Rename the functions and adjust the comments also. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: fit: Refine handling of devicetrees for OF_UPSTREAMSimon Glass
With OF_UPSTREAM the dts files are in an SoC-specific subdirectory, meaning that the resulting dtb files all end up in a similar subdirectory. We don't want the subdirectory name to appear as a node name in the FIT, so handle this as a special case. Also the default devicetree may have a directory-name prefix, so handle that when searching through the available devicetree files. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: fit: Set the image_pos attributes only onceSimon Glass
The section etype has its own implementation of SetImagePos(), most of which is not useful since the code is included here. So call Entry.SetImagePos() which has the only piece of this which we actually want. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: fit: Avoid assuming that a FIT member is a sectionSimon Glass
Use the more generic variable name 'entry' to avoid confusion. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Update fdt-list-dir to use the provided directorySimon Glass
Since the files are known to be in the provided directory, use that instead of requiring it to be added to the list of input directories. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Avoid setting the image_pos attribute directlySimon Glass
Two places set this attribute directly. Update them to use the function provided. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Tidy up comments and pylint warnings in fitSimon Glass
Update this entry type to resolve some pylint warnings and make sure that functions and members are fully commented. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Tidy up comments for Entry.GetEntryArgsOrProps()Simon Glass
Improve the comments for this function. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Correct the comment for fdtgrepSimon Glass
This returns stdout, not a CommandResult so update the comment. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Fix up test coverage for mkeficapsuleSimon Glass
Add tests for missing tools to complete the test coverage for this etype. Signed-off-by: Simon Glass <[email protected]>
2024-09-26buildman: Allow skipping the dtc buildSimon Glass
For most boards, the device-tree compiler is built in-tree, ignoring the system version. Add a special option to skip this build. This can be useful when the system dtc is up-to-date, as it speeds up the build. Signed-off-by: Simon Glass <[email protected]>
2024-09-26buildman: Retry the build for current sourceSimon Glass
Buildman retries a failed build when processing a branch, but does not do this when building current source. It is useful to do this retry in both cases, so add the logic for it. Signed-off-by: Simon Glass <[email protected]>
2024-09-25arm: imx: Enable always-on regulators using board specific workaround on ↵Marek Vasut
DHCOM SoM U-Boot is currently unable to automatically enable regulators which contain DT property regulator-always-on or regulator-boot-on. There is an ongoing work to add this functionality to regulator core code, but until the proper solution lands, add this awful workaround code to force these regulators on. This is specifically needed to assure the VIO regulator used to supply ethernet magnetics is enabled. Signed-off-by: Marek Vasut <[email protected]>
2024-09-25ARM: stm32: Fix secure_waitbits() mask checkMarek Vasut
Do not apply bitwise AND to register value and expected value, only apply bitwise AND to register value and mask, and only then compare the result with expected value that the function polls for. Fixes: b49105320a5b ("stm32mp: psci: Implement PSCI system suspend and DRAM SSR") Signed-off-by: Marek Vasut <[email protected]>
2024-09-25ARM: stm32: Fix TAMP_SMCR BKP..PROT fields on STM32MP15xxMarek Vasut
Update the TAMP_SMCR BKP..PROT fields to put first 10 registers into protection zone 1 and next 5 into zone 2. This fixes use of boot counter which is often in zone 3 and has to be updated from Linux, which runs in NS. Fixes: 73f7fc944cf6 ("ARM: stm32: Initialize TAMP_SMCR BKP..PROT fields on STM32MP15xx") Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2024-09-25power: regulator: Consistently return -ENOSYS when ops is unimplementedJonas Karlman
dev_get_driver_ops() may return NULL when the udevice is invalid. Move the ops check to top of functions to consistently return -ENOSYS when ops is unimplemented and prevent trying to access uclass plat data, also add missing NULL checks to suspend ops. Signed-off-by: Jonas Karlman <[email protected]>
2024-09-25power: regulator: Do not call set_suspend_value with -ENODATAJonas Karlman
On some boards a PMIC regulator is flagged with regulator-on-in-suspend and does not define any suspend or max microvolt, e.g. on Radxa ROCK 3A: vcc_ddr: DCDC_REG3 { regulator-name = "vcc_ddr"; regulator-always-on; regulator-boot-on; regulator-initial-mode = <0x2>; regulator-state-mem { regulator-on-in-suspend; }; }; This result in suspend_uV having the value -ENODATA after probe. This negative voltage, -ENODATA, gets missinterpreted and result in an unexpected voltage being set by autoset. E.g. on Radxa ROCK 3A the vcc_ddr regulator by default have a normal and suspend voltage value of 0.5v. However, due to this missinterpretation the suspend voltage end up beind set to 0.5625v instead. Fix this by skip calling regulator_set_suspend_value() in autoset and also protect calling set value ops when input value is -ENODATA. Signed-off-by: Jonas Karlman <[email protected]>
2024-09-25Merge tag 'u-boot-imx-next-20240925' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22406 - i.MX93 FEC fixes. - Always name the generated fitImage u-boot.itb to keep compatibility with pr-buildman behavior. -----------------------
2024-09-24net: fec_mxc: Skip recv packet process when fec is haltedYe Li
After FEC is halted by calling fec_halt callback, we should not continue receiving packet. Otherwise it will process previous pending interrupts on EIR register and uses wrong rbd index as this has been reset to 0. The GRA interrupt which is triggered by issuing graceful stop command to FEC transmitter in fec_halt is processed in this case. It causes wrong receive buffer descriptors be used by FEC in next time. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2024-09-24net: fec_mxc: Fix clk_ref rate on iMX93Peng Fan
i.MX93 FEC ENET port supports two mode: RGMII and RMII. For RGMII, there is an internal /2 divider, so the freq needs to set with (*2), otherwise the speed will not reach 1G and cause communication error in some network environments. For RMII, the clk path is ccm -> enet tx_clk pin -> pad loop back to enet, no /2 divider. So fix for RGMII mode with freq multiplied by 2. Fixes: 09de565f76b ("net: fec_mxc: support i.MX93") Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2024-09-24arm64: dts: imx8m: Always name the generated fitImage u-boot.itbMarek Vasut
Maintain backward compatibility with pre-binman u-boot file naming, the U-Boot fitImage used to be named u-boot.itb before, restore the file name after binman conversion. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2024-09-24Merge patch series "Miscellaneous fixes"Tom Rini
Jerome Forissier <[email protected]> says: Miscellaneous fixes made when developing the lwIP series [1]. They are posted separately since they make sense on their own. Subsequent versions of the lwIP series will contain a squashed version of this one. [1] http://patchwork.ozlabs.org/project/uboot/list/?series=420712&state=%2A&archive=both
2024-09-24cmd: pxe: CMD_PXE implies CMD_TFTPBOOTJerome Forissier
cmd/pxe.c (CMD_PXE) calls do_get_tftp() (CMD_TFTPBOOT) therefore add an "imply" to cmd/Kconfig. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2024-09-24common: update: UPDATE_COMMON implies CMD_TFTPBOOTJerome Forissier
common/update.c (UPDATE_COMMON) depends on tftp_timeout_ms which is defined in cmd/tftp.c (CMD_TFTPBOOT). Therefore add the appropriate imply statement to Kconfig. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2024-09-24test/py: test_efi_loader: add HTTP (wget) test for the EFI loaderJerome Forissier
Add a test to test_efi_loader.py similar to the TFTP test but for HTTP with the wget command. Suggested-by: Tom Rini <[email protected]> Signed-off-by: Jerome Forissier <[email protected]> Tested-by: Tom Rini <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2024-09-24test/py: test_efi_loader: add missing dependency on cmd_tftpbootJerome Forissier
test_efi_helloworld_net() and test_efi_grub_net() depend on cmd_tftpboot so add the missing annotations. Reported-by: Tom Rini <[email protected]> Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-24test/py: net_boot: fix commentJerome Forissier
If env__pxe_boot_test_skip is not present, it defaults to True not False. Therefore fix the comment. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-24net: fec_mxc_init(): do not ignore return status of fec_open()Jerome Forissier
The fec_mxc_init() function currently always returns 0. This does not allow the callers to detect when for instance the PHY initialization failed due to the port being unconnected. Fix that by returning the status of fec_open(). Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-24net: wget: allow EFI bootJerome Forissier
wget followed by bootefi currently fails as follows: U-Boot> wget 200000 192.168.0.30:helloworld.efi Waiting for Ethernet connection... done. HTTP/1.0 200 OK Packets received 13, Transfer Successful Bytes transferred = 12720 (31b0 hex) U-Boot> bootefi 200000 No UEFI binary known at 200000 U-Boot> Fix the problem by adding the missing efi_set_bootdev() call. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-24net: ftgmac100: depend on NETJerome Forissier
FTGMAC100 enables drivers/net/ftgmac100.c which uses PHY_INTERFACE_MODE_NCSI, which is defined only when PHY_NCSI is enabled. Therefore FTGMAC100 depends on PHY_NCSI. However adding such a dependency causes a "recursive dependency detected!" message, so add a dependency on NET instead (PHY_NCSI depends on NET). All in all, either the stack is NET and FTGMAC100 can be enabled, or it is NET_LWIP (or NO_NET) and it cannot. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-24net: phy: ncsi: depend on NETJerome Forissier
PHY_NCSI enables drivers/net/phy/ncsi.c which calls net_loop() and net_set_timeout_handler(). That's the legacy NET stack (as opposed to NET_LWIP). Therefore add the dependency to Kconfig. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-24net: wget: removed unused function wget_success()Jerome Forissier
wget_success() is used nowhere so remove it. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2024-09-24net: fm: call dtsec_init_phy() only when it is definedJerome Forissier
dtsec_init_phy() is defined only with MII so add the proper conditional in the caller code. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-24arm: omap2: add missing #include <netdev.h>Jerome Forissier
emac.c implements cpu_eth_init() so it needs to pull the corresponding header file. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-09-24at91: rename mem_init() to at91_mem_init()Jerome Forissier
The AT91-based platforms have a mem_init() function declared in arch/arm/mach-at91/include/mach/at91_common.h and implemented in various places. In preparation of the introduction of the lwIP networking library which also has a global mem_init() function, rename the AT91 one to at91_mem_init(). Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Hari Prasath Gujulan Elango <[email protected]>
2024-09-24flash: prefix error codes with FL_Jerome Forissier
Prefix the flash status codes (ERR_*) with FL_ in order to avoid clashes with third-party libraries. Case in point: including the lwIP library header file <lwip/err.h> which defines err_enum_t as an enum with values being ERR_*. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2024-09-24buildman/toolchain.py: do not set CROSS_COMPILE for sandboxJerome Forissier
When building for sandbox, self.cross is empty. In MakeEnvironment(), CROSS_COMPILE is defined to be self.cross (with or without a full path), optionally prefixed by the toolchain wrapper defined in ~/.buildman. This is fine when self.cross is not empty, but it doesn't make sense when it is: - Either there is no wrapper and we end up with an empty CROSS_COMPILE which is the same as not defining it (the host compiler will be used), - Or there is a wrapper and CROSS_COMPILE will contain only the wrapper which obviously is not a valid compiler, hence an error. Test case: $ sudo apt install ccache $ grep -q toolchain-wrapper ~/.buildman || \ printf "[toolchain-wrapper]\nwrapper = ccache\n" >>~/.buildman $ make mrproper $ ./tools/buildman/buildman sandbox_noinst $ ./tools/buildman/buildman sandbox_noinst Building current source for 1 boards (1 thread, 24 jobs per thread) sandbox: + sandbox_noinst +arch/sandbox/lib/reloc_sandbox_efi.c:10:15: error: operator '==' has no left operand + 10 | #if HOST_ARCH == HOST_ARCH_X86_64 + | ^~ [...] The GetEnvArgs function is modified too, since the VAR_CROSS_COMPILE case has the same issue. In tools/buildman/test.py, testGetEnvArgs is extended and testMakeEnvironment is added. They check the 'arm' and 'sandbox' toolchains, with and without a wrapper. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-24test/py/tests/test_bootstage.py: Combine stash/unstash testsTom Rini
When running the bootstage tests currently we get a warning like: tests/test_bootstage.py::test_bootstage_stash ...PytestReturnNotNoneWarning: Expected None, but tests/test_bootstage.py::test_bootstage_stash returned (37748736, 4096), which will be an error in a future version of pytest. Did you mean to use `assert` in stead of `return`? This is because the unstash test will run the stash test and fetch the addr / size from that. Rework the test to be stash and unstash and then run the unstash command at the end of the current stash test. Acked-by: Michal Simek <[email protected]> Reviewed-by: Love Kumar <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-09-24spl: ram: hide SPL_RAM_SUPPORTJerome Forissier
Make SPL_RAM_SUPPORT a hidden Kconfig symbol, automatically selected by SPL_RAM_DEVICE or SPL_DFU. Avoids the situation where SPL_RAM_SUPPORT may be enabled without the other two being enabled, which results in the following build warning: common/spl/spl_ram.c:19:14: warning: ‘spl_ram_load_read’ defined but not used [-Wunused-function] 19 | static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, | ^~~~~~~~~~~~~~~~~ Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2024-09-24ram: k3-ddrss: Handle error properly in lpddr4_startUdit Kumar
In lpddr4_start function error returned by lpddr4_enablepiinitiator may go undetected due to overwrite of return code. Add support to handle error in above case. Reported-by: Andreas Dannenberg <[email protected]> Signed-off-by: Udit Kumar <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]>
2024-09-23Merge tag 'xilinx-for-v2025.01-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next AMD/Xilinx changes for v2025.01-rc1 kbuild: - Add rules for automatically applying DT overlays Microblaze: - Enable bootscript location via DT AMD/Xilinx - Enable SIMPLE_PM_BUS by default ZynqMP: - DT updates and alignments with dt-schema - Call fdtoverlay via make directly - Enable non-invasive CCI-400 PMU debug - Disable secure access for boot devices - Add new zynqmp reboot command Versal NET: - Cleanup spi_get_env_dev() Kria: - Add bootmenu support sdhci: - Do not call device_is_compatible everywhere net: - Remove is-internal-pcspma DT flag
2024-09-21mmc: Poll CD in case cyclic framework is enabledMarek Vasut
In case the cyclic framework is enabled, poll the card detect of already initialized cards and deinitialize them in case they are removed. Since the card initialization is a longer process and card initialization is done on first access to an uninitialized card anyway, avoid initializing newly detected uninitialized cards in the cyclic callback. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-21Merge tag 'doc-2024-10-rc6' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request doc-2024-10-rc6 Documentation: * Correct function descriptions that are not Sphinx conformant. * Correct incorrect dependency CONFIG_USB_USB_GADGET in the ums command description.
2024-09-21doc: usage: cmd: ums: fix dependenciesThomas Perrot
Replace CONFIG_USB_USB_GADGET by CONFIG_USB_GADGET_DOWNLOAD. Signed-off-by: Thomas Perrot <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2024-09-21events: correct event_uninit() descriptionHeinrich Schuchardt
The function name in the description must match the function. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-21boot: correct struct expo_action descriptionHeinrich Schuchardt
Correct the description of the select.id member to fix a kernel-doc warning. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-21sandbox: fix OS function descriptionsHeinrich Schuchardt
* Add missing function names. * Align names used in descriptions with function names. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-21efi_loader: correct efi_set_variable_int() descriptionHeinrich Schuchardt
The name used in the function description must match the function. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>