From patchwork Tue Mar 27 09:20:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10309651 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 4299D60353 for ; Tue, 27 Mar 2018 09:23:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31A9929BAB for ; Tue, 27 Mar 2018 09:23:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 261FA29BEE; Tue, 27 Mar 2018 09:23:13 +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 C1D1D29C15 for ; Tue, 27 Mar 2018 09:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751056AbeC0JXK (ORCPT ); Tue, 27 Mar 2018 05:23:10 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:43362 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbeC0JUl (ORCPT ); Tue, 27 Mar 2018 05:20:41 -0400 Received: by mail-wr0-f193.google.com with SMTP id p53so14112587wrc.10 for ; Tue, 27 Mar 2018 02:20:40 -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=vjyRC092YiXAdTkXNkXg2IVGSo03d5SC5RitAjZh+kY=; b=O0vi9tEx6BHjLBa0YFjx/O6bqj0/UnYcy1MqHcjBCDolCfUD4SOyGzP2+3DeJJlqAt AhsDTn8AyEmoyENzo10nR+rS5X+BAdo+tswJPX5sqY5gbIWZS1k14BY10UZlwyw2BgJ+ 4x5Z0LcYows4Ga/faEfdGW62b1F3MMkH4VYl04WwpgyfozRrUl6sNZaTmA7Z45xRthGU fcb+VG02VtfPqNWkikBiXbS1XhL9YBtMdP/hgrULZliRXfEYJvmYZA8SRE/J+7u6tcOH mBoikcajyJJeK01vMH4t4+1MGynlqBgJ8+ca0hcE73J0cLqS2N69Bf09ogbMXfDwAF3W +psg== 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=vjyRC092YiXAdTkXNkXg2IVGSo03d5SC5RitAjZh+kY=; b=aWUr6otDtQXcZTngMcM6lqYth67YcLmAQJXHPvG2e3IgNttr1bAA/+Y9wWzShvPq3E kWFKiiWFbw9eC8swKsWQMvKJo+uPbMXCmjZdy53NZwJymAToe1ROfv7bVNnyvdTZqsLr LfuGgRnl7DG6TgT4tKnkZAAh/yyW/iwFbry7miQyvKlxOkhmYvM9VCKGaznYxv3tYLgd C4f1UVosqT1KfXX9pU8G+yVqEUEWqdpa9pNSV7BByYdApaGT7X2kooPXSnYrEnczmgbU lClGeodnagJFXGJ/51FOi22gdTSuexgHChqSaFyfa6s3qhnQ9TDGGi1cBkNVUy9ckOEb YbOg== X-Gm-Message-State: AElRT7HSSa8H7D6P3uFwjxraZKAZRuh1lS6tKUywj/ss3TK+VNqgUn+H ipaXKtTSGlevbzRzjLCdH8/PBw== X-Google-Smtp-Source: AIpwx49cIi2B0QZM8cBV4AmTOsWDS49jmmKrfPj5+k5u915pGG4u50QdGZsnPg1fMaE9uY6CwaEepw== X-Received: by 10.223.182.78 with SMTP id i14mr6991836wre.140.1522142439860; Tue, 27 Mar 2018 02:20:39 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id h190sm1288925wmd.22.2018.03.27.02.20.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 02:20:39 -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 v3 3/8] clk: davinci: add a reset lookup table for psc0 Date: Tue, 27 Mar 2018 11:20:26 +0200 Message-Id: <20180327092031.11251-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180327092031.11251-1-brgl@bgdev.pl> References: <20180327092031.11251-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 | 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..d196dcbed560 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", 15, "davinci-rproc.0", NULL), +}; + 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;