[PATCH 0/4] rng: msm: fixes for MSM8916
Sam Day
me at samcday.com
Mon Jan 27 08:48:45 CET 2025
The msm-rng driver is currently broken on MSM8916.
The first issue is that the core clock isn't defined and thus not being
enabled before registers in the PRNG block are accessed.
The second issue is that the enable method is only initializing the PRNG
registers if the block is *already* initialized. This would have likely
caused issues elsewhere once the driver was in more active use, but the
problems on MSM8916 are immediate: trying to modify the state of LFSR_CFG
causes SErrors, presumably because this register is protected by TZ.
I also included a couple of extra patches while I'm in the neighborhood.
One is to improve the logging in apq8016 clk_enable (which would have
better surfaced the first issue). The other changes msm-rng driver slightly
to only enable its core clock when it's needed (similar to how the kernel
does it).
Signed-off-by: Sam Day <me at samcday.com>
---
Sam Day (4):
clk/qcom: apq8016: add PRNG_AHB_CLK
rng: msm: don't enable PRNG if it's already enabled
clk/qcom: apq8016: improve clk_enable logging
rng: msm: keep core clock disabled when PRNG not in use
drivers/clk/qcom/clock-apq8016.c | 9 +++++----
drivers/rng/msm_rng.c | 13 +++++++++++--
2 files changed, 16 insertions(+), 6 deletions(-)
---
base-commit: 8a2a71a4eec7afdca6377ee46b1ed7e78ec692c9
change-id: 20250126-msm-rng-fixes-f5a722a9492c
Best regards,
--
Sam Day <me at samcday.com>
More information about the U-Boot
mailing list