1
0
Fork 0
mirror of https://github.com/u-boot/u-boot.git synced 2025-04-28 08:35:38 +00:00
Commit graph

27616 commits

Author SHA1 Message Date
Svyatoslav Ryhel
b12931d7de board: nvidia: tegratab: add Nvidia Tegra Note 7 support
The Tegra Note 7 is a mini tablet computer and the second Tegra 4
based mobile device designed by Nvidia that runs the Android operating
system. The Tegra Note has a 7" IPS display with 1280 x 800 (217 ppi)
resolution. The 1 GB of RAM and 16 GB of internal memory can be
supplemented with a microSDXC card giving up to 64 GB of additional
storage.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12 11:12:06 +03:00
Svyatoslav Ryhel
00d4996a82 board: asus: transformer: add ASUS Transformer Pad TF701T support
The ASUS Transformer Pad TF701T is an Android tablet computer made by
ASUS, successor to the ASUS Transformer Pad Infinity. The tablet includes
a Tegra 4 T114 processor clocked at 1.9 GHz, and an upgraded 2560×1600
pixel resolution screen, increasing the pixel density to 300 PPI and
a mobile dock. Transformers (t114) board derives from Nvidia Macallan
development board.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12 11:12:06 +03:00
Svyatoslav Ryhel
9ee12daa59 ARM: tegra: replace per-device config headers with generic Tegra
Most device headers contain SoC specific part and common Tegra post part.
Add a generic header which can be used by any Tegra device of one of the
supported SoC generations (T20, T30, T114, T124 or T210) without need in
device specific configuration.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12 11:11:05 +03:00
Svyatoslav Ryhel
ee3462160c ARM: tegra: convert CFG_TEGRA_BOARD_STRING into Kconfig option
Convert CFG_TEGRA_BOARD_STRING into Kconfig option and move it into device
board Kconfig.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12 09:48:30 +03:00
Svyatoslav Ryhel
11bf63c230 ARM: tegra: board: set CFG_SYS_NS16550_COM1 according to TEGRA_ENABLE_UART
Link CFG_SYS_NS16550_COM1 value to chosen CONFIG_TEGRA_ENABLE_UART Tegra
wide. Remove all CFG_SYS_NS16550_COM1 from device headers.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12 09:48:30 +03:00
Svyatoslav Ryhel
645350ed4b board: motorola: add Atrix 4G MB860 and Droid X2 MB870 support
The Motorola Atrix 4G (MB860) and Droid X2 (MB870) both featured a
dual-core NVIDIA Tegra 2 AP20H processor clocked at 1GHz, coupled with 1GB
of DDR2 RAM. Storage consisted of 16GB of internal flash memory, expandable
via microSD. The display was a 4.0-inch TFT LCD with a resolution of
960x540 pixels (qHD). The devices originally ran on Android up to 2.3
(Gingerbread).

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12 09:46:53 +03:00
Svyatoslav Ryhel
4dc27f9644 power: regulator: add regulator support for CPCAP PMIC
The driver provides regulator set/get voltage and enable/disable functions
for CPCAP PMIC.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12 09:44:02 +03:00
Svyatoslav Ryhel
0d12f77ce5 power: pmic: add the basic CPCAP PMIC support
The CPCAP is a Motorola/ST-Ericsson creation, a multifunctional IC whose
main purpose was power control. It was used in a wide variety of Motorola
products, both Tegra and OMAP based. The most notable devices using this
PMIC are the Motorola Droid 4, Atrix 4G, and Droid X2.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-04-12 09:44:02 +03:00
Tom Rini
ff0b7d741d Qualcomm changes for v2025.07
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEtlGhRjxqvtBpDFXNBYMxKxlfZLYFAmf5HL8ACgkQBYMxKxlf
 ZLaY6A//Ry5wkX1f/WTVFUO6gBJQom6hsEpkNgYwtgzaWOWhqvR53e5sbsiMPKnO
 5BRtKhrs0Jp2/kl06+k5tsGQbr3rogvwNS9m8DFyF2Hfq7uT2ooQKzxeBM9MaGhI
 p+7d92JjcHeYP7ejWcoAnag0ZvM/3iofdsrRcGsFjbYbcbAkBtAUDj2RqaZFIAFk
 A6g6/IZ62K6QH24oAMPv5yR4ru2tfzRMJHdZh79FHMXNp9wOLgMsHAV8NToQ/ZHU
 ACn9EHc4g9aI8h8gXPTEjCzOx6saYcmV+zzn0mSeICCSbOqvJ/C2/96NUlD5BW8/
 XFIeuBNgnHyxv4O3idFpyaxF34SMp2j2dDAIQFLN+0lG1M1Zi75pqf9UzlSvvSjm
 d1xd/LbrOEwNEyTKG7Ss0e3nf03lP22s2COpFUPJAijkfRZ8K/Y8RISeQv+MJKwa
 AZqYofLua0Uo0kuKTiHuOdD5oWUxmEcjtisaP/X9hcXWteTillntp120qm/a93s2
 X015V56B/e2+uf9xAQW+iqnrcgpMGKffqbs7tVhVr3SDTDa+c4/c6EXX2naqzgDQ
 T/S0hetOONuNXZvyAguUq5HKNI0IoC+OZQhA1uIgq+JyV/7qgENyrERlt29435cg
 NAr+410m0OKYUGHz5xwLSUh2j68v/4fZj7I4nZt4eYjEfYk/2dI=
 =Ep2x
 -----END PGP SIGNATURE-----

