From patchwork Mon Sep 18 14:02:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PrasannaKumar Muralidharan X-Patchwork-Id: 9956813 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 C82C060385 for ; Mon, 18 Sep 2017 14:04:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9676288E2 for ; Mon, 18 Sep 2017 14:04:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE29928A34; Mon, 18 Sep 2017 14:04:19 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 651AE288E2 for ; Mon, 18 Sep 2017 14:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197AbdIROES (ORCPT ); Mon, 18 Sep 2017 10:04:18 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34451 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbdIROES (ORCPT ); Mon, 18 Sep 2017 10:04:18 -0400 Received: by mail-pg0-f66.google.com with SMTP id u18so179073pgo.1 for ; Mon, 18 Sep 2017 07:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i9VW3ROZjKNMHBBUDPGc83f+IqJjnk8vMG8hhdQS+RQ=; b=WHujJjEs6TQXKXN8dQeC67dg07ZFO05fkBUwGtM+qIJd2rWSYiTGsYZqeT5004vIUk taIwZJsaTSq8x3qRklHygQ5wAXNc2rnRGBfJcXYdI/ddGOoNGB5aU+VPu1h6hovhuEAH kGhKMmz046kaz/D/FNsx6SAkrjsknHrufXK/olpiIOaeuC4EIXi12HPtpImjhuR/YLNL QJyeeVBaelIOk9RfRfyn8+pcECyQaYdvLTmNbG8ZKjxGqYut2QcOYiqw7fNeR2EySx+g 7EOxM2mejgKQpQjTR5z+DI/D2TGv/8BvmRNbF0q/7oeLjN8E1RfJ76eVaboOzoIc6UM7 FVEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i9VW3ROZjKNMHBBUDPGc83f+IqJjnk8vMG8hhdQS+RQ=; b=UcghU32oTsZxrwIjdsoQXBihqb1VGPKxo4RNT+W7Axq6DXrwxiusGXt/ZZNtjwIrSx J/x50w0lmLMzK+TVU5Rge+f/vu8/hKHIoKZC1uk16V2zfhv+dwRBguoXLDt6bUZa2aLb Svj/P2x6fvYtkZZKVelmm52JLim7lyvElBu657ee/oM/9S6qHENEDZmoWpRnuaRE0MBV lmZSkc42UplLc7LPgQvbfcwYgokG+AfV9LDHyB3ImpW4/nhX30xZr09QJzHj67GqDpUY 0RH5nqpQzpFRIx9LxEy9q16+c/16Xi0V5nHdcGJDddohqj08FrnMPI5thZsOsnQWPt3A lFPw== X-Gm-Message-State: AHPjjUiFXOD8zlmdZBtnK9IOADnqlltT53AfKxtXQPRyyjiWmuV9G3wN l8Mw4iOMucqv/Q== X-Google-Smtp-Source: AOwi7QAEf/gfC4BMjtI6/pgCDxGfL9ZlZhl0e0WTqeWwTf1btwgulM4D4PhbVuKv7IEeBBL6iAoi4g== X-Received: by 10.84.171.132 with SMTP id l4mr10761919plb.369.1505743457621; Mon, 18 Sep 2017 07:04:17 -0700 (PDT) Received: from linux.local ([43.224.131.38]) by smtp.gmail.com with ESMTPSA id q77sm14683252pfa.173.2017.09.18.07.04.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Sep 2017 07:04:17 -0700 (PDT) From: PrasannaKumar Muralidharan To: herbert@gondor.apana.org.au, robh+dt@kernel.org, ralf@linux-mips.org, davem@davemloft.net, paul@crapouillou.net, linux-crypto@vger.kernel.org, linux-mips@linux-mips.org, malat@debian.org, noloader@gmail.com Cc: PrasannaKumar Muralidharan Subject: [PATCH v3 3/4] crypto: jz4780-rng: Add RNG node to jz4780.dtsi Date: Mon, 18 Sep 2017 19:32:40 +0530 Message-Id: <20170918140241.24003-4-prasannatsmkumar@gmail.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20170918140241.24003-1-prasannatsmkumar@gmail.com> References: <20170918140241.24003-1-prasannatsmkumar@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add RNG node to jz4780 dtsi. This driver uses registers that are part of the register set used by Ingenic CGU driver. Use regmap in RNG driver to access its register. Create 'simple-bus' node, make CGU and RNG node as child of it so that both the nodes are visible without changing CGU driver code. Signed-off-by: PrasannaKumar Muralidharan Acked-by: James Hogan --- Changes in v3: * Create a cgublock node with "simple-bus" compatible * Make CGU and RNG node as children of cgublock node. Changes in v2: * Add "syscon" in CGU node's compatible section * Make RNG child node of CGU. arch/mips/boot/dts/ingenic/jz4780.dtsi | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi index 4853ef6..5953b97 100644 --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi @@ -34,14 +34,29 @@ clock-frequency = <32768>; }; - cgu: jz4780-cgu@10000000 { - compatible = "ingenic,jz4780-cgu"; + cgublock { + compatible = "simple-bus"; + + #address-cells = <1>; + #size-cells = <1>; + reg = <0x10000000 0x100>; + ranges; - clocks = <&ext>, <&rtc>; - clock-names = "ext", "rtc"; + cgu: jz4780-cgu@0 { + compatible = "ingenic,jz4780-cgu"; + reg = <0x10000000 0x100>; - #clock-cells = <1>; + clocks = <&ext>, <&rtc>; + clock-names = "ext", "rtc"; + + #clock-cells = <1>; + }; + + rng: rng@d8 { + compatible = "ingenic,jz4780-rng"; + reg = <0x100000d8 0x8>; + }; }; pinctrl: pin-controller@10010000 {