Re: [PATCH v2 2/2] hwrng: msm: Add PRNG support for MSM SoC's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Stephen,

Thanks for the review.

On 10/11/2013 11:37 PM, Stephen Boyd wrote:
> On 10/11, Stanimir Varbanov wrote:
>> This adds a driver for hardware random number generator present
>> on Qualcomm MSM SoC's.
>>
>> Signed-off-by: Stanimir Varbanov <svarbanov@xxxxxxxxxx>
>> ---
> 
> Just nitpicks.
> 
>> diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
>> index 0aa9d91daef5..d902330cef43 100644
>> --- a/drivers/char/hw_random/Kconfig
>> +++ b/drivers/char/hw_random/Kconfig
>> @@ -314,3 +314,15 @@ config HW_RANDOM_TPM
>>  	  module will be called tpm-rng.
>>  
>>  	  If unsure, say Y.
>> +
>> +config HW_RANDOM_MSM
>> +        tristate "Qualcomm MSM Random Number Generator support"
>> +        depends on HW_RANDOM && ARCH_MSM && HAVE_CLK
> 
> It should be fine to drop HAVE_CLK here because ARCH_MSM always
> selects COMMON_CLK which indirectly selects HAVE_CLK.

It is leftover, I'll remove HAVE_CLK dependency.

> 
>> +        ---help---
>> +          This driver provides kernel-side support for the Random Number
>> +          Generator hardware found on Qualcomm MSM SoCs.
>> +
>> +          To compile this driver as a module, choose M here. the
>> +          module will be called msm-rng.
>> +
>> +          If unsure, say Y.
>> diff --git a/drivers/char/hw_random/msm-rng.c b/drivers/char/hw_random/msm-rng.c
>> new file mode 100644
>> index 000000000000..e219e94d02c1
>> --- /dev/null
>> +++ b/drivers/char/hw_random/msm-rng.c
>> @@ -0,0 +1,195 @@
>> +#include <linux/clk.h>
>> +#include <linux/hw_random.h>
>> +#include <linux/io.h>
>> +#include <linux/module.h>
>> +#include <linux/of.h>
>> +#include <linux/platform_device.h>
> 
> +#include <linux/err.h> for -ENOMEM usage.

OK

> 
>> +
>> +/* Device specific register offsets */
>> +#define PRNG_DATA_OUT		0x0000
>> +#define PRNG_STATUS		0x0004
>> +#define PRNG_LFSR_CFG		0x0100
>> +#define PRNG_CONFIG		0x0104
>> +
> [snip]
>> +
>> +MODULE_AUTHOR("The Linux Foundation");
>> +MODULE_DESCRIPTION("Qualcomm MSM random number generator driver");
>> +MODULE_LICENSE("GPL v2");
> 
> MODULE_ALIAS perhaps?

OK, I will add it.

regards,
Stan

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux