mbox series

[0/2] Add support for the RNG in Ingenic JZ4780 and X1000.

Message ID 20200722164007.77655-1-zhouyanjie@wanyeetech.com
Headers show
Series Add support for the RNG in Ingenic JZ4780 and X1000. | expand

Message

Zhou Yanjie July 22, 2020, 4:40 p.m. UTC
1.Add the RNG bindings for the JZ4780 SoC and the X1000 SoC
  from Ingenic.
2.Add JZ4780 SoC and X1000 SoC random number generator driver,
  based on PrasannaKumar Muralidharan's JZ4780 RNG driver.

周琰杰 (Zhou Yanjie) (2):
  dt-bindings: RNG: Add Ingenic RNG bindings.
  crypto: Ingenic: Add hardware RNG for Ingenic JZ4780 and X1000.

 .../devicetree/bindings/rng/ingenic,rng.yaml       |  36 +++++
 drivers/char/hw_random/Kconfig                     |  15 ++
 drivers/char/hw_random/Makefile                    |   1 +
 drivers/char/hw_random/ingenic-rng.c               | 154 +++++++++++++++++++++
 4 files changed, 206 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rng/ingenic,rng.yaml
 create mode 100644 drivers/char/hw_random/ingenic-rng.c

Comments

Randy Dunlap July 22, 2020, 6:27 p.m. UTC | #1
On 7/22/20 9:40 AM, 周琰杰 (Zhou Yanjie) wrote:
> diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
> index 0ad17efc96df..fcb06027cd88 100644
> --- a/drivers/char/hw_random/Kconfig
> +++ b/drivers/char/hw_random/Kconfig
> @@ -257,6 +257,21 @@ config HW_RANDOM_IMX_RNGC
>  
>  	  If unsure, say Y.
>  
> +config HW_RANDOM_INGENIC_RNG
> +	tristate "Ingenic Random Number Generator support"
> +	depends on HW_RANDOM
> +	depends on MACH_JZ4780 || MACH_X1000
> +	default HW_RANDOM
> +	---help---

Just use:
	help
here. See this for why:

commit 8f268881d7d278047b00eed54bbb9288dbd6ab23
Author: Masahiro Yamada <masahiroy@kernel.org>
Date:   Tue Dec 17 20:51:51 2019 +0900

    kconfig: remove ---help--- from documentation
    
    Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), scripts/checkpatch.pl warns the use of ---help---.
    
    Kconfig still supports ---help---, but new code should avoid using it.
    Let's stop advertising it in documentation.

> +	  This driver provides kernel-side support for the Random Number Generator
> +	  hardware found in ingenic JZ4780 and X1000 SoC. MIPS Creator CI20 uses
> +	  JZ4780 SoC, YSH & ATIL CU1000-Neo uses X1000 SoC.
> +
> +	  To compile this driver as a module, choose M here: the
> +	  module will be called ingenic-rng.
> +
> +	  If unsure, say Y.
> +
>  config HW_RANDOM_NOMADIK
>  	tristate "ST-Ericsson Nomadik Random Number Generator support"
>  	depends on ARCH_NOMADIK

thanks.
Zhou Yanjie July 23, 2020, 6:16 a.m. UTC | #2
Hello Randy,

在 2020/7/23 上午2:27, Randy Dunlap 写道:
> On 7/22/20 9:40 AM, 周琰杰 (Zhou Yanjie) wrote:
>> diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
>> index 0ad17efc96df..fcb06027cd88 100644
>> --- a/drivers/char/hw_random/Kconfig
>> +++ b/drivers/char/hw_random/Kconfig
>> @@ -257,6 +257,21 @@ config HW_RANDOM_IMX_RNGC
>>   
>>   	  If unsure, say Y.
>>   
>> +config HW_RANDOM_INGENIC_RNG
>> +	tristate "Ingenic Random Number Generator support"
>> +	depends on HW_RANDOM
>> +	depends on MACH_JZ4780 || MACH_X1000
>> +	default HW_RANDOM
>> +	---help---
> Just use:
> 	help
> here. See this for why:
>
> commit 8f268881d7d278047b00eed54bbb9288dbd6ab23
> Author: Masahiro Yamada <masahiroy@kernel.org>
> Date:   Tue Dec 17 20:51:51 2019 +0900
>
>      kconfig: remove ---help--- from documentation
>      
>      Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
>      '---help---'"), scripts/checkpatch.pl warns the use of ---help---.
>      
>      Kconfig still supports ---help---, but new code should avoid using it.
>      Let's stop advertising it in documentation.
>

Sure, I will change it in v2.

Thanks and best regards!


>> +	  This driver provides kernel-side support for the Random Number Generator
>> +	  hardware found in ingenic JZ4780 and X1000 SoC. MIPS Creator CI20 uses
>> +	  JZ4780 SoC, YSH & ATIL CU1000-Neo uses X1000 SoC.
>> +
>> +	  To compile this driver as a module, choose M here: the
>> +	  module will be called ingenic-rng.
>> +
>> +	  If unsure, say Y.
>> +
>>   config HW_RANDOM_NOMADIK
>>   	tristate "ST-Ericsson Nomadik Random Number Generator support"
>>   	depends on ARCH_NOMADIK
> thanks.