Commit graph

91115 commits

Author SHA1 Message Date
Caleb Connolly
24d2908e98
pinctrl: qcom: move ipq4019 driver from mach-ipq40xx
Drop the duplicated pinctrl-snapdragon driver from mach-ipq40xx and add
it to drivers/pinctrl/qcom.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:49 +00:00
Caleb Connolly
53b2c7af69
pinctrl: qcom: move out of mach-snapdragon
Move the Qualcomm pinctrl drivers out of mach-snapdragon and over to the
rest of the pinctrl drivers, adjust the drivers so that support for each
platform can be enabled/disabled individually and introduce platform
specific configuration options.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:24 +00:00
Caleb Connolly
d5db46cf93
clk/qcom: fix rcg divider value
The RCG divider field takes a value of (2*h - 1) where h is the divisor.
This allows fractional dividers to be supported by calculating them at
compile time using a macro.

However, the clk_rcg_set_rate_mnd() function was also performing the
calculation. Clean this all up and consistently use the F() macro to
calculate these at compile time and properly support fractional divisors.

Additionally, improve clk_bcr_update() to timeout with a warning rather
than hanging the board, and make the freq_tbl struct and helpers common
so that they can be reused by future platforms.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:24 +00:00
Caleb Connolly
6acc44319b
clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()
This property is needed on some platforms to ensure that only the
relevant bits are set in the M/N/D registers.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:24 +00:00
Caleb Connolly
37ea1343ac
clk/qcom: use function pointers for enable and set_rate
Currently, it isn't possible to build clock drivers for more than one
platform due to how the msm_enable() and msm_set_rate() callbacks are
implemented.

Extend qcom_clk_data to include function pointers for these and convert
all platforms to use them.

Previously, clock drivers relied on include/configs/<board.h> to include the
board specific sysmap header, however as most of the header contents are clock
driver related, import the contents directly into each clock driver and
remove the header. The only exception here is the dragonboard820c board file
which includes some pinctrl macros, those are also inlined.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
[caleb: remove additional sysmap-sdm845.h mention]
2024-01-16 12:26:24 +00:00
Caleb Connolly
0e7fec02ce
clk/qcom: sdm845: add register map for simple gate clocks
Many gate clocks can be enabled with a single register write, add support
for defining these simple gate clocks and add the ones found on SDM845.

While we're here, inline clk_init_uart() into msm_set_rate().

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:24 +00:00
Konrad Dybcio
3ead661633
clk/qcom: handle resets and clocks in one device
Qualcomm's clock controller blocks actually do much more than it
says on the tin.. They provide clocks, resets and power domains.
Currently, U-Boot requires one to spawn 2 separate devices for
controlling clocks and resets, both spanning the same register space.
Refactor the code to make it work with just a single DT node, making
it compatible with upstream Linux bindings and dropping the dedicated
reset driver in favour of including it in the clock driver.

Heavily inspired by Renesas code for a similar hw block.

[caleb: moved drivers to clk/qcom, added reset driver and adjusted bind
logic. Imported qcom,gcc-ipq4019.h from Linux]

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Caleb Connolly
fac2121a47
clk/qcom: move ipq4019 driver from mach-ipq40xx
This driver is just a stub, but it's necessary to support the upcoming
reset driver changes.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Caleb Connolly
a623c14f43
clk/qcom: move from mach-snapdragon
Clock drivers don't belong here, move them to the right place and
declutter mach-snapdragon a bit.

