From patchwork Mon Mar 16 01:54:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Wolokita X-Patchwork-Id: 6014981 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 23E939F2A9 for ; Mon, 16 Mar 2015 02:10:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A70B202EC for ; Mon, 16 Mar 2015 02:10:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69BB82022A for ; Mon, 16 Mar 2015 02:10:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751638AbbCPCKv (ORCPT ); Sun, 15 Mar 2015 22:10:51 -0400 Received: from mail-bl2on0067.outbound.protection.outlook.com ([65.55.169.67]:19424 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751840AbbCPCKv (ORCPT ); Sun, 15 Mar 2015 22:10:51 -0400 Received: from BN3PR0301CA0066.namprd03.prod.outlook.com (25.160.152.162) by DM2PR03MB366.namprd03.prod.outlook.com (10.141.55.18) with Microsoft SMTP Server (TLS) id 15.1.118.15; Mon, 16 Mar 2015 01:56:08 +0000 Received: from BN1AFFO11FD024.protection.gbl (2a01:111:f400:7c10::101) by BN3PR0301CA0066.outlook.office365.com (2a01:111:e400:401e::34) with Microsoft SMTP Server (TLS) id 15.1.112.19 via Frontend Transport; Mon, 16 Mar 2015 01:56:08 +0000 Received: from nwd2mta1.analog.com (137.71.25.55) by BN1AFFO11FD024.mail.protection.outlook.com (10.58.52.84) with Microsoft SMTP Server (TLS) id 15.1.112.13 via Frontend Transport; Mon, 16 Mar 2015 01:56:07 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.72.140]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id t2G1tQv4032012 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 15 Mar 2015 18:55:26 -0700 Received: from pelican.spd.analog.com (10.122.9.130) by NWD2HUBCAS7.ad.analog.com (10.64.72.140) with Microsoft SMTP Server (TLS) id 14.3.210.2; Sun, 15 Mar 2015 21:54:55 -0400 From: Andre Wolokita To: CC: , Andre Wolokita Subject: [PATCH] omap-rng: Change RNG_CONFIG_REG to RNG_CONTROL_REG in init Date: Mon, 16 Mar 2015 12:54:50 +1100 Message-ID: <1426470890-26653-1-git-send-email-Andre.Wolokita@analog.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Originating-IP: [10.122.9.130] X-EOPAttributedMessage: 0 Received-SPF: Pass (protection.outlook.com: domain of analog.com designates 137.71.25.55 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.55; helo=nwd2mta1.analog.com; Authentication-Results: spf=pass (sender IP is 137.71.25.55) smtp.mailfrom=Andre.Wolokita@analog.com; gondor.apana.org.au; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:137.71.25.55; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(438002)(199003)(189002)(106466001)(50466002)(48376002)(36756003)(46102003)(86362001)(50226001)(19580405001)(19580395003)(6806004)(77096005)(77156002)(92566002)(62966003)(87936001)(229853001)(50986999)(110136001)(2351001)(16796002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR03MB366; H:nwd2mta1.analog.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB366; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:DM2PR03MB366; BCL:0; PCL:0; RULEID:; SRVR:DM2PR03MB366; X-Forefront-PRVS: 05177D47DC X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2015 01:56:07.1200 (UTC) X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a; Ip=[137.71.25.55]; Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB366 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP omap4_rng_init() checks bit 10 of the RNG_CONFIG_REG to determine whether the RNG is already running before performing any initiliasation. This is not the correct register to check, as the enable bit is in RNG_CONFIG_CONTROL. Read from RNG_CONTROL_REG instead. Signed-off-by: Andre Wolokita --- drivers/char/hw_random/omap-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index d14dcf7..ff74e5d 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c @@ -236,7 +236,7 @@ static int omap4_rng_init(struct omap_rng_dev *priv) u32 val; /* Return if RNG is already running. */ - if (omap_rng_read(priv, RNG_CONFIG_REG) & RNG_CONTROL_ENABLE_TRNG_MASK) + if (omap_rng_read(priv, RNG_CONTROL_REG) & RNG_CONTROL_ENABLE_TRNG_MASK) return 0; val = RNG_CONFIG_MIN_REFIL_CYCLES << RNG_CONFIG_MIN_REFIL_CYCLES_SHIFT;