Skip to contentSkip to conversation

ARM: OMAP2+: Add support for RNG on DT booted N900

PATCH In review Sebastian Reichel 2 participants 3 messages Apr 7, 2014 – May 13, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP2+: Add support for RNG on DT booted N900

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

---
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(+)
arch/arm/mach-omap2/pdata-quirks.c +12 -0
index b04c5f0..5baad1e 100644
@@ -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 */
Signature · 1 line
1.9.1
#1 lore raw

Hi,

Quoted 2 lines · Sebastian Reichel

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

ping

-- Sebastian

maintainer
#2 lore raw
Quoted 7 lines · Sebastian Reichel

Hi,

Quoted 2 lines · Sebastian Reichel

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

ping

Thanks applying into omap-for-v3.16/board.

Tony