To de-couple these drivers from specific "target" platforms, add
additional config options to enable each clock driver gated behind a
common CLK_QCOM option and enable them by default for the respective
targets. This will make future work easier as we move towards a generic
Qualcomm target.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Tom Rini
b9631fe781 Pull request for u-boot-nand-20240115
The first patch is by Heinrich Schuchardt and fixes an integer overflow
 
 The following two patches are by Dario Binacchi and add arguments check
 to the nand_mtd_to_devnum() and nand_register() functions.
 
 The remaining patches are by Roger Quadros and include various fixes for
 the OMAP platform.
 -----BEGIN PGP SIGNATURE-----
 
 iQJYBAABCgBCFiEE6GOTDNYiFygVXvMmQBtB6IWRjvEFAmWlAhUkHGRhcmlvLmJp
 bmFjY2hpQGFtYXJ1bGFzb2x1dGlvbnMuY29tAAoJEEAbQeiFkY7xp6AP/iSHmzZd
 GrVbeyjSFPkl1ZEEq1z3UW7jrd/5chGNDrD7OUqKw3L0zrDNQWYaYTyO/IqZMYjm
 rtSc1hF6cTzkCBYrg8jKlmfS6eRR/7Og+gYxvkD5iqJC/++5eR3N+CYq4nroz9S5
 YovWFNkgVQIe2W6PXwhr8Sj7IScWhRJPidaX5MtTN8Xx+uz/2Y/VjKw8m2g+MC6E
 jrVrmiuFj1YwmS7qx8QZlmPzAnMmANy4YUZywpYNFzN7H5o52FDZRBr5Hn97gmHy
 asQhuqurMbz+vzV9VPrb1iLUVErnkjzCKvl9Vu75At8L/UcSfxeUG4O9wNhmsADZ
 kDgGx60ZJdCNK1ym47F/JvB2qgFBByY4FVEHqPfjddCUJhpi8fLwmSNeVh/uaV7C
 uWG9Gu9rlJV/yQAQCGfuwqf/uQ/PrqaqgPd419JR9GzhM21g8Ytye1lHYgmlnEo6
 4dgF4pb/kj1vMwD36kfwqM+zHqzv9I6oNDEHU4keIjUPR+bMnNtwXmS9DtARESK9
 RE48iAv/m3OO9Wfcb0XxwAySZiYoJsVCmcwXaoVCiuE+4eSqarqhKvlZdsvXobs/
 0EZYN7lcNcxO5jTTA5S0WcXNeWjc8KyC+w3bPou86TepjrmF6QIm6VUR0Eyks3sA
 zUoC5M8W/dCt1SRSJiC46jfOqnGgSxWu73P+
 =xg/L
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-nand-20240115' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash

Pull request for u-boot-nand-20240115

The first patch is by Heinrich Schuchardt and fixes an integer overflow

The following two patches are by Dario Binacchi and add arguments check
to the nand_mtd_to_devnum() and nand_register() functions.

The remaining patches are by Roger Quadros and include various fixes for
the OMAP platform.
2024-01-15 09:29:57 -05:00
Anatolij Gustschin
662e7ef7f0 arm: xea: Add support for boot image source descriptor in SPL
We load two boot image source descriptor structures from last
two sectors in the SPI NOR flash and determine the boot source
for loading the kernel/DTB images, then adjust the boot order for
loading image from eMMC boot0 or boot1 partition.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-01-15 10:55:42 -03:00
Lukasz Majewski
decc451a85 arm: config: Enable CRC8 support in SPL on imx287 XEA board
The boot0/1 feature uses simple CRC8 to check (in SPL) if
SPI-NOR content is not corrupted, hence the need to enable
it.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-01-15 10:55:42 -03:00
Lukasz Majewski
dbde4c6155 arm: xea: Move XEA's environment variables from xea.h to xea.env
The default set of environment variables from CFG_EXTRA_ENV_SETTINGS
has been moved to a separate file - board/liebherr/xea/xea.env