Merge tag 'qcom-for-2025.07' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon

Qualcomm changes for v2025.07:

CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/25653

There's been a surprising amount of activity lately on the Qualcomm
side with the two oldest boards getting some fresh attention and a lot
of cleanup and polish going on across the board.

* SDM660 gets USB phy fixes and a pinctrl driver
* The recently added SA8775P/QCS9100 SoC gets a pinctrl driver
* The Qualcomm pinctrl driver now handles reserved pins correctly,
  fixing crashes on some boards when running "gpio status -a"
* OF_UPSTREAM_BUILD_VENDOR is enabled in qcom_defconfig
* SDM845 and SC7280 get missing clocks added (since we're now stricter
  about those). This gets USB working more reliably in more cases.
* DM_USB_GADGET is enabled for all boards using DWC3 and fasbtoot is
  enabled too
* A bug in the livetree fixup code is fixed (making USB work on a lot
  more platforms)
* Button label lookup is made case insensitive* bootretry becomes more dynamic, allowing it to be hijacked to make a
  "persistent" boot menu that allows dropping to U-Boot shell later on
* A new qcom-phone.config fragment is added along with a phone-specific
  default environment and phone-specific debugging/bringup docs. These
  make U-Boot more usable on devices without a serial port or keyboard.
* The db820c gets fixed up and updated documentation
* The db410c also gets some love and modernisation as well as a new
  reviewer.
* A new driver is added for the USB VBUS regulator found on various
  Qualcomm PMICs
* The Qualcomm SPMI driver gets some fixes and cleanup for SPMI v5 and
  v7 support.
2025-04-11 09:12:16 -06:00
Tom Rini
295376ce8a Merge tag 'u-boot-imx-master-20250411' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/25652

