All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Sebastian Reichel <sre@ring0.de>,
	Tony Lindgren <tony@atomide.com>,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Cc: Sebastian Reichel <sre@kernel.org>
Subject: [PATCH] ARM: OMAP2+: Add support for RNG on DT booted N900
Date: Mon,  7 Apr 2014 14:28:46 +0200	[thread overview]
Message-ID: <1396873726-4657-1-git-send-email-sre@kernel.org> (raw)

Add support for OMAP3 ROM Random Number Generator via
pdata-quirks.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
Hi Tony,

I currently see no clean way to add DTS based support for the
random number generator in the N900, so this patch initializes
it using pdata-quirks.

I think its worth adding this for now, since its one of the few
things missing to get N900 DT based boot to the same level as
platform data based boot.

I've prepared a table tracking the patch status for my N900 DT
patches targeting 3.16 at [0]. If I'm not mistaken all of the
N900's hardware supported via platform data is also supported
via DT after these patches are merged. The overall status (incl.
hardware, which is also not supported by platform data) can
be seen on [1].

[0] http://elinux.org/N900/Changelog#Kernel_3.16_.28planned.29
[1] http://elinux.org/N900#Kernel_Status

-- Sebastian
---
 arch/arm/mach-omap2/pdata-quirks.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index b04c5f0..5baad1e 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -227,6 +227,14 @@ static void __init am3517_evm_legacy_init(void)
 	am35xx_emac_reset();
 }
 
+static struct platform_device omap3_rom_rng_device = {
+	.name		= "omap3-rom-rng",
+	.id		= -1,
+	.dev	= {
+		.platform_data	= rx51_secure_rng_call,
+	},
+};
+
 static void __init nokia_n900_legacy_init(void)
 {
 	hsmmc2_internal_input_clk();
@@ -240,6 +248,10 @@ static void __init nokia_n900_legacy_init(void)
 			pr_warning("RX-51: Not enabling ARM errata 430973 workaround\n");
 			pr_warning("Thumb binaries may crash randomly without this workaround\n");
 		}
+
+		pr_info("RX-51: Registring OMAP3 HWRNG device\n");
+		platform_device_register(&omap3_rom_rng_device);
+
 	}
 }
 #endif /* CONFIG_ARCH_OMAP3 */
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: sre@kernel.org (Sebastian Reichel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: Add support for RNG on DT booted N900
Date: Mon,  7 Apr 2014 14:28:46 +0200	[thread overview]
Message-ID: <1396873726-4657-1-git-send-email-sre@kernel.org> (raw)

Add support for OMAP3 ROM Random Number Generator via
pdata-quirks.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
Hi Tony,

I currently see no clean way to add DTS based support for the
random number generator in the N900, so this patch initializes
it using pdata-quirks.

I think its worth adding this for now, since its one of the few
things missing to get N900 DT based boot to the same level as
platform data based boot.

I've prepared a table tracking the patch status for my N900 DT
patches targeting 3.16 at [0]. If I'm not mistaken all of the
N900's hardware supported via platform data is also supported
via DT after these patches are merged. The overall status (incl.
hardware, which is also not supported by platform data) can
be seen on [1].

[0] http://elinux.org/N900/Changelog#Kernel_3.16_.28planned.29
[1] http://elinux.org/N900#Kernel_Status

-- Sebastian
---
 arch/arm/mach-omap2/pdata-quirks.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index b04c5f0..5baad1e 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -227,6 +227,14 @@ static void __init am3517_evm_legacy_init(void)
 	am35xx_emac_reset();
 }
 
+static struct platform_device omap3_rom_rng_device = {
+	.name		= "omap3-rom-rng",
+	.id		= -1,
+	.dev	= {
+		.platform_data	= rx51_secure_rng_call,
+	},
+};
+
 static void __init nokia_n900_legacy_init(void)
 {
 	hsmmc2_internal_input_clk();
@@ -240,6 +248,10 @@ static void __init nokia_n900_legacy_init(void)
 			pr_warning("RX-51: Not enabling ARM errata 430973 workaround\n");
 			pr_warning("Thumb binaries may crash randomly without this workaround\n");
 		}
+
+		pr_info("RX-51: Registring OMAP3 HWRNG device\n");
+		platform_device_register(&omap3_rom_rng_device);
+
 	}
 }
 #endif /* CONFIG_ARCH_OMAP3 */
-- 
1.9.1

             reply	other threads:[~2014-04-07 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 12:28 Sebastian Reichel [this message]
2014-04-07 12:28 ` [PATCH] ARM: OMAP2+: Add support for RNG on DT booted N900 Sebastian Reichel
2014-05-08 19:54 ` Sebastian Reichel
2014-05-13 17:08   ` 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=1396873726-4657-1-git-send-email-sre@kernel.org \
    --to=sre@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sre@ring0.de \
    --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 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.