Age | Commit message (Collapse) | Author |
|
spl_start_uboot is a board overridable function that switches to falcon
boot mode on return value of 0.
Though for SPI, the falcon boot mode was being enabled on return value
of 1 which is not the correct behaviour. Therefore this patch fixes it
to the expected boot flow.
Fixes: 14509a28aa20 ("spl: spi: Consolidate spi_load_image_os into spl_spi_load_image")
Signed-off-by: Anshul Dalal <anshuld@ti.com>
|
|
Anshul Dalal <anshuld@ti.com> says:
On various TI's K3 platforms boot failure was observed on SPI NOR since the
commit 5609f200d062 ("arm: Kconfig: enable LTO for ARCH_K3"). This issue was
root caused to stack corruption by the 'udma_transfer' function. Where the local
variable 'paddr' of type 'dma_addr_t' was being written to as a 64-bit value
which overwrote the stack frame of the caller (dma_memcpy) as only 32-bits had
been reserved for paddr on the stack, specifically the r4 register in the frame
of dma_memcpy was being overwritten with a 0.
drivers/dma/ti/k3-udma.c:2192:
int udma_transfer(...)
{
...
dma_addr_t paddr = 0;
...
/* paddr was written to as 64-bit value here */
udma_poll_completion(uc, &paddr);
}
drivers/dma/dma-uclass.c:234:
int dma_memcpy(...)
{
dma_addr_t destination;
dma_addr_t source;
int ret;
...
/* This call resolves to udma_transfer */
ret = ops->transfer(...);
...
dma_unmap_single(destination, ...);
dma_unmap_single(...);
return ret;
}
Enabling LTO changed how gcc mapped local variables of dma_memcpy to CPU
registers, where earlier the bug was hidden since the overwritten register
'r4' was allotted to 'ret' but was allotted to 'destination' once LTO was
enabled. And since the overwritten value was 0, the bug remained undetected
as it just meant ret was 0, but having 'destination' set to 0 caused
dma_unmap_single to fail silently leading to boot failures.
The fix entails enabling DMA_ADDR_T_64BIT which changes dma_addr_t from u32 to
u64 for the R5 SPL thus reserving enough space for 'paddr' to prevent the
overflow.
Link: https://lore.kernel.org/r/20250903115207.572304-1-anshuld@ti.com
|
|
ARCH_K3 encompasses both 32 and 64-bit cores on the same SoC, though the
DMA addresses are always 64-bit in size.
With the current implementation, the R5 SPL uses a u32 for dma_addr_t
which leads to data overflow when functions such as k3_nav_*_pop_mem try
to write a 64-bit address to dma_addr_t variable.
In certain cases it leads to stack corruption which manifest as boot
failures on certain compilers, such as SPI boot on GCC 14.2 or 13.3.
Therefore this patch selects CONFIG_DMA_ADDR_T_64BIT for all ARCH_K3.
Fixes: ffcc66e8fec5 ("dma: ti: add driver to K3 UDMA")
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Prasanth Babu Mantena <p-mantena@ti.com>
|
|
dma_addr_t is used to store any valid DMA address which might not
necessarily be the same size as host architecture's word size. Though
various typecasts in k3's dma and usb driver expect dma_addr_t to be the
same size as the word size.
This leads the compiler to throw a "cast from pointer to integer of
different size" warning when the condition is not met, for example when
enabling CONFIG_DMA_ADDR_T_64BIT for the R5 core.
Therefore this patch fixes the typecasts by using 'uintptr_t' as an
intermediary type which is guaranteed to be the same size as void* on
the host architecture. Thus, eliminating the compiler warning.
Signed-off-by: Anshul Dalal <anshuld@ti.com>
|
|
Since commit 5fb88fa725 "env: Rename SYS_REDUNDAND_ENVIRONMENT to ENV_REDUNDANT"
the option SYS_REDUNDAND_ENVIRONMENT is no longer available and should be
renamed to ENV_REDUNDANT.
Fixes: 95f03ee65c0e ("env: mmc: fix offsets relative to the end of the partition")
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
|
|
Resync all defconfig files using qconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
|
|
The SPI flash driver does not build without SPI support enabled.
Fixes: 4151f4f822bb ("spl: Rework and tighten some dependencies")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Anshul Dalal <anshuld@ti.com>
|
|
Enable CONFIG_DNS for visionfive2 board target. With CONFIG_PROT_DNS_LWIP
enabled and CONFIG_CMD_DNS disabled this restores DNS functionality
displaced by LwIP DNS refactoring during the merge window.
Signed-off-by: E Shattow <e@freeshell.de>
|
|
Booting u-boot as payload with coreboot's main branch is currently broken
since commit [1] on x86 as U-boot assumes the active GDT matches what
U-Boot would have installed in start16.S.
Make no assumptions and always load the GDT when building as coreboot
payload to make sure the segment registers are actually matching the GDT.
Fixes #GP seen when booting U-Boot as coreboot payload.
1: https://review.coreboot.org/c/coreboot/+/87255
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://review.coreboot.org/c/coreboot/+/87255
Reviewed-by: Tom Rini <trini@konsulko.com>
|
|
Signed-off-by: Tom Rini <trini@konsulko.com>
|
|
Add a MAINTAINERS entry for the DesignWare XGMAC network driver to
ensure future patches are properly routed for review and support.
Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
|
|
Resync all defconfig files using qconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
|
|
Anurag Dutta <a-dutta@ti.com> says:
This patch series migrates from .h to .env format for am57xx/dra7xx.
Also, we do relevant changes so that the fdtfile can be set from C code.
logs : https://gist.github.com/anuragdutta731/82560cc9bc958ca70a25a95a7031eeea
Link: https://lore.kernel.org/r/20250901061659.986164-1-a-dutta@ti.com
|
|
We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
|
|
We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
|
|
Move to using .env file for setting up environment variables
for am57xx and dra7xx.
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
|
|
Add omap common environment variables to .env. We retain the old-style C
environment .h files to maintain compatibility with other omap devices that
have not moved to using .env yet.
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
|
|
|
|
Sparrow Hawk board
Avoid use of hard-coded address in boot command, instead use $loadaddr
which is the default load address. This improves consistency of the
environment on this board.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
|
|
The CONFIG_ENV_VARS_UBOOT_CONFIG extends U-Boot environment with
variables arch/board/board_name/soc/vendor, which can be used to
discern different devices from each other based purely on U-Boot
environment variables.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
|
|
- Fix issues reported by smatch
- exynos4210-origen cleanups
- e850-96 improvements
|
|
Branch contains minor improvents for ASUS SL101 and Jetson Nano along
with support for Microsoft Surface 2 tablet.
|
|
- Fix an issue reported by smatch in rzg2l pinctrl driver
|
|
In spi_rx_tx there comes a test for execution of a code block that
allows execution if rxp is not NULL or stopping is true. However all the
code in this block relies on rxp being valid so allowing entry just if
stopping is true does not make sense. So remove this from the test
expression leaving just a NULL check for rxp.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
In rzg2l_pinconf_set and rzg2l_get_pin_muxing if the call to
rzg2l_selector_decode fails then the variable pin may not have been
assigned to. Remove the use of pin from the error message. Also update
the error message to show the invalid selector used instead of port
which will be the error code returned.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Paul Barker <paul@pbarker.dev>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
|
|
https://source.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/27522
- New Board support:
rk3588 Xunlong Orange Pi 5 Ultra;
rk3588s GameForce Ace;
rk3576 ArmSoM Sige5;
- rk3328 soc fixes;
- usb controller and phy fixes;
- new rk3328 ddr timing;
- other board level updates;
|
|
https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-10-rc4.
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/27527
Documentation:
* Rephrasing and text corrections for buildman
UEFI:
* Serial: Use correct EFI status type
* Let EFI_HTTP_BOOT select CMD_DHCP
* Let EFI_VARIABLES_PRESEED depend on !COMPILE_TEST
|
|
To make stdout messages easier to read and understand.
Signed-off-by: Henrik Grimler <henrik@grimler.se>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
For multi-line commands the lines should preferably be aligned with
the opening parenthesis.
Signed-off-by: Henrik Grimler <henrik@grimler.se>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
There exists both a Origen board based on exynos4210, and a board
based on exynos4412. U-boot only supports the one based on exynos
4210, but Kconfig string was accidentally written as Exynos4412 Origen
in previous migration to Kconfig. Fix the string to clear up
confusion, and to not give the impression that both types of Origen
boards are supported.
Fixes: 72df68cc6b73 ("exynos: kconfig: move board select menu and common settings")
Signed-off-by: Henrik Grimler <henrik@grimler.se>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
SL101 unlike TF101/G has no Lid sensor, so lets add a separate env for
SL101 without Lid sensor used.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
|
|
Hall sensor found in SL101 is not used for closed dock detection as on
TF101 or TF101G, it is used to detect if keyboard slider is out. To address
this, lets move Lid sensor switch into TF101/G trees and add Tablet mode
switch into SL101 tree.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
|
|
LAN9514 is a chip on E850-96 board which acts as a USB host hub and
Ethernet controller. It's controlled via USB lines when DWC3 is
configured to be in USB host role (by setting the "dr_mode" property to
"host" value in e850-96 dts file).
Enable network support and LAN9514 chip support. This makes Ethernet
functional on E850-96 board.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Exynos850 SoC has a dual-role USB controller which can be configured in
USB host role. As it's the only one USB controller on the board, it's
shared between "device" USB connector (micro-USB) and host USB
connectors. The hardware automatically powers on the host related parts
when the micro-USB cable (for device role) is being disconnected. Also,
as U-Boot lacks dynamic USB role switching capability, the only way to
switch the role at the moment is to modify "dr_mode" property in
U-Boot's device tree file here:
dts/upstream/src/arm64/exynos/exynos850-e850-96.dts
This won't affect the dynamic role switching later in Linux kernel, as a
separate (different) device tree blob is provided to the kernel.
Enable the USB host support and corresponding commands to make it
functional in E850-96 board.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Linux kernel should use some separate device tree obtained from another
source anyway. For example the dtb file can be read from /boot directory
in eMMC rootfs partition, either by GRUB or U-Boot. Using U-Boot's
device tree blob to provide it to the kernel (when
CONFIG_DEFAULT_FDT_FILE is set and nobody else overrides this choice)
might lead to undesired effects when booting the OS. For example, if a
user sets "dr_mode" property to "host" value in U-Boot's dts to enable
USB host capabilities in U-Boot, it might confuse usb-conn-gpio driver
in Linux kernel later like this:
platform connector: deferred probe pending: usb-conn-gpio:
failed to get role switch
Disable CONFIG_DEFAULT_FDT_FILE option to avoid any possible confusion.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Provide a way for the user to select which storage to load the LDFW
firmware from, by setting the corresponding environment variables:
- bootdev: block device interface name
- bootdevnum: block device number
- bootdevpart: partition number
This might be useful when the OS is flashed and booted from a different
storage device than eMMC (e.g. USB flash drive). In this case it should
be sufficient to just set:
=> setenv bootdev usb
=> env save
assuming that the USB drive layout follows the same partitioning scheme
as defined in $partitions.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Make it possible to provide the information about storage device where
LDFW firmware resides to the firmware loading routine. The firmware
loader code shouldn't have that data hard-coded anyway, and it also
allows for implementing more dynamic behavior later, like choosing the
storage device containing LDFW via some environment variables.
No functional change.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Make use of PMIC configuration routines and enable all LDOs that might
be useful for bootloader and kernel. The most crucial regulator being
enabled at the moment is LDO24 which provides power to LAN9514 chip.
That makes Ethernet controller and USB hub functional.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Add functions for configuring voltage regulators on S2MPU12 PMIC chip
for E850-96 board. The chip is accessed by commanding APM core (via
ACPM IPC protocol) to perform corresponding transfers over I3C bus.
The most important regulator being set up is LDO24 used for LAN9514 chip
power. As LAN9514 implements USB hub and Ethernet controller
functionality, it's crucial to enable and configure LDO24 to be able to
use it further. While at it, configure the rest of regulators that might
be needed later, both in the bootloader and in kernel.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Add functions to access I3C bus via APM (Active Power Management) core
by using ACPM IPC protocol. It will be further used for configuring PMIC
chip voltage regulators.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Set the environment variable for Ethernet MAC address (ethaddr). Use the
SoC ID to make sure it's unique. It'll be formatted in a way that
follows the consecutive style of the serial number ("serial#" variable),
i.e.:
OTP_CHIPID0 = 0xf51c8113
OTP_CHIPID1 = 0x236
get_chip_id() = 0x236f51c8113
serial# = 00000236f51c8113
ethaddr = 02:36:f5:1c:81:13
where corresponding bytes of the MAC address are:
mac_addr[0] = 0x02 // OTP_CHIPID1[15:8]
mac_addr[1] = 0x36 // OTP_CHIPID1[7:0]
mac_addr[2] = 0xf5 // OTP_CHIPID0[31:24]
mac_addr[3] = 0x1c // OTP_CHIPID0[23:16]
mac_addr[4] = 0x81 // OTP_CHIPID0[15:8]
mac_addr[5] = 0x13 // OTP_CHIPID0[7:0]
because OTP_CHIPID1 has only 16 significant bits (with actual ID
values), and all 32 bits of OTP_CHIPID0 are significant.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
Enable support for Exynos850 SoC in DWC3 host glue layer driver.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
In exynos7420_peric1_get_rate the variable ret is declared as an
'unsigned int' but is then used to receive the return value of
clk_get_by_index which returns an int. The value of ret is then tested
for being less than 0 which will always fail for an unsigned variable.
Fix this by declaring ret as an 'int' so that the test for the error
condition is valid.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
|
|
This should say 'switching', so fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
This consistency reads a bit nicer.
Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
|
|
It was "... doing the same build ... will not trigger a rebuild".
Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
|
|
Reads better.
Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
|
|
It might not be clear what is meant with "to make sure the shell leaves it alone".
Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
|
|
It reads a bit nicer.
Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
|
|
riscv was missing from the list.
To some, the architecture's name may not be obvious from the code name.
Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
|