From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: Re: [PATCH v2 2/2] hwrng: msm: Add PRNG support for MSM SoC's Date: Fri, 11 Oct 2013 13:37:01 -0700 Message-ID: <20131011203701.GC13139@codeaurora.org> References: <1381504601-23773-1-git-send-email-svarbanov@mm-sol.com> <1381504601-23773-3-git-send-email-svarbanov@mm-sol.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1381504601-23773-3-git-send-email-svarbanov@mm-sol.com> Sender: linux-kernel-owner@vger.kernel.org To: Stanimir Varbanov Cc: Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Matt Mackall , Herbert Xu , linux-kernel@vger.kernel.org, Rob Landley , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org List-Id: devicetree@vger.kernel.org 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 > --- 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 > +#include > +#include > +#include > +#include > +#include +#include 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