summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge https://source.denx.de/u-boot/custodians/u-boot-shWIP/15Jan2023Tom Rini2023-01-158-10/+16
|\
| * configs: r8a77980: Condor: Enable MMC support by defaultAndrey Dolnikov2023-01-141-1/+6
| | | | | | | | | | | | | | | | | | This enables MMC support, which is available on Condor board, by default. Signed-off-by: Andrey Dolnikov <andrey.dolnikov@cogentembedded.com> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
| * ARM: renesas: condor: switch eMMC bus to 1V8Hai Pham2023-01-141-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | The eMMC card has two supplies, VCC and VCCQ. The VCC supplies the NAND array and the VCCQ supplies the bus. On Condor, the VCC is connected to 3.3V rail, while the VCCQ is connected to 1.8V rail. Adjust the pinmux to match the bus, which is always operating in 1.8V mode. Based on Linux commit 69efe4bbeda50745 ("arm64: dts: renesas: condor: Switch eMMC bus to 1V8") from Wolfram Sang Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
| * ARM: dts: renesas: condor: Enable SPI NOR fast-readMarek Vasut2023-01-141-0/+1
| | | | | | | | | | | | | | | | | | This board requires SPI NOR fast-read, otherwise the SPI NOR access returns corrupted data. Enable the fast-read explicitly in DT as it has been disabled in the MTD subsystem by commit d008190920 ("mtd: spi-nor: Mask out fast read if not requested in DT") Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * ARM: renesas: ulcb: Set CONFIG_TEXT_BASE=0x0 on R-Car Gen3 ULCBMarek Vasut2023-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since R-Car Gen3 already enables position independent build, also set CONFIG_TEXT_BASE=0x0 to finalize the switch. This is possible since 534f0fbd65 ("arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=y") fixed current env_get_char() crash with CONFIG_TEXT_BASE=0x0 . This change permits us to start U-Boot from any location in DRAM instead of specific TEXT_BASE. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * ARM: renesas: condor: Set CONFIG_TEXT_BASE=0x0 on R-Car Gen3 CondorMarek Vasut2023-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since R-Car Gen3 already enables position independent build, also set CONFIG_TEXT_BASE=0x0 to finalize the switch. This is possible since 534f0fbd65 ("arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=y") fixed current env_get_char() crash with CONFIG_TEXT_BASE=0x0 . This change permits us to start U-Boot from any location in DRAM instead of specific TEXT_BASE. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * ARM: renesas: Enable LTO on R-Car3 FalconMarek Vasut2023-01-141-0/+1
| | | | | | | | | | | | | | Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 30 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * ARM: renesas: Enable LTO on R-Car3 DraakMarek Vasut2023-01-141-0/+1
| | | | | | | | | | | | | | Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 29 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * ARM: renesas: Enable LTO on R-Car3 EbisuMarek Vasut2023-01-141-0/+1
| | | | | | | | | | | | | | Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 34 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * ARM: renesas: Enable LTO on R-Car3 CondorMarek Vasut2023-01-141-0/+1
| | | | | | | | | | | | | | Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 32 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * ARM: renesas: Enable LTO on R-Car3 EagleMarek Vasut2023-01-141-0/+1
| | | | | | | | | | | | | | Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 32 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * ARM: renesas: Enable LTO on R-Car3 ULCBMarek Vasut2023-01-141-0/+1
| | | | | | | | | | | | | | Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 31 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
* | Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini2023-01-154-2/+23
|\ \ | |/ |/|
| * usb: gadget: dwc2_udc_otg: implement pullup()Mattijs Korpershoek2023-01-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pullup is used by the usb framework in order to do software-controlled usb_gadget_connect() and usb_gadget_disconnect(). Implement pullup() for dwc2 using the SOFT_DISCONNECT bit in the dctl register: * when pullup is on, clear SOFT_DISCONNECT * when pullup is off, set SOFT_DISCONNECT This is especially useful when a gadget disconnection is initiated but no board_usb_cleanup() is called. Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
| * usb: gadget: fastboot: detach usb just before rebootingDario Binacchi2023-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes the following error when updating a BSH SMM S2 board: 3:72>Start Cmd:FB[-t 8000]: ucmd nand write ${loadaddr} nanddtb ${filesize} 3:72>Okay (0.023s) 3:72>Start Cmd:FB: reboot 3:72>Fail Bulk(R):LIBUSB_ERROR_IO(0s) The "fastboot reboot" command detaches the USB when it still needs to be used. So let's detach the USB just before the reset. CC: Mattijs Korpershoek <mkorpershoek@baylibre.com> Fixes: 5f7e01e9d5d800 ("usb: gadget: fastboot: detach usb on reboot commands") Suggested-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
| * usb: hub: allow to increase HUB_DEBOUNCE_TIMEOUTPatrick Delaunay2023-01-142-1/+13
|/ | | | | | | | | | | | | | | | Add a new CONFIG_USB_HUB_DEBOUNCE_TIMEOUT to increase the HUB_DEBOUNCE_TIMEOUT value, for example to 2s because some usb device needs around 1.5s or more to make the hub port status to be connected steadily after being powered off and powered on. This 2s value is aligned with Linux driver and avoids to configure "usb_pgood_delay" as a workaround for connection timeout on some USB device; normally the env variable "usb_pgood_delay" is used to delay the first query after power ON and thus the device answer, but this variable not used to increase the connection timeout delay. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* Merge tag 'u-boot-stm32-20230113' of ↵Tom Rini2023-01-1325-86/+507
|\ | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-stm Add driver to manage onboard hub supplies Add calibration support for stm32-adc Linux kernel v6.1 DT synchronization for stm32mp151.dtsi stm32mp157a-dk1-scmi-u-boot.dtsi update Add support of OP-TEE and STM32MP13x in bsec driver ECDSA various fixes for stm32mp
| * ARM: stm32: Make ECDSA authentication available to U-BootMarek Vasut2023-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | With U-Boot having access to ROM API call table, it is possible to use the ROM API call it authenticate e.g. signed kernel fitImages using the BootROM ECDSA support. Make this available by pulling the ECDSA BootROM call support from SPL-only guard. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
| * ARM: stm32: Pass ROM API table pointer to U-Boot properMarek Vasut2023-01-131-0/+15
| | | | | | | | | | | | | | | | | | | | | | The ROM API table pointer is no longer accessible from U-Boot, fix this by passing the ROM API pointer through. This makes it possible for U-Boot to call ROM API functions to authenticate payload like signed fitImages. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
| * ARM: stm32: Factor out save_boot_paramsMarek Vasut2023-01-134-36/+43
| | | | | | | | | | | | | | | | | | | | | | | | The STM32MP15xx platform currently comes with two incompatible implementations of save_boot_params() weak function override. Factor the save_boot_params() implementation into common cpu.c code and provide accessors to read out both ROM API table address and DT address from any place in the code instead. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
| * ARM: stm32: Fix ECDSA authentication with Dcache enabledMarek Vasut2023-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | In case Dcache is enabled while the ECDSA authentication function is called via BootROM ROM API, the MMU tables are set up and the BootROM region is not marked as executable, so an attempt to run code from it results in a hang. Mark the BootROM region as executable as suggested by Patrick to prevent the hang. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
| * configs: stm32mp13: Activate command stm32keyPatrick Delaunay2023-01-121-0/+1
| | | | | | | | | | | | | | Activate the command stm32key with CONFIG_CMD_STM32KEY. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * board: st: Add support of STM32MP13x boards in stm32board cmdPatrick Delaunay2023-01-122-4/+5
| | | | | | | | | | | | | | | | Add board identifiers for STMicroelectronics STM32MP13x boards: - DISCO board: MB1635 Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * configs: stm32mp13: Activate CONFIG_CMD_FUSEPatrick Delaunay2023-01-121-0/+1
| | | | | | | | | | | | | | | | Activate the command fuse to access on STM32MP13x OTP with the BSEC driver. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * stm32mp: Add support of STM32MP13x in bsec driverPatrick Delaunay2023-01-121-0/+1
| | | | | | | | | | | | | | | | Add support for "st,stm32mp13-bsec" for STM32MP13x in the bsec driver based on OP-TEE pseudo TA STM32MP BSEC. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * stm32mp: Add OP-TEE support in bsec driverPatrick Delaunay2023-01-125-12/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When OP-TEE is used, the SMC for BSEC management are not available and the STM32MP BSEC pseudo TA must be used (it is mandatory for STM32MP13 and it is a new feature for STM32MP15x). The BSEC driver try to open a session to this PTA BSEC at probe and use it for OTP read or write access to fuse or to shadow. This patch also adapts the commands stm32key and stboard to handle the BSEC_LOCK_PERM lock value instead of 1. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * stm32mp: cosmetic: Update of bsec driverPatrick Delaunay2023-01-121-3/+1
| | | | | | | | | | | | | | | | Remove unnecessary return in stm32mp_bsec_write_lock and replace tab by space for plat_auto opts. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * ARM: dts: stm32: Add timer interrupts on stm32mp15Patrick Delaunay2023-01-121-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | The timer units in the stm32mp15x CPUs have interrupts, depending on the timer flavour either one "global" or four dedicated ones. Add the irqs to the timer units on stm32mp15x. Sync the DT Files with linux kernel v6.1 and with commit a9b70102253ce ("ARM: dts: stm32: Add timer interrupts on stm32mp15") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * ARM: dts: stm32mp15: fix typo in stm32mp15xx-dkx.dtsiPatrick Delaunay2023-01-121-5/+5
| | | | | | | | | | | | | | Remove unnecessary space in device tree stm32mp15xx-dkx.dtsi. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * ARM: dts: stm32mp15: remove clksrc include in SCMI dtsi filePatrick Delaunay2023-01-122-2/+0
| | | | | | | | | | | | | | | | | | | | The include file stm32mp1-clksrc.h is not necessary for the SCMI STM32MP15 dtsi files as the clock tree is not defined in the U-Boot SCMI device tree; these SCMI device tree only support TFABOOT with stm32mp15_defconfig, SPL with the basic boot defconfig is not supported. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * adc: stm32mp15: add calibration supportOlivier Moysan2023-01-121-18/+116
| | | | | | | | | | | | | | | | | | | | | | | | Add support of offset and linear calibration for STM32MP15. The calibration is performed once at probe. The ADC is set in power on state for calibration. It remains in this state after calibration, to give to the kernel the opportunity to retrieve calibration data, directly from the ADC. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp157c-ev1Fabrice Gasnier2023-01-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | Add support for USB2514B onboard hub on stm32mp157c EV1 board. The HUB is supplied by a 3v3 PMIC regulator. [backport from linux ad9591b01d24] Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Tested-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * configs: stm32: enable USB onboard HUB driverFabrice Gasnier2023-01-123-0/+3
| | | | | | | | | | | | | | | | | | | | Activate the USB onboard HUB driver, that is used to enable the HUB supply on STM32MP15 EVAL, DK1 and DK2 boards. This avoids marking the 3v3 corresponding regulator as always-on. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * usb: onboard-hub: add driver to manage onboard hub suppliesFabrice Gasnier2023-01-124-6/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main issue the driver addresses is that a USB hub needs to be powered before it can be discovered. This is often solved by using "regulator-always-on". This driver is inspired by the Linux v6.1 driver. It only enables (or disables) the hub vdd (3v3) supply, so it can be enumerated. Scanning of the device tree is done in a similar manner to the sandbox, by the usb-uclass. DT part looks like: &usbh_ehci { ... #address-cells = <1>; #size-cells = <0>; hub@1 { compatible = "usb424,2514"; reg = <1>; vdd-supply = <&v3v3>; }; }; When the bus gets probed, the driver is automatically probed/removed from the bus tree, as an example on stm32: STM32MP> usb start starting USB... STM32MP> dm tree Class Index Probed Driver Name ----------------------------------------------------------- usb 0 [ + ] ehci_generic | |-- usb@5800d000 usb_hub 0 [ + ] usb_onboard_hub | | `-- hub@1 usb_hub 1 [ + ] usb_hub | | `-- usb_hub STM32MP> usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 2mA) Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * ARM: dts: stm32: update vbus-supply of usbphyc_port0 on stm32mp157c-ev1Fabrice Gasnier2023-01-121-0/+4
| | | | | | | | | | | | | | | | | | | | phy-stm32-usbphyc bindings uses a connector node with vbus-supply property. [backport from linux 43e55d778a6b] Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* | Merge tag 'efi-2023-04-rc1' of ↵Tom Rini2023-01-139-51/+117
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc1 Documentation: * build infodocs target on Gitlab CI, Azure UEFI: * fix function descriptions * add .rela sections to .text on arm64 * use EFI_EXIT in efi_riscv_get_boot_hartid * improve specification conformance of set_keyboard_layout()
| * | efi_loader: provide agent_handle to efi_disk_add_dev()Heinrich Schuchardt2023-01-131-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In efi_disk_add_dev() we have to open protocols with BY_DRIVER and BY_CHILD_CONTROLLER. Provide the handle of the EFI block driver. The actual usage of the value will follow in a later patch. Change function descriptions to Sphinx style. Remove a TODO: tag. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_selftest: add hii set keyboard layout test caseVincent Stehlé2023-01-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test for the case when the HII database protocol set_keyboard_layout() function is called with a NULL key_guid argument. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * | efi_loader: refine set_keyboard_layout() statusVincent Stehlé2023-01-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the EFI specification, the HII database protocol function set_keyboard_layout() must return EFI_INVALID_PARAMETER when it is called with a NULL key_guid argument. Modify the function accordingly to improve conformance. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * | efi_loader: use EFI_EXIT in efi_riscv_get_boot_hartidHeinrich Schuchardt2023-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After calling EFI_ENTRY we have to call EFI_EXIT before returning. Add a missing EFI_EXIT(). Fixes: 1ccf87165e38 ("efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support") Reported-by: Dave Jones <dave.jones@canonical.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
| * | efi_loader: add .rela sections to .text on arm64Heinrich Schuchardt2023-01-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | _relocate() needs the information in .rela* for self relocation of the EFI binary. Fixes: d7ddeb66a6ce ("efi_loader: fix building aarch64 EFI binaries") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: fix description of memory functionsHeinrich Schuchardt2023-01-131-20/+62
| | | | | | | | | | | | | | | | | | | | | | | | * Add missing function descriptions * Adjust to Sphinx style Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * | doc: build infodocs target on Gitlab CI, AzureHeinrich Schuchardt2023-01-132-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add infodocs target to CI testing. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | doc: fix description of u16_strcasecmp()Heinrich Schuchardt2023-01-131-1/+0
|/ / | | | | | | | | | | | | Remove non-existent parameter 'n' from function description. Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* | Merge branch '2023-01-12-further-assorted-general-updates'Tom Rini2023-01-1226-83/+340
|\ \ | | | | | | | | | | | | | | | | | | - Bring in a number of assorted updates, some of which have been waiting around for a bit. Make silent console really be silent, get rid of gpio_hog_probe_all, add RNG for imx6, make net/fm use fs_loader, get rid of a bad __weak usage and set distro_bootpart_uuid in another case.
| * | gpio: Get rid of gpio_hog_probe_all()Marek Vasut2023-01-125-41/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gpio_hog_probe_all() functionality can be perfectly well replaced by DM_FLAG_PROBE_AFTER_BIND DM flag, which would trigger .probe() callback of each GPIO hog driver instance after .bind() and thus configure the hogged GPIO accordingly. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Samuel Holland <samuel@sholland.org>
| * | dm: fix probing of all devices that have u-boot, dm-pre-reloc in SPL/TPLQuentin Schulz2023-01-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, dm_probe_devices checks that the flags of the device contains DM_FLAG_PRE_RELOC. However DM_FLAG_PRE_RELOC is a driver - and not a device - flag. This means that the check in pre_reloc_only mode would always fail. Instead, what was aimed to be checked is that either the driver of the device has the flag set, or that the device has the u-boot,dm-pre-reloc Device Tree property set. So let's fix the check to allow u-boot,dm-pre-reloc devices to be probed. Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
| * | distro_bootcmd: Set distro_bootpart_uuid for block devicesMarek Vasut2023-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assignment of block device nodes in Linux is not deterministic by default, i.e. a newly added eMMC controller or other block device can change the assignment of /dev/mmcblkN (or other block device node like e.g. /dev/sdXy) and prevent the system from picking the correct block device for root filesystem in case the root filesystem is specified on kernel command line using 'root=/dev/mmcblkNpM' (or 'root=/dev/sdXy' etc.). One way out is to derive PARTUUID in U-Boot, which is unique identifier of a partition, and pass that as root=PARTUUID=<partuuid> to Linux via kernel command line. Linux would then find the partition using PARTUUID, no matter on which block device the partition resides and which node was assigned to that block device. Derive the PARTUUID before scanning for extlinux presence and assign it into distro_bootpart_uuid environment variable, which can then be used in extlinux.conf kernel command line specifier. Note that it is not possible to do this in scan_dev_for_extlinux script because this script is called from scan_dev_for_boot script, which is called for both block devices as well as UBI volumes, and we can not derive PARTUUID for UBI volumes. Signed-off-by: Marek Vasut <marex@denx.de>
| * | Revert "time: add weak annotation to timer_read_counter declaration"Harald Seiler2023-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 65ba7add0d609bbd035b8d42fafdaf428ac24751. A weak extern is a nasty sight to behold: If the symbol is never defined, on ARM, the linker will replace the function call with a NOP. This behavior isn't well documented but there are at least some hints to it [1]. When timer_read_counter() is not defined, this obviously does the wrong thing here and it does so silently. The consequence is that a board without timer_read_counter() will sleep for random amounts and generally have erratic get_ticks() values. Drop the __weak annotation of the extern so a linker error is raised when timer_read_counter() is not defined. This is okay, the original reason for the reverted change - breaking the sandbox build - no longer applies. Final sidenote: This was the only weak extern in the entire tree at this time as far as I can tell. I guess we should avoid introduction of them again as they are obviously a very big footgun. [1]: https://stackoverflow.com/questions/31203402/gcc-behavior-for-unresolved-weak-functions Fixes: 65ba7add0d60 ("time: add weak annotation to timer_read_counter declaration") Reported-by: Serge Bazanski <q3k@q3k.org> Signed-off-by: Harald Seiler <hws@denx.de>
| * | net: fm: Support loading firmware from a filesystemSean Anderson2023-01-122-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new method to load Fman firmware from a filesystem. This allows users to use regular files instead of hard-coded offsets for the firmware. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>