From patchwork Sun Feb 19 20:33:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9581815 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 22223604A0 for ; Sun, 19 Feb 2017 20:33:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 127AC28703 for ; Sun, 19 Feb 2017 20:33:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0697F28708; Sun, 19 Feb 2017 20:33:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9061F28703 for ; Sun, 19 Feb 2017 20:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6L+8wFWjpjj3Oy9z/H0sIrnn5qeCqX7poj0JOduzp9U=; b=lQ0JnBu9mqy2ES IHo3Xs09GhBG435iDGn9n+Pmgd1TCN8wOO3and50qDr1amy8rUP12DEJ4nABrU3nGN5YgI3/XW4Z7 3DtSSenw0Gv1wPH//UEb2rXxeDr9uj9C8M3d967MYFAcXYRC5y3etfKPLTTal2ehOTif2Xqjmetj3 A7IpNh2z66+IeVTM6utgLZvaS9/R0cLm35ddnkCJkvi+hNXtCL8FPeVlAwHvSnkvz1FDuZpYGXGwp ntFFWru+dQ5oS4RoVzkVuQuA3zym17WB54BYoRknDOSkdX2NBokDTZoT6XZlz3C/VgnNzFqDm2yy7 aeUYUeXUJtT7eeM/K0Iw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cfYB2-0006yv-3i; Sun, 19 Feb 2017 20:33:48 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cfYAx-0006x0-Bq for linux-amlogic@lists.infradead.org; Sun, 19 Feb 2017 20:33:45 +0000 Received: by mail-wm0-x243.google.com with SMTP id v77so11167997wmv.0 for ; Sun, 19 Feb 2017 12:33:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Daj3ZsL+tiWzatNDKwmCy8rumpG6UILpelQrDZpDLsY=; b=emrm9tqyi15p83IYwZYTLZCO7qj+V8wUNNI5YOhxLr04+vRTm0Utew9saOOCL4FuFU ULH2it0l9kg+lCJw1QlJnHcvXQH1BUYwguWRZD6OxjRNg03niSBrTkB2hkFvMhZH4JnB eyiyBXADAwsuA/BLYQZXCvNd9mbDYd8u2Qbp0YwXHquUnvZnNhRv6d1i5M9ChJg4zQ6o xkcFxigw2Ns31L+a5F3+nxTSWJPggEcSaCRy0MAvQrsPmzhksOh+1zcj89ND1AGmAsAS Vs49p7wfJQMJX/wdxGN33ZN7Ql5fQOdw9QMRCOIbZ3Pu9s8lOqvXUNbGaWjIRvcHKSiU /CGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Daj3ZsL+tiWzatNDKwmCy8rumpG6UILpelQrDZpDLsY=; b=BHgRw6omwVR5Wsn3DEL4wER1mw99uf/yx8LMURjsYXXe+rvx5j2HQxVKBDTIxs71R7 D0sgNpBQkecnqyt3jeDA+KEMzmpWkQync1hRmfTt/uparVVzJrjbJadxpwhjFKy9lleH 1iRfz+pIpgk0ZejHelfahtnKOrM1o3LPU/jIHkQNkbTYGc+KK8KtKB0zeZv76UudmU61 uWzRdD02vKcVU49tn8aPOJDgFRsqw9w9OnNQV822tjhdx558Hr0KpyEOCKoJGDk0cMob nbeRjnoeREjwEdmC5eMIhFsgpJyGZjiHwuKDjmCuPCEGM+EnyElCISrSOphrpW78IDvQ 8LUg== X-Gm-Message-State: AMke39nXeWrVFcxTYiG4atv7F02l0M1/2Cas1vxODwGhMuejlUT24REZ9hX9UE7D69AWEg== X-Received: by 10.28.232.90 with SMTP id f87mr14598573wmh.35.1487536401723; Sun, 19 Feb 2017 12:33:21 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:b54a:e921:753c:183c? (p200300C6EBDC4000B54AE921753C183C.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:b54a:e921:753c:183c]) by smtp.googlemail.com with ESMTPSA id q16sm21943840wra.69.2017.02.19.12.33.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Feb 2017 12:33:21 -0800 (PST) Subject: [PATCH 1/2] hwrng: meson: expose RNG0 clock via DT To: Kevin Hilman , Herbert Xu References: <00b2a4cc-686e-0cc0-43e8-552b70a1e868@gmail.com> From: Heiner Kallweit Message-ID: Date: Sun, 19 Feb 2017 21:33:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <00b2a4cc-686e-0cc0-43e8-552b70a1e868@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170219_123343_567109_8EC3B448 X-CRM114-Status: UNSURE ( 7.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-crypto@vger.kernel.org, Neil Armstrong Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Expose the RNG0 clock via DT. Signed-off-by: Heiner Kallweit --- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 5 +++++ include/dt-bindings/clock/gxbb-clkc.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi index 5d995f77..620495a4 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi @@ -380,7 +380,7 @@ #size-cells = <2>; ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>; - rng { + hwrng: rng { compatible = "amlogic,meson-rng"; reg = <0x0 0x0 0x0 0x4>; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi index 04b3324b..a375cb21 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi @@ -524,3 +524,8 @@ &vpu { compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu"; }; + +&hwrng { + clocks = <&clkc CLKID_RNG0>; + clock-names = "core"; +}; diff --git a/include/dt-bindings/clock/gxbb-clkc.h b/include/dt-bindings/clock/gxbb-clkc.h index 692846c7..473676b1 100644 --- a/include/dt-bindings/clock/gxbb-clkc.h +++ b/include/dt-bindings/clock/gxbb-clkc.h @@ -15,6 +15,7 @@ #define CLKID_SPI 34 #define CLKID_I2C 22 #define CLKID_SAR_ADC 23 +#define CLKID_RNG0 25 #define CLKID_ETH 36 #define CLKID_USB0 50 #define CLKID_USB1 51