Commit Graph

93361 Commits

Author SHA1 Message Date
6dfa30fc8b sunxi: pinephone: force 1.2b magnetometer
based on: <https://github.com/Tow-Boot/U-Boot/pull/2>
2024-07-02 17:42:55 +00:00
Tom Rini
8937bb265a Merge patch series "Bug-fixes for a few boards (reduced series)"
Simon Glass <sjg@chromium.org> says:

This series includes fixes to get some rockchip and nvidia boards
working again. It also drops the broken Beaglebone Black config and
provides a devicetree fix for coral (x86).
2024-06-28 13:55:10 -06:00
Simon Glass
d780965927 Drop the special am335x_boneblack_vboot target
Now that am335x_evm boots OK on the Beaglebone black, drop the latter
and update the docs to cover the change.

Also add a few updates about 'make fit' and drop the note about the
security review, as U-Boot's verified boot has had quite extensive
review now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-06-28 13:54:52 -06:00
Simon Glass
37323aec51 rockchip: bob: kevin: Disable dcache in SPL
This causes a hang, so disable it. Unfortunately the RAM-size fix does
not resolve the problem and I am unsure what is wrong. As soon as the
cache is enabled the board appears to hang.

Fixes: 6d8cdfd153 ("rockchip: spl: Enable caches to speed up checksum validation")

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-06-28 13:54:52 -06:00
Simon Glass
024767e66d spl: Allow ATF to work when dcache is disabled
The dcache may not be enabled in SPL. Add a check to avoid trying to
use an undefined function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-06-28 13:54:52 -06:00
Simon Glass
ac91baea6d power: regulator: Handle autoset in regulators_enable_boot_on()
With a recent change, regulators_enable_boot_on() returns an error if a
regulator is already set. Check for and handle this situation.

Fixes: d99fb64a98 power: regulator: Only run autoset once for each regulator
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
2024-06-28 13:54:52 -06:00
Simon Glass
bbc46241a1 rockchip: veyron: Add logging for power init
Add better logging for power init so that CONFIG_LOG_ERROR_RETURN can
be enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2024-06-28 13:54:52 -06:00
Simon Glass
c2484b43bf x86: Set a board-size limit for chromebook_link
Set a size limit for this board so that we get a build error if it grows
too much.

Note that the limit is approximately, since it does not include the FDT,
microcode and fdtmap, which can change in size. However this board is
fairly stable, so overflowing this limit will likely result in the image
not fitting in the ROM space available for U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-06-28 13:54:52 -06:00
Simon Glass
092b6ec65c tpm: Avoid code bloat when not using EFI_TCG2_PROTOCOL
It does not make sense to enable all SHA algorithms unless they are
needed. It bloats the code and in this case, causes chromebook_link to
fail to build. That board does use the TPM, but not with measured boot,
nor EFI.

Since EFI_TCG2_PROTOCOL already selects these options, we just need to
add them to MEASURED_BOOT as well.

Note that the original commit combines refactoring and new features,
which makes it hard to see what is going on.

Fixes: 97707f12fd tpm: Support boot measurements
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2024-06-28 13:54:52 -06:00
Simon Glass
8a9040e3ef nvidia: nyan-big: Disable debug UART
This cannot be enabled early in boot since some other init is needed.
At this point it is unclear exactly what init is needed, so disable
the debug UART to avoid a hang.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-06-28 13:54:52 -06:00
Frank Wunderlich
efee71ab4d arm: mediatek: fix ram init for mt7622 (decrease to 1G)
RAM init on mt7622 based bananapi R64 is broken since v2023.10.

Increasing the mem-map does not help here, so i reduced the maximum
available ram in get_ram_size call from 2G to 1G (board has only 1G).

Fixes: 5fd6d4c7b3 ("arm: mediatek: retrieve ram_base from dts node for armv8 platform")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
2024-06-27 10:52:39 -06:00
Conor Dooley
c38af2ccfd board: mpfs_icicle: change maintainer to Conor
Padmarao is leaving Microchip soon, and suggested that I should take
over maintaining the Icicle in U-Boot in his stead.

