From patchwork Fri Mar 23 13:04:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10304677 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 DF5D460385 for ; Fri, 23 Mar 2018 13:08:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0CE628E63 for ; Fri, 23 Mar 2018 13:08:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C549E28E69; Fri, 23 Mar 2018 13:08:49 +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 6D84B28E63 for ; Fri, 23 Mar 2018 13:08:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752967AbeCWNFK (ORCPT ); Fri, 23 Mar 2018 09:05:10 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:46125 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbeCWNFH (ORCPT ); Fri, 23 Mar 2018 09:05:07 -0400 Received: by mail-wr0-f193.google.com with SMTP id d1so39761wrj.13 for ; Fri, 23 Mar 2018 06:05:06 -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=dr/MQZAOsGjhPcCHLAgxV2ASzVNgrolJRaKHnhrWlT6aejgEIHMG5F15MjwnSOx9Xq YmGYKiIUufYL75itViGyACxGNFqBZq4Y9L0PxGMRyMdt0ax3LQmX1Q4oaqEbZDN+JlYX G10w7pbWbbNmi/+W4kIo8oSzJpWjeMlrJfhgCDuYlnfcIbm16R0ZD0YiZ4ZvBffSEUtg MPKU9r/YhF/oANsUZkFpBCvaecdQcHBiaVGyn4VOHoxDuD/MxLg/bYi6OkDN6TpmLoxH feRmBH3tAAL//hgHi16T4wkbA/eG0dS+nG9QzvagQDXe4VW/r8NXnykifCxVdJpkgDKi 4rdQ== 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=kh25IKVAFMWbe9at5+PDA/ECowYxLGPS/XSAm3eElVIvt00IbWJZQYlKuhKl7Ew/YQ HNPcBnQns/BDC0qhYuHGkYxAeb5NGdqITQSrgbcZzdjzu+CrwnqVLw/ChvNUcfKT6B3p WsVCPPTAwAddwg68aEacF2YhIDhVru2yOyHc6yJeWtmjn3WUGazB44bLtI1XUtkrhiUW wCGG/fDKdKmtxF7dYgbcydVtWQRo78mVkmgAf2/zSoqWluFtEczqoa1C4LSmMYs6B9FL LcN17jkK0aQzvFkgYSEuMueGWQSfYLogcxmnoNidMyi/nO0BrN65BnXOk5TfzuehzPJn PNuw== X-Gm-Message-State: AElRT7HLJljwg3B7WWC412E38cCqjcwB38ZoWtgIko5QNHucHQ+JKcqw yUeJr8zoFzxK9X8CufvGuvtCqKwlkv0= X-Google-Smtp-Source: AG47ELtcuBa8e4YtxC1IUtjAPEJ/zVPXCDKGFwAUHxT2OyBm2rKEXlViJAWmkfT3uRqCvWyRbLshJw== X-Received: by 10.223.193.129 with SMTP id x1mr14282329wre.166.1521810306004; Fri, 23 Mar 2018 06:05:06 -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 x67sm7069964wma.5.2018.03.23.06.05.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 06:05:05 -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 v4 4/8] clk: davinci: add a reset lookup table for psc0 Date: Fri, 23 Mar 2018 14:04:51 +0100 Message-Id: <20180323130455.11470-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180323130455.11470-1-brgl@bgdev.pl> References: <20180323130455.11470-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;