lkml.org 
[lkml]   [2013]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] hwrng: msm: Add PRNG support for MSM SoC's
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@mm-sol.com>
> ---

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.

> + ---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.

> +
> +/* 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?

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation


\
 
 \ /
  Last update: 2013-10-11 23:41    [W:0.109 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site