Suggested-by: Padmarao Begari <padmarao.begari@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2024-06-27 10:52:39 -06:00
Bryan Brattlof
c53b344475 board: beagle: beagleplay: enable OF_SYSTEM_SETUP
Unfortunately when enabling FDT fixups for the AM62x family of SoCs and
moving TF-A to the bottom of RAM we missed the BeaglePlay. This is
causing Linux's memory allocator to clobber TF-A and break its boot.

Enable OF_SYSTEM_SETUP to fixup the kernel's FDT to inform it of the
actual location of the firmware

CC: Andrew Davis <afd@ti.com>
CC: Nishanth Menon <nm@ti.com>
CC: Robert Nelson <robertcnelson@gmail.com>
Reported-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Acked-by: Chirag Shilwant <c-shilwant@ti.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
2024-06-24 14:49:59 -06:00
Tom Rini
9e9f78f7aa Prepare v2024.07-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-06-24 13:29:32 -06:00
Tom Rini
58f7ae116c Merge tag 'tpm-master-24062024' of https://source.denx.de/u-boot/custodians/u-boot-tpm
When the EFI TCG measurement code moved from EFI to the TPM subsystem for
general use some prototypes changed from returning efi_status_t to int,
which is more appropriate for the non-EFI APIs. However, some of the
EFI callsites never changed and we ended up assigning the int value to
efi_status_t.

This is unlikely to cause any problems, apart from returning invalid
values on failures and violating the EFI spec.
2024-06-24 09:49:37 -06:00
Ilias Apalodimas
b73948c785 efi_loader: fix the return values on efi_tcg
A while back we moved the core functions of the EFI TCG protocol to the
TPM APIs in order for them to be used with bootm, booti etc.
Some prototypes changed from returning efi_status_t to int, which is more
appropriate for the non-EFI APIs. However, some of the EFI callsites never
changed and we ended up assigning the int value to efi_status_t.

This is unlikely to cause any problems, apart from returning invalid
values on failures and violating the EFI spec. Let's fix them
by looking at the new return code and map it to the proper EFI return
code on failures.

Fixes: commit 97707f12fd ("tpm: Support boot measurements")
Fixes: commit d6b55a420c ("efi_loader: startup the tpm device when installing the protocol")
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-06-24 08:38:06 +03:00
Ilias Apalodimas
27d496627e tpm: fix the return code, if the eventlog buffer is full
We currently return 'No space left on device' if the eventlong buffer
we allocated is not enough. On a similar check later on that function
during the call to tcg2_log_init() we return 'No buffer space
available'. So switch both error codes to -ENOBUFS since we are always
checking a buffer and not a device.

Fixes: commit 97707f12fd ("tpm: Support boot measurements")
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-06-24 08:37:56 +03:00
Tom Rini
c326bb6792 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb 2024-06-23 18:06:32 -06:00
Tom Rini
099755f900 Merge tag 'doc-2024-07-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request doc-2024-07-rc5-2

Documentation:

* Fix broken references to pytest suite and test writing
* Fix links to FIT documentation
* Add capsule documentation for TI K3 devices
2024-06-23 18:06:18 -06:00
Jonathan Humphreys
271ca9ef8a doc: board: ti: Add capsule documentation for TI K3 devices
Added introductory documentation about capsule support for TI devices,
including links to more detailed information.

Also added a note in the build secction that points to the host package
dependency docs.

This patch is followup from a request in the series introducing capsule
update for TI boards.
https://lore.kernel.org/r/20240618145058.552eapp5iiz772ej@hardcore

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-06-22 17:04:19 +02:00
Alexander Dahl
7a8bd3fa31 doc: develop: testing: Fix reference to test writing section
Add missing colon in :doc: link.

Fixes: fc32833145 ("doc: Explain briefly how to write new tests")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-06-22 17:03:01 +02:00
Alexander Dahl
7ec3b48908 doc: develop: testing: Fix broken reference to pytest suite help
This should have been adapted directly with or after
v2021.01-693-gca6583d4e08 ("doc: move test/README to HTML
documentation") or v2021.01-694-g0157619d5c8 ("doc: move
test/py/README.md to HTML documentation") already.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-06-22 17:02:23 +02:00
Heinrich Schuchardt
3fc9de484a boot: links to FIT documentation in Kconfig
Correct the links to the FIT documentation in boot/Kconfig.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-06-22 17:02:23 +02:00
Heinrich Schuchardt
dfb28817c1 doc: FIT links in develop/uefi/uefi.rst
Correct the links to the FIT documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-06-22 17:02:23 +02:00
Heinrich Schuchardt
082b4675ff cmd: link to doc/usage/fit/x86-fit-boot.rst
Replace the outdated link.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-06-22 17:02:23 +02:00
Caleb Connolly
0db3941a24 usb: dwc3: add newlines to dev_vdbg calls in ep0
For some reason none of these debug prints have newlines, resulting in a
"fun" surprise when attempting to debug this driver.

The other parts of the dwc3 driver have newlines, add them here too (and
fix some minor nearby indent issues to make checkpatch happy).

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2024-06-19 06:15:37 +02:00
Heinrich Schuchardt
4477e425d5 usb: informative message if no controller
The message 'No working controllers found' provides no clue that this
refers to USB controllers.

Provide a message that refers to USB.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-06-19 06:14:55 +02:00
Tom Rini
fe2ce09a07 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-watchdog
- cyclic: Rise default CYCLIC_MAX_CPU_TIME_US to 5000 (Jiaxun)

CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=371&view=results
2024-06-18 08:34:56 -06:00
Jiaxun Yang
1fd754cebd cyclic: Rise default CYCLIC_MAX_CPU_TIME_US to 5000
The default value CYCLIC_MAX_CPU_TIME_US was 1000, which is
a little bit too low for slower hardware and sandbox.

On my MIPS Boston FPGA board with interaptiv CPU, wdt_cyclic
can easily take 3200 us to run.

On azure pipeline sandbox_clang, wdt_cyclic some times goes
beyond 1300 us.

Raise default value to 5000, which is the value already taken
by octeon_nic32. This is still sufficent to maintain system
responsiveness.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2024-06-18 12:34:37 +02:00
Tom Rini
16324b43db Merge tag 'u-boot-nand-20240617' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash
Pull request for u-boot-nand-20240617

The first patch is by Arseniy Krasnov and adds support for OTP area
access on MX30LFxG18AC chip series.

The second patch is by John Watts and adds MTD dependency in Kconfig
for UBI.

The last patch is by Ravi Minnikanti and fixes bitflip return value on
page read.
2024-06-17 09:27:28 -06:00
Tom Rini
4d07da3333 Merge tag 'u-boot-stm32-20240617' of https://source.denx.de/u-boot/custodians/u-boot-stm
STM32MP1:
 - Ping IWDG on exit from PSCI suspend code
2024-06-17 09:26:13 -06:00
Marek Vasut
9968e8dbf3 ARM: dts: stm32: Ping IWDG on exit from PSCI suspend code
Make sure the OS would not get any spurious IWDG pretimeout IRQ
right after the system wakes up. This may happen in case the SoC
got woken up by another source than the IWDG pretimeout and the
pretimeout IRQ arrived immediately afterward, but too late to be
handled by the suspend main loop. In case either of the IWDG is
enabled, ping it first and then return to the OS.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2024-06-17 09:52:38 +02:00
Ravi Minnikanti
aad8aa56d9 mtd: nand: pxa3xx: Incorrect bitflip return on page read
Once a page is read with higher bitflips all subsequent reads
are returning the same bitflip value even though they have none.
max_bitflip variable is not being reset to 0 across page reads.

This is causing problems like incorrectly
marking erase blocks bad by UBI and causing read failures.

Verified the change with both MTD reads and UBI.
This change is inline with other NFC drivers.

Sample error log where a block is marked bad incorrectly:

ubi0: fixable bit-flip detected at PEB 125
ubi0: run torture test for PEB 125
ubi0: fixable bit-flip detected at PEB 125
ubi0 error: torture_peb: read problems on freshly erased PEB 125,
must be bad
ubi0 error: erase_worker: failed to erase PEB 125, error -5
ubi0: mark PEB 125 as bad

Link: https://lore.kernel.org/all/ea0422cd-a8e6-3c36-f551-a0142893301b@marvell.com
Signed-off-by: rminnikanti <rminnikanti@marvell.com>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: rminnikanti <rminnikanti@marvell.com>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-06-17 09:43:45 +02:00
John Watts
2978e716b2 ubi: Depend on MTD
UBI required MTD to build correctly, add it as a Kconfig dependency.

Link: https://lore.kernel.org/all/20240411-mtd-v1-1-fe300f6ab657@jookia.org
Signed-off-by: John Watts <contact@jookia.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutins.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-06-17 09:43:45 +02:00
Arseniy Krasnov
9119570eee mtd: rawnand: macronix: OTP access for MX30LFxG18AC
Support for OTP area access on MX30LFxG18AC chip series.

Link: https://lore.kernel.org/all/20231130112405.92196-1-avkrasnov@salutedevices.com
Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-06-17 09:43:45 +02:00
Tom Rini
7d602334f6 Merge tag 'efi-2024-07-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2024-07-rc5-2

Documentation:

* Correct links and board names in PHYTEC board descriptions.
* Describe UEFI measured boot.
* Fix typos in include/bootmeth.h.
* Fix link reference to general verified boot docs.

UEFI:

* Measure device-tree into PCR1 instead of PCR0
2024-06-16 09:10:53 -06:00
Tom Rini
d571e8c544 Merge tag 'u-boot-rockchip-20240614' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/21111

- pmic fix for rk8xx;
- pinctrl fix for rk3188/rv1126/rk3588;
- mkimage fix for rockcihp "-l" option;
2024-06-16 09:08:27 -06:00
Alexander Dahl
d1499a8b3f doc: Fix link reference to general verified boot docs
Fixes: ad29e08b79 ("doc: Bring in FIT signature files")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-06-16 10:37:10 +02:00
Ilias Apalodimas
00cac74561 doc: describe UEFI measured boot
We currently only describe the process to enable measured boot using
bootm. Describe the UEFI requirements as well which predate bootm.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-06-16 09:46:00 +02:00
Ilias Apalodimas
d69759aec2 tpm: measure DTB in PCR1 instead of PCR0
The PC client spec [0], doesn't describe measurements for DTBs. It does
describe what do to for ACPI tables though.

There is a description for ACPI in 3.3.4.1 PCR[0] – SRTM, POST BIOS,
and Embedded Drivers and they explicitly mention ACPI in there. There's
no mention of ACPI in 3.3.4.2 PCR[1] – Host Platform Configuration.

However, in Figure 6 --  PCR Mapping of UEFI Components ACPI is shown
in PCR1. The general description also mentions PCR0 is for code and PCR1
is for data such as ACPI and SMBIOS.

So let's switch over the DTB measurements to PCR1 which seems a better
fit.

[0] https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
2024-06-16 09:45:57 +02:00
Daniel Schultz
38720c8f94 doc: board: phytec: phycore-am64: Fix phyBOARD Name
The Carrier-Board for the pyhCORE-AM64x is called phyBOARD-Electra.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-16 09:39:09 +02:00
Daniel Schultz
48752c5994 doc: board: phytec: phycore-am64x: Fix Link to Documentation
We moved our documentation to another hoster and therefore the URL
changed. Point to the latest documentation instead of release versions
to not link out-dated documentation.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-06-16 09:39:09 +02:00
Daniel Schultz
88b2eb0c39 doc: board: phytec: phycore-am62x: Fix Link to Documentation
We moved our documentation to another hoster and therefore the URL
changed. Point to the latest documentation instead of release versions
to not link out-dated documentation.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
2024-06-16 09:39:09 +02:00
Mattijs Korpershoek
06eb1aa62e bootstd: Fix a handful of doc typos in bootmeth
Fix some trivial typos found by browsing the code.
Done with flyspell.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Guillaume La Roque<glaroque@baylibre.com>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
2024-06-16 09:39:09 +02:00
Tom Rini
1811ed5de8 Merge tag 'u-boot-imx-master-20240614' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/21125

- Update imx8mn_s2 DDR initialization to fix USB boot.
2024-06-14 10:37:53 -06:00
Michael Trimarchi
09d63e647a board: imx8mn_s2: Update timing with production one
The timing upstream was wrong corresponding to the production.
This come evident after commit b614ddb5d3
(ddr: imx: Save the FW loading if it hasn't changed). This
change fix booting from usb

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-06-14 11:42:19 -03:00
Tom Rini
2248c96ea1 Merge tag 'u-boot-stm32-20240614' of https://source.denx.de/u-boot/custodians/u-boot-stm
STM32MP1:
 _ Fix spl compilation warning
 _ Fix optee_get_reserved_memory()
 _ Fix livetree conversion on STM32MP15xx DHSOM
2024-06-14 08:13:54 -06:00
Marek Vasut
55df13d930 ARM: stm32: Fix livetree conversion on STM32MP15xx DHSOM
Unlike fdt_node_check_compatible() which returns 0 if node is compatible,
ofnode_device_is_compatible() return true which is non-zero if node is
compatible. The intention of the code is to exit from the function in
case the node is not compatible with "micrel,ks8851-mll". Add the missing
invert into the conditional to reinstate original behavior.

This exposes a follow up problem caused by conversion to DM based FMC2 EBI
driver, where the FMC2 EBI is not configured when accessed by this code.
Probe the KS8851 MAC, which also configures the FMC2 EBI as a dependency,
so that the KS8851 MAC CCR register can be accessed over the FMC2 EBI bus
and checked for EEPROM present bit.

Fixes: 5a605b7c86 ("board: dhelectronics: stm32mp1: convert to livetree")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2024-06-14 13:25:06 +02:00
Patrice Chotard
12dfaa101b stm32mp1: spl: Update optee_get_reserved_memory() return value
In case node "/reserved-memory/optee" is not found, return -ENOENT
instead of 0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-06-14 13:25:06 +02:00
Patrice Chotard
9c9eeb6e37 stm32mp1: spl: Fix compilation warnings
Fix the following compilation warnings :

../arch/arm/mach-stm32mp/stm32mp1/spl.c: In function 'stm32_init_tzc_for_optee':
../arch/arm/mach-stm32mp/stm32mp1/spl.c:148:37: warning: 'optee_size' may be used uninitialized [-Wmaybe-uninitialized]
  148 |         tee_shmem_base = optee_base + optee_size - CFG_SHMEM_SIZE;
      |                          ~~~~~~~~~~~^~~~~~~~~~~~
../arch/arm/mach-stm32mp/stm32mp1/spl.c:137:30: note: 'optee_size' was declared here
  137 |         uint32_t optee_base, optee_size, tee_shmem_base;
      |                              ^~~~~~~~~~
../arch/arm/mach-stm32mp/stm32mp1/spl.c:148:37: warning: 'optee_base' may be used
uninitialized [-Wmaybe-uninitialized]
  148 |         tee_shmem_base = optee_base + optee_size - CFG_SHMEM_SIZE;
      |                          ~~~~~~~~~~~^~~~~~~~~~~~
../arch/arm/mach-stm32mp/stm32mp1/spl.c:137:18: note: 'optee_base' was declared here
  137 |         uint32_t optee_base, optee_size, tee_shmem_base;
      |                  ^~~~~~~~~~

Fix also the following checkpatch "check" :

CHECK: Prefer kernel type 'u32' over 'uint32_t'
37: FILE: arch/arm/mach-stm32mp/stm32mp1/spl.c:137:
+	uint32_t optee_base = 0, optee_size = 0, tee_shmem_base;

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-06-14 13:25:06 +02:00