aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-21env: Inline env_get_char() into its only userMarek Behún
This function is a relic from the past when environment was read from underlying device one character at a time. It is used only in the case when getting an environemnt variable prior relocation, and the function is simple enough to be inlined there. Since env_get_char() is being changed to simple access to an array, we can drop the failing cases and simplify the code (this could have been done before, since env_get_char() did not fail even before). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21env: Change env_match() to static and remove from headerMarek Behún
This function was used by other parts of U-Boot in the past when environment was read from underlying device one character at a time. This is not the case anymore. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21examples: api: glue: Remove comment that does not apply anymoreMarek Behún
This comment is not true since commit 6215bd4c1fd6 ("api: Use hashtable function for API_env_enum"). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21env: Drop env_get_char_spec() and old, unused .get_char() implementationsMarek Behún
Commit b2cdef4861be ("env: restore old env_get_char() behaviour") dropped the .get_char() method from struct env_driver, but left the two existing implementations (eeprom and nvram) in case someone would use them by overwriting weak function env_get_char_spec(). Since this was never done in the 3.5 years, let's drop these methods and simplify the code. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21env: Fix documentation for env_get_f()Marek Behún
This function actually returns: - the number of bytes written into @buf excluding the terminating NULL-byte, if there was enough space in @buf - the number of bytes written into @buf including the terminating NULL-byte, if there wasn't enough space in @buf - -1 if the variable is not found Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21dm: Fix util.h's broken include guardPierre-Clément Tosi
Fix up the header's include guard to contain the definition of dm_priv_to_rw(), which was erroneously added outside of it, by moving its #endif to the end of the file (i.e. where it belongs). This removes the risk of compilation errors resulting from the redefinition of that function where the header might have been (indirectly) included more than once. Fixes: cfb9c9b77c2 ("dm: core: Use separate priv/plat data region") Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> Cc: Simon Glass <sjg@chromium.org>
2021-10-21sandbox: provide /chosen/boot-hartid propertyHeinrich Schuchardt
On RISC-V the sandbox must provide the /chosen/boot-hartid in the devicetree. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21buildman: Add gcc-11.1.0 to the directory listTom Rini
While CI has been using gcc-11.1.0 for a long time, we have not updated buildman to match. Correct this omission. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-21CI: Switch running the nokia_rx51 test with in-container toolchainTom Rini
Instead of fetching an arm toolchain to use, run the test with the one that's already in the container image. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2021-10-21tools: imx8m_image: Support ddr3 firmwareAriel D'Alessandro
Some boards use ddr3, not ddr4, so we need to check ddr3 firmware. Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
2021-10-21mx7ulp: add getting a board serial numberRicardo Salveti
Get Unique ID of SoC iMX7ULP, using the logic described in Fusemap (IMX7ULPRMB2_Rev0_Fusemap) attached in the i.MX 7ULP APRM [1]. [1] https://www.nxp.com/docs/en/reference-manual/IMX7ULPRMB2.pdf Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-10-21board: ea: mx7ulp_com: allocate specific region of memory to OP-TEERicardo Salveti
On the iMX7ULP uCOM board, OP-TEE uses the memory region defined by the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE, so subtract CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size to avoid conflicts. Note the OPTEE boot process itself subtracts the DRAM region it lives in from the memory map passed to Linux. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-10-21arm: dts: imx8mp: Delete default clocks for clock controller nodeYe Li
Since SPL has initialized clocks for bus and core. We don't need to set the default clocks for clock controller node. Signed-off-by: Ye Li <ye.li@nxp.com> Tested-by: Teresa Remmet <t.remmet@phytec.de> Tested-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2021-10-21imx8mp_evk: Enable the DWC EQoS iMX driverYe Li
Enable the EQoS i.MX driver in defconfig, also enable the PHYLIB to facilitate the case that only has FEC enabled. Signed-off-by: Ye Li <ye.li@nxp.com>
2021-10-21imx8mp_evk: Delete noncached memory configYe Li
DWC EQOS driver has removed to use noncached memory, so delete the configuration from iMX8MP EVK head file. Signed-off-by: Ye Li <ye.li@nxp.com>
2021-10-21imx8mp_evk: Remove EQoS PHY reset codesYe Li
Since we uses the DTS and PHY reset gpio in EQoS driver to do the reset, remove the duplicated codes from board file. Signed-off-by: Ye Li <ye.li@nxp.com>
2021-10-21imx8mp_evk: Fix incorrect cascade for FEC and EQOS setupYe Li
The setup functions should be independent for two ethernet controllers Signed-off-by: Ye Li <ye.li@nxp.com>
2021-10-21arm: dts: imx8mp-evk: Enable the EQoS ethernet portYe Li
i.MX8MP EVK has two ethernet ports. Add relevant nodes and properties for EQoS port to the EVK DTS file. In -u-boot.dtsi, change the u-boot eqos compatible string, add PHY reset gpio and remove assigned clocks as not supported in CCF. Signed-off-by: Ye Li <ye.li@nxp.com>
2021-10-21arm: mach-imx: Allow to build mac.c for EQoS driverYe Li
i.MX8MP has one DWC EQoS controller, so allow to build mac.c when only this driver is enabled. Signed-off-by: Ye Li <ye.li@nxp.com>
2021-10-21arm: mach-imx: Update MAC fuse for i.MX8MPYe Li
i.MX8MP has two ENET controllers, have to update the function to enable loading two MAC addresses. Signed-off-by: Ye Li <ye.li@nxp.com> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-10-21Merge branch 'master' of git://git.denx.de/u-bootStefano Babic
Signed-off-by: Stefano Babic <sbabic@denx.de>
2021-10-21Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- Turris MOX and Omnia changes, mostly moving to Kconfig (Marek) - a37xx: pci: Misc smaller fixes (Pali) - cmd: tlv_eeprom: Fix building with DEBUG enabled (Sven) - termios_linux.h: Fix tcsendbreak() implementation (Pali) - mvebu: Add missing "if SPL" (Tom)
2021-10-21arm: a37xx: pci: Fix condition for CRS responsePali Rohár
As stated in comment above the code, CRS response can be returned to OS only for 4-byte PCI_VENDOR_ID config read request. So fix the code. Fixes: 1d7ad68559e2 ("arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root Port") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: Add missing "if SPL"Tom Rini
We can only select SPL_SKIP_LOWLEVEL_INIT if SPL is enabled, otherwise we get a warning about unmet dependencies on platforms that don't use SPL. Fixes: cf47a8cf8f7e ("arm: mvebu: Select SPL_SKIP_LOWLEVEL_INIT on ARMADA_32BIT") Cc: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: a37xx: pci: Do not allow setting bars on PCI BridgePali Rohár
PCI Bridge which represents Aardvark PCIe Root Port does not have configurable bars. So ensure that write operation to bars registers on PCI Bridge is noop and bars registers always contain zero address which indicates that bars are unsupported. After this change U-Boot 'pci bar 0.0.0' command does not show any allocated bars for PCI Bridge device. Signed-off-by: Pali Rohár <pali@kernel.org> Fixes: cb056005dc67 ("arm: a37xx: pci: Add support for accessing PCI Bridge on root bus") Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_omnia: Move CONFIG_SPL_DRIVERS_MISC to KconfigMarek Behún
Instead of declaring CONFIG_SPL_DRIVERS_MISC in board config header, select it in Kconfig. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_omnia: Move SPL's SYS_MALLOC_SIMPLE to KconfigMarek Behún
Instead of declaring CONFIG_SYS_MALLOC_SIMPLE dependant on CONFIG_SPL_BUILD in board config header, select CONFIG_SPL_SYS_MALLOC_SIMPLE in Kconfig. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_omnia: Use show_board_info()Marek Behún
We are printing board information in checkboard() function, which is called from the default weak implementation of show_board_info(). Rename checkboard() to show_board_info(). This throws away the weak implementation of show_board_info(). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_omnia: Overwrite ethaddr only if invalidMarek Behún
Currently we always overwrite ethaddrs with those from EEPROM. In order to allow user to use a cloned MAC address in U-Boot, change the code so that it sets ethaddr variables only if they aren't set or are invalid. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_mox: Better check for valid ethernet addresses in envMarek Behún
Currently we overwrite ethaddr and eth1addr only if these variables don't exist. Better overwrite them even if the env variable exists, but is invalid - eth_env_get_enetaddr_by_index() checks for validity. Refactor the code to use a for cycle. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_mox: Always handle reset buttonMarek Behún
Handle reset button even if we can't configure modules. This happens if we fail retrieving reset GPIO with which we can reset the modules. (Note that this GPIO is different from reset button GPIO.) Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_mox: Use show_board_info()Marek Behún
We are printing board information in last_stage_init(), but U-Boot has dedicated function, show_board_info(), for this. Move code which prints board information (board version, serial number, module topology, ...) to show_board_info(). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_mox: Cosmetic update for board config headerMarek Behún
Reorder the definitions in Turris MOX' board config header, drop the comment relics from when this file was copied, fix indentation. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: kirkwood, mvebu: Remove CONFIG_SYS_RESET_ADDRESS optionMarek Behún
This option is not used anywhere. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: a3720: Create Kconfig option for I2C_MVMarek Behún
Move the config option CONFIG_I2C_MV to a Kconfig option CONFIG_SYS_I2C_MV and move the default definition from config header files into defconfigs. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21arm: mvebu: turris_mox: Move options to defconfigMarek Behún
Move config options CONFIG_LAST_STAGE_INIT and CONFIG_DISPLAY_BOARDINFO_LATE to turris_mox_defconfig. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21tools: termios_linux.h: Fix tcsendbreak() implementationPali Rohár
There are two Linux ioctls which implements tcsendbreak() functionality: TCSBRK and TCSBRKP TCSBRK with non-zero parameter implements tcdrain() and with zero parameter implements tcsendbreak() for duration of 0.25s. TCSBRKP with zero parameter is same as TCSBRK and with non-zero parameter implements tcsendbreak() for duration in deciseconds specified by parameter. TCSBRKP does not have to be provided by older toolchain versions. So tcsendbreak() has to either use TCSBRK with zero parameter or TCSBRKP with any parameter. Fix code to use TCSBRKP and fallback to TCSBRK with 0. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21cmd: tlv_eepromSven Auhagen
The function show_eeprom is missing int i if debug is enabled. Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21efi_loader: Fix link of EFI apps with ld.lldAlistair Delva
When compiling U-Boot with ld.lld as the linker, the helloworld EFI app example fails to link: LD lib/efi_loader/helloworld_efi.so ld.lld: error: section: .dynamic is not contiguous with other relro sections LLD will always create RELRO program header regardless of target emulation, whereas BFD may automatically disable it for unsupported targets. Add -znorelro to disable it explicitly in all cases. Signed-off-by: Alistair Delva <adelva@google.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: efi_dp_from_lo() should skip VenMedia nodeHeinrich Schuchardt
The 'efidebug boot dump' command should not display the VenMedia() device path node preceding the device path of the initial ram disk. By letting efi_dp_from_lo() skip the VenMedia() device path node we can simplify the coding. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-21efi_loader: avoid multiple local copies of lf2_initrd_guidHeinrich Schuchardt
Create the GUID as a global variable. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-21efi_loader: efi_dp_from_lo() unused parameter sizeHeinrich Schuchardt
Parameter size is never used in function efi_dp_from_lo(). Remove it. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-21efi_loader: simplify show_efi_boot_opt_data()Heinrich Schuchardt
Use printf code %pD for printing device paths. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: efi_dp_from_lo() don't copy GUIDHeinrich Schuchardt
Instead of copying a GUID and then using a pointer to the copy for calling guidcmp(), just pass the pointer to the orginal GUID. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: Fix loaded image alignmentIlias Apalodimas
We are ignoring the alignment communicated via the PE/COFF header. Starting 5.10 the Linux kernel will loudly complain about it. For more details look at [1] (in linux kernel). So add a function that can allocate aligned EFI memory and use it for our relocated loaded image. [1] c32ac11da3f83 ("efi/libstub: arm64: Double check image alignment at entry") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Vincent Stehlé <vincent.stehle@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: don't load Shim's MOK database from fileHeinrich Schuchardt
When using a file to store UEFI variables we must make sure that secure boot related variables are not loaded from this file. With commit 9ef82e29478c ("efi_loader: don't load signature database from file") this has already been implemented for variables defined in the UEFI specification. As most Linux distributions use Shim we should do the same for Shim's MOK database. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-10-21x86: Show some EFI info with the bdinfo commandSimon Glass
It is useful to see some basic EFI info with the command as it forms part of the information about a board. Add a hook for this and show the table address as a start. While here, fix an invalid cast in setup_efi_info(). Note that this function is using a data structure defined by Linux so we cannot change it. Also note that ulong is used since this is the standard in U-Boot (>6k uses), despite there being quite a bit of the more verbose uintptr_t (930 uses). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21x86: Create a new header for EFISimon Glass
The setup routines are called from zimage but don't really belong in the zimage header. Add a new EFI header to house these. Add comments so it is clear what the functions do. Note that these functions are x86-specific. The zimage business is not used on other architectures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21x86: Keep symbol information in u-boot ELF fileSimon Glass
At present this information is stripped when linking. It is useful to keep it around. Strip it from the .efi files instead. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi: Add a separate maintainer entry for the appSimon Glass
Separate this out slightly from the payload, with a new entry. We might consider renaming EFI PAYLOAD to EFI LOADER, but that would require quite a lot of file changes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>