Re: [PATCH v7 2/2] hwrng: starfive: rework clk/reset teardown order for JHB100

From: Herbert Xu

Date: Fri Sep 04 2026 - 05:57:35 EST


On Wed, Aug 12, 2026 at 10:34:01AM +0800, lianfeng.ouyang wrote:
> From: Lianfeng Ouyang <lianfeng.ouyang@xxxxxxxxxxxxxxxx>
>
> Rework the StarFive TRNG driver to address hardware-specific requirements
> for JHB100 SoC. To avoid reset-domain crossing glitches, the driver now
> ensures clocks are gated before asserting reset during teardown for
> JHB100, while JH7110 retains the original reset-first sequence.
>
> Add per-compatible match data (struct starfive_trng_data) describing the
> clock/reset teardown order, a new "starfive,jhb100-trng" compatible, and
> select the ordering from it.
>
> Fix the runtime-PM get/put balancing across the init/read/reseed/cleanup
> paths, manage PM and the clk/reset teardown via devm so all error paths
> unwind correctly, run the SEU-triggered reseed from a workqueue instead
> of hard IRQ, and serialise the command sequences with a mutex.
>
> Signed-off-by: Lianfeng Ouyang <lianfeng.ouyang@xxxxxxxxxxxxxxxx>
> ---
> MAINTAINERS | 2 +-
> drivers/char/hw_random/jh7110-trng.c | 295 +++++++++++++++++++++------
> 2 files changed, 239 insertions(+), 58 deletions(-)

Sashiko wasn't able to apply your patches. Please try rebasing
and reposting.

https://sashiko.dev/#/patchset/20260812023401.44149-1-lianfeng.ouyang%40starfivetech.com

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt