Unlike audio_pll1 and audio_pll2, there is no video_pll2. Further, the
name used in the RM is video_pll. So, let's rename "video_pll1" to
"video_pll" to be consistent with the RM and avoid misunderstandings.
The IMX8MN platform does not have any video processing unit (VPU), and
indeed in the reference manual (document IMX8MNRM Rev 2, 07/2022) there
is no occurrence of its pll. From an analysis of the code and the RM
itself, I think vpu pll is used instead of m7 alternate pll, probably
for copy and paste of code taken from modules of similar architectures.
To quote the author:
Since U-Boot's tracing feature was originally written, quite a few changes
have taken place in this domain. The original text format used by tracing
is still emitted by Linux, but a new trace-cmd tool has invented a binary
format which is now used by new tools, such as kernelshark.
With recent distributions and the move to Python 3, the old pybootchart
tool does not build or run. Unfortunately there is no 1:1 replacement for
the features that were provided by pybootchart, or at least it is not
obvious. Still, it makes sense to keep with the times.
This series updates proftool to use the new binary format, adding support
for function and funcgraph tracing, so that U-Boot's trace records can be
examined by trace-cmd and kernelshark.
This series also adds support for a flamegraph, which provides a visual
way to see which functions are called a lot, as well as which ones consume
the most time.
Some minor updates to the trace implementation within U-Boot are included,
to provide a little more information and to fix a few problems.
No unit tests are provided by proftool, but a functional test ensures that
sandbox can emit traces which can be processed by proftool, then parsed by
trace-cmd and that the timing of the various formats looks consistent.
Simon Glass [Sun, 15 Jan 2023 21:16:00 +0000 (14:16 -0700)]
trace: Add a test
Add a test which runs sandbox, collects a trace and makes sure it can
be processed by trace-cmd. This should ensure that this feature continues
to work as U-Boot and trace-cmd evolve.
Simon Glass [Sun, 15 Jan 2023 21:15:59 +0000 (14:15 -0700)]
Docker: Support trace-cmd
Build trace-cmd as part of the docker image, so that trace tests can be
used. Unfortunately the version provided by distributions is a little old
and has bugs. It also does not support specifying the time base for the
trace, which is required to convert microseconds to nanaseconds.
Simon Glass [Sun, 15 Jan 2023 21:15:58 +0000 (14:15 -0700)]
trace: Provide a flamegraph that uses timing
Add a second variant of the flame graph that shows records in terms of the
number of microseconds used by each call stack. This is a useful way of
seeing where time is going within the execution of U-Boot.
This requires a call stack that records the start time of each function,
as well as a way of subtracting all time consumed by child functions, so
that this time is not counted twice by the flamegraph. The time values in
the output are just for the function itself, not for its children.
Simon Glass [Sun, 15 Jan 2023 21:15:56 +0000 (14:15 -0700)]
trace: Support output of funcgraph records
Add support for writing ftrace records in the 'funcgraph' format, which
shows function entry and exit points as well as the time taken by each
function.
Simon Glass [Sun, 15 Jan 2023 21:15:55 +0000 (14:15 -0700)]
trace: Use text_base from the trace header
Use the information in the trace header instead of reading it from the
trace records. Add debugging to check that System.map and the trace header
agree on this value.
Simon Glass [Sun, 15 Jan 2023 21:15:53 +0000 (14:15 -0700)]
trace: Update proftool to use new binary format
The old text format is not much used anymore. Instead a new trace-cmd tool
has introduced a binary format for trace records.
Add support for generating this format. This involves removing the old
text format, adding various helpers for the new format and adjusting the
code to use an output file instead of stdout.
Simon Glass [Sun, 15 Jan 2023 21:15:52 +0000 (14:15 -0700)]
trace: Rename prof to trace and improve comments
The current use of 'profile' in some places is confusing. Update the code
to use the word 'trace' consistently. Change the flags to better match
their meaning and add some more comments.
Simon Glass [Sun, 15 Jan 2023 21:15:50 +0000 (14:15 -0700)]
trace: Correct the relocation handover with buffer overflow
When the early trace buffer overflows it leaves a gap in the trace buffer
between where the actual data finished and where it would have finished if
there were enough buffer space. This results in corrupted output.
Adjust the logic to resolve this and add a message when the buffer
overflows.
Simon Glass [Sun, 15 Jan 2023 21:15:48 +0000 (14:15 -0700)]
trace: Track the minimum stack depth
The trace does not necessarily start at the top level, so we can see it
go negative. Track this so that we can show an accurate value for the
stack depth.
Simon Glass [Sun, 15 Jan 2023 21:15:47 +0000 (14:15 -0700)]
trace: Reduce the number of function sites
Given that the compiler adds two function calls into each function, the
current spacing is overkill. Drop it down to 16 bytes per function, which
is still plenty. This saves some space in the trace buffer.
Also move the calculation into a function, so it is common code. Add a
check for gd->mon_len being unset, which breaks tracing.
Simon Glass [Sun, 15 Jan 2023 21:15:46 +0000 (14:15 -0700)]
trace: Update the file header
It seems better to put the TEXT_BASE value in the file header rather than
in an entry record. While it is true that there is a separate base for
pre-relocation, this can be handled by using offsets in the file.
It is useful to have a version number in case we need to change the trace
format again.
Simon Glass [Sun, 15 Jan 2023 21:15:42 +0000 (14:15 -0700)]
timer: Tidy up use of notrace
Tracing is typically enabled by the time driver model starts up, so there
is no point in adding a 'notrace' to the timer-init function. However,
once the driver model timer is enabled, we do need to be able to access
the timer's private data when reading the timer, so add it to the core
function needed for that.
Update the function's documentation while we are here.
Simon Glass [Sun, 15 Jan 2023 21:15:41 +0000 (14:15 -0700)]
dm: Allow serial output during the relocation process
Reset the serial flags so that the debug UART can be used (if enabled)
in the small window where there is no serial device. This can avoid a hang
in some cases.
Simon Glass [Sun, 15 Jan 2023 21:15:40 +0000 (14:15 -0700)]
sandbox: Bring back setting mon_len in global_data
This change was made for the benefit of RISC-V but broke other
architectures also. In particular, tracing cannot work without this value.
Add it back for architectures which support it.
Fixes: 685b9ec26e6 ("sandbox: don't refer to symbol _init") Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 10 Feb 2023 18:45:15 +0000 (13:45 -0500)]
Merge tag 'efi-2023-04-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-04-rc2
Documentation:
* Provide page with links to talks on U-Boot
UEFI:
* Enable CTRL+S to save the boot order in eficonfig command
* Run attribute check for QueryVariableInfo() only for the file store
* Bug fixes
Others:
* Improve output formatting of the coninfo command
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 10 Feb 2023 12:15:45 PM EST
# gpg: using RSA key 6DC4F9C71F29A6FA06B76D33C481DBBC2C051AC4
# gpg: Good signature from "Heinrich Schuchardt <xypron.glpk@gmx.de>" [unknown]
# gpg: aka "[jpeg image of size 1389]" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7 6D33 C481 DBBC 2C05 1AC4
- DM_SERIAL conversion for bcm7xxx, button input driver, qcom updates,
environment and network related cleanup, ftmac100 update, add a
IS_ENABLED conversion that was just missed.
Bootmenu requires an input device with arrows and enter key.
A common smartphone luckily has power, volume up/down buttons,
which may be used for controlling bootmenu.
To use driver, add 'button-kbd' to stdin.
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
test: create dedicated fdt node for ofnode_for_each_prop test
Property count may change in /buttons node, if more button tests added,
and this will break ofnode_for_each_prop.
Add separate node for mentioned test.
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
GPIO button driver requires direction functions to probe
button gpio. Those functions are blank, since pwrkey is not
really gpio, and don't support direction settings.
The Qualcom ETHQOS hardware supports an RGMII macro which needs to be
configured according to following link speeds:
- SPEED_1000
- SPEED_100
- SPEED_10
So add a corresponding glue driver to configure RGMII macro.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Sumit Garg [Wed, 1 Feb 2023 13:58:54 +0000 (19:28 +0530)]
net: dwc_eth_qos: Allow platform to override tx/rx_fifo_sz
The GMAC controller on QCS404 SoC (support added by upcoming patch) fails
to work with maximum tx/rx_fifo_sz supported by the hardware (16K). So
allow platforms to override FIFO size using corresponding DT node
properties.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Sumit Garg [Wed, 1 Feb 2023 13:58:52 +0000 (19:28 +0530)]
pinctrl-snapdragon: Get rid of custom drive-strength values
Use standard pinconf drive-strength values from Linux DT bindings rather
than ones based on custom u-boot header. These changes are in direction
to make u-boot DTs for Qcom SoCs to be compatible with standard Linux
DT bindings.
Sumit Garg [Wed, 1 Feb 2023 13:58:48 +0000 (19:28 +0530)]
qcs404: sysmap: Don't map reserved memory ranges
Currently u-boot maps whole of 1G RAM but there reserved memory ranges on
QCS404 which are reserved for TrustZone, various firmware components etc.
Any access to these reserved memory ranges causes a bus hang issue. So
disable mapping for reserved memory ranges in u-boot.
Jan Kiszka [Fri, 3 Feb 2023 12:22:51 +0000 (13:22 +0100)]
env: Complete generic support for writable list
This completes what af7104f46007 started by selecting ENV_APPEND and
loading the default env before any other sources. This ensures that load
operations pick up all non-writable vars from the default env and only
permitted parts from other locations according to the regular
priorities.
With this change, boards only need to define the list of writable
variables but no longer have to provide a custom env_get_location
implementation.
CC: Joe Hershberger <joe.hershberger@ni.com> CC: Marek Vasut <marex@denx.de> CC: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Marek Vasut <marex@denx.de>
- This series brings in a large number of patches in the form of changing
CONFIG_IS_ENABLED(FOO) to IS_ENABLED(CONFIG_FOO) when there it is the
case that CONFIG_xPL_FOO is never a valid symbol. The majority of
the times where we do this, it is unintentional and does not make the
code more useful, or rarely, introduces bugs.