summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-07-22clk: mediaTek: mt8516: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt8516 clock tree structures. These will be used later for parent lookup. Clock trees had to be split now that each tree has a different type flag. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-16-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt8512: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt8512 clock tree structures. These will be used later for parent lookup. Clock trees had to be split now that each tree has a different type flag. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-15-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt8365: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt8365 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-14-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt8195: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt8195 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-13-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt8189: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt8189 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-12-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt8188: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt8188 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-11-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt8183: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt8183 clock tree structures. These will be used later for parent lookup. Clock trees had to be split now that each tree has a different type flag. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-10-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt7988: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt7988 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-9-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt7987: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt7987 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-8-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt7986: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt7986 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-7-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt7981: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt7981 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-6-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt7629: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt7629 clock tree structures. These will be used later for parent lookup. Clock trees had to be split now that each tree has a different type flag. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-5-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt7623: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt7623 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-4-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediaTek: mt7622: add clock tree type flagsDavid Lechner
Add clock tree type flags to the mt7622 clock tree structures. These will be used later for parent lookup. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-3-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediatek: add registration function for clock tree typesDavid Lechner
Add a new enum, field and function for registering clock tree types. These types will be later used when looking up parent clocks. This will replace fragile code that depends on lookup up devices by driver names or ops. We also need a way to ensure that any parent clock trees are probed before trying to use a clock tree that depends on them. Since the devicetree does not provide these relationships and there are only a small number of clock parent providers (2 or 3 per SoC) vs. a large number of clock trees that depend on them, it will simpler to just always probe the parent clock trees on bind rather than trying to add device info to all of the clocks to describe their parent relations. For this, a mtk_common_clk_parent_bind() is added that the drivers will use to set DM_FLAG_PROBE_AFTER_BIND. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-2-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediatek: mt7622: set parent flag for GATE_APMIXED()David Lechner
Set the parent flag for GATE_APMIXED() clocks. By having parent flags on all clocks we can simplify the parent lookup process. This is the only mediatek clock still without this flag. Link: https://patch.msgid.link/20260710-mtk-clk-parent-lookup-improvements-v2-1-f3f3a4a28dca@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22arm: dts: mt7623: remove duplicate topckgen overrideDavid Lechner
Remove a duplicate topckgen override setting `bootph-all;`. The same code was written twice in a row (probably copy/paste leftover). Link: https://patch.msgid.link/20260708-mtk-mt7623-remove-dup-dt-override-v1-1-efffd4b6c12a@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediatek: mt8189: fix VLP_CK wrong parentsDavid Lechner
Fix a couple of places where we used the wrong macro to set the parent flag for vlpcfg_ao_clks. Fixes: 04b3a834c654 ("clk: mediatek: mt8189: add some VLP clocks") Link: https://patch.msgid.link/20260706-mtk-clk-mt8189-fix-vlp-parent-v1-1-aedc2f8cc69d@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22configs: mediatek: do not autostart the watchdog on the Genio EVKsCarlo Caione
U-Boot autostarts the SoC watchdog (CONFIG_WATCHDOG_AUTOSTART default y) and services it from its main loop, but nothing services it after ExitBootServices()/bootm: an EFI-booted OS that does not take over the watchdog in time is reset mid-boot at a wall-clock-dependent point. The MediaTek toprgu can count at most ~16 seconds, once firmware stops servicing it at the handoff, the OS has whatever is left of those 16 seconds. On the Genio 700 EVK the generic Ubuntu 26.04 arm64 image is hard-reset before its first boot reaches the login prompt: the mtk-wdt driver is a module loaded from the rootfs and cannot win that race. Nothing tells a generic OS that the watchdog is armed, so the failure is silent and, from the user's side, indistinguishable from broken firmware. Disable WATCHDOG_AUTOSTART for the Genio EVK boards (mt8365_evk directly, mt8188.config for the Genio 510/700). Signed-off-by: Carlo Caione <[email protected]> Reviewed-by: Tom Rini <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: David Lechner <[email protected]>
2026-07-22clk: mediatek: mt8188: add missing clock in pericfg_aoJulien Stephan
Add CLK_PERI_AO_PCIE_P0_FMEM clock in pericfg_ao. Signed-off-by: Julien Stephan <[email protected]> Link: https://patch.msgid.link/20260701-mt8188-clk-add-missing-clock-in-pericfg-ao-v1-1-13109b199248@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22arm: dts: mediatek: add U-Boot dtsi overrides for Genio 510 and Genio 700Julien Stephan
U-Boot applies DTS overrides by searching for files in the following priority order [1]: <orig_filename>-u-boot.dtsi <CONFIG_SYS_SOC>-u-boot.dtsi <CONFIG_SYS_CPU>-u-boot.dtsi <CONFIG_SYS_VENDOR>-u-boot.dtsi u-boot.dtsi For Genio 510 and Genio 700, the common mt8188-u-boot.dtsi override is never applied because none of the lookup paths resolve to it (CONFIG_SYS_SOC="mediatek", CONFIG_SYS_CPU="armv8", CONFIG_SYS_VENDOR="mediatek"). Add board-specific overrides for mt8370-genio-510-evk and mt8390-genio-700-evk that include mt8188-u-boot.dtsi. While at it, also add mt8188-u-boot.dtsi into board/mediatek/MAINTAINERS. [1]: https://docs.u-boot.org/en/stable/develop/devicetree/control.html#adding-tweaks-for-u-boot Signed-off-by: Julien Stephan <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://patch.msgid.link/20260701-fix-genio-510-genio-700-dts-override-v1-1-cb571f8c9296@baylibre.com Signed-off-by: David Lechner <[email protected]>
2026-07-22MAINTAINERS: Replace Mediatek with N:Marek Vasut
Use N: to match on all mediatek/mtk files, drop the large list of entries which represent the same set of relevant files and miss a few in the process. Signed-off-by: Marek Vasut <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: David Lechner <[email protected]>
2026-07-22usb: ci_udc: verify all dtds are inactive before completing requestJason He
According to device mode spec, the ACTIVE status field of dtds should be check to determine whether the transfers completed successfully. However, this is not implemented in handle_ep_complete. When two EPs are enabled and transferring, EPa requests with multiple dtds and EPb request with one dtd. Irq is triggred on EPb. The udc_irq handler finds both EPb's and EPa's ENDPTCOMPLETE=1 while not all of EPa's dtds have been completed. Because ACTIVE status is not checked, this case causes crash in ci_udc driver. Signed-off-by: Jason He <[email protected]> Signed-off-by: Ye Li <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-07-22usb: ci_udc: Update usb request statusYe Li
usb request status is not set in ci_udc driver. However in ci_ep_dequeue, it checks the request status for executing complete callback, so upper layer is not able to free these enqueued requests when calling usb_ep_dequeue. Signed-off-by: Ye Li <[email protected]> Fixes: 26cc5129ee64 ("USB: gadaget: add Marvell controller support") Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-07-22usb: ci_udc: set correct ep type in ep_enable()Xu Yang
The Endpoint Type in ENDPTCTRL register should be correctly set according to endpoint descriptor, not fixed to bulk. Otherwise, unexpected behaviors may happen. Fixes: 26cc5129ee64 ("USB: gadaget: add Marvell controller support") Signed-off-by: Xu Yang <[email protected]> Signed-off-by: Ye Li <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-07-22boot: android: fix out-of-bounds access in bootconfig parsingAlexey Charkov
When android_image_get_vendor_bootimg_size is called, its buffer is only allocated with enough space for the bootconfig header, but the android_vendor_boot_image_v3_v4_parse_hdr helper attempts to append a bootconfig trailer to it, causing an out-of-bounds access and heap corruption in some cases (e.g. triggered in sandbox test builds when extra bootmeths are added, resulting in a segfault of the sandbox process). Skip the dangerous memcpy operations altogether when the android_vendor_boot_image_v3_v4_parse_hdr helper is only called for size calculation purposes, and only append the bootconfig trailer when called from the actual bootconfig parsing code path. Fixes: 57e405e1f474 ("android: boot: support bootconfig") Signed-off-by: Alexey Charkov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-07-22usb: gadget: dwc2: Set endpoint capabilities via .caps fieldMattijs Korpershoek
Endpoint capabilities can be described via the .caps field of struct usb_ep since commit 77dcbdf3c1ce ("usb: gadget: Add match_ep() op to usb_gadget_ops") In linux, the following commit introduces it: b86f33a3a371 ("usb: gadget: epautoconf: add endpoint capabilities flags verification") Linux's change also reworks the ep matching function by relying on these new capabilities instead of guessing based on the endpoint name. Prepare the dwc2 UDC driver for capability-based matching by adding the required capabilities for each endpoint. Acked-by: Ilias Apalodimas <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-07-22usb: gadget: dwc2: Use usb_ep_set_maxpacket_limit() for fifo sizesMattijs Korpershoek
More recent versions of usb_ep_autoconfig() use the maxpacket_limit field from struct usb_ep. This field has been introduced in the linux kernel via commit e117e742d310 ("usb: gadget: add "maxpacket_limit" field to struct usb_ep") And has been ported to U-Boot via commit 747a0a5b387f ("usb: dwc3: gadget: make dwc3 gadget build in uboot") However, the dwc2 gadget driver was not converted to use usb_ep_set_maxpacket_limit(). This is harmless for now, but the driver will break once usb_ep_autoconfig() is updated to a more recent version. Set maxpacket_limit via the recommended helper function to prepare for a core gadget update. Acked-by: Ilias Apalodimas <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-07-22cmd: ums: Set Device Descriptor iSerial based on serial# env variableMarek Vasut
The DFU code currently sets the content of "serial#" environment variable into Device Descriptor iSerial field. This is useful when there are multiple devices connected to the same host PC and they have to be told apart. Replicate the same behavior in the UMS code. Example without serial# set, which is the original behavior: " u-boot=> ums 0 mmc 1 UMS: LUN 0, dev mmc 1, hwpart 0, sector 0x0, count 0x1d5a000 $ dmesg -w ... usb 5-2.3.7: New USB device found, idVendor=0525, idProduct=a4a5, bcdDevice=7e.a7 usb 5-2.3.7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 5-2.3.7: Product: USB download gadget usb 5-2.3.7: Manufacturer: Vendor <------------------------------- NOT HERE usb-storage 5-2.3.7:1.0: USB Mass Storage device detected ... $ lsusb -vd 0525:a4a5 Bus 005 Device 051: ID 0525:a4a5 Netchip Technology, Inc. Linux-USB File-backed Storage Gadget Negotiated speed: High Speed (480Mbps) Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 [unknown] bDeviceSubClass 0 [unknown] bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0525 Netchip Technology, Inc. idProduct 0xa4a5 Linux-USB File-backed Storage Gadget bcdDevice 7e.a7 iManufacturer 1 Vendor iProduct 2 USB download gadget iSerial 0 <------------------------------- NOT HERE ... " Example with serial# set to 1234abcd, which is the optional new behavior: " u-boot=> setenv serial# 1234abcd <------------------------------ HERE u-boot=> ums 0 mmc 1 UMS: LUN 0, dev mmc 1, hwpart 0, sector 0x0, count 0x1d5a000 $ dmesg -w ... usb 5-2.3.7: New USB device found, idVendor=0525, idProduct=a4a5, bcdDevice=7e.a7 usb 5-2.3.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 5-2.3.7: Product: USB download gadget usb 5-2.3.7: Manufacturer: Vendor usb 5-2.3.7: SerialNumber: 1234abcd <--------------------------- HERE usb-storage 5-2.3.7:1.0: USB Mass Storage device detected ... $ lsusb -vd 0525:a4a5 Bus 005 Device 052: ID 0525:a4a5 Netchip Technology, Inc. Linux-USB File-backed Storage Gadget Negotiated speed: High Speed (480Mbps) Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 [unknown] bDeviceSubClass 0 [unknown] bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0525 Netchip Technology, Inc. idProduct 0xa4a5 Linux-USB File-backed Storage Gadget bcdDevice 7e.a7 iManufacturer 1 Vendor iProduct 2 USB download gadget iSerial 3 1234abcd <-------------------------- HERE ... " Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-07-21cmd: read: fix unsigned overflow bypassing range checkNaveen Kumar Chaudhary
The bounds check in do_rw() was written as: if (cnt + blk > limit) with cnt and blk declared as uint (unsigned int) and limit as ulong. C's usual arithmetic conversions are applied per binary operator, so "cnt + blk" is evaluated entirely in unsigned int and wraps modulo 2^32 before the result is widened for the comparison against limit. With cnt = 0xFFFFFFFF and blk = 1 the sum wraps to 0 and the guard passes, allowing blk_dread()/blk_dwrite() to be issued with a 4 GiB transfer count that runs past the partition (or, when no partition is selected, the entire device). Rewrite the check as two comparisons that do not overflow: if (blk > limit || cnt > limit - blk) The subtraction is performed in ulong (limit's type), so no truncation occurs, and the two sub-conditions cover both "start block past end" and "count would push us past end" failure modes. Signed-off-by: Naveen Kumar Chaudhary <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-07-21Merge patch series "some string cleanup, and a tweak of the "config" command"Tom Rini
Rasmus Villemoes <[email protected]> says: This started by me wanting something like what patch 8 does. That wasn't too hard, except we had no strcasestr(), and also our regex engine (which I didn't really want to pull into the mix anyway) doesn't have a flag that requests case-insensitive matching. So I wanted to add strcasestr(), but then I stumbled on a bunch of stuff that should be cleaned up in str-land. Link: https://lore.kernel.org/r/[email protected]
2026-07-21test: add test of 'config' commandRasmus Villemoes
Add some test cases for the 'config' command, including the ability to filter the output. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-07-21doc: document 'config' commandRasmus Villemoes
Add a little documentation for the config command and its new ability to filter the output. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-07-21cmd: config: allow simple filtering of outputRasmus Villemoes
When doing development, it can be quite useful to enable CONFIG_CMD_CONFIG, so that one can always check whether a config knob one has just enabled has actually made it to target. Because sometimes, one doesn't flash the right binary, or maybe one has just done CONFIG_FOO=y in some config fragment, but that had no effect because one would also have to do CONFIG_BAR=y. However, 2400+ lines of text are rather hard to read through. One probably uses a terminal emulator with capturing enabled, but searching back through the capture file is a little tedious, and one easily ends up finding something that doesn't pertain to the most recent 'config' command invocation. So make it possible to limit the output to those lines containing a given string. Like the search functionality in menuconfig, make it case insensitive, because it is much more convenient to type "config pinctrl" than "config PINCTRL". Since enabling CONFIG_CMD_CONFIG by itself adds over 10K of data, and that increases with every U-Boot release even if one doesn't add any new features to one's own defconfig (because the .config grows lots of "is not set"), I don't see any point in guarding this by some CONFIG_CMD_CONFIG_GREP. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-21test: string: add test of new strcasestr() functionRasmus Villemoes
Change the existing strstr() test a little so that the substring not found is "bits", i.e. one that is actually found when doing case insensitive search. Then copy all of lib_strstr(), adapt the expectation for the strcasestr(s1, s3) result, and add another "not found" case. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-21string: add strcasestr()Rasmus Villemoes
While this is not likely needed by any "real" driver code, a later convenience addition to the "config" command will need this. As usual, the linker will throw it away if nothing actually uses it, so it should have no size impact when not used. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-21string: remove more pointless __HAVE_ARCH_STR*Rasmus Villemoes
None of these six macros are defined by any architecture. Moreover, the ifndef guard only exists in either string.h or string.c, making them completely pointless. I'm not sure whether we have an explicit coding style discouraging the "extern" qualifier on function declarations, and string.h has a random mix of everything, but I can't leave it on strncasecmp() now that it will be immediately after strcasecmp() which doesn't have it. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-21string: remove unused strswab() functionRasmus Villemoes
The last use of this function with rather peculiar semantics[*] vanished in 2021 with 0a527fda782 ("Fix IDE commands issued, fix endian issues, fix non MMIO"). It has no tests, and should a need for something similar ever appear, it is better done with some proper utf16le/utf16be/utf16 abstractions rather than cluttering code with '#ifdef __LITTLE_ENDIAN'. [*] The byte-swapping itself is weird enough. But why is an input string of odd length ok, while the empty string is not allowed? Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-21string: correct documentation for strstr and strnstrRasmus Villemoes
The len parameter for strnstr() concerns the maximum size of the haystack to consider, not the length of the needle being searched for. strstr() obviously has no len parameter, so remove the copy-pasta. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-21string: correct prototype of strchrnul()Rasmus Villemoes
Both glibc's (where this originated as a GNU extension) and the kernel's versions of strchrnul() return "char *", not "const char *". That also makes it consistent with the standard strchr() function. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-21sh: clean up asm/string.hRasmus Villemoes
First, remove the !__KERNEL__ block, since U-Boot is always compiled with -D__KERNEL__. Second, remove the mention of the non-existing file arch/sh/lib/strcasecmp.c and the redundant declaration of strcasecmp() If sh did have a strcasecmp.c file, presumably the header would have had to #define __HAVE_ARCH_STRCASECMP. Third, remove the explicit #undefs of various __HAVE_ARCH_* and redundant declarations of standard functions, which are anyway declared in linux/string.h. In the linux source tree, those are all #defines, and indeed linux does have asm implementations of those functions. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-21test: spl: check load_simple_fit() rejects an oversized data-sizeAristo Chen
Add a regression test that builds a FIT with external data, inflates the data-size property far beyond the image and any plausible load region, and confirms that spl_load_simple_fit() returns -EFBIG instead of reading the declared size off the device. Without the bounds check in load_simple_fit() this test overruns memory and crashes; with it the load is rejected cleanly. Signed-off-by: Aristo Chen <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-07-21spl: fit: bound the external data size before reading itAristo Chen
load_simple_fit() loads an image stored as external data by reading it from the boot device with a transfer sized from the FIT data-size property. That property is listed in exc_prop[] in image-fit-sig.c, so it is excluded from the configuration signature and stays under the control of anyone able to modify the boot medium even when CONFIG_SPL_FIT_SIGNATURE is enabled. The read happens before fit_image_verify_with_data() checks the image hash, so an inflated data-size overruns the destination before the corruption can be detected. The device-tree overlay path is the sharpest case, because there the destination is a fixed CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ heap buffer. Pass the size of the destination into load_simple_fit() and reject an image whose data does not fit before the read is issued. The check is done in two places: an early bail on len > max_size, then a bail on the block-aligned size > max_size. The size check is the mathematically binding one because size is len rounded up to the device block length. The early bail exists so that get_aligned_image_size() never runs on a hostile len, where its int arithmetic would invoke signed-integer overflow. For the overlay path the bound is exact: the caller passes the size of its temporary buffer. For the firmware, loadables, FDT and FPGA call sites the destination is wherever the load_addr field points, with no defined upper limit at the call site. Those callers pass CONFIG_SYS_BOOTM_LEN as a conservative ceiling, matching the same limit spl_parse_legacy_validate() already applies to legacy images. It is not a tight bound on the actual capacity at the destination, just a cap that rejects implausibly-sized data. Signed-off-by: Aristo Chen <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-07-21Merge tag 'riscv-for-v2026.10-rc1' of ↵Tom Rini
https://git.u-boot-project.org/u-boot/custodians/u-boot-riscv CI: https://git.u-boot-project.org/u-boot/custodians/u-boot-riscv/-/pipelines/676 - Adds support for the SpacemiT K1 and - Updates the MAINTAINERS.
2026-07-21nvme: Fix missing address translation for PCIe inbound accessTorsten Duwe
U-Boot currently does not account for PCIe bridges with a non-zero inbound access offset when talking NVMe, it only works on platforms where this offset happens to be zero. This patch enhances the NVMe driver with the ability to also handle these cases. It also removes the unused function nvme_get_features(). Signed-off-by: Torsten Duwe <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Tested-by: Peter Robinson <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2026-07-21MAINTAINERS: update RISC-V maintainersTim Ouyang
Rick and Leo are no longer with Andes. Remove Rick from the RISC-V maintainer list. Leo will continue maintaining RISC-V, but update his email address. Add myself to the maintainer list as Rick's replacement. Signed-off-by: Leo Yu-Chi Liang <[email protected]> Signed-off-by: Tim Ouyang <[email protected]>
2026-07-21configs: k1: enable pinctrl and gpioGuodong Xu
Enable pinctrl and gpio configurations for Spacemit K1 SoC. Signed-off-by: Raymond Mao <[email protected]> Signed-off-by: Guodong Xu <[email protected]>
2026-07-21gpio: add gpio driver for Spacemit K1 SoCRaymond Mao
Enable gpio driver for Spacemit K1 SoC. Signed-off-by: Raymond Mao <[email protected]> Signed-off-by: Guodong Xu <[email protected]>
2026-07-21pinctrl: add pinctrl driver for Spacemit K1 SoCRaymond Mao
Add pinctrl driver for Spacemit K1 SoC. Signed-off-by: Raymond Mao <[email protected]> Signed-off-by: Guodong Xu <[email protected]>
2026-07-21spacemit: k1: Add multiple device tree supportGuodong Xu
Enable multiple DTB support in the FIT image for the Spacemit K1 SoC, allowing a single U-Boot binary to support different board variants. The SPL reads the board type from EEPROM and selects the corresponding device tree at runtime via board_fit_config_name_match(), ensuring the correct hardware description is passed to U-Boot proper. Signed-off-by: Guodong Xu <[email protected]>