Commit Graph
3 Commits
Author SHA1 Message Date
snlavaise 8e92d068c3 rtwo: replace debug blink instrumentation with a boot progress bar
Confirmed on hardware that the chainload boots. The per-call blink
instrumentation lived in hot paths (clk_enable/qcom_gate_clk_en/serial
probe) and did a full 10 MiB framebuffer clear + cache flush on every
call, noticeably slowing boot. Replaced with a single progress bar
hooked once per INITCALL step (include/initcall.h) plus an explicit
100% draw at the end of board_late_init(), touching only the bar's
rectangle instead of the whole screen. Kept the real fixes from the
same patch (qcom,kalama-gcc-v2 GCC compatible, the IS_ERR(clk) handling
in serial_msm_geni.c) untouched.
2026-09-17 01:13:01 -03:00
snlavaiseandClaude Sonnet 5 01a9184178 clk: qcom: sm8550: match downstream kalama-gcc-v2 GCC compatible
The rtwo (Motorola Edge 40 Pro, SM8550/kalama) vendor DTB -- used by
U-Boot as its own control FDT (see board.c board_fdt_blob_setup(),
which sources it from the ABL-supplied vendor DTB rather than a
compiled-in one) -- describes the GCC with the downstream binding
"qcom,kalama-gcc-v2" instead of mainline's "qcom,sm8550-gcc". Same
hardware/register map (confirmed the vendor DT's raw clock IDs, e.g.
0x6b/0x7f/0x80, match GCC_QUPV3_WRAP1_S7_CLK/M_AHB_CLK/S_AHB_CLK from
dt-bindings/clock/qcom,sm8550-gcc.h 1:1), so reusing sm8550_gcc_data
for the new compatible is correct.

Without this alias the GCC driver never binds to that node, so any
clk_get() depending on it (e.g. the debug UART's "se" clock) returns
an error that is not -ENOENT/-ENODATA.

serial: msm_geni: don't clk_enable() an unfiltered error pointer

devm_clk_get_optional() only converts -ENOENT/-ENODATA to NULL; any
other error (such as the unbound-GCC case above) is returned as-is.
msm_serial_probe() passed that error pointer straight to clk_enable(),
which dereferences it in clk_valid() -> hard hang with no console, no
panic message, nothing (CONFIG_PANIC_HANG masks it further). Clamp any
IS_ERR(clk) to NULL so it degrades to "no clock" like the two error
codes that were already handled.

Debug: add 7-segment digit instrumentation for UART-less bring-up

Isolating the hang above required visual output on a device with no
serial console, no fastboot response while hung, and no crash log.
INITCALL() and a handful of clk/serial entry points now draw a large
two-digit 7-segment style zone number straight onto the ABL's
framebuffer at 0xb8000000 so the exact call site can be read directly
off the screen instead of inferred from blink/bar-count/binary-stripe
patterns, which gave contradictory readings across multiple attempts.
Zone 23 (entry to clk_enable()) is what pinpointed the hang above.
Harmless to leave in; candidate for removal once the rtwo port is
past active UART-less bring-up.

Confirmed on hardware: `fastboot boot` of this build reaches a live
U-Boot console (banner + prompt) on the rtwo. See project notes
rtwo-uboot-clk-compat-fix / rtwo-bring-up-estado for the full
debugging trail.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ADQrjdgE8awSA7TSaGgfr
2026-09-16 23:16:16 -03:00
snlavaise 391981275c Import U-Boot v2026.07 (unmodified upstream source, base for rtwo patches) 2026-09-16 23:15:56 -03:00