28011 Commits

Author SHA1 Message Date
Tom Rini
2cf46de9b6 include/mmc.h: Audit include list
This file does not need <linux/sizes.h> nor <linux/compiler.h> so remove
them. This exposes however that a number of other files had been relying
on this implicit include for <linux/sizes.h> so add that where needed.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:16 -06:00
Tom Rini
d81b57a3cc include/ide.h: Cleanup usage
At this point in time, <ide.h> provides the IDE_BUS macro and the
function prototype for ide_set_reset, which is used with IDE_RESET. The
only files which should include this header are the ones that either use
that macro or that function. Remove <blk.h> from <ide.h> and remove
<ide.h> from places which do not need it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:16 -06:00
Tom Rini
43d76dc7df include/fat.h: Audit include list
This file does not need <asm/cache.h> so remove it. However the file
common/spl/spl_fat.c does need it, so add it there.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
40d5f55331 include/efi_loader.h, include/efi_tcg2.h: Audit include list
In include/efi_loader.h we do not directly need <log.h>, <part_efi.h>,
<pe.h> nor <linux/oid_registry.h> so remove them. In include/efi_tcg2.h
we make use of <part_efi.h> but did not include it, so add it directly.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
8f3c64a535 include/dwmmc.h: Audit include list
This file does not need <asm/cache.h> so remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
ddf050a5d6 include/dw_hdmi.h: Audit include list
This file does not need <edid.h> so remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
1585d92a05 include/dfu.h: Audit include list
This file does not need a forward declaration of 'struct list_head' as
it includes <linux/list.h> so remove it.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
cad8e20333 include/compiler.h: Audit include list
This file does not need <time.h> so remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
ef560b42ec include/cbfs.h: Audit include list
This file does not need <compiler.h> but does directly need
<linux/types.h>.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
5d14fca77a include/cadence-nand.h: Audit include list
This file does not need <linux/mtd/mtd.h> but does directly need
<linux/types.h>.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
5bbc8b5c55 include/bootstd.h: Audit include list
This file does not need <linux/list.h> so remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
48703b2d6b include/bootflow.h: Audit include list
This file does not need <linux/list.h> but does directly need
<linux/types.h>.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
377c75f8c5 include/bios_emul.h: Audit include list
This file does not need <pc.h> but does directly need
<linux/types.h>. Furthermore, arch/x86/lib/bios.c was getting <pci.h>
via <bios_emul.h> so add it there.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
6a891bb78c include/arm_ffa.h: Audit include list
This file does not need <linux/printk.h> but does directly need
<linux/types.h>.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Tom Rini
a510bc2c9a include/ahci.h: Audit include list
This file does not need <pci.h> but does directly need <linux/types.h>.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-02 17:26:15 -06:00
Mayuresh Chitale
31e215fde8 Revert "riscv: image: Add new image type for RV64"
This reverts commit 14a4792a71db3561bea065415ac1f2ac69ef32b5 as
discussed in [1].

[1] https://lists.denx.de/pipermail/u-boot/2025-May/590841.html

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-06-02 16:18:33 +08:00
Tom Rini
6e03ca2409 Bring in recent expo enhancements:
- multi-line text
 - highlighting of menu items
 - rationalisation of menu and expo code
 - support for object alignment
 - editable strings
 - various bug fixes and tweaks
 
 This also includes some required abuf improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmg5ksURHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreZwDgf+Pw4rVR+GmSs1C4sYJSP5ZU7QAX9J+rw+
 t3xfg4zI0qxEQU8P11iXYS6oJqOfHDNO5Ar31iWcY+Zv1b5G4O9rYVk4YJbUY4to
 TuYiJ6u9BERjCRW11KvQlLUlZkHx2JWvKNwoFmn90SEv7QuxqPOi+snDkq7CQcmG
 9/02OiK3i+aTawoROt2Fo0pYm3jekqjQWraajtMYVxx7tI58eeFnPbQtLfTHLHU3
 OKXtyNzAftLR+afUV6xem9sh8dZR7hSkiTjjPy6XP6YZsaRaOq22wXkyy0yUPfca
 Hqk6Lj04dWorkH7CGHcT7qx086q8UneFcs4fkcjzj0qiJvEExjDIlQ==
 =3kLT
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-30may25' of git://git.denx.de/u-boot-dm into next

Bring in recent expo enhancements:
- multi-line text
- highlighting of menu items
- rationalisation of menu and expo code
- support for object alignment
- editable strings
- various bug fixes and tweaks

This also includes some required abuf improvements.
2025-05-30 13:53:50 -06:00
Benjamin ROBIN
6aa9c0f453 env: Fix network support when CONFIG_NET_LWIP is set
When lwIP (CONFIG_NET_LWIP) is used instead of legacy stack (CONFIG_NET),
environment flags support associated with network was not built: restore
support of "i" and "m" environment flags.

Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-05-30 13:43:24 -06:00
Marek Vasut
e15282f943 image: Fix FIT image loadable section custom processing
The original commit always generated linker list entries with the same
entry variable name, because _function passed to ll_entry_declare() is
not a variable and therefore was interpreted as fixed string. Change it
to _type which is a variable and which does allow generation of multiple
unique linker list entries, one for each U_BOOT_FIT_LOADABLE_HANDLER().

Fixes: d7be50921ed3 ("image: Add FIT image loadable section custom processing")
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
2025-05-30 10:19:24 -06:00
Tom Rini
2ab0f0d058 Merge patch series "Almost complete DM_SERIAL migration"
Tom Rini <trini@konsulko.com> says:

In a private thread, Simon asked about what's needed to get PowerPC
migrated to DM_SERIAL. I went and took a look, and to complete the
entire DM_SERIAL migration (excluding SPL/TPL) we're actually nearly
there. This series first migrates PowerPC (and some NXP Layerscape
boards that share history more clearly with PowerPC parts), with the
biggest change being to make sure we still use the correct legacy
drivers in SPL/TPL (where SPL is extremely constrained). With that out
of the way, I looked at what was left. With two exceptions, it's
platforms which can be trivially enabled for conversion, and so we do
that.

Link: https://lore.kernel.org/r/20250502201226.1369013-1-trini@konsulko.com
2025-05-30 10:17:40 -06:00
Tom Rini
191b10ac70 PowerPC / Layerscape: Finish migration to DM_SERIAL
Migrate the few ARM Layerscape platforms that had not been switched
along with all remaining PowerPC platforms to DM_SERIAL. For PowerPC,
this means that platforms which use SPL/TPL, keeping the non-DM serial
driver enabled there as they do not use DM. We also rework the guards
on how to define CFG_SYS_NS16550_CLK so that this is mostly in one place
now.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-05-30 10:16:51 -06:00
Simon Glass
f769735f88 expo: Split setting up the menu from adding items
Some callers may wish to add items later as they are discovered. Split
the setup code into its own function, to permit this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:33 +01:00
Simon Glass
06a9d88e4d expo: Update bootflow_menu_poll() to return a sequence ID
Rather than returning a bootflow, return the index of the bootflow. This
will allow callers to do their own translation to bootflows or some
other data structure.

Also return a special code when the user tries to move the pointer, so
that the caller can cancel the boot-menu timeout, if this is in use.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:33 +01:00
Simon Glass
ddd1c97653 expo: Provide a way to position things relative to display
It is often necessary to centre objects within the display area. Add a
special position value to indicate this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
8d7ae52d77 expo: Drop the render from expo_poll()
Within tests it is useful to be able to control rendering of the expo.
Drop the automatic call to expo_render() within expo_poll() and adjust
its callers to handle this instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
0dc8c7740c expo: Support highlighting menu items
Expo normally uses a pointer to show the current item. Add support for
highlighting as well, since this makes it easier for the user to see the
current item.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
e005f18b93 expo: Begin implementation of a text editor
It is useful to be able to edit text, e.g. to allow the user to edit the
environment or the command-line arguments for the OS.

Add the beginnings of an implementation. Future work is needed to finish
this: keypress handling and scrolling. For now it just displays the
text.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
09f6f915fe expo: Support object alignment
Add support for left, right and centred alignment for text, in the
horizontal dimension.

Also support top, bottom and centred in the vertical dimension, for the
text object as a whole.

Alignment is not yet implemented for images. It has no meaning for
menus. A textline object uses a text object internally, so alignment
is supported there.

Provide some documentation to explain how objects are positioned.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
0635004e22 expo: Implement a box
It is useful to be able to draw a box around elements in the menu. Add
support for an unfilled box with a selectable thickness.

Note that there is no support for selecting the colour for any expo
objects yet.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
03f9ce815c expo: Support rendering multiple lines of text
Use the measurement info to write each line of text separately, thus
respecting word-wrapping and newlines.

Fix up the comment for scene_obj_render() while we are here.

Since a lineedit does not support alignment, add a special case to just
display the text if there is no measurement. This happens assuming the
lineedit is initially empty.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
87750b0276 expo: Allow strings to be editable
In some cases dynamic text is needed, e.g. for a menu countdown. Add a
function which handles this, allowing the caller to take control of the
text that is shown on each render.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
5a80996cb6 expo: Create a struct for generic text attributes
In preparation for adding more text types, refactor the common fields
into a new structure. This will allow common code to be used.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
e3c3f83cb6 expo: Support setting the size and bounds of an object
Add a function to allow the size of an object to be set independently
of its position.

Also add a function to permit the object's bounding box to be set
independently of its dimensions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
f04026a59f expo: Separate dimensions from the bounding box
At present each object has a width and height and the bounding box is
implicit in that.

This is not flexible enough to handle objects which are larger than
their contents might need. For example, when centring a text object we
might want to have it stretch across the whole width of the display even
if the text itself does not need that much space.

Create a new 'dimensions' field and convert the existing width/height
into x1/y1 coordinates.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
8636da86a2 expo: Use an abuf to hold strings
It is more convenient to put strings in an abuf so they can easily be
resized. Adjust the struct accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
8aa384d01a expo: Rename x and y in struct scene_obj_bbox
These coordinates are the top left values, so rename them to x0 and y0
in preparation for changing the width and height to x1 and y1

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
85a2954c29 expo: Rename scene_dim to scene_obj_bbox
At present we assume that each object is a simple box and that it fills
the whole box.

This is quite limiting for text objects, which we may want to centre
within the box. We need a position within the box where drawing starts.

Rename the scene_dim struct to indicate that it is a bounding box.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
a4ede5e0ac expo: Allow adding a single bootflow to a menu
Refactor bootflow_menu_add_all() to call a new bootflow_menu_add() to
add each of its bootflows.

Move the last_bootdev value into struct menu_priv to make this work.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
da754e20c9 expo: Split bootflow_menu_new() into two pieces
Split the iteration piece of this function into bootflow_menu_add_all()
so that it is possible for the caller to be in control of adding items
to the menu.

Move the expo_destroy() call into the caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
b991a0c8bf expo: Split bootflow_menu_run() into two pieces
Split the starting piece of this function into bootflow_menu_start()
and the polling part into bootflow_menu_poll() so that it is possible
for the caller to be in control of the event loop.

Move the expo_destroy() call into the caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
9f44b544e1 expo: Provide access to the current menu item
Add functions to allow a caller to find out the current menu item and to
select a different one.

Update the event handling so that an attempt to change the current item
(e.g. by pressing the up-arrow key) is reported to the caller, since
this may be used to cancel an autoboot timeout.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
23d2ddf1b4 expo: Pass in the video device for cedit_prepare()
At present this function locates it own video device. Pass it in to
provide more flexibility.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
5f99334296 expo: Test some cedit actions
Refactor the action-processing code into a new cedit_do_action()
function so we can call it from a test. Check moving to a new field and
opening the menu, to ensure that rendering is correct.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
932ea4a104 expo: Move cedit-state fields into expo
Move the boolean flags into struct expo so that the state can be
maintained over function calls.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:32 +01:00
Simon Glass
bf98604595 expo: Add a function to poll for input
Both bootflow_menu and cedit use similar logic to poll an expo. Move
this into the expo library so the code can be shared.

Update bootflow_menu_run() to return -EPIPE when the user quits without
choosing anything, since -EAGAIN is ambiguous and elsewhere means that
there is no input yet.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:31 +01:00
Simon Glass
5c365ecabc expo: Add CLI context to the expo
An expo generally needs to keep track of the keyboard state while it is
running, so move the context into struct expo

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:31 +01:00
Simon Glass
4f4b9477f4 abuf: Add a way to printf() into a buffer
It is useful to format a string into a buffer, with the sizing handled
automatically. Add a function for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:31 +01:00
Simon Glass
d58cebbbc7 abuf: Add a function to copy a buffer
It is useful to be able to copy an abuf, to allow changes while
preserving the original. Add a function for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:31 +01:00
Simon Glass
97b586695c abuf: Add a helper for initing and allocating a buffer
This construct appears in various places. Reduce code size by adding a
function for it.

It inits the abuf, then allocates it to the requested size.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-30 09:49:31 +01:00
Tom Rini
a619c44109 Merge patch series "Enable env in SCSI"
Varadarajan Narayanan <quic_varada@quicinc.com> says:

The qcs9100 based Ride platforms have UFS as their primary storage.
Hence add support to U-Boot env framework to be able to save and
retrieve the environment from UFS. The environment will be
saved/retrieved from the partition specified in the config option
CONFIG_SCSI_ENV_PART.

Also add an API to convert partition UUID string to block device
descriptor for UFS. This API will be used to get the block device
descriptor for the partition specified in CONFIG_SCSI_ENV_PART.

Link: https://lore.kernel.org/r/20250513091710.3719292-1-quic_varada@quicinc.com
2025-05-29 18:36:51 -06:00