Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6020418ybe; Tue, 10 Sep 2019 12:15:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxA6e/i2+kdha7qkY/6hwyZqAx3zNHyXi0wN2colMNqLYYgJzTCLOWklEnIecZ/KHC7suC X-Received: by 2002:a05:6402:17aa:: with SMTP id j10mr32185200edy.222.1568142930976; Tue, 10 Sep 2019 12:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568142930; cv=none; d=google.com; s=arc-20160816; b=y87L7SbgJuov/q5oaqF2lAR5/NWdCFEoxuqloDn4+P2uuJKFXt7qNyMrAPGXh8b0Qd Fot5qaSrg4HpfG9GOaeTabNL2PibDjXSLa5kcRRtuD33I6yXUDgy5Dlw3HjUCbqUOG0n I0mMfFlc5mIvzmFBGyQucXl6DjXj4tLxeh9jQIzjRprMpSHIbKVN17I1ktGvo0gDB3Hw mKXCBUl43xccBtChdZLkFoHwydjUS/VM5or0ej2Yd5VznQWdFrQ/NOn1qAVZcU51IhwE TXCR6DyPNhuteAu5g8zw8QncrE+HS0+/MsJrDzq4ENbybmtg+nYlvqkOmymmse2iLfWT ayuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zfak0oamvqR0wlkWdro1v2MEWig7UToX5bvVAqdDtOo=; b=yhrFcve2DTUAxCs6VnOUNTasTGGk3siNaQtD8YbIDQ9pKsyijgoM9jORb8+lcjg6af KfAg4b0m00bViPS8G9qK7HSpa6ghlngxJuPbyg82+rTlwUELrs1fM7Eh0Iv8EFMPI2Co mxdctPOMCoDr+BpjtMs+9xoT2r5v8CuNrepqy8HqUgch6+1ErT7M4GZ3wXPSVRVy1m8Y wlM88HVKofSO/R2XW47F9UNA3V/2evpWAij+OJzpVW8p2Tj29aPyg9OhPK+xc2/ahxzs oBiPxxwSdzK6h/VU1vGqBKKWpzf6TzJLPjtZAOgJjfSBQkXUttmU9ZZ1rVHnLhFiqRKN PqfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bmHftRBV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jr9si3206495ejb.118.2019.09.10.12.14.48; Tue, 10 Sep 2019 12:15:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bmHftRBV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394176AbfIJQVs (ORCPT + 99 others); Tue, 10 Sep 2019 12:21:48 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:46685 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394113AbfIJQVr (ORCPT ); Tue, 10 Sep 2019 12:21:47 -0400 Received: by mail-io1-f66.google.com with SMTP id d17so16959864ios.13; Tue, 10 Sep 2019 09:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zfak0oamvqR0wlkWdro1v2MEWig7UToX5bvVAqdDtOo=; b=bmHftRBVG3UesIvZiqDbiuOA72BylSogyhaiKS/wsP0AEjtZYtvMHOLsoute6sQZ5m xIpo4gwZiwWDF9NooW5VDBFoxQRjUbyuPu83ukqlsJCxANwMV2lX6+qwjxFIUr6BKnq3 NfSd+thBNxcRljHIBEfSFJfnX7Q/CYPMHBuJo7QT+nvrZD7tMejiXPX4Zs/CkfDsqBOY LGQ4DWvRummpLuvyn5+fQh6ES61QTQ1cEyqouvQ1C/hgnOdTAA8wQ5nVUanyJCpycTeh pUe2RixtytadF7XaVfarQuRIZRWLNta0DZH6FwCIudQOeAh9XLLfxyWfqlD0aJ0kin47 bl5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zfak0oamvqR0wlkWdro1v2MEWig7UToX5bvVAqdDtOo=; b=GyX477TlhyWib5JtJq+IojEWdR6yb62pnhKvQI0ZlEWOR2QjP8RU2u3ccwKcT6sWUJ JGveHMF07yiH6VY8qf06IZRyaSsuNoUfc3xYqpJKNTq8aMs1ptOomSGPWl4R8gATdxY7 MwLAIE+cgOyAoHHrVIxRakNEatHCQNLkseHNcqiF/zGaPQNgc2trp5kUo0Tw9cJHXwaz XTPtdPOPkKcrVg6oysHmpeERDzdrI6gxTfl+GAh5gcO9rg0DgjkOECC86tKjc8nDwwkp U8rWLWd7vhtVhr3DtKTu1j2L0Q4Atq0ZlCJIwauoitg0aXyVeBCxf8hFJDqmAtR85HBQ Lp7g== X-Gm-Message-State: APjAAAUZ2eSxYTAPXjqJvjYMKweSrkKfQMKtv3hEHn42Xo14Rksr2I2z LZ4q2+Qx6f91VGMG5d3GiwujUAU7BlpGFEyggTI= X-Received: by 2002:a5e:de47:: with SMTP id e7mr1078126ioq.127.1568132506319; Tue, 10 Sep 2019 09:21:46 -0700 (PDT) MIME-Version: 1.0 References: <20190828150037.2640-1-aford173@gmail.com> <20190905230443.GA52127@atomide.com> <20190909134033.s26eiurpat3iekse@pali> <20190909163543.GQ52127@atomide.com> In-Reply-To: From: Adam Ford Date: Tue, 10 Sep 2019 11:21:34 -0500 Message-ID: Subject: Re: [RFC] ARM: omap3: Enable HWMODS for HW Random Number Generator To: Tony Lindgren Cc: =?UTF-8?Q?Pali_Roh=C3=A1r?= , Linux-OMAP , Tero Kristo , Aaro Koskinen , Adam Ford , =?UTF-8?Q?Beno=C3=AEt_Cousson?= , Rob Herring , Mark Rutland , Russell King , Paul Walmsley , devicetree , Linux Kernel Mailing List , arm-soc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 10, 2019 at 10:48 AM Adam Ford wrote: > > On Mon, Sep 9, 2019 at 11:35 AM Tony Lindgren wrote: > > > > * Pali Roh=C3=A1r [190909 13:41]: > > > On Monday 09 September 2019 08:37:09 Adam Ford wrote: > > > > I applied this on 5.3 and it is working. I assume the same is true= in for-next. > > > > Hmm I noticed I stopped getting RNG data after several rmmod modprobe > > cycles, or several hd /dev/random reads. Anybody else seeing that? > > > > > > Do you want to submit a formal patch? I can mark it as 'tested-by= ' > > > > This really helps speed up the startup sequence on boards with sshd > > > > because it delays for nearly 80 seconds waiting for entropy without > > > > the hwrng. > > > > > > Hi! When applying a patch, could you please disable this rng for n900= ? > > > > > > In omap3-n900.dts for rng should be status =3D "disabled" (as Tony al= ready > > > wrote), similarly like for aes. > > > > Yeah I'll post a proper patch after -rc1. > > FYI, > > By putting your node into omap34xx.dtsi and omap36xx.dtsi along with > the following, I can get the RNG to work on an OMAP3530 and a DM3730. > > > diff --git a/arch/arm/boot/dts/omap34xx-omap36xx-clocks.dtsi > b/arch/arm/boot/dts/omap34xx-omap36xx-clocks.dtsi > index 5e9d1afcd422..73f351e6d132 100644 > --- a/arch/arm/boot/dts/omap34xx-omap36xx-clocks.dtsi > +++ b/arch/arm/boot/dts/omap34xx-omap36xx-clocks.dtsi > @@ -259,7 +259,7 @@ > <&i2c1_ick>, <&uart2_ick>, <&uart1_ick>, <&gpt11= _ick>, > <&gpt10_ick>, <&mcbsp5_ick>, <&mcbsp1_ick>, > <&omapctrl_ick>, <&aes2_ick>, <&sha12_ick>, <&ic= r_ick>, > - <&des2_ick>, <&mspro_ick>, <&mailboxes_ick>, > + <&des2_ick>, <&mspro_ick>, <&mailboxes_ick>, > <&rng_ick>, > <&mspro_fck>; > }; > }; > > I tried doing the same for am3517, but it doesn't appear to work. In > fact, the board hangs at boot with no splat, so I assume that some > clock isn't running and causing a hang. Figure 4-50 in the AM3517 TRM > shows the security_l4_iclk2, so I wonder if the HW mods for AES, SHA, > etc are doing something to enable this clock. Those HWmods are > disabled on AM3517. I tried turning on the hwmods for them before > without success, but I'll try it again. According to a note in omap_hwmod_3xxx_data.c, /* * Apparently the SHA/MD5 and AES accelerator IP blocks are * only present on some AM35xx chips, and no one knows which * ones. See * http://www.spinics.net/lists/arm-kernel/msg215466.html So * if you need these IP blocks on an AM35xx, try uncommenting * the following lines. */ I decided to uncomment the hwmod entries, and I got the following: [ 0.263222] omap_hwmod: sham: _wait_target_ready failed: -16 [ 0.263248] omap_hwmod: sham: cannot be enabled for reset (3) [ 0.265837] omap_hwmod: aes: _wait_target_ready failed: -16 [ 0.265851] omap_hwmod: aes: cannot be enabled for reset (3) [ 6.208866] omap_hwmod: sham: _wait_target_ready failed: -16 [ 6.287732] omap_hwmod: aes: _wait_target_ready failed: -16 Based on this, I wonder if the sham and aes modules are not present. If this is the case, it might explain why I cannot use the rng either. adam > > adam > > > > Regards, > > > > Tony