Skip to contentSkip to conversation

hwrng: cctrng kconfig updates

PATCH Superseded Hadar Gat 2 participants 6 messages Apr 27, 2020

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Hadar Gat

author
#0 lore raw

v2 cover hwrng: cctrng kconfig updates

Some fixes in Kconfig for cctrng:
+ add missing dependency on OF
+ change default to 'n'
+ improve inaccurate help description

v2 changes:
+ remove unneeded depends on HW_RANDOM.
+ remove unneeded line 'default n' in order to follow the convention.
+ in help description changed to: If unsure, say 'N'

Hadar Gat (3):
hwrng: cctrng - Add dependency on OF
hwrng: cctrng - change default to n
hwrng: cctrng - update help description

 drivers/char/hw_random/Kconfig | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v2 1/3 hwrng: cctrng - Add dependency on OF

The cctrng is unusable on non-DT systems so we should depend on it.

---
 drivers/char/hw_random/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/hw_random/Kconfig +1 -1
index 0c99735..df2d001 100644
@@ -476,7 +476,7 @@ config HW_RANDOM_KEYSTONE
 
 config HW_RANDOM_CCTRNG
 	tristate "Arm CryptoCell True Random Number Generator support"
-	depends on HAS_IOMEM
+	depends on HAS_IOMEM & OF
 	default HW_RANDOM
 	help
 	  This driver provides support for the True Random Number
Signature · 1 line
2.7.4
maintainer
#2 lore raw

Re: [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF

Quoted 7 lines · Hadar Gat

The cctrng is unusable on non-DT systems so we should depend on it.

---
 drivers/char/hw_random/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This breaks compile testing for me so nack.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
author
#3 lore raw

RE: [PATCH v2 1/3] hwrng: cctrng - Add dependency on OF

Quoted 6 lines

-----Original Message-----
From: [email protected] <linux-crypto- [email protected]> On Behalf Of Herbert Xu

On Mon, Apr 27, 2020 at 12:49:04PM +0300, Hadar Gat wrote:

Quoted 8 lines
Quoted 6 lines

The cctrng is unusable on non-DT systems so we should depend on it.

---
 drivers/char/hw_random/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This breaks compile testing for me so nack.

Oops.. Fixed this in v3.

Hadar

Quoted 4 lines

--
Email: Herbert Xu <[email protected]> Home Page:
http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

author
#4 lore raw

PATCH v2 2/3 hwrng: cctrng - change default to n

In reply to Hadar Gat

For many users, the Arm CryptoCell HW is not available, so the default for HW_RANDOM_CCTRNG should to n.
Remove the line to follow the convention - 'n' is the default anyway so no need to state it explicitly.

---
 drivers/char/hw_random/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/char/hw_random/Kconfig +0 -1
index df2d001..fc8bb31 100644
@@ -477,7 +477,6 @@ config HW_RANDOM_KEYSTONE
 config HW_RANDOM_CCTRNG
 	tristate "Arm CryptoCell True Random Number Generator support"
 	depends on HAS_IOMEM & OF
-	default HW_RANDOM
 	help
 	  This driver provides support for the True Random Number
 	  Generator available in Arm TrustZone CryptoCell.
Signature · 1 line
2.7.4
author
#5 lore raw

PATCH v2 3/3 hwrng: cctrng - update help description

In reply to Hadar Gat

Improved the HW_RANDOM_CCTRNG help description.

---
 drivers/char/hw_random/Kconfig | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/char/hw_random/Kconfig +7 -6
index fc8bb31..d53470d 100644
@@ -478,13 +478,14 @@ config HW_RANDOM_CCTRNG
 	tristate "Arm CryptoCell True Random Number Generator support"
 	depends on HAS_IOMEM & OF
 	help
-	  This driver provides support for the True Random Number
-	  Generator available in Arm TrustZone CryptoCell.
-
-	  To compile this driver as a module, choose M here: the module
+	  Say 'Y' to enable the True Random Number Generator driver for the
+	  Arm TrustZone CryptoCell family of processors.
+	  Currently the CryptoCell 713 and 703 are supported.
+	  The driver is supported only in SoC where Trusted Execution
+	  Environment is not used.
+	  Choose 'M' to compile this driver as a module. The module
 	  will be called cctrng.
-
-	  If unsure, say Y.
+	  If unsure, say 'N'.
 
 endif # HW_RANDOM
 
Signature · 1 line
2.7.4