From patchwork Wed Mar 21 12:08:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10299289 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 820AA602B3 for ; Wed, 21 Mar 2018 12:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C52D2982F for ; Wed, 21 Mar 2018 12:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F59629832; Wed, 21 Mar 2018 12:09:58 +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_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 008052982F for ; Wed, 21 Mar 2018 12:09:57 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Dm3WxKyzjwMOC9jnFCBfcs/L0tyjiE3mdTbv/blAayE=; b=G8ThbUQjb+Tuq3Lj7CgrG8pxuv 3nMQaS5M2X2darQK8+oflfiRv8oVFo6TV0lJPzx4xMg2M/axNaXVaj/71/gPxb1lYwWeguS4Xzv6F e5B8R7BZ4EsTohjdEf/ECLPvRVTsD/+SuG59sY9G1xu1RQIB8RpBqIP+tLDDnDnnr6NzoD6U5/Var vPBXtjsBw+NgA0mPbRALVLS190ncnt+XbDqn0GFxRvB6L8ON5sJcAul9lyVSHzYM236oZ+AdWAAxC KRmABUtSMUJSldUi7y35IagdMd+eosJynIDweDxhV1bT2JZXgFJ6y5NVAjX0J5xvVVdup/v47Ytw4 LKphJRwA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eycYv-0004k0-I7; Wed, 21 Mar 2018 12:09:49 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1eycXl-000409-9b for linux-arm-kernel@lists.infradead.org; Wed, 21 Mar 2018 12:08:39 +0000 Received: by mail-wm0-x243.google.com with SMTP id f125so9312047wme.4 for ; Wed, 21 Mar 2018 05:08:31 -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=ticCCuv2eueXzvk8BDvYUGHZ+rPcDASjhlt8pFm+CI3mPUZ3rtHzPmnAD4Wavb5qTl TdgQrl1idbNfjGEsLwOT6elPDqsyXDTeePphzTLKdiJkajk+fE059LQ6cfJmKEspTrNj ALOmINQ6J1uQp2KCc3+sCXvv3hHnyyHZCdJqoKD72RRs4GaYTMXXVczjH5hdIBkOLM33 6/hzanOeffjAhmtDwSX0uydGR7ACZ+H57Loft/IOs9ymvw5TjLFvwuhzZZ+OOWg6BW7+ g2EvLNTA+Ayl3uPtz5ltdF7448MQQ3MDYDihRhWhvN8sRcWG2KQmn5k7FI/mXaTm+WAI poFg== 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=e5e8RYuEFpp2nYBIbb4fApO4Zpux2THCfDt8ZLZ7RIXWiXkZfDzJath0C0PP70WJ70 ZdVYGgi3DPE1xOO4vUA/wOBsd21U1LmIQUddJcaUF0Ze6Lrk7ryt6Bsnq/svyM6DUdcl XPXOQJXpvHZdEpkzuEJ9x+HWnkTJK/x1RTghwZnGIPDuzcMgkQWT75tg694Lo/ok4h50 ne5OXl9t3LpguGz13OGk0WdxGDHGXm7jCefdeibqiQ2zvCBFMhn5I8OHd0gWm/m3Q8Bx bdIiuc4Vt5Lovk4FWWi5ZggchrS+LaEEEgHJgki6NNwFCW2myGIlgLkG2j1Ub8jRRHL7 DUOQ== X-Gm-Message-State: AElRT7H0B8e9THSd5meszd1pyvNOtkV5lCEHS9oSrUgSzkIQDW3q3cN4 p8+r8MCYylSY6tfY/VsQHskOhA== X-Google-Smtp-Source: AG47ELvY2jz7T5Ll1HGWX6p+4MCY76YpOMmvhWU/K/QOTf1iczprWIQtQ925pitY5OJuLlR++GctdA== X-Received: by 10.28.145.4 with SMTP id t4mr2388438wmd.14.1521634110648; Wed, 21 Mar 2018 05:08:30 -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 69sm3871018wmp.36.2018.03.21.05.08.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Mar 2018 05:08:30 -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 Subject: [PATCH 4/8] clk: davinci: add a reset lookup table for psc0 Date: Wed, 21 Mar 2018 13:08:03 +0100 Message-Id: <20180321120807.18032-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180321120807.18032-1-brgl@bgdev.pl> References: <20180321120807.18032-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180321_050837_502674_F0B4B114 X-CRM114-Status: GOOD ( 15.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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;