linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Tony Lindgren <tony@atomide.com>
Cc: "Juha Yrjola" <juha.yrjola@solidboot.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Matt Mackall" <mpm@selenic.com>,
	"Herbert Xu" <herbert@gondor.hengli.com.au>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Ивайло Димитров" <freemangordon@abv.bg>
Subject: Re: [PATCH] OMAP3 ROM Random Number Generator support
Date: Sun, 31 Mar 2013 11:28:12 +0200	[thread overview]
Message-ID: <201303311128.12698@pali> (raw)
In-Reply-To: <20130328214411.GZ10155@atomide.com>

[-- Attachment #1: Type: Text/Plain, Size: 2302 bytes --]

On Thursday 28 March 2013 22:44:11 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [130328 10:58]:
> > Here is new version of patch:
> > 
> > --- a/arch/arm/mach-omap2/devices.c
> > +++ b/arch/arm/mach-omap2/devices.c
> > @@ -486,6 +486,23 @@ static void omap_init_mcspi(void)
> > 
> >  static inline void omap_init_mcspi(void) {}
> >  #endif
> > 
> > +extern u32 *omap3_rom_rng_call(u32 id, u32 proc, u32 flags,
> > u32 va_ptr); +
> > +static struct platform_device omap3_rom_rng_device = {
> > +	.name		= "omap3-rom-rng",
> > +	.id		= -1,
> > +	.dev	= {
> > +		.platform_data	= omap3_rom_rng_call,
> > +	},
> > +};
> > +
> > +static void omap_init_rom_rng(void)
> > +{
> > +	if (!cpu_is_omap34xx() || omap_type() ==
> > OMAP2_DEVICE_TYPE_GP) +		return;
> > +	platform_device_register(&omap3_rom_rng_device);
> > +}
> > +
> > 
> >  /**
> >  
> >   * omap_init_rng - bind the RNG hwmod to the RNG
> >   omap_device *
> 
> This driver probably only works on Nokia boards because of the
> different SMC call numbering. Until it's been verified on some
> other HS omap34xx, I'd probably register this only from the
> Nokia board-*.c file.
> 

Freemangordon, can you look at this smc and errara 430973 code if 
they could be merged? Really omap3_rom_rng_call function looks 
like n900 specific.

Link: https://lkml.org/lkml/2013/3/28/398

> > --- /dev/null
> > +++ b/drivers/char/hw_random/omap3-rom-rng.c
> > +static int omap3_rom_rng_probe(struct platform_device
> > *pdev) +{
> > +	printk(KERN_INFO "%s: initializing\n",
> > omap3_rom_rng_name); +
> > +	omap3_rom_rng_call = pdev->dev.platform_data;
> > +	if (!omap3_rom_rng_call) {
> > +		printk(KERN_ERR "%s: omap3_rom_rng_call is NULL\n",
> > +		       omap3_rom_rng_name);
> > +		return -EINVAL;
> > +	}
> > +
> > +	setup_timer(&idle_timer, omap3_rom_idle_rng, 0);
> > +	rng_clk = clk_get_sys("omap_rng", "ick");
> > +	if (IS_ERR(rng_clk)) {
> > +		printk(KERN_ERR "%s: unable to get RNG clock\n",
> > +		       omap3_rom_rng_name);
> > +		return IS_ERR(rng_clk);
> > +	}
> 
> You can use regular clk_get if you add the alias to
> struct omap_clk omap3xxx_clks table.
> 
> Regards,
> 
> Tony

Tony, can you show me how?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-03-31  9:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 18:05 [PATCH] OMAP3 ROM Random Number Generator support Pali Rohár
2013-03-24 14:15 ` Pali Rohár
2013-03-27 21:09 ` Tony Lindgren
2013-03-27 22:03   ` Pali Rohár
2013-03-27 22:25     ` Tony Lindgren
2013-03-28 17:54       ` Pali Rohár
2013-03-28 21:44         ` Tony Lindgren
2013-03-31  9:28           ` Pali Rohár [this message]
2013-04-01 16:25             ` Tony Lindgren
2013-09-18 20:05         ` [PATCH 0/2] " Pali Rohár
2013-09-18 20:05           ` [PATCH 1/2] hwrng: " Pali Rohár
2013-09-18 20:22             ` Joe Perches
2013-09-18 20:50             ` Aaro Koskinen
2013-09-18 20:05           ` [PATCH 2/2] RX-51: Add support for OMAP3 ROM Random Number Generator Pali Rohár
2013-09-18 20:39             ` Tony Lindgren
2013-09-20 13:25           ` [PATCH v2 0/3] OMAP3 ROM Random Number Generator support Pali Rohár
2013-09-20 13:25             ` [PATCH v2 1/3] omap2: Change clk dev id for rng to omap3-rom-rng Pali Rohár
2013-09-20 16:23               ` Tony Lindgren
2013-09-20 16:41                 ` Pali Rohár
2013-09-20 17:46                   ` Tony Lindgren
2013-09-20 18:24                     ` Pali Rohár
2013-09-20 18:31                       ` Tony Lindgren
2013-09-20 13:25             ` [PATCH v2 2/3] hwrng: OMAP3 ROM Random Number Generator support Pali Rohár
2013-10-08 19:04               ` Tony Lindgren
2013-10-16 12:57                 ` Herbert Xu
2013-11-18 21:51                   ` Pali Rohár
2013-11-19  2:14                     ` Herbert Xu
2013-11-23  9:37                       ` Pali Rohár
2013-11-23 12:09                         ` Sebastian Reichel
2013-09-20 13:25             ` [PATCH v2 3/3] RX-51: Add support for OMAP3 ROM Random Number Generator Pali Rohár
2013-10-08 19:06               ` Tony Lindgren
2013-03-28  9:52   ` [PATCH] OMAP3 ROM Random Number Generator support Russell King - ARM Linux
2013-03-28 17:24     ` Pali Rohár
  -- strict thread matches above, loose matches on Subject: below --
2013-03-31 12:05 Ивайло Димитров
2013-03-31 12:43 ` Pali Rohár
2013-04-01 16:59 ` Tony Lindgren
2013-04-01 22:09 ` Aaro Koskinen
2013-04-01 20:37 Ивайло Димитров
2013-04-02 16:17 ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201303311128.12698@pali \
    --to=pali.rohar@gmail.com \
    --cc=freemangordon@abv.bg \
    --cc=herbert@gondor.hengli.com.au \
    --cc=juha.yrjola@solidboot.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mpm@selenic.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).