Adjustments done:
- fitImage support
- SPI-NOR layout re-organization

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-01-15 10:55:42 -03:00
Yannic Moog
1aebea9bde board: phytec: fix link error when disabling PHYTEC_SOM_DETECTION
Commit aa7858fe5e ("board: phytec: som_detection: move definitions to
source file") moved function definitions from header to source file.
Makefile however was not updated to unconditionally (from
[..]_SOM_DETECTION) build the imx8 and phytec som detection units.
Also remove unused includes that cause build failures on arm 32bit
boards. SoM detection shall support 32bit boards as well, but arch
specific code should not be included in the generic module.

Fixes: aa7858fe5e ("board: phytec: som_detection: move definitions to source file")
Signed-off-by: Yannic Moog <y.moog@phytec.de>
2024-01-15 06:35:50 -03:00
Roger Quadros
4dfa08af79 arm: mach-k3: am642: Define NAND boot device
AM642 SoC supports booting from GPMC NAND device.
Define boot device for it.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499180.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-01-15 08:58:24 +01:00
Roger Quadros
e76959aba5 mtd: rawnand: omap_gpmc: fix OF based partition parsing for NAND
Set NAND chip ofnode and device so OF based partition parsing
can work.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499178.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-01-15 08:58:24 +01:00
Roger Quadros
dd01a229c8 mtd: rawnand: omap_gpmc: Use DT provided IO address
For DM case we can get the NAND chip's IO address from DT
so we don't need to rely on CFG_SYS_NAND_BASE.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499177.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-01-15 08:58:24 +01:00
Roger Quadros
58d6f349e4 memory: ti-gpmc: Fix build
sys_proto.h no longer exists for K3 platform so drop it.
Include sizes.h to so SZ_16M is visible.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499176.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-01-15 08:58:24 +01:00
Roger Quadros
f6e7d8d2f3 mtd: rawnand: omap_elm: Fix elm_init definition
The macro ELM_BASE is defined in mach/hardware.h and is
not visible at the omap_elm.h header file. Avoid using it
in omap_elm.h.

Reported-by: Hong Guan <hguan@ti.com>
Fixes: 7363cf0581 ("mtd: rawnand: omap_elm: u-boot driver model support")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/all/20231211114600.4414-3-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-01-15 08:58:24 +01:00
Roger Quadros
84e6fe3c04 mtd: nand: omap_gpmc: Fix NAND in SPL for AM335x
AM335x uses a special driver "am335x_spl_bch.c" as SPL
NAND loader. This driver expects 1 sector at a time ECC
and doesn't work well with multi-sector ECC that was implemented in
commit 04fcd25873 ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction")

Additionally, the omap_elm driver does not support multi sector ECC and will
need more work and tests to get multi sector working correctly on all
platforms.

Switch back to 1 sector at a time read/ECC.

Fixes: 04fcd25873 ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Tested-by: Enrico Leto <enrico.leto@siemens.com>
Tested-by: Heiko Schocher <hs@denx.de>
Link: https://lore.kernel.org/all/20231211114600.4414-2-rogerq@kernel.org/
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-01-15 08:58:24 +01:00
Dario Binacchi
cbfff3b123 mtd: nand: check nand_mtd_to_devnum() argument
If the "mtd" parameter is NULL, the search will definitely yield a
negative result. In that case, it's better to exit immediately.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20231102113829.58852-1-dario.binacchi@amarulasolutions.com
2024-01-15 08:58:24 +01:00
Dario Binacchi
6b3d175928 mtd: nand: complete nand_register() arguments check
The patch checks that the "mtd" parameter is accessible before
proceeding.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20231102112743.57420-1-dario.binacchi@amarulasolutions.com
2024-01-15 08:58:24 +01:00
Heinrich Schuchardt
6b37320c76 cmd: mtd: avoid unintentional integer overflow
mtd dump beyond 4 GiB will show incorrect results.

Multiplying two u32 will yield a u32. Add a missing cast.

Fixes: 5db66b3aee ("cmd: mtd: add 'mtd' command")
Addresses-Coverity-ID: 477205 ("Unintentional integer overflow")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/all/20240111073155.19545-1-heinrich.schuchardt@canonical.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-01-15 08:58:24 +01:00
Tom Rini
697758e7c8 Merge branch 'master-sync-dts-663' of https://source.denx.de/u-boot/custodians/u-boot-sh 2024-01-14 18:07:49 -05:00
Marek Vasut
73595fd4c0 ARM: dts: renesas: Synchronize R-Car R8A779F0 S4 DTs with Linux 6.6.3
Synchronize R-Car R8A779F0 S4 DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
5a9eea75dd ARM: dts: renesas: Synchronize R-Car R8A77990 E3 DTs with Linux 6.6.3
Synchronize R-Car R8A77990 E3 DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
33713261bf ARM: dts: renesas: Synchronize R-Car R8A77970 V3M DTs with Linux 6.6.3
Synchronize R-Car R8A77970 V3M DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
61d32fb92c ARM: dts: renesas: Synchronize R-Car R8A7792 V2H DTs with Linux 6.6.3
Synchronize R-Car R8A7792 V2H DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
a1997a3892 clk: renesas: Synchronize RZ R8A774E1 RZ/G2H clock tables with Linux 6.6.3
Synchronize RZ R8A774E1 RZ/G2H clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
94c2f5b622 clk: renesas: Synchronize RZ R8A774C0 RZ/G2E clock tables with Linux 6.6.3
Synchronize RZ R8A774C0 RZ/G2E clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
0e2433efe0 clk: renesas: Synchronize RZ R8A774B1 RZ/G2N clock tables with Linux 6.6.3
Synchronize RZ R8A774B1 RZ/G2N clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
e811b03e4a clk: renesas: Synchronize RZ R8A774A1 RZ/G2M clock tables with Linux 6.6.3
Synchronize RZ R8A774A1 RZ/G2M clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
f26739e23b clk: renesas: Synchronize R-Car R8A77995 D3 clock tables with Linux 6.6.3
Synchronize R-Car R8A77995 D3 clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
aa580d8c80 clk: renesas: Synchronize R-Car R8A77990 E3 clock tables with Linux 6.6.3
Synchronize R-Car R8A77990 E3 clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
25558301d2 clk: renesas: Synchronize R-Car R8A77965 M3-N clock tables with Linux 6.6.3
Synchronize R-Car R8A77965 M3-N clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
dca7e0c40e clk: renesas: Synchronize R-Car R8A77960 M3-W and R8A77961 M3-W+ clock tables with Linux 6.6.3
Synchronize R-Car R8A77960 M3-W and R8A77961 M3-W+ clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Add ZG clock macro into rcar-gen3-cpg.h to cover the new clock type .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Tom Rini
817fdce324 Pull request efi-2024-04-rc1
Documentation:
 
 * update coreboot graphics documentation
 * fix '---' rendering
 
 UEFI:
 
 * add missing pointer check after memory allocation in efidebug
 * replace duplicate functions efi_dp_append and efi_dp_concat
 * support fmp versioning for multi bank update
 * avoid using dm_scan_other() in EFI app
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmWj6wMACgkQhO4vgnE3
 U0s5Kg/+Jl3SYJ13PHW+qe7JZoKdAiv5QV5ZgieYnks01fFqmwRcOc7VyW+uRNZg
 99DSeYbZ+J2+d0PYC6gwwG3oAQ0FwxYMRXViRHuD0jaS3U7o4VVR2gGve2zjGia/
 ErTrlxKs0C5hksM3ZPLkwjt6eDbRpixWINHwdLlqAPdTfyeB65VnAXUae6KzvIKo
 M7f14EYxurSZWRzUkgwChynn970Eld1dEXAB99Jn8qBoTvgVyvY9kgJWwG68m+fJ
 V5uCTyIhA0/vCFqFpZxuN4XqG4jTiVFWcJh0Q3wP8VvKmUEI/tVHCCWAqWmkcTap
 CT0368NZ3xXETl5xGnIjutjRLIgPkjPe5M/yCvwPsMQcF32tOOg3R7m2ezq4Wnl8
 xl0W8ZBkejxMcQWfcJIKzxPmJHCvY4KWcMrseYaEpzLvomXzRr3CycOW5pVMTnWk
 5kyteYsP0ikScybqOlDQyCotIJYdrGu811yD/4+iVrpTTWiHoJPihvTK5eHcFXfK
 j20de21k59TgQKfcj+UjY/d3j3cHsOfam5sz/QI5uWW1MXrCO36C+6t2qeNQFLUh
 HlWjndp/jj3d/Hw77dG9FdMAmeoJ6UWR6Ky6vzvOxcW1jEKjcs5g2cn73psmX2TF
 TA9SAGprtziV4tO0e+n8tMPaZDNmqLeTA6f4EniCIlxqzd3dgl4=
 =+F6g
 -----END PGP SIGNATURE-----

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

Pull request efi-2024-04-rc1

Documentation:

* update coreboot graphics documentation
* fix '---' rendering

UEFI:

* add missing pointer check after memory allocation in efidebug
* replace duplicate functions efi_dp_append and efi_dp_concat
* support fmp versioning for multi bank update
* avoid using dm_scan_other() in EFI app
2024-01-14 09:34:14 -05:00
Marek Vasut
645add770e ARM: imx: Set stdio to serial on Data Modul i.MX8M Mini/Plus eDM SBC
In case CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are enabled, the console
stdin, stdout, stderr must be defined in environment. Define the default
settings to fix the following warning on boot:

"
In:    No input devices available!
Out:   No output devices available!
Err:   No error devices available!
"

Sort the default environment as well.

Signed-off-by: Marek Vasut <marex@denx.de>
2024-01-13 15:02:47 -03:00
Marek Vasut
eba41982cf ARM: imx: Set stdio to serial on DH i.MX8M Plus DHCOM
In case CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are enabled, the console
stdin, stdout, stderr must be defined in environment. Define the default
settings to fix the following warning on boot:

"
In:    No input devices available!
Out:   No output devices available!
Err:   No error devices available!
"

Sort the default environment as well.

Signed-off-by: Marek Vasut <marex@denx.de>
2024-01-13 15:02:24 -03:00
Heinrich Schuchardt
55125bbfb4 cmd: efidebug: check pointer after memory allocation
After calling efi_alloc() we must check that the return value is not NULL.

Fixes: f01c961ee3 ("cmd: efidebug: add uri device path")
Addresses-Coverity-ID: 477185 Dereference null return value
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13 18:17:47 +01:00
Masahisa Kojima
b20c9c3d86 efi_loader: support fmp versioning for multi bank update
This commit stores the firmware version into the array
of fmp_state structure to support the fmp versioning
for multi bank update. The index of the array is identified
by the bank index.

This modification keeps the backward compatibility with
the existing versioning feature.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13 18:17:47 +01:00
Masahisa Kojima
af7a34acfd fwu: fix fwu_get_image_index interface
The capsule update uses the DFU framework for updating
storage. fwu_get_image_index() currently returns the
image_index calculated by (dfu_alt_num + 1), but this is
different from the image_index in UEFI terminology.

Since capsule update implementation calls dfu_write_by_alt
function, it is better that FWU returns the dfu_alt_num.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13 18:17:47 +01:00
Ilias Apalodimas
f19171c919 efi_loader: Clean up efi_dp_append and efi_dp_concat
Looking back at the initrd storing functionality, we introduced three
functions, efi_dp_append_or_concatenate(), efi_dp_append/concat(). In
hindsight we could have simplified that by a lot. First of all none of
the functions append anything. They all allocate a new device path and
concatenate the contents of two device paths in one. A boolean parameter
controls the final device path -- if that's true an end node is injected
between the two device paths.

So let's rewrite this and make it a bit easier to read. Get rid of
efi_dp_append(), efi_dp_concat() and rename
efi_dp_append_or_concatenate() to efi_dp_concat(). This is far more
intuitive and the only adjustment that is needed is an extra boolean
argument on all callsites.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13 18:17:47 +01:00
Grzegorz Szymaszek
753f76e417 doc: fix three-dash references in reStructuredText
The "Sending patches" and "Patman patch manager" documents refer to the
three-dash, "---", that separates patch parts. The symbol is written in
the documentation in the same form as it is in actual patches: as three
U+002D HYPHEN-MINUS characters. When building the documentation, Sphinx
converts this symbol to a U+2014 EM DASH, that is invalid in this case.

Make the three-dash symbol a reStructuredText inline literal to prevent
its conversion; that is, enclose it in a pair of double backquotes (`).

Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-01-13 18:17:46 +01:00
Bin Meng
86efd04934 doc: coreboot: Update stale graphics enabling instructions
With latest coreboot (e.g.: v4.22.01), the instructions to enable
graphics support has changed. Refresh the doc.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2024-01-13 18:17:46 +01:00
Masahisa Kojima
6caf3a3e89 efi_loader: remove unused members from struct efi_disk_obj
part and dev_index in struct efi_disk_obj are not used,
let's remove it.

This commit also removes the invalid structure comment
for @dev, it does not exist.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-01-13 18:17:46 +01:00
Simon Glass
50662260c4 efi: Avoid using dm_scan_other()
This function is defined by bootstd so using it precludes using that
feature. Use the board_early_init_r() feature instead.

Nove the affected code into a new file, so that it is clear that
this relates to board init.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-01-13 18:17:46 +01:00
Masahisa Kojima
5a0970ee8c efi_loader: fix iteration of FMP protocols
If one of the FMP protocols fails when calling GetImageInfo(),
populating the ESRT ends up with failure and other FMP protocols
are not added to the ESRT. We should still add all other FMP
protocols to the ESRT.

With this commit, iteration of all FMP protocols continues
even though one of the FMP protocols fails.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-13 18:17:46 +01:00
Lukasz Majewski
b19ef134f5 defconfig: xea: Change default spi-nor memory bus to 2 (single binary)
After the re-sync with Linux kernel (v6.0) of the XEA DTS
(SHA1: 7d08ddd09b) the alias
for SPI bus, to which SPI-NOR  memory is connected, has changed from
'spi3' to 'spi2'.

To be in sync with current u-boot's xea dts, the default bus number
(which allows running 'sf probe' without any extra parameters given)
has been adjusted.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-01-12 15:02:09 -03:00
Primoz Fiser
3233349fa6 imx: imx9: fixup thermal trips from fuses
Read i.MX9 CPU temp grade from fuses and fixup thermal trips in Linux
device-tree accordingly.

Based on commit 0543a1ed27 ("imx8m: fixup thermal trips")

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
2024-01-12 15:01:55 -03:00