- Add i.MX8MP LDB support.
- Various phycore-imx93 environment improvements.
- Add support for Toradex SMARC iMX8MP.
2025-04-11 09:11:38 -06:00
Tom Rini
dea298c62e Pull request efi-2025-07-rc1
Documentation:
 
 * Update authenticated capsules documentation
 
 UEFI:
 
 * add support for loading FIT images including initrd
   - efi_loader: efi_load_initrd: provide a memory mapped initrd
   - efi_loader: binary_run: register an initrd
   - bootm: add support for initrd in do_bootm_efi
 * efi_selftest: remove un-needed NULL checks
 * efi: Fix efiboot for payloads loaded from memory
 
 * Print extra information from the bootmgr
 * Move public cert for capsules to .rodata
 * set EFI capsule dfu_alt_info env explicitly
 * Make FDT extra space configurable
 * Install the ACPI table from the bloblist
 * Handle GD_FLG_SKIP_RELOC
 * handle malloc() errors
 
 Others:
 
 * acpi: select CONFIG_BLOBLIST
 * smbios: select CONFIG_BLOBLIST
 * xilinx: dfu: Fill directly update_info.dfu_string
 * cmd: fwu: Dump custom fields from mdata structure
 * board: remove capsule update support in set_dfu_alt_info()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmf5ELMACgkQhO4vgnE3
 U0tr9g/7B1F/aMYr7TB8Pf+fKM4lTbajdJyH+J4iHOZ22B76oW0DFVJNnVP9KIxp
 ioLUO6tdb80wrmL+/rZAkWdNpbNco6j7huGwhe29R3TRyf43+PZHm2hpqunY/Orc
 /Ub3S0u01nH0deWiEMuJ0YZexRYWTPZJogYjTLTfHsRyXdQhWbcUhPECsEaDXBhA
 3ISp18cl3WQiU+aSAcI6S5xo+Xo0Q06DLDhRKs0WudgEM+Y4b0zlyj8pRA2GNwVX
 ehvdfowsEbzZTBCyIbBfb8jWASw/vDLxtnlSaUG63g/hvllNdM1eXJrlcXdvv8VU
 95wY8cYg49TpQTPYF4hlFzpO4XdxqU0z//FNsLrCV8kcXQKlLiK7eAF8/I+cZCQC
 A/Xq8ZmkYcljOrsDNdBB9sCOVEQux9mf897kUHA3FFSg0fnvdgmkT2YTW447MvXJ
 eoCRaccMkg5DXZ/gBkiG3nIFgXDwRmSNz9KqYj6zKvhNRGkwVLD3/3brZWNWz009
 d4amO0aeVFaPioelm7sGzecJMj2IE5FuB66gloqfAsecWHQqfUX4+MZpH3BLPfek
 O0c0bi6Rw7aAowBDF4Q8LOQE0jL84gWHbv7URGY3O9aufirBgn3Zjxd701XrbGWA
 /y5kIEMZf1Z31gpgSUM4TuO51Op8vlUit9wD5prvwi84Sh013yo=
 =bdEe
 -----END PGP SIGNATURE-----

Merge tag 'efi-2025-07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2025-07-rc1

CI:

* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/25648

Documentation:

* Update authenticated capsules documentation

UEFI:

* Add support for loading FIT images including initrd
  - efi_loader: efi_load_initrd: provide a memory mapped initrd
  - efi_loader: binary_run: register an initrd
  - bootm: add support for initrd in do_bootm_efi
* efi_selftest: remove un-needed NULL checks
* efi: Fix efiboot for payloads loaded from memory

* Print extra information from the bootmgr
* Move public cert for capsules to .rodata
* Set EFI capsule dfu_alt_info env explicitly
* Make FDT extra space configurable
* Install the ACPI table from the bloblist
* Handle GD_FLG_SKIP_RELOC
* Handle malloc() errors

Others:

* acpi: select CONFIG_BLOBLIST
* smbios: select CONFIG_BLOBLIST
* xilinx: dfu: Fill directly update_info.dfu_string
* cmd: fwu: Dump custom fields from mdata structure
* board: remove capsule update support in set_dfu_alt_info()
2025-04-11 09:09:08 -06:00
Tom Rini
048266be42 Merge tag 'mmc-2025-04-11' of https://source.denx.de/u-boot/custodians/u-boot-mmc
CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/25640

- Support Sandisk and Micron eMMC BOOT/RPMB hardware partition resizing
- Optimize eMMC erasing time
- Simplify poll CD logic
- Fix possible Synchronous Abort for sdhci
- Kconfig dependencies fix
- Minor code update, return fail if mmc_complete_init, avoid uniniting twice
2025-04-11 08:51:22 -06:00
Stephan Gerhold
cfd27d130b
board: dragonboard410c: Use BOOTSTD instead of DISTRO_DEFAULTS
Reduce the environment size by using standard boot instead of distro boot.
It uses faster bootdevs first by default (eMMC -> SD -> USB -> Network), so
set "boot_targets" to keep the current ordering (USB -> SD -> eMMC ->
Network). Perhaps this should be changed for consistency, but for now this
keeps the behavior similar to before.

Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-10-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-04-11 15:32:22 +02:00
Vitor Soares
dde53eae88 board: toradex: add Toradex SMARC iMX8MP
Add support for the Toradex SMARC iMX8MP.

Link: https://www.toradex.com/computer-on-modules/smarc-arm-family/nxp-imx-8m-plus
Link: https://www.toradex.com/products/carrier-board/smarc-development-board-kit
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
2025-04-11 10:00:26 -03:00
Ilias Apalodimas
fd58c275f6 efi_loader: Move public cert for capsules to .rodata
commit ddf67daac3 ("efi_capsule: Move signature from DTB to .rodata")
was reverted in
commit 47a25e81d3 ("Revert "efi_capsule: Move signature from DTB to .rodata"")
because that's what U-Boot was usually doing -- using the DT to store
configuration and data. Some of the discussions can be found here [0].

(Ab)using the device tree to store random data isn't ideal though.
On top of that with new features introduced over the years, keeping
the certificates in the DT has proven to be problematic.
One of the reasons is that platforms might send U-Boot a DTB
from the previous stage loader using a transfer list which won't contain
the signatures since other loaders are not  aware of internal
U-Boot ABIs. On top of that QEMU creates the DTB on the fly, so adding
the capsule certificate there does not work and requires users to dump
it and re-create it injecting the public keys.

Now that we have proper memory permissions for arm64, move the certificate
to .rodata and read it from there.

[0] https://lore.kernel.org/u-boot/CAPnjgZ2uM=n8Qo-a=DUkx5VW5Bzp5Xy8=Wgmrw8ESqUBK00YJQ@mail.gmail.com/

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Jonathan Humphreys <j-humphreys@ti.com>  # on TI sk-am62p-lp
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on AML-A311D-CC
Tested-by: Raymond Mao <raymond.mao@linaro.org>
2025-04-11 13:25:31 +02:00
Adriano Cordova
36835a9105 efi_loader: binary_run: register an initrd
Add support to install an initrd when running an EFI binary
with efi_binary_run

Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-11 13:20:38 +02:00
Adriano Cordova
73c9a35270 efi_loader: efi_load_initrd: provide a memory mapped initrd
U-Boot can pass an initrd to subsequent boot stages via the
EFI_LOAD_FILE2_PROTOCOL. The current implementation only supports
this functionality via the efi boot manager: the initrd is taken
from the load options of the BootCurrent variable. This commit adds
support for registering a memory mapped initrd, e.g. loaded from a
FIT image. For now this new method takes precedence over loading the
initrd from the BootCurrent variable (if both are present) because
the BootCurrent variable is not cleared on exiting the boot manager.

Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-11 13:20:37 +02:00
Luke Wang
7550bfdbf4 mmc: mmc_boot: Support Sandisk and Micron eMMC BOOT/RPMB hardware partition resizing
Current mmc bootpart-resize command only support Samsung eMMC BOOT/RPMB
hardware partition resizing. Add Sandisk and Micron eMMC BOOT/RPMB hardware
partition resizing support. The commands and parameters for resizing
partitions are different for each manufacturer. Select the corresponding
function according to CID.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-04-11 11:51:04 +08:00
Marek Vasut
4357167e0e mmc: Simplify poll CD logic in case cyclic framework is enabled
Simplify 90cc07fd78 ("mmc: Poll CD in case cyclic framework is enabled")
according to suggestions by Rasmus. The struct cyclic_info is zero-size in
case CONFIG_CYCLIC is not enabled and does not add any size to struct mmc,
so it can unconditionally be part of that structure. This allows clean up
of all the other conditionals in mmc.c which can now be unconditionally
present, as they also add no extra space.

Suggested-by: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-04-11 11:45:50 +08:00
Varadarajan Narayanan
7dd49a9264 drivers: scsi: Add 'erase' support
UFS devices uses the block and scsi frameworks. Enable UFS erase
support by adding erase support to SCSI.

Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
2025-04-10 20:55:53 -06:00
Miquel Raynal
197376fbf3 power-domain: Add refcounting
It is very surprising that such an uclass, specifically designed to
handle resources that may be shared by different devices, is not keeping
the count of the number of times a power domain has been
enabled/disabled to avoid shutting it down unexpectedly or disabling it
several times.

Doing this causes troubles on eg. i.MX8MP because disabling power
domains can be done in recursive loops were the same power domain
disabled up to 4 times in a row. PGCs seem to have tight FSM internal
timings to respect and it is easy to produce a race condition that puts
the power domains in an unstable state, leading to ADB400 errors and
later crashes in Linux.

CI tests using power domains are slightly updated to make sure the count
of on/off calls is even and the results match what we *now* expect.

As we do not want to break existing users while stile getting
interesting error codes, the implementation is split between:
- a low-level helper reporting error codes if the requested transition
  could not be operated,
- a higher-level helper ignoring the "non error" codes, like EALREADY and
  EBUSY.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2025-04-10 22:32:55 -03:00
Miquel Raynal
04fcddac28 dm: core: Add a helper to retrieve devices through graph endpoints
There are already several helpers to find a udevice based on its
position in a device tree, like getting a child or a node pointed by a
phandle, but there was no support for graph endpoints, which are very
common in display pipelines.

Add a new helper, named uclass_get_device_by_endpoint() which enters the
child graph reprensentation, looks for a specific port, then follows the
remote endpoint, and finally retrieves the first parent of the given
uclass_id.

This is a very handy and straightforward way to get a bridge or a panel
handle.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2025-04-10 22:32:55 -03:00
Tom Rini
fba8bfdd0b Merge patch series "acpi: simplify updating ACPI table header checksum"
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says:

Introduce a new function to update ACPI table headers.
This allows to simplify the existing code.

Link: https://lore.kernel.org/r/20250321232121.251800-1-heinrich.schuchardt@canonical.com
2025-04-08 16:23:27 -06:00
Heinrich Schuchardt
69e61d46d2 acpi: new function acpi_update_checksum()
Introduce a new function to update ACPI table headers.
This allows to simplify the existing code.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-08 15:22:56 -06:00
Tom Rini
ff61d6bfd1 Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc ("x86:
emulation: Disable bloblist for now") as that was intended only for the
release due to time.
2025-04-08 11:43:23 -06:00
Tom Rini
f892a7f397 Revert "Merge patch series "pxe: Precursor series for supporting read_all() in extlinux / PXE""
This reverts commit 8bc3542384, reversing
changes made to 698edd63ec.

There are still problems with this series to work out.

Link: https://lore.kernel.org/u-boot/CAFLszTjw_MJbK9tpzVYi3XKGazcv55auBAdgVzcAVUta7dRqcg@mail.gmail.com/
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-07 16:35:43 -06:00
Jeremy Compostella
33d84771e9 Fix EFI boot file name definition for 64-bit x86
This change aligns the preprocessor directive with the standard
configuration flag used for detecting 64-bit x86 architecture.

Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-04-04 12:26:36 -06:00
Tom Rini
c5032bf3f6 Merge patch series "cmd: fuse: Introduce fuse writebuff sub-system and clean up"
Harsha Vardhan V M <h-vm@ti.com> says:

This patch series introduces the fuse writebuff sub-system command and
makes improvements to the existing fuse implementation by removing the
custom string functions. The patches are required to be applied in
sequence.

The series consists of the following changes:
Patch 1 removes custom string functions and replaces them with standard
string functions.
Patch 2 introduces fuse.rst documentation for fuse commands.
Patch 3 introduces the fuse writebuff sub-system command, allowing to
write a structured buffer in memory to fuses, and implementing the
necessary function calls.
Patch 4 enables the fuse sub-system in the K3 platform.
Patch 5 updates the fuse.rst documentation to include details about the
new fuse writebuff command.

These changes aim to improve the fuse sub-system by the removal of
custom string functions and the addition of the fuse writebuff
command improves fuse programming workflows by allowing to write a
structured buffer in memory to efuses.

Link: https://lore.kernel.org/r/20250319084714.335777-1-h-vm@ti.com
2025-04-04 12:25:11 -06:00
Harsha Vardhan V M
578e7882bf cmd: fuse: Add fuse writebuff sub-system command
Add CMD_FUSE_WRITEBUFF config option to add and enable fuse writebuff
sub-system command. Add fuse_writebuff function to be invoked on
writebuff command.

Signed-off-by: Harsha Vardhan V M <h-vm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-04 12:25:02 -06:00
Tom Rini
1aa8b03c01 Merge patch series "membuff: Add tests and update to support a flag for empty/full"
Simon Glass <sjg@chromium.org> says:

The membuff implementation curently has no tests. It also assumes that
head and tail can never correspond unless the buffer is empty.

This series provides a compile-time flag to support a 'full' flag. It
also adds some tests of the main routines.

The data structure is also renamed to membuf which fits better with
U-Boot.

There may be some cases in the code which could be optimised a little,
but the implementation is functional.

Link: https://lore.kernel.org/r/20250318152059.1464369-1-sjg@chromium.org
2025-04-03 16:54:59 -06:00
Simon Glass
da8694a7d2 membuf: Minor code-style improvements
Show the start in end in the comment. Comment a missing variable in
membuf_readline() and fix its line length.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 16:54:49 -06:00
Simon Glass
f48f1705c3 membuf: Include stdbool
This uses a bool type so include the required header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 16:54:49 -06:00
Simon Glass
68b0af2127 membuf: Rename struct
Rename the struct to match the function prefix and filenames.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 16:54:49 -06:00
Simon Glass
9ca1789ff0 membuff: Rename the files to membuf
Rename the C and header files to use the membuf basename, to match the
functions.

Add a MAINTAINERS entry while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 16:54:49 -06:00
Simon Glass
4662e5286a membuff: Rename functions to have membuf_ prefix
The double 'f' is not necessary and is a bit annoying as elsewhere in
U-Boot we use 'buf'. Rename all the functions before it is used more
widely.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 16:54:49 -06:00
Simon Glass
199648bac1 boot: Handle running out of labels
If only a single label is provided in the list, bootdev_next_label()
does not operate correctly and reads beyond the end of the pointer list.

Fix this by adding a new check. Also add a note to convert this array
to an alist

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 11:43:22 -06:00
Simon Glass
6acb0d28b0 boot: Consider non-bootable partitions
Any 'bootable' flag in a DOS partition causes boostd to only scan
bootable partitions for that media. This can mean that extlinux.conf
files on the root disk are missed.

Put this logic behind a flag and update the documentation.

For now, the flag is enabled, to preserve the existing behaviour of
bootstd which is to ignore non-bootable partitions so long as there is
at least one bootable partition on the disk.  Future work may provide a
command (or some other mechanism) to control this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 11:41:55 -06:00
Simon Glass
8d6097d300 acpi: Mark struct acpi_rsdp as packed
At present the size of this struct is too large on 64-bit machines.
Annotate it with __packed to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 11:41:55 -06:00
Simon Glass
96aa0719b7 sandbox: Correct a typo in mapmem
This should say 'cast', not 'case', so fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03 11:41:54 -06:00
Tom Rini
0a174922c6 Merge patch series "fs: exfat: Add exfat port based on exfat-fuse"
Marek Vasut <marex@denx.de> says:

Import exfat-fuse libexfat, add U-Boot filesystem layer porting glue
code and wire exfat support into generic filesystem support code. This
adds exfat support to U-Boot.

Fill in generic filesystem interface for mkdir and rm commands.
Make filesystem tests test the generic interface as well as exfat,
to make sure this code does not fall apart.

Link: https://github.com/relan/exfat/commits/0b41c6d3560d ("CI: bump FreeBSD to 13.1.")
Link: https://lore.kernel.org/r/20250317031418.223019-1-marex@denx.de
2025-04-02 20:01:14 -06:00
Marek Vasut
b86a651b64 fs: exfat: Add U-Boot porting layer
Add U-Boot adjustments to the libexfat code and integrate
the result into U-Boot filesystem layer. This provides full
read-write exfat support for U-Boot available via generic
filesystem interface.

FS_DIRENT_NAME_LEN is increased to 1024 in case exfat is
enabled, because EXFAT can use UTF16 names, which do not
fit into current FS_DIRENT_NAME_LEN. To avoid affecting
every configuration, increase FS_DIRENT_NAME_LEN only in
case EXFAT is enabled.

Example usage via sandbox, assuming disk.img with one exfat partition:

Drive info:
$ ./u-boot -Tc 'host bind 0 ../disk.img ; host info 0'
dev       blocks  blksz label           path
  0       262144    512 0               ../disk.img

List files:
$ ./u-boot -Tc 'host bind 0 ../disk.img ; ls host 0:1 /api'
      475   Kconfig
      230   Makefile
     1873   README
     ...
10 file(s), 0 dir(s)

Load and checksum a file:
$ ./u-boot -Tc 'host bind 0 ../disk.img ; load host 0:1 $loadaddr .config ; \
                crc32 $loadaddr $filesize'
56724 bytes read in 1 ms (54.1 MiB/s)
crc32 for 00000000 ... 0000dd93 ==> b2e847c9

$ crc32 .config
b2e847c9

Load .config file to RAM, store the file into FS as /newconfig,
load the /newconfig into RAM and checksum the file:
$ ./u-boot -Tc 'host bind 0 ../disk.img ; load host 0:1 $loadaddr .config ; \
		save host 0:1 $loadaddr /newconfig $filesize ; \
		load host 0:1 0x10000 /newconfig ; \
		crc32 0x10000 $filesize'
56724 bytes read in 1 ms (54.1 MiB/s)
56724 bytes written in 0 ms
56724 bytes read in 0 ms
crc32 for 00010000 ... 0001dd93 ==> b2e847c9

Remove file 3.txt and create new directory /newdir:
$ ./u-boot -Tc 'host bind 0 ../disk.img ; ls host 0:1 / ; \
                rm host 0:1 3.txt ; mkdir host 0:1 /newdir ; \
		ls host 0:1 /'
...
        0   1.txt
        0   2.txt
        0   3.txt
        0   4.txt
        0   5.txt

7 file(s), 4 dir(s)
...
        0   1.txt
        0   2.txt
            newdir/
        0   4.txt
        0   5.txt

6 file(s), 5 dir(s)

Acked-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Marek Vasut <marex@denx.de>
2025-04-02 20:00:59 -06:00
Marek Vasut
9e0e0ff260 fs: Add generic fs_devread() implementation
Add generic implementation of write into a block device to be used
by filesystem implementations. This is a pair function for already
existing fs_devread().

Signed-off-by: Marek Vasut <marex@denx.de>
2025-04-02 20:00:59 -06:00
Marek Vasut
be96ac51ec linux: Add generic struct stat {}
Add generic implementation of struct stat {} imported from Linux 6.13.y
commit 27560b371ab8 ("fs: pack struct kstat better"). This can be used
by filesystem code imported from elsewhere. Now struct stat {} becomes
available on all supported architectures.

Signed-off-by: Marek Vasut <marex@denx.de>
2025-04-02 20:00:59 -06:00
Tom Rini
80c61c5ce8 Merge patch series "airoha: Add initial support AN7581"
Christian Marangi <ansuelsmth@gmail.com> says:

This little series adds initial support for Airoha AN7581 SoC.

With the help of some backport patch, this use OF_UPSTREAM
directly.

Posting this to have the targer and the very basic driver.

Ethernet, SNAND and eMMC support is already ready downstream
and will be posted shortly after this gets approved.

Having the first driver ready permits to separately push
dedicate series for SNAND, eMMC and Ethrnet as they all depends
on basic support of clock and reset and nothing else.

Link: https://lore.kernel.org/r/20250314185941.27834-1-ansuelsmth@gmail.com
2025-04-01 08:45:46 -06:00
Christian Marangi
793e327e2c airoha: Add initial support for Airoha AN7581 SoC
Add initial support for Airoha AN7581 SoC. This adds the initial Kconfig
and Makefile entry for the SoC, an U-Boot specific DTSI and initial config
for it. Also add the initial code for CPU and RAM initialization.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-01 08:44:51 -06:00
Jerome Forissier
36510e4e41 net: remove commented out line
Commit 1d5d292b79 ("net: split net into net{,-common,-legacy,-lwip}")
inadvertendly left a commented out declaration for do_wget() in
net-common.h. Remove it.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-03-31 09:46:25 +02:00
Anshul Dalal
bcb8cac2d5 config: falcon: move CFG_SYS_SPI_* to Kconfig
CFG_SYS_SPI_* are used in falcon boot to specify the offsets and size of
the respective payloads. This patch moves them to Kconfig keeping the
values consistent for each of the affected boards.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
2025-03-30 09:15:31 -06:00
Tom Rini
f1895bc1e7 Merge patch series "Clarify DM_FLAG_PROBE_AFTER_BIND behaviour"
Caleb Connolly <caleb.connolly@linaro.org> says:

In Simon's series reworking autoprobe, a discussion came up about
DM_FLAG_PROBE_AFTER_BIND, specifically that it wasn't very clear where
this flag should be used.

This series implements my suggestions made there to clarify the use of
this flag, and fixup the two driver which erroneously apply it to their
driver struct (this does nothing).

Link: https://lore.kernel.org/u-boot/20241120153642.861633-1-sjg@chromium.org/
Link: https://lore.kernel.org/r/20250117-clarify-probe-after-bind-v1-0-273f046ce5dd@linaro.org
2025-03-30 09:11:07 -06:00
Caleb Connolly
8a0e6212bb dm: clarify DM_FLAG_PROBE_AFTER_BIND behaviour
The DM_FLAG_PROBE_AFTER_BIND flag only makes sense on a per-device
basis, however recently added documentation as well as some confused
drivers imply that it might be added to a driver definition, this does
nothing.

Clarify the new documentation and expand on the comment by the
definition to point people in the right direction.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <michal.simek@amd.com>
2025-03-30 09:09:04 -06:00
Tom Rini
4adbf64ff8 Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next
- More Tegra video improvements
2025-03-26 14:07:37 -06:00