All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Russell King <linux@arm.linux.org.uk>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] RX-51: Add support for OMAP3 ROM Random Number Generator
Date: Wed, 18 Sep 2013 13:39:49 -0700	[thread overview]
Message-ID: <20130918203949.GI9994@atomide.com> (raw)
In-Reply-To: <1379534757-20870-3-git-send-email-pali.rohar@gmail.com>

* Pali Rohár <pali.rohar@gmail.com> [130918 13:15]:
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>

Description please, then also add a note that this makes
sense to do as a platform device at least until we have
some ARM generic way to deal with SMC calls.

>  arch/arm/mach-omap2/board-rx51.c  |   10 ++++++++++
>  arch/arm/mach-omap2/omap-secure.c |   11 +++++++++++
>  arch/arm/mach-omap2/omap-secure.h |    1 +
>  3 files changed, 22 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
> index db168c9..c2a3e39 100644
> --- a/arch/arm/mach-omap2/board-rx51.c
> +++ b/arch/arm/mach-omap2/board-rx51.c
> @@ -93,6 +93,14 @@ static struct omap_musb_board_data musb_board_data = {
>  	.power			= 0,
>  };
>  
> +static struct platform_device omap3_rom_rng_device = {
> +	.name		= "omap_rng",
> +	.id		= -1,
> +	.dev	= {
> +		.platform_data	= rx51_secure_rng_call,
> +	},
> +};
> +
>  static void __init rx51_init(void)
>  {
>  	struct omap_sdrc_params *sdrc_params;
> @@ -113,6 +121,8 @@ static void __init rx51_init(void)
>  		/* set IBE to 1 */
>  		rx51_secure_update_aux_cr(BIT(6), 0);
>  #endif
> +		pr_info("RX-51: Registring OMAP3 HWRNG device\n");
> +		platform_device_register(&omap3_rom_rng_device);
>  	}
>  
>  	/* Ensure SDRC pins are mux'd for self-refresh */

Maybe this should be in board-rx51-peripherals.c instead?

That way we can initialize the legacy platform devices
from there for DT based booting too and don't have to
move code around when moving to DT based booting.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.hengli.com.au>,
	Russell King <linux@arm.linux.org.uk>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] RX-51: Add support for OMAP3 ROM Random Number Generator
Date: Wed, 18 Sep 2013 13:39:49 -0700	[thread overview]
Message-ID: <20130918203949.GI9994@atomide.com> (raw)
In-Reply-To: <1379534757-20870-3-git-send-email-pali.rohar@gmail.com>

* Pali Rohár <pali.rohar@gmail.com> [130918 13:15]:
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>

Description please, then also add a note that this makes
sense to do as a platform device at least until we have
some ARM generic way to deal with SMC calls.

>  arch/arm/mach-omap2/board-rx51.c  |   10 ++++++++++
>  arch/arm/mach-omap2/omap-secure.c |   11 +++++++++++
>  arch/arm/mach-omap2/omap-secure.h |    1 +
>  3 files changed, 22 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
> index db168c9..c2a3e39 100644
> --- a/arch/arm/mach-omap2/board-rx51.c
> +++ b/arch/arm/mach-omap2/board-rx51.c
> @@ -93,6 +93,14 @@ static struct omap_musb_board_data musb_board_data = {
>  	.power			= 0,
>  };
>  
> +static struct platform_device omap3_rom_rng_device = {
> +	.name		= "omap_rng",
> +	.id		= -1,
> +	.dev	= {
> +		.platform_data	= rx51_secure_rng_call,
> +	},
> +};
> +
>  static void __init rx51_init(void)
>  {
>  	struct omap_sdrc_params *sdrc_params;
> @@ -113,6 +121,8 @@ static void __init rx51_init(void)
>  		/* set IBE to 1 */
>  		rx51_secure_update_aux_cr(BIT(6), 0);
>  #endif
> +		pr_info("RX-51: Registring OMAP3 HWRNG device\n");
> +		platform_device_register(&omap3_rom_rng_device);
>  	}
>  
>  	/* Ensure SDRC pins are mux'd for self-refresh */

Maybe this should be in board-rx51-peripherals.c instead?

That way we can initialize the legacy platform devices
from there for DT based booting too and don't have to
move code around when moving to DT based booting.

Regards,

Tony

  reply	other threads:[~2013-09-18 20:39 UTC|newest]

Thread overview: 65+ 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-02-28 18:05 ` Pali Rohár
2013-03-24 14:15 ` Pali Rohár
2013-03-24 14:15   ` Pali Rohár
2013-03-27 21:09 ` Tony Lindgren
2013-03-27 21:09   ` Tony Lindgren
2013-03-27 22:03   ` Pali Rohár
2013-03-27 22:03     ` Pali Rohár
2013-03-27 22:25     ` Tony Lindgren
2013-03-27 22:25       ` Tony Lindgren
2013-03-28 17:54       ` Pali Rohár
2013-03-28 17:54         ` Pali Rohár
2013-03-28 21:44         ` Tony Lindgren
2013-03-28 21:44           ` Tony Lindgren
2013-03-31  9:28           ` Pali Rohár
2013-03-31  9:28             ` Pali Rohár
2013-04-01 16:25             ` Tony Lindgren
2013-04-01 16:25               ` Tony Lindgren
2013-09-18 20:05         ` [PATCH 0/2] " Pali Rohár
2013-09-18 20:05           ` Pali Rohár
2013-09-18 20:05           ` [PATCH 1/2] hwrng: " Pali Rohár
2013-09-18 20:05             ` Pali Rohár
2013-09-18 20:22             ` Joe Perches
2013-09-18 20:22               ` Joe Perches
2013-09-18 20:50             ` Aaro Koskinen
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:05             ` Pali Rohár
2013-09-18 20:39             ` Tony Lindgren [this message]
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             ` 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 13:25               ` Pali Rohár
2013-09-20 16:23               ` Tony Lindgren
2013-09-20 16:23                 ` Tony Lindgren
2013-09-20 16:41                 ` Pali Rohár
2013-09-20 16:41                   ` Pali Rohár
2013-09-20 17:46                   ` Tony Lindgren
2013-09-20 17:46                     ` Tony Lindgren
2013-09-20 18:24                     ` Pali Rohár
2013-09-20 18:24                       ` Pali Rohár
2013-09-20 18:31                       ` Tony Lindgren
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-09-20 13:25               ` Pali Rohár
2013-10-08 19:04               ` Tony Lindgren
2013-10-08 19:04                 ` Tony Lindgren
2013-10-16 12:57                 ` Herbert Xu
2013-10-16 12:57                   ` Herbert Xu
2013-11-18 21:51                   ` Pali Rohár
2013-11-18 21:51                     ` Pali Rohár
2013-11-19  2:14                     ` Herbert Xu
2013-11-19  2:14                       ` Herbert Xu
2013-11-23  9:37                       ` Pali Rohár
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-09-20 13:25               ` Pali Rohár
2013-10-08 19:06               ` Tony Lindgren
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  9:52     ` Russell King - ARM Linux
2013-03-28 17:24     ` Pali Rohár
2013-03-28 17:24       ` Pali Rohár

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=20130918203949.GI9994@atomide.com \
    --to=tony@atomide.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mpm@selenic.com \
    --cc=pali.rohar@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.