From patchwork Fri Mar 23 09:36:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10303127 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 B527A60386 for ; Fri, 23 Mar 2018 09:38:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A236628952 for ; Fri, 23 Mar 2018 09:38:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 970C728C40; Fri, 23 Mar 2018 09:38:35 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 3BB1D28952 for ; Fri, 23 Mar 2018 09:38:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752094AbeCWJic (ORCPT ); Fri, 23 Mar 2018 05:38:32 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:52016 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbeCWJgV (ORCPT ); Fri, 23 Mar 2018 05:36:21 -0400 Received: by mail-wm0-f65.google.com with SMTP id v21so2350375wmc.1 for ; Fri, 23 Mar 2018 02:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fyl2kH/w05MmkZOpuh/W2JizBemAH5UgkWhupUIPKmA=; b=FtzAP7H6veNUHU/4EUKGJn8ahX7QVY/E5EqIPdQqtAgB0RVG+1N25AbPBI1Vmo880v wNITzeQ8lk8iuTQ4GXo9jMiS4AdokLSao9UK/ifOn2Q013WaTLJdjCkQEaUPUbaZzu8V bZbtA6d1Z23FAZqOXmRoNgq10B8lCqS9jPAKnewzWIa0q+Shso1GvqaNx4+cSYdnDHkm LGUuR/9czwO0LZxJL3Ov9KlbkX4bSgMuhXdNmD0/yw9YoOaJW09DJ8I10dsbqQRSsiYI njdWHZGvqAuCgMNRsDIRd0dIYNw8CXESJquL907CKqJKupn9gjCfryu/+zcM9xrzkHwH abKg== 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=fyl2kH/w05MmkZOpuh/W2JizBemAH5UgkWhupUIPKmA=; b=lWZdDSE48IFTrV7GJ4tPoqWPt3ckcqJu6Dn62hbk7gTKMjE/wzHGDk7Jkjk30/oIhO FOuWfH7hMCfwqqgQm2qj54s+deEUHL8xS39SgSyhbFHk9yerwIL6aFpdCweZD/KQrBYG nR/eu21k+re4ET9WJlENhgkayGQZsog23yuGppG+sHGEVMz9qTNQPL9G8Iydok+klxjI jYnFLa6TUrujnX9ifxP+6G7MLKEhVaZji8pxXbXAVbuJvCa5CDPOIkkRdzJbvnE/ZMTh MLRHdJ6JtzewlFYuwpCVCX+dyGcpAb2HFywNcBJbXn9ai0HBR9WPYmDCb7/5zH85Nqz+ ziDQ== X-Gm-Message-State: AElRT7FPjaYFe9vnu8WYB9Epg0Q72zIxNMZ8gjTOWrVrIBPCISIxvw0e xh/ULMS9xREVI2t81SMWxPtB3Q== X-Google-Smtp-Source: AG47ELtlFzRdqgxDYgIxmI4OmuZCMWAIS2NUfVI+TsDDqyqtNSMSwRM4kSZ+LMpnweQ54UsbF9i8TA== X-Received: by 10.28.1.197 with SMTP id 188mr7777510wmb.49.1521797780385; Fri, 23 Mar 2018 02:36:20 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-208-99.w2-15.abo.wanadoo.fr. [2.15.55.99]) by smtp.gmail.com with ESMTPSA id s125sm8045203wmf.4.2018.03.23.02.36.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 02:36:19 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Rob Herring , Mark Rutland , Russell King , David Lechner , Michael Turquette , Stephen Boyd , Ohad Ben-Cohen , Bjorn Andersson , Philipp Zabel Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-remoteproc@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 4/8] clk: davinci: add a reset lookup table for psc0 Date: Fri, 23 Mar 2018 10:36:05 +0100 Message-Id: <20180323093609.24576-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180323093609.24576-1-brgl@bgdev.pl> References: <20180323093609.24576-1-brgl@bgdev.pl> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski In order to be able to use the reset framework in legacy boot mode as well, add the reset lookup table to the psc driver for da850 variant. Signed-off-by: Bartosz Golaszewski --- drivers/clk/davinci/psc-da850.c | 8 ++++++++ drivers/clk/davinci/psc.c | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/clk/davinci/psc-da850.c b/drivers/clk/davinci/psc-da850.c index ccc7eb17bf3a..395db4b2c0ee 100644 --- a/drivers/clk/davinci/psc-da850.c +++ b/drivers/clk/davinci/psc-da850.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -66,8 +67,15 @@ LPSC_CLKDEV3(ecap_clkdev, "fck", "ecap.0", "fck", "ecap.1", "fck", "ecap.2"); +static struct reset_control_lookup da850_psc0_reset_lookup_table[] = { + RESET_LOOKUP("davinci-rproc.0", NULL, 15), +}; + static int da850_psc0_init(struct device *dev, void __iomem *base) { + reset_controller_add_lookup("da850-psc0", + da850_psc0_reset_lookup_table, + ARRAY_SIZE(da850_psc0_reset_lookup_table)); return davinci_psc_register_clocks(dev, da850_psc0_info, 16, base); } diff --git a/drivers/clk/davinci/psc.c b/drivers/clk/davinci/psc.c index 3b0e59dfbdd7..063df62381ea 100644 --- a/drivers/clk/davinci/psc.c +++ b/drivers/clk/davinci/psc.c @@ -425,6 +425,7 @@ __davinci_psc_register_clocks(struct device *dev, psc->rcdev.ops = &davinci_psc_reset_ops; psc->rcdev.owner = THIS_MODULE; + psc->rcdev.dev = dev; psc->rcdev.of_node = dev->of_node; psc->rcdev.of_reset_n_cells = 1; psc->rcdev.of_xlate = davinci_psc_reset_of_xlate;