summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-01Merge tag 'efi-2023-04-rc6' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc6 Documentation: * describe skipping triggering a pipeline in Gitlab UEFI: * correct shortening of device-paths for boot options
2023-04-01efi_loader: remove duplicate assignmentHeinrich Schuchardt
Assigning the value of a variable to itself should be avoided. Addresses-Coverity-ID: 451089 ("Evaluation order violation") Fixes: 180b7118bed8 ("efi_loader: fix device-path for USB devices") Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-04-01efi_loader: correct shortening of device-pathsHeinrich Schuchardt
We use short device-paths in boot options so that a file on a block device can be found independent of the port into which the device is plugged. Usb() device-path nodes only contain port and interface information and therefore cannot identify a block device. UsbWwi() device-path nodes contain the serial number of USB devices. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-04-01doc: describe skipping triggering a pipeline in GitlabHeinrich Schuchardt
'git push -o ci.skip' can be used to push to Gitlab without triggering a pipeline. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-04-01scsi: typo supporedtHeinrich Schuchardt
%s/supporedt/supported/ Fixes: edca8cf72130 ("Convert CONFIG_SCSI_AHCI_PLAT et al to Kconfig") Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-31Merge tag 'u-boot-imx-next-20230331' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next u-boot-imx-next-20230331 for next --------------------------------- CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/15819 i.MX patches queued for next: - Conversions to DM_SERIAL - Fixes for Toradex boards - Gateworks Boards - i.MX8ULP - EQoS support / fixes, changes in boards
2023-03-31Merge tag 'dm-pull-31mar23' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dm Fixes for buildman and sysreset
2023-03-31Merge branch '2023-03-30-assorted-general-upates' into nextTom Rini
- RTC cleanups / improvements, run_commandf() cleanups, fs bugfixes, socrates config fix, PCI MPS support, GPIO improvements, other code cleanups
2023-03-31configs: imx8mn_bsh_smm_s2: remove console from bootargsDario Binacchi
The Linux kernel device tree already specifies the device to be used for boot console output with a stdout-path property under /chosen. Commit 36b661dc919da ("Merge branch 'next'") re-added the console setting that commit bede82f750752 ("configs: imx8mn_bsh_smm_s2: remove console from bootargs") had previously removed. Fixes: 36b661dc919da ("Merge branch 'next'") Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-03-31sysreset: gpio: fix gpio_reboot_request return valueJonathan Liu
It should return -EINPROGRESS if successful otherwise sysreset-uclass will continue to the next sysreset device. Signed-off-by: Jonathan Liu <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-31buildman: Correct overwriting of settings fileSimon Glass
The toolchain test causes the settings file to be overwritten, which is annoying for local development. Fix it by passing None as the filename. Signed-off-by: Simon Glass <[email protected]>
2023-03-30test: fs: Check fat short file nameStefan Herbrechtsmeier
Ensure that a freshly written fat file with a lower case filename which fits into the upper case 8.3 short filename is not mangeled with a tilde and number. Signed-off-by: Stefan Herbrechtsmeier <[email protected]>
2023-03-30input: button_kbd: make driver complementary to gpio buttonsSvyatoslav Ryhel
Remove need of dts binding for button keyboard since it reuses gpio-keys binding. Select gpio-keys driver if button keyboard is selected since button keyboard can not operate on its own. Tested-by: Svyatoslav Ryhel <[email protected]> # HTC One X T30 Signed-off-by: Svyatoslav Ryhel <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30cmd: ums: abort mounting by pressing any keySvyatoslav Ryhel
This patch introduses config which allows interrupt run of usb mass storage with any key. This is especially useful on devices with limited input capabilities like tablets and smatphones which have only gpio keys in direct access. Signed-off-by: Svyatoslav Ryhel <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30test: exit: fix run_commandf() warningsEvgeny Bachinin
Fix warnings after adding printf-like attribute format for run_commandf(): warning: too many arguments for format [-Wformat-extra-args] Signed-off-by: Evgeny Bachinin <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30test: fdt: fix run_commandf() warningsEvgeny Bachinin
Fix warnings both for 32bit and 64bit architecture after adding printf-like attribute format for run_commandf(): warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘ulong {aka long unsigned int}’ [-Wformat=] ret = run_commandf("fdt addr -c %08x", addr); ^ Signed-off-by: Evgeny Bachinin <[email protected]> Cc: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]> [trini: Fixup testcases added since patch was posted] Signed-off-by: Tom Rini <[email protected]>
2023-03-30unit-test: cover run_commandf() by test-casesEvgeny Bachinin
As run_commandf() is variadic version of run_command() and just a wrapper, hence apply similar run_command's test-cases. Let's avoid warning about empty string passing: warning: zero-length gnu_printf format string [-Wformat-zero-length] assert(run_commandf("") == 0); Signed-off-by: Evgeny Bachinin <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30cli: run_commandf(): small fixupsEvgeny Bachinin
* vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable ‘i’ set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30drivers: rtc: add max313xx series rtc driverChris Packham
Adding support for Analog Devices MAX313XX series RTCs. This is ported from the Linux driver and adapted for use in u-boot. Notable differences are - handling of tm_year and tm_mon differ - clock source support is omitted - hwmon support for the MAX31328 and MAX31343 is omitted - rtc_ops->reset is added Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30include: kernel.h: port find_closest() from LinuxChris Packham
The find_closest() macro can be used to find an element in a sorted array that is closest to an input value. Bring in this macro from Linux v6.3-rc1-2-g8ca09d5fa354. Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30disk: Use a helper function to reduce duplicationSimon Glass
Reduce the duplicated code slightly by using a helper function to handle the common code. This reduces the code size very slightly. Signed-off-by: Simon Glass <[email protected]>
2023-03-30lib: Fix SYS_TIMER_COUNTS_DOWN description in KconfigMarek Vasut
The SYS_TIMER_COUNTS_DOWN description contains a typo, s@rathe@&r@ , fix it. Signed-off-by: Marek Vasut <[email protected]>
2023-03-30gpio: allow passing NULL to gpio_request_by_line_name() to search all gpio ↵Rasmus Villemoes
controllers The API is more convenient to use if one doesn't have to know upfront which gpio controller has a line with the name one is searching for, and arrange to look that device up somehow. Or implement this loop oneself. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30rtc: m41t62: implements read8/write8 operationsThomas Perrot
These operations are required by dm_rtc_read and dm_bootcount_get helpers. Signed-off-by: Thomas Perrot <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30fs: ext4: fix files seen as symlink during deletionCorentin GUILLEVIC
The deletion process handles special case for symlinks whose target are small enough that it fits in struct ext2_inode.b.symlink. So no block had been allocated. But the check of file type wrongly considered regular files as symlink. So, no block was freed. So, the EXT4 partition could be corrupted because of no free block available. Signed-off-by: Corentin GUILLEVIC <[email protected]>
2023-03-30fs: fat: do not mangle short filenamesStefan Herbrechtsmeier
Do not mangle lower or mixed case filenames which fit into the upper case 8.3 short filename. This ensures FAT standard compatible short filenames (SFN) to support systems without long filename (LFN) support like boot roms (ex. SFN BOOT.BIN instead of BOOT~1.BIN for LFN boot.bin). Signed-off-by: Stefan Herbrechtsmeier <[email protected]>
2023-03-30test: Add test for new command pci_mpsStephen Carlson
Adds a test for the new pci_mps command to ensure that it can set the Maximum Payload Size (MPS) of all devices to 256 bytes in the sandbox environment. Enables the pci_mps command in the sandbox environment so that this test can be run. Signed-off-by: Stephen Carlson <[email protected]>
2023-03-30drivers: pci: sandbox: Add stub sandbox PCI MPS supportStephen Carlson
Reports the sandbox swapcase PCI Express device to support a 256 byte Maximum Payload Size for MPS tuning tests. Signed-off-by: Stephen Carlson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30cmd: pci: Add command to set MPS of all PCIe devicesStephen Carlson
Enable tuning of the PCI Express MPS (Maximum Payload Size) of each device. The Maximum Read Request Size is not altered. The SAFE method uses the largest MPS value supported by all devices in the system for each device. This method is the same algorithm as used by Linux pci=pcie_bus_safe. The PEER2PEER method sets all devices to the minimal (128 byte) MPS, which allows hot plug of devices later that might only support the minimum size, and ensures compatibility of DMA between two devices on the bus. Signed-off-by: Stephen Carlson <[email protected]>
2023-03-30sysinfo: gpio: fix loop over DT "revisions" arrayRasmus Villemoes
There can certainly be a lot more elements in the "revisions" (and "names") arrays than there are gpios used to form the trinary number we're searching for; we simply don't know the array size up-front. Nor do we need to, because the loop body already knows to recognize -EOVERFLOW as "not that many elements present" (and we have a test that specifically ensures that dev_read_u32_index() returns exactly that). So just drop the i < priv->gpio_num condition. While in here, fix the weird placement of the default: keyword. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2023-03-30nvedit: simplify do_env_indirect()Rasmus Villemoes
Instead of calling env_get(from) up to three times, just do it once, computing the value we will put into 'to' and error out if that is NULL (i.e. no 'from' variable and no default provided). No functional change. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30api: move API related config options into submenuHeinrich Schuchardt
Kconfig settings that are related to the API for standalone applications should be in the API sub-menu and not on the top level. CONFIG_STANDALONE_LOAD_ADDR is only relevant if standalone example applications are built. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-03-30Kconfig: Sort the BUILD_TARGET listMarek Vasut
Sort the defaults list in BUILD_TARGET Kconfig option. No functional change. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30image: Fix potentially uninitialized data variableMarek Vasut
In case fitImage support is disabled, and image_locate_script() is passed a fitImage, then the 'data' variable is used uninitialized. Drop into the default: branch of the switch-case statement and do not return the uninitialized data, and do not modify the return pointer either, just print an error message. Reported by clang build: " $ make HOSTCC=clang CC=clang KCFLAGS=-Werror sandbox64_defconfig && make HOSTCC=clang CC=clang KCFLAGS=-Werror ... boot/image-board.c:1006:7: error: variable 'data' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] case IMAGE_FORMAT_LEGACY: ^~~~~~~~~~~~~~~~~~~ include/image.h:608:29: note: expanded from macro 'IMAGE_FORMAT_LEGACY' ^~~~ boot/image-board.c:1128:19: note: uninitialized use occurs here *datap = (char *)data; ^~~~ boot/image-board.c:1001:11: note: initialize the variable 'data' to silence this warning u32 *data; ^ = NULL " Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30powerpc/mpc85xx: disable legacy format bootingHeiko Schocher
disable CONFIG_LEGACY_IMAGE_FORMAT so prevent of booting not signed fitimages. Signed-off-by: Heiko Schocher <[email protected]>
2023-03-30Merge branch 'next' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-marvell into next - mvebu: Fix boot mode detection (Pali) - mvebu: clearfog: defconfig and eMMC updates (Martin)
2023-03-30clk: imx8mp: add pwm clocks supportTommaso Merciai
Add clocks support for the PWM controllers. This is ported from Linux v6.3.0-rc1 Signed-off-by: Tommaso Merciai <[email protected]>
2023-03-30arm64: imx8mm: imx8mn: imx8mp: Drop FEC GPR[1] board workaroundMarek Vasut
The FEC interface mode is now configured in common board_interface_eth_init() and called by FEC MAC driver when appropriate. Drop the board side duplicates if the same functionality. Signed-off-by: Marek Vasut <[email protected]>
2023-03-30arm64: imx8mp: Drop EQoS GPR[1] board workaroundMarek Vasut
The EQoS interface mode is now configured in common board_interface_eth_init() and called by EQoS MAC driver when appropriate. Drop the board side duplicates if the same functionality. Signed-off-by: Marek Vasut <[email protected]>
2023-03-30arm64: dts: imx8mp: Drop EQoS clock workaroundMarek Vasut
The assigned-clock no longer have to be dropped, the clock are now defined in clk-imx8mp.c and used by DWMAC driver to configure the DWMAC clock. Drop the workarounds from U-Boot specific DT extras. Signed-off-by: Marek Vasut <[email protected]>
2023-03-30configs: verdin-imx8mp: Fix wrong early malloc() heap sizeEmanuele Ghidoli
Set, previously unset, CONFIG_SPL_SYS_MALLOC_F_LEN to 0x4000 whose default value is 0x10000. Early malloc() uses CRAM_S at 0x184000 (CFG_MALLOC_F_ADDR), this ram area end at 0x188000. Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support") Signed-off-by: Emanuele Ghidoli <[email protected]> Signed-off-by: Francesco Dolcini <[email protected]> Acked-by: Marcel Ziswiler <[email protected]>
2023-03-30ARM: imx: imx8mp: fix enable_i2c_clkRasmus Villemoes
In order for i2c_num==4 and 5 to stay invalid for non-imx8mp SOCs, the i2c_ccgr[] array must be sized by the number of initializers present, not with a hard-coded 6 which would implicitly initialize the last two elements with zeroes. Also, the bounds check is off-by-one. Fixes: c92c3a4453b8 "ARM: imx: imx8mp: Enable support for i2c5 and i2c6 on i.MX8MP" Signed-off-by: Rasmus Villemoes <[email protected]>
2023-03-30compulab: imx8mm-cl-iot-gate: Fix some function declarations in ddr.hYing-Chun Liu (PaulLiu)
We have a few places here that the function declarations do not match their prototypes, correct them. Signed-off-by: Ying-Chun Liu (PaulLiu) <[email protected]> Cc: Tom Rini <[email protected]> Cc: Stefano Babic <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: NXP i.MX U-Boot Team <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reported-by: Tom Rini <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-03-30net: fec_mxc: Add board_interface_eth_init() for i.MX8M Mini/Nano/PlusMarek Vasut
Implement common board_interface_eth_init() and call it from the FEC driver to configure IOMUXC GPR[1] register according to the PHY mode obtained from DT. This supports all three interface modes supported by the i.MX8M Mini/Nano/Plus FEC and supersedes the current board-side configuration of the same IOMUX GPR[1] duplicated in the board files. Signed-off-by: Marek Vasut <[email protected]>
2023-03-30net: fec_mxc: Add ref clock setup support for i.MX8M Mini/Nano/PlusMarek Vasut
The FEC ref clock frequency on i.MX8M Mini/Nano/Plus was so far configured via ad-hoc board code. Replace that with DM clock clk_set_rate() instead. This way, the driver claims all its required clock and sets the ref clock rate, without any need of architecture specific register fiddling. Signed-off-by: Marek Vasut <[email protected]>
2023-03-30net: dwc_eth_qos: Add board_interface_eth_init() for i.MX8M PlusMarek Vasut
Implement common board_interface_eth_init() and call it from the DWMAC driver to configure IOMUXC GPR[1] register according to the PHY mode obtained from DT. This supports all three interface modes supported by the i.MX8M Plus DWMAC and supersedes current board-side configuration of the same IOMUX GPR[1] duplicated in the board files. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2023-03-30net: dwc_eth_qos: Add i.MX8M Plus RMII supportMarek Vasut
With DM clock support in place, it is easy to add RMII support into the MAC driver. The RMII cannot operate at 1000 Mbps and at 100 and 10 Mbps the clock frequency is 50 MHz and 5 MHz instead of 25 MHz and 2.5 MHz. The board DT requires the following adjustments to EQoS node: phy-mode = "rmii"; assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, <&clk IMX8MP_SYS_PLL2_100M>, <&clk IMX8MP_SYS_PLL2_50M>; assigned-clock-rates = <0>, <100000000>, <50000000>; Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2023-03-30net: dwc_eth_qos: Add DM CLK support for i.MX8M PlusMarek Vasut
The DWMAC clock in i.MX8M Plus were so far configured via ad-hoc architecture code. Replace that with DM clock instead. This way, the driver claims all its required clock, enables and disables them, and even gets the CSR clock rate and sets the TX clock rate, without any need of architecture specific register fiddling. Drop the architecture specific code while at it too. The adjustment here is modeled after STM32MP15xx clock handling in this driver. Signed-off-by: Marek Vasut <[email protected]>
2023-03-30net: dwc_eth_qos: Set DMA_MODE SWR bit to reset the MACMarek Vasut
The driver currently only waits for DMA_MODE SWR bit to clear itself. This is insufficient e.g. on i.MX8M Plus, where the MAC must be reset before IOMUX GPR[1] content is latched into the MAC and used. Without the proper reset, the i.MX8M Plus MAC variant does not take the value in IOMUX GPR[1] into account, which makes it impossible e.g. to switch interface mode from RGMII to any other. Since proper reset is desired in general to put the block into defined state, always assert the DMA_MODE SWR bit before waiting for the bit to clear itself. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2023-03-30net: dwc_eth_qos: Staticize eqos_inval_buffer_tegra186()Marek Vasut
This function is only used within the driver, staticize it. Fixes: 149e80f74b6 ("net: dwc_eth_qos: public some functions") Signed-off-by: Marek Vasut <[email protected]>