Received: by 10.213.65.68 with SMTP id h4csp1371934imn; Wed, 21 Mar 2018 09:04:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELvnE0xWi9QK4u8ulFj0QIUXIMopTR4glgcf8o0i9ZZLDlZ7FDu4MxAbCtlQTN40dt3/DJWI X-Received: by 10.101.64.197 with SMTP id u5mr15591022pgp.23.1521648282223; Wed, 21 Mar 2018 09:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521648282; cv=none; d=google.com; s=arc-20160816; b=JOi/39kNdUDEvScCwg6jVHthZcdpVdsqu4X/7wuxFDyXApmprwOu+Gw2RR/Dzbx9TS o41ARs66P3ZHUZtOrP646TiS6Xs+SNNoRavrCYb8jv83PVBsDtPKF1AURJQUeVJZyjkr v7NdcLWjw1qOVNqWU4TfhcwKD7Higk3QV8s38Vhb5C/AamU0YUZ616bXVlo5VJKYXLAO 8QOyOVy3wys6zH5Lwa06qYI13FicBMitiA3uOyv6/eOH91ujamCuOmJ99WTv16qxUNdb 6jhePAY0EB9Ipu+HdMC8kXSo8358floDlXA7AJs4JmZqHMnQKD0+KM2jl7smkqsnGeW0 Nvrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=62z7z6XkM7vEwaocPiNzO01vg+un0j12pnoxYEwfuK4=; b=RlIhfydvc/EAUiGo3h9CdXTfhYiA2kFNql0epQfvXYfMkhVTb5FsZ8FtGpME/Voglq DKTGccakQF4+b2YQ9lgIn5aoQSCNbpj2LfmhCwNWTE772jEMQryt7gHOtkEiUlQKuQej D2MLZFKmAPF+9MiknpvaqPa/fzR6Mo/ps6++B/04enZKTH857bqSMisi3b0aLKHjMuRx CGl0dosZec+vQPW+Z+EbC6MItbY1xEaRqwJmu4oKpCL71BOOJkRRey2JbQRYd9aVT6qW yZGbuMpn2ZqFyrKw9BOAvdykOIKY1qo1vExQJOyQ4eJVW6irL+0CzkP4bRLyIwRd6CQ8 x4mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=NxvJauBf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n190si3256155pfn.297.2018.03.21.09.04.13; Wed, 21 Mar 2018 09:04:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=NxvJauBf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752610AbeCUQB6 (ORCPT + 99 others); Wed, 21 Mar 2018 12:01:58 -0400 Received: from vern.gendns.com ([206.190.152.46]:34809 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751817AbeCUQBz (ORCPT ); Wed, 21 Mar 2018 12:01:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=62z7z6XkM7vEwaocPiNzO01vg+un0j12pnoxYEwfuK4=; b=NxvJauBfxJ6FLv66nQfArnKvEM GhNWRO8OtZ4EG1/wQeuVKh8wFSZy1X91mN8Ouc3wcj+7dydOYMC6miKtWEpk2c/mNFzsYfYhVIvvn 3Qcv6MN8xShLu+h0yUVD5D2Oj/GhCTEmcODS6cSpkNl7wwwVKmLYFOwP2Uuflp9jF27y9cjfbv6CG X8hBt64kJ8KI6f+96KQCyw4kyp2dIRa+RvDP4D/2yoOSfyBewBj65g90ua/nUlD1LVNgQwthFt44d z3NYaGOhsrhNFzIjDC8ohXf6Am2FLnvynB+U38T5u4H65hsKcz7hDCsfdN8UDzInwXrDnOs5YUvWs hLHpHfaQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:58982 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1eyg9O-002XJk-Ip; Wed, 21 Mar 2018 11:59:42 -0400 Subject: Re: [PATCH 4/8] clk: davinci: add a reset lookup table for psc0 To: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , Rob Herring , Mark Rutland , Russell King , 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 References: <20180321120807.18032-1-brgl@bgdev.pl> <20180321120807.18032-5-brgl@bgdev.pl> From: David Lechner Message-ID: <4b985ed2-0db0-b4ad-8a9f-b8804e6d4db4@lechnology.com> Date: Wed, 21 Mar 2018 11:01:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180321120807.18032-5-brgl@bgdev.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/21/2018 07:08 AM, Bartosz Golaszewski wrote: > 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)); Could there be a race condition here since you are adding the lookup *before* you are adding the actual provider? It seems like reset_controller_add_lookup() should be after davinci_psc_register_clocks(). > 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; >