On 10/1/2026 5:04 AM, Dawid Osuchowski wrote:
From: Karol Wachowski <[email protected]>

ivpu_hw_ip_soc_cpu_boot() and pwr_island_delay_set() keep the result of
their per-generation switch in locals that are left uninitialized on the
path past the last case. Building with -Wmaybe-uninitialized reports ret,
post, post2 and status; Kbuild disables that warning for GCC, so it does
not show up in a normal build.

Let every case return directly instead, so no local is needed.
ivpu_hw_ip_soc_cpu_boot() now dispatches on its own, with the debug
message moved ahead of the switch so that the boot mode is logged before
the boot registers are written, and the power island delay values move
into per-generation helpers. Neither switch has a default: label, so
-Wswitch reports any enum vpu_hw_ip value added later that is not
handled, and the path past the switch returns -EINVAL.

Build the power island delay values from zero instead of reading the
registers first. POST_DLY, POST1_DLY and POST2_DLY together span every
writable bit of PWR_ISLAND_EN_POST_DLY, and STATUS_DLY spans every
writable bit of PWR_ISLAND_STATUS_DLY, so the read-modify-write only
fetched bits that are immediately overwritten.

The boot mode is now logged even when the boot fails; no other functional
changes.

Signed-off-by: Karol Wachowski <[email protected]>
Signed-off-by: Dawid Osuchowski <[email protected]>

Reviewed-by: Jeff Hugo <[email protected]>

Reply via email to