From patchwork Mon Apr 7 12:28:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 3945021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2C473BFF02 for ; Mon, 7 Apr 2014 12:29:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57185202A1 for ; Mon, 7 Apr 2014 12:29:36 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FF8F20256 for ; Mon, 7 Apr 2014 12:29:35 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WX8g4-0003Qa-KU; Mon, 07 Apr 2014 12:29:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WX8g2-0005Al-6w; Mon, 07 Apr 2014 12:29:26 +0000 Received: from ring0.de ([5.45.105.125]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WX8fz-0005AL-Nj for linux-arm-kernel@lists.infradead.org; Mon, 07 Apr 2014 12:29:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 From: Sebastian Reichel To: Sebastian Reichel , Tony Lindgren , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH] ARM: OMAP2+: Add support for RNG on DT booted N900 Date: Mon, 7 Apr 2014 14:28:46 +0200 Message-Id: <1396873726-4657-1-git-send-email-sre@kernel.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140407_082923_935780_3536EFE2 X-CRM114-Status: GOOD ( 14.52 ) X-Spam-Score: -2.2 (--) Cc: Sebastian Reichel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for OMAP3 ROM Random Number Generator via pdata-quirks. Signed-off-by: Sebastian Reichel --- 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 */