Re: [PATCH 2/6] crypto: jz4780-rng: Make ingenic CGU driver use syscon
From: Paul Burton <hidden>
Date: 2017-08-21 16:04:24
Also in:
linux-mips
Attachments
- signature.asc [application/pgp-signature] 833 bytes
From: Paul Burton <hidden>
Date: 2017-08-21 16:04:24
Also in:
linux-mips
Hi PrasannaKumar, On Sunday, 20 August 2017 09:12:12 PDT PrasannaKumar Muralidharan wrote:
quoted
Could you instead perhaps: - Just add "syscon" as a second compatible string to the CGU node in the device tree, but otherwise leave it as-is without the extra cgu_registers node. - Have your RNG device node as a child of the CGU node, which should let it pick up the regmap via syscon_node_to_regmap() as it already does. - Leave the CGU driver as-is, so it can continue accessing memory directly rather than via regmap.As per my understanding, CGU driver and syscon will map the same register set. Is that fine?
That should work fine.
It's only risky if you have 2 drivers using the same registers in ways that
might race with one another or clobber one another's data. In this case each
of the 2 drivers is using a different subset of registers that just happen to
be in the same address range, so there shouldn't be an issue.
Thanks,
Paul