From patchwork Fri Mar 23 11:47: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: 10304397 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 1F2DD600F6 for ; Fri, 23 Mar 2018 12:00:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DC7028E09 for ; Fri, 23 Mar 2018 12:00:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01F4428E13; Fri, 23 Mar 2018 12:00:27 +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 77F8428E09 for ; Fri, 23 Mar 2018 12:00:27 +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=Hd8lHpmZnPpTt4txEpBdHDS/rWB9Zr+/1uDcDF6HOmE=; b=lZG54XJb6N+lS0D/d2dCKzBfJ/ l3eGtUpndgFBvWFXO6JWiTZ4MufIIkZ+Max2CzQLn72skRHfdbDmG8FEh/0ONGiDCh8YST0Qb/5Sv dGGATZIW2x2fJ7gySCoBsUK00Gxd93g8DAzpFHH0D3S8IzkHj7tq03vCiiEWe/ZQmmBEEOz1WPVVy kV2g2hKw1YZ/+gOJU+lxohiPFP7G/SWo9BQb9SWsWDgVhrMN7QeEySSM3cs2sWewDCLPmp/cytfBv pJZYYCBAipiqq2w+ZdBnWoJWyaImEFy9YVkAUU3KNczPx8lzyzEw/Bp6suwWpPEZAkdZvIiDLEpvN +yYybSrQ==; 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 1ezLMw-0005bb-BS; Fri, 23 Mar 2018 12:00:26 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ezLAQ-000612-KJ for linux-arm-kernel@lists.infradead.org; Fri, 23 Mar 2018 11:47:35 +0000 Received: by mail-wm0-x244.google.com with SMTP id l9so3039405wmh.2 for ; Fri, 23 Mar 2018 04:47:20 -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=RIeX3gDJksXxJN2F6O4y/4hmYHVSmvDkE1DtkrGIJ34=; b=t+1amq4Dw5LUOrC9YbWN+qh88x02xUlHGZT17jsUXsDAZSh+qnDMVuxgGMKQW1VAHn DDs0j5Nx+ehOFenC2U5WcBsHQWVm9FV6GZsGnVGA0ljHoEtmN+byXbs2csNAM6itPHkE SW6ROeJx9bSygZAbe5ii7oIS6xgalVChHfQibWPfeWzPaF8xauOPLKMVegxO7+Beje0O oF+41ILFx3eqN91m2SnlfyYFo+UUcQbb3OQXokJNjDk2sBW7YdAkjj4y31G6VFq5rre6 O1J9dF582gRZAaPAgY7snQPS2qpwgIYQCc8gH4Q//y5GH/ZPKXmY3XUOYrFTtp987hyM GBAQ== 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=RIeX3gDJksXxJN2F6O4y/4hmYHVSmvDkE1DtkrGIJ34=; b=eaZ+vUOQfOSUBFwtuVRY9fDjux3WrHyxNGuYeXon8LAeav7Pnt2fFJACNhGZid/XL1 AU91AEYQxZ/zX+oNCvwHJMK1RM7D4ljoEb5Y2vr2+QSKIcYqV43YyogXQl1rfD4PndED pLdUGZvpwixhXPi1rC4eD2yZsZJwYAquBokTCj60ruTBQb9rSBccgdg/gDrxBJwlAAIR Tf4dTNnHPewjNcXs+Bv7Ek39bz51MlYXuA2h37H9HbVMH6ke36f49k5KfFhiO2yJkQuL TUeticaq4nHQvnnsUgrbuuBUt+B4skitX3mWsj5pwQ/yXuLdNvRH3ZY1mzYeF9b/ibcm 9C2Q== X-Gm-Message-State: AElRT7F2qNhRR3DvBqoPma08bOKGO/9zhm6Isyn+Hw5Ml1mmYnilXgWP vt0y5Ck995cmwDv2WtvDiJoXbQ== X-Google-Smtp-Source: AG47ELsFvFgmbPYX1DG49XVfnm7utAvxDCQLZ1Qdx/aVrtMKPta4Pts7Z3tIixnw2+B91YSKuXz2Uw== X-Received: by 10.28.141.136 with SMTP id p130mr8245371wmd.0.1521805638992; Fri, 23 Mar 2018 04:47:18 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-1-7086-217.w90-116.abo.wanadoo.fr. [90.116.254.217]) by smtp.gmail.com with ESMTPSA id m71sm9394843wmd.6.2018.03.23.04.47.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 04:47:18 -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 v3 4/8] clk: davinci: add a reset lookup table for psc0 Date: Fri, 23 Mar 2018 12:47:05 +0100 Message-Id: <20180323114709.20330-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180323114709.20330-1-brgl@bgdev.pl> References: <20180323114709.20330-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180323_044731_190105_11E6F1C6 X-CRM114-Status: GOOD ( 15.09 ) 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 | 7 +++++++ drivers/clk/davinci/psc.c | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/clk/davinci/psc-da850.c b/drivers/clk/davinci/psc-da850.c index ccc7eb17bf3a..50cc0d17df40 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,14 @@ 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("da850-psc0", "davinci-rproc.0", NULL, 15), +}; + static int da850_psc0_init(struct device *dev, void __iomem *base) { + reset_controller_add_lookup(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;