Junhui Liu [Fri, 10 Jan 2025 13:55:21 +0000 (21:55 +0800)]
usb: dwc2: Fix incorrect ULPI_UTMI_SEL bit setting
The ULPI_UTMI_SEL bit in the DWC2 driver was set incorrectly. According
to the datasheet [1], this bit should be set to 0 for UTMI interface and 1
for ULPI interface. The existing code had this logic reversed,
causing the interface selection to be incorrect.
This commit corrects the ULPI_UTMI_SEL bit setting to match the
datasheet's description. Referencing the kernel's code [2] also confirms
this fix.
[1] https://rockchip.fr/RK312X%20TRM/chapter-26-usb-otg-2-0.pdf#page=30
[2] https://github.com/torvalds/linux/blob/v6.13-rc3/drivers/usb/dwc2/core.c#L1106
Reviewed-by: Marek Vasut <marex@denx.de>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Link: https://lore.kernel.org/r/20250110-dwc2-dev-v4-2-987f4fd6f8b2@pigmoral.tech
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Kongyang Liu [Fri, 10 Jan 2025 13:55:20 +0000 (21:55 +0800)]
usb: dwc2: Extract register definitions to common header file
The same registers are accessed in both the otg and gatet drivers of
dwc2, and these registers are repeatedly defined in these two parts.
Extract register definitions into a common header file to reduce
redundancy and make the code more maintainable.
Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Link: https://lore.kernel.org/r/20250110-dwc2-dev-v4-1-987f4fd6f8b2@pigmoral.tech
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Tom Rini [Fri, 30 May 2025 19:53:50 +0000 (13:53 -0600)]
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.
Tom Rini [Fri, 30 May 2025 16:26:33 +0000 (10:26 -0600)]
Merge patch series "test/py: enable HTTP testing"
Adriano Cordova <adrianox@gmail.com> says:
Enable HTTP server in CI to support HTTP tests in pytest
QEMU does not emulate an HTTP server, unlike other services like DHCP or TFTP.
To enable HTTP tests during CI runs, start a simple Python HTTP server
on port 80. This allows tests that require HTTP access to run.
The HTTP server is launched on the host. For QEMU environments launched
with '-netdev,user' this means that the HTTP server runs together with DHCP
at 10.0.2.2. HTTP testing needs to be explicitly enabled with
env__efi_helloworld_net_http_test_skip = False.
We also default `WGET=y` in `ARCH_QEMU` configurations so that these HTTP
tests are included automatically when using QEMU in CI.
Link: https://lore.kernel.org/r/20250516085256.30386-1-adriano.cordova@canonical.com
Adriano Cordova [Fri, 16 May 2025 08:52:56 +0000 (04:52 -0400)]
cmd/Kconfig: select CMD_WGET if ARCH_QEMU
select CMD_WGET for ARCH_QEMU. This way HTTP can be tested
on the qemu platforms in CI.
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Adriano Cordova [Fri, 16 May 2025 08:52:55 +0000 (04:52 -0400)]
CI testing: add http server to CI tests
Add an http server to CI tests so that HTTP booting and
loading can be tested.
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Marek Vasut [Mon, 12 May 2025 15:58:39 +0000 (17:58 +0200)]
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>
Tom Rini [Tue, 6 May 2025 14:04:12 +0000 (08:04 -0600)]
Gitlab: Rework sjg-lab calling test.py to be closer to test.py stage
There are a few differences between how the test.py stage invokes
test.py and how the sjg-lab stage invokes test.py. As a start of making
both the code and the output and artifacts similar, this updates the
sjg-lab stage with the following:
- Pass "-ra" so that we get the summary information in the job
- Make use of TEST_PY_EXTRA for passing "--capture=tee-sys"
- Re-order some of the arguments to be the same order when possible.
And most importantly:
- Create and save as an artifact the junitxml output.
The last part here is the kind of test result information that in the
future we should determine how to archive for future reference.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 30 May 2025 16:17:40 +0000 (10:17 -0600)]
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
Tom Rini [Fri, 2 May 2025 20:07:40 +0000 (14:07 -0600)]
global: Convert almost all remaining non-DM_SERIAL users
This converts almost all of the remaining non-DM_SERIAL users to enable
DM_SERIAL. These are platforms where there have long been other SoC
boards that have switched and so it's been a matter of inertia keeping
these from being converted. Do so now.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 2 May 2025 20:07:39 +0000 (14:07 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:58 +0000 (08:46 -0600)]
expo: Drop the special theme code for bootflow_menu
The expo now has all that is needed to apply a suitable theme, so drop
this unnecessary code. Any further tweaks can be added to the generic
expo code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:57 +0000 (08:46 -0600)]
expo: Set up menu fully in bootflow_menu_start()
Apply the theme, calculate dimensions, highlight the menu and arrange
the scene correctly, so that everything is ready to go when the expo
is rendered.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:56 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:55 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:54 +0000 (08:46 -0600)]
expo: Improve the visual appearance of the menu
The menu is currently quite basic. Make use of some recently added
features in expo, to:
- Show proper prompts
- Highlight the current item
- Centre text
- Use multi-line text instead of two independent lines
- Put a box around the items
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:53 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:52 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:51 +0000 (08:46 -0600)]
expo: Adjust expo_poll() to avoid looping forever
If the user does not quickly provide some input, exit so that other
things can be done, such as searching for the next OS.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:50 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:49 +0000 (08:46 -0600)]
expo: Add forward declarations to scene_internal.h
Provide some forward declarations for types used in this file, to keep
the LSP happy and avoid errors if the caller happens not to include the
required header.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:48 +0000 (08:46 -0600)]
expo: Drop the gap between groups of menu items
The gap is intended to separate options which are on different bootdevs,
but most of the time there is only one. So drop this gap.
Keep the code around in case it becomes useful to have it in the style,
or based on some other mechanism.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:47 +0000 (08:46 -0600)]
expo: Use a simpler name for USB media
For USB devices we use the string 'usb_mass_storage' which is a bit
verbose. Use 'USB' instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:46 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:45 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:44 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:43 +0000 (08:46 -0600)]
expo: Support white-on-black in the theme
Allow this setting to be controlled from the theme.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:42 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:41 +0000 (08:46 -0600)]
expo: Check the screen contents after rendering
Make sure that the screen contents are as expected when a scene has been
rendered.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:40 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:39 +0000 (08:46 -0600)]
expo: Tidy up scene_txt_render()
Add an early return if there is no string. Move all declarations to the
top of the function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:38 +0000 (08:46 -0600)]
expo: Move text-rendering into its own function
The code to render text is quite long, so put it in its own function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:37 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:36 +0000 (08:46 -0600)]
expo: Line up all menu objects
At present labels are lined up vertically. Do the same with keys and
descriptions, since it looks nicer.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:35 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:34 +0000 (08:46 -0600)]
expo: Make bounding-box calculation more flexible
In some cases it is useful to obtain more than just two bounding boxes
from a menu, e.g. to line up all descriptions vertically.
Use an array to obtain bounding-box information and calculate it
separately for each item.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:33 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:32 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:31 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:30 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:29 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:28 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:27 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:26 +0000 (08:46 -0600)]
expo: Test editing a lineedit
Open the lineedit and add a few characters, to check that things look
right.
At present when the user moves to a new menu item, the menu code
handles this immediately. This means it is not possible to use an expo
action to effect the same change.
Update this so that EXPOACT_POINT_ITEM is handled in cedit_do_action().
Expand the test to cover this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:25 +0000 (08:46 -0600)]
expo: Adjust how menu items are highlighted
At present when the user moves to a new menu item, the menu code
handles this immediately. This means it is not possible to use an expo
action to effect the same change.
Update this so that EXPOACT_POINT_ITEM is handled in cedit_do_action().
Expand the test to cover this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:24 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:23 +0000 (08:46 -0600)]
expo: Test rendering a lineedit
Check the rendering output when adding characters to a line-edit object.
Add a separate test to check behaviour when starting with existing text
in the lineedit. The cursor should start at the end.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:22 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:21 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:20 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:19 +0000 (08:46 -0600)]
expo: Create a rendering test for cedit
Add a test to check that the cedit renders as expected.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:17 +0000 (08:46 -0600)]
expo: Destroy the cedit expo when done
Once 'cedit run' is completed, destroy the expo so that a fresh one is
used for any future editing.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 2 May 2025 14:46:16 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:15 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:04 +0000 (08:46 -0600)]
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>
Simon Glass [Fri, 2 May 2025 14:46:03 +0000 (08:46 -0600)]
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>
Simon Glass [Thu, 1 May 2025 13:37:01 +0000 (07:37 -0600)]
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>
Tom Rini [Fri, 30 May 2025 00:43:15 +0000 (18:43 -0600)]
Merge patch series "Update kbuild"
Ilias Apalodimas <ilias.apalodimas@linaro.org> says:
Last time the kbuild scripts were synced with the Linux kernel was on the
4.20 release. Updating directly to 6.x makes the diff difficult to read, so
let's do the changes incrementally and bump to 5.1 first.
Since the number of commits is big, I am splitting this in multiple series.
This one includes most of the commits for Makefile.build,
Makefile.lib and some from Makefile.
commit
eeb5687a7139649e ("kbuild: add -Werror=strict-prototypes flag unconditionally")
commit
3812b8c5c5d5 ("kbuild: make -r/-R effective in top Makefile for old Make versions")
commit
b421b8a6cb87 ("kbuild: remove unused archmrproper")
commit
1a49b2fd8f58 ("kbuild: strip whitespace in cmd_record_mcount findstring")
commit
88110713ca9dfb ("kbuild: hardcode genksyms path and remove GENKSYMS variable")
commit
1d8001ef358 ("kbuild: generate modules.order only when CONFIG_MODULES=y")
commit
45c4372d00 ("kbuild: refactor quiet_modtag")
commit
b39a691617e4 commit ("kbuild: remove redundant quiet_modtag for $(obj-m)")
commit
5439f09f488f ("kbuild: remove redundant 'set -e' from cmd_* defines")
commit
e5d289100d3a ("kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule")
commit
3a2429e1faf4 ("kbuild: change if_changed_rule for multi-line recipe")
commit
ee3e46b7efd2 ("kbuild: refactor modversions build rules")
commit
4317ee3b6a5e ("kbuild: remove redundant 'set -e' from sub_cmd_record_mcount")
commit
392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files")
commit
898f5a009f22 ("kbuild: move archive command to scripts/Makefile.lib")
commit
b79c6aa6a1f1 ("kbuild: remove unnecessary in-subshell execution")
commit
afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)")
commit
ecbd10d90e94 ("kbuild: simplify rules of data compression with size appending")
commit
58156ba4468f ("kbuild: skip 'addtree' and 'flags' magic for external module build")
commit
172caf1993b7 ("kbuild: remove redundant target cleaning on failure")
commit
f3fd4a3f3a38 ("kbuild: remove redundant 'set -e' from filechk_offsets")
commit
a2237fec1e06 ("kbuild: Enable dtc graph_port warning by default")
commit
70523a3ce5ff ("kbuild: disable dtc simple_bus_reg warnings by default")
commit
e4aca4595005 ("kbuild: de-duplicate fixdep usage")
Link: https://lore.kernel.org/r/20250520052153.307194-1-ilias.apalodimas@linaro.org
Ilias Apalodimas [Tue, 20 May 2025 05:21:35 +0000 (08:21 +0300)]
kbuild: add -Werror=strict-prototypes flag unconditionally
Backported from kernel
commit
eeb5687a7139649e ("kbuild: add -Werror=strict-prototypes flag unconditionally")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:34 +0000 (08:21 +0300)]
kbuild: make -r/-R effective in top Makefile for old Make versions
Backported from kernel
commit
3812b8c5c5d5 ("kbuild: make -r/-R effective in top Makefile for old Make versions")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:33 +0000 (08:21 +0300)]
kbuild: remove unused archmrproper
Backported from kernel
commit
b421b8a6cb87 ("kbuild: remove unused archmrproper")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:32 +0000 (08:21 +0300)]
kbuild: strip whitespace in cmd_record_mcount findstring
Backport from kernel
commit
1a49b2fd8f58 ("kbuild: strip whitespace in cmd_record_mcount findstring")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:31 +0000 (08:21 +0300)]
kbuild: hardcode genksyms path and remove GENKSYMS variable
Back port from kernel although it's not used since it makes diffing
easier.
commit
88110713ca9dfb ("kbuild: hardcode genksyms path and remove GENKSYMS variable")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:30 +0000 (08:21 +0300)]
kbuild: generate modules.order only when CONFIG_MODULES=y
Backport from kernel although it is unused since it makes diffing easier.
commit
1d8001ef358 ("kbuild: generate modules.order only when CONFIG_MODULES=y")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:29 +0000 (08:21 +0300)]
kbuild: refactor quiet_modtag
Backport from kernel
commit
45c4372d00 ("kbuild: refactor quiet_modtag")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:28 +0000 (08:21 +0300)]
kbuild: remove redundant quiet_modtag for $(obj-m)
Backported from kernel
commit
b39a691617e4 commit ("kbuild: remove redundant quiet_modtag for $(obj-m)")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:27 +0000 (08:21 +0300)]
kbuild: remove redundant 'set -e' from cmd_* defines
Backported from kernel
commit
5439f09f488f ("kbuild: remove redundant 'set -e' from cmd_* defines")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:26 +0000 (08:21 +0300)]
kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule
Backport from kernel
commit
e5d289100d3a ("kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:25 +0000 (08:21 +0300)]
kbuild: change if_changed_rule for multi-line recipe
Backport from kernel
commit
3a2429e1faf4 ("kbuild: change if_changed_rule for multi-line recipe")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:24 +0000 (08:21 +0300)]
kbuild: refactor modversions build rules
Backport from kernel
commit
ee3e46b7efd2 ("kbuild: refactor modversions build rules")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:23 +0000 (08:21 +0300)]
kbuild: remove redundant 'set -e' from sub_cmd_record_mcount
Back from kernel
commit
4317ee3b6a5e ("kbuild: remove redundant 'set -e' from sub_cmd_record_mcount")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:22 +0000 (08:21 +0300)]
kbuild: let fixdep directly write to .*.cmd files
Backport from kernel
commit
392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:21 +0000 (08:21 +0300)]
kbuild: move archive command to scripts/Makefile.lib
Backport from kernel
commit
898f5a009f22 ("kbuild: move archive command to scripts/Makefile.lib")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:20 +0000 (08:21 +0300)]
kbuild: remove unnecessary in-subshell execution
Backport kernel changes
commit
b79c6aa6a1f1 ("kbuild: remove unnecessary in-subshell execution")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:19 +0000 (08:21 +0300)]
kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^)
Backport from kernel
commit
afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:18 +0000 (08:21 +0300)]
kbuild: simplify rules of data compression with size appending
Backport kernel changes
commit
ecbd10d90e94 ("kbuild: simplify rules of data compression with size appending")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:17 +0000 (08:21 +0300)]
kbuild: skip 'addtree' and 'flags' magic for external module build
Backport from kernel
commit
58156ba4468f ("kbuild: skip 'addtree' and 'flags' magic for external module build")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:16 +0000 (08:21 +0300)]
kbuild: remove redundant target cleaning on failure
Bacport from the kernel
commit
172caf1993b7 ("kbuild: remove redundant target cleaning on failure")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:15 +0000 (08:21 +0300)]
kbuild: remove redundant 'set -e' from filechk_offsets
Backport changes from the kernel
commit
f3fd4a3f3a38 ("kbuild: remove redundant 'set -e' from filechk_offsets")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:14 +0000 (08:21 +0300)]
kbuild: Enable dtc graph_port warning by default
Backport changes from the kernel
commit
a2237fec1e06 ("kbuild: Enable dtc graph_port warning by default")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:13 +0000 (08:21 +0300)]
kbuild: disable dtc simple_bus_reg warnings by default
Backport changes from the kernel
commit
70523a3ce5ff ("kbuild: disable dtc simple_bus_reg warnings by default")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 20 May 2025 05:21:12 +0000 (08:21 +0300)]
kbuild: de-duplicate fixdep usage
Backported from the linux kernel
commit
e4aca4595005 ("kbuild: de-duplicate fixdep usage")
A lot of the kernels kbuild depend on that patch. Backport it and pull in
the 'rule_as_o_S'a rule as well. This might end up being unused but it
doesn't break anything and makes diffing the files easier.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Thu, 29 May 2025 20:24:11 +0000 (14:24 -0600)]
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
Varadarajan Narayanan [Tue, 13 May 2025 09:17:10 +0000 (14:47 +0530)]
configs: qcs9100: Enable env in SCSI
Enable CONFIG_ENV_IS_IN_SCSI to store environment variables in SCSI.
Set env variables partition UUID as seen in qcs9100 based boards.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Varadarajan Narayanan [Tue, 13 May 2025 09:17:08 +0000 (14:47 +0530)]
env: Add support for storing env variables in SCSI devices
Allow SCSI to be able to store environment variables.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Acked-by: Casey Connolly <casey.connolly@linaro.org>
Varadarajan Narayanan [Tue, 13 May 2025 09:17:07 +0000 (14:47 +0530)]
scsi: Implement get_blk() function
Add a function to obtain the block device for SCSI.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Acked-by: Casey Connolly <casey.connolly@linaro.org>
Varadarajan Narayanan [Tue, 13 May 2025 09:17:06 +0000 (14:47 +0530)]
disk: part: implement generic function part_get_info_by_uuid()
Add function to search for a partition by UUID as partition
names may not be unique.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Acked-by: Casey Connolly <casey.connolly@linaro.org>
Tom Rini [Thu, 29 May 2025 14:33:17 +0000 (08:33 -0600)]
Merge patch series "Remove clocks from R5 dtsi for missed boards."
Manorit Chawdhry <m-chawdhry@ti.com> says:
Fix some of the boards that could be affected by the change done in [0].
[0]: https://lore.kernel.org/u-boot/
20241121-b4-upstream-pll-fix-v1-0-
904f618897a7@ti.com/T/#mecb70b415a364fdf322a94241438db7b5607e92b
Link: https://lore.kernel.org/r/20250515-b4-upstream-k3-pll-miss-v1-0-e38b89f027b8@ti.com
Manorit Chawdhry [Thu, 15 May 2025 11:38:37 +0000 (17:08 +0530)]
arm: dts: k3-am62a7-phycore-r5*: Remove clocks from main_timer0
The commit
79d91e77f4c2 ("clk: ti: clk-k3-pll: Add additional robustness
steps to the PLL sequence") introduced a change which requires the
main_timer0 to not rely on it's own clocks which anyways was wrong.
Fix it by removing the clock dependency for it, also while at it, move
it from u-boot.dtsi to R5 as that is the only entity that should require
it as DM isn't up.
Fixes:
5d1aac358f3c ("arm: dts: k3-*-r5: Remove clocks from mcu_timer0")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Acked-by: Wadim Egorov <w.egorov@phytec.de>
Manorit Chawdhry [Thu, 15 May 2025 11:38:36 +0000 (17:08 +0530)]
arm: dts: k3-am625-verdin-r5*: Remove clocks from main_timer0
The commit
79d91e77f4c2 ("clk: ti: clk-k3-pll: Add additional robustness
steps to the PLL sequence") introduced a change which requires the
main_timer0 to not rely on it's own clocks which anyways was wrong.
Fix it by removing the clock dependency for it, also while at it, move
it from u-boot.dtsi to R5 as that is the only entity that should require
it as DM isn't up.
Fixes:
5d1aac358f3c ("arm: dts: k3-*-r5: Remove clocks from mcu_timer0")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Manorit Chawdhry [Thu, 15 May 2025 11:38:35 +0000 (17:08 +0530)]
arm: dts: k3-am625-phycore-r5*: Remove clocks from main_timer0
The commit
79d91e77f4c2 ("clk: ti: clk-k3-pll: Add additional robustness
steps to the PLL sequence") introduced a change which requires the
main_timer0 to not rely on it's own clocks which anyways was wrong.
Fix it by removing the clock dependency for it, also while at it, move
it from u-boot.dtsi to R5 as that is the only entity that should require
it as DM isn't up.
Fixes:
5d1aac358f3c ("arm: dts: k3-*-r5: Remove clocks from mcu_timer0")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
Manorit Chawdhry [Thu, 15 May 2025 11:38:34 +0000 (17:08 +0530)]
arm: dts: k3-am625-beagleplay-r5*: Remove clocks from main_timer0
The commit
79d91e77f4c2 ("clk: ti: clk-k3-pll: Add additional robustness
steps to the PLL sequence") introduced a change which requires the
main_timer0 to not rely on it's own clocks which anyways was wrong.
Fix it by removing the clock dependency for it, also while at it, move
it from u-boot.dtsi to R5 as that is the only entity that should require
it as DM isn't up.
Fixes:
5d1aac358f3c ("arm: dts: k3-*-r5: Remove clocks from mcu_timer0")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Tom Rini [Thu, 29 May 2025 14:32:52 +0000 (08:32 -0600)]
Merge patch series "Print Reset Reason for K3 based devices"
Wadim Egorov <w.egorov@phytec.de> says:
Although AM62x, AM62Ax, AM64x, and AM62Px share the same register for
reset reason, not all TRMs document this consistently. To avoid relying
on undocumented behavior, introduce SoC-specific implementations for
now. If TI confirms all SoCs share the same register, this can be moved to
common.c for reuse.
It will be mostly copy&paste for the mentioned devices.
Also, I am not sure how this Register operates exactly. I noticed that
two bits can be set at once, so I started to check for set bits instead
of having a switch/case logic.
Link: https://lore.kernel.org/r/20250515111554.2916254-1-w.egorov@phytec.de
Wadim Egorov [Thu, 15 May 2025 11:15:54 +0000 (13:15 +0200)]
arm: mach-k3: am62x: Implement get_reset_reason()
Implement get_reset_reason() for AM62x to enable reporting of
the reset cause in the cpuinfo output.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Wadim Egorov [Thu, 15 May 2025 11:15:53 +0000 (13:15 +0200)]
arm: mach-k3: Detect and print reset reason
Call get_reset_reason() during CPU info output and display the result
if the SoC provides the implementation. This helps in debugging by
providing context on the last system reset reason.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Tom Rini [Thu, 29 May 2025 14:31:07 +0000 (08:31 -0600)]
Merge patch series "Remove <env.h> from <net.h>"
Tom Rini <trini@konsulko.com> says:
Hey all,
This is a v3 of Simon's series[1] and depends on the series[2] I posted
the other day that removes <env.h> from <command.h>. With this series
done, I believe we've tackled all of the current cases of headers which
include <env.h> without directly needing it. Much of this series is in
fact Simon's v2 with the main differneces being:
- Removing <env.h> from <net.h> at the end
- Removing env_to_ip() given how little it's used rather than shuffling
around where it's declared and un-inline'ing it. For a rarely used
helper, this ends up being cleaner I think. Especially looking at some
of the users (which called env_get repeatedly). If there's strong
opinion here about using the other method[3] we can do that instead.
- Setting aside for now how to handle CMD_ELF=y and NO_NET=y because
today it's actually fine as we unconditionally build lib/net_utils.c
where string_to_ip() is defined. I'm unsure if a further series is
warranted here or not. We rely on link-time optimization to keep code
readable too.
[1]: https://lore.kernel.org/all/
20250501010456.3930701-1-sjg@chromium.org
[2]: https://lore.kernel.org/all/
20250514225002.15361-1-trini@konsulko.com
[3]: https://lore.kernel.org/all/
20250501010456.3930701-23-sjg@chromium.org
Link: https://lore.kernel.org/r/20250515234154.1859366-1-trini@konsulko.com
Tom Rini [Thu, 15 May 2025 23:31:51 +0000 (17:31 -0600)]
include/net.h: Drop <env.h>
Now that all of the cases of code that relied on <net.h> to provide
<env.h> (or one of the headers that it includes, and so forth) have been
fixed, we can drop the include from here.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 15 May 2025 23:31:50 +0000 (17:31 -0600)]
global: Avoid indirect inclusion of <env.h> from <net.h>
Now that env_get_ip() has been removed, the include file <net.h> does
not need anything from <env.h>. Furthermore, include/env.h itself
includes other headers which can lead to longer indirect inclusion
paths. To prepare to remove <env.h> from <net.h> fix all of the
remaining places which had relied on this indirect inclusion to instead
include <env.h> directly.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> # net/lwip
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 15 May 2025 23:31:49 +0000 (17:31 -0600)]
net: dc2114x: Include env.h to permit reading the environment
This file uses the environment but does not include the header file.
Update it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 15 May 2025 23:31:48 +0000 (17:31 -0600)]
net: Include env.h in pcap.c
This file uses the environment but does not include the header file.
Update it.
Signed-off-by: Simon Glass <sjg@chromium.org>