From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Burton Subject: Re: [PATCH 2/6] crypto: jz4780-rng: Make ingenic CGU driver use syscon Date: Mon, 21 Aug 2017 09:04:16 -0700 Message-ID: <45556677.8n3yGzOkJs@np-p-burton> References: <20170817182520.20102-1-prasannatsmkumar@gmail.com> <3563032.h0vdzx9HfC@np-p-burton> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8306877.L2Sq6hHNpB"; micalg=pgp-sha256; protocol="application/pgp-signature" Cc: , Herbert Xu , Rob Herring , Mark Rutland , Ralf Baechle , Michael Turquette , , "David S . Miller" , Paul Cercueil , To: PrasannaKumar Muralidharan Return-path: Received: from mailapp01.imgtec.com ([195.59.15.196]:6272 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754270AbdHUQEY (ORCPT ); Mon, 21 Aug 2017 12:04:24 -0400 In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org List-ID: --nextPart8306877.L2Sq6hHNpB Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi PrasannaKumar, On Sunday, 20 August 2017 09:12:12 PDT PrasannaKumar Muralidharan wrote: > > 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 --nextPart8306877.L2Sq6hHNpB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEELIGR03D5+Fg+69wPgiDZ+mk8HGUFAlmbBIAACgkQgiDZ+mk8 HGVe1Q/6Au2TClXs/W79i3QnmUiwaV9otdtoqCPYhvX6pFQ3vlrPt+Dn1FsvoRwL dccm/fueHvkdYvueUbkqmjUDuiWrt3tv4YoVnih81gtmBWVeF9hQ9hLqd3nlZhbS 9aFryozQ8mO6AHP4N58Iv8aPubtoYunDasCdMZ72cq9T3SxIaAl9B2AEQEls5JO8 mgESbB7kGrv5d484ktOGGRr4KjNlCxFxOVWxZq7zPQxuCMRbsIAZEnpW9ei1OXuV b2VGa/o8oz3WnPiCrxwgNHH7ckp6LBjdtv4Rq+oxiOs9ONWRZoXXC0ygvdc1Pv6a 9Y1DCZWzQrzali8g1YAytuEQgql+i/xId9uoNxQy3Fw0SGIRsNkEXjqASFzUF/wb Z/8jvxuia4EQEUsgb5UWlDP2zy2q7zCCj/IB3pvAn9u4vD8WtQRrZIhR7W0qOd3f P8Q1Eq/u4rnyPdNV9x7TrFSRlIJ90FTytYCfKDu0qeGcsfYi39vrVPEEESgzSPmM UVD4/biG80szEmkCNeGFsaViNoUCE1/5sw4nvCmStsH0IIYaXHV3hLDi4J0L90JY PsDssx1NUF+ySLeaNYLfIfg5ySRJlnFRN7kdC2fcp85D1bx4xBc5qqDuo2MIXR5K G9jZOj2H2DzoVI22SW2mbRJYSwTWIApkMzyfBXPcGUByUm1QCQM= =fpS/ -----END PGP SIGNATURE----- --nextPart8306877.L2Sq6hHNpB-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailapp01.imgtec.com ([195.59.15.196]:35186 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23994781AbdHUQEaybhH3 (ORCPT ); Mon, 21 Aug 2017 18:04:30 +0200 From: Paul Burton Subject: Re: [PATCH 2/6] crypto: jz4780-rng: Make ingenic CGU driver use syscon Date: Mon, 21 Aug 2017 09:04:16 -0700 Message-ID: <45556677.8n3yGzOkJs@np-p-burton> In-Reply-To: References: <20170817182520.20102-1-prasannatsmkumar@gmail.com> <3563032.h0vdzx9HfC@np-p-burton> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8306877.L2Sq6hHNpB"; micalg=pgp-sha256; protocol="application/pgp-signature" Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: PrasannaKumar Muralidharan Cc: linux-mips@linux-mips.org, Herbert Xu , Rob Herring , Mark Rutland , Ralf Baechle , Michael Turquette , sboyd@codeaurora.org, "David S . Miller" , Paul Cercueil , linux-crypto@vger.kernel.org Message-ID: <20170821160416.Hwi82nrSSsBH-Ymetwep97SN_2qGPm_EcwgmFgT95N8@z> --nextPart8306877.L2Sq6hHNpB Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi PrasannaKumar, On Sunday, 20 August 2017 09:12:12 PDT PrasannaKumar Muralidharan wrote: > > 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 --nextPart8306877.L2Sq6hHNpB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEELIGR03D5+Fg+69wPgiDZ+mk8HGUFAlmbBIAACgkQgiDZ+mk8 HGVe1Q/6Au2TClXs/W79i3QnmUiwaV9otdtoqCPYhvX6pFQ3vlrPt+Dn1FsvoRwL dccm/fueHvkdYvueUbkqmjUDuiWrt3tv4YoVnih81gtmBWVeF9hQ9hLqd3nlZhbS 9aFryozQ8mO6AHP4N58Iv8aPubtoYunDasCdMZ72cq9T3SxIaAl9B2AEQEls5JO8 mgESbB7kGrv5d484ktOGGRr4KjNlCxFxOVWxZq7zPQxuCMRbsIAZEnpW9ei1OXuV b2VGa/o8oz3WnPiCrxwgNHH7ckp6LBjdtv4Rq+oxiOs9ONWRZoXXC0ygvdc1Pv6a 9Y1DCZWzQrzali8g1YAytuEQgql+i/xId9uoNxQy3Fw0SGIRsNkEXjqASFzUF/wb Z/8jvxuia4EQEUsgb5UWlDP2zy2q7zCCj/IB3pvAn9u4vD8WtQRrZIhR7W0qOd3f P8Q1Eq/u4rnyPdNV9x7TrFSRlIJ90FTytYCfKDu0qeGcsfYi39vrVPEEESgzSPmM UVD4/biG80szEmkCNeGFsaViNoUCE1/5sw4nvCmStsH0IIYaXHV3hLDi4J0L90JY PsDssx1NUF+ySLeaNYLfIfg5ySRJlnFRN7kdC2fcp85D1bx4xBc5qqDuo2MIXR5K G9jZOj2H2DzoVI22SW2mbRJYSwTWIApkMzyfBXPcGUByUm1QCQM= =fpS/ -----END PGP SIGNATURE----- --nextPart8306877.L2Sq6hHNpB--