From: David Lechner <david@lechnology.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>, Sekhar Nori <nsekhar@ti.com>,
Kevin Hilman <khilman@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Russell King <linux@armlinux.org.uk>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Philipp Zabel <p.zabel@pengutronix.de>
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 <bgolaszewski@baylibre.com>
Subject: Re: [PATCH 4/8] clk: davinci: add a reset lookup table for psc0
Date: Wed, 21 Mar 2018 11:01:54 -0500 [thread overview]
Message-ID: <4b985ed2-0db0-b4ad-8a9f-b8804e6d4db4@lechnology.com> (raw)
In-Reply-To: <20180321120807.18032-5-brgl@bgdev.pl>
On 03/21/2018 07:08 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> 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 <bgolaszewski@baylibre.com>
> ---
> 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 <linux/clk-provider.h>
> +#include <linux/reset-controller.h>
> #include <linux/clk.h>
> #include <linux/clkdev.h>
> #include <linux/init.h>
> @@ -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;
>
next prev parent reply other threads:[~2018-03-21 16:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 12:07 [PATCH 0/8] ARM: davinci: complete the conversion to using the reset framework Bartosz Golaszewski
2018-03-21 12:08 ` [PATCH 1/8] reset: modify the way reset lookup works for board files Bartosz Golaszewski
2018-03-21 12:08 ` [PATCH 2/8] ARM: davinci: dts: make psc0 a reset provider Bartosz Golaszewski
2018-03-21 12:08 ` [PATCH 3/8] ARM: davinci: dts: add a reset control to the dsp node Bartosz Golaszewski
2018-03-21 14:04 ` Bartosz Golaszewski
2018-03-21 16:07 ` David Lechner
2018-03-21 12:08 ` [PATCH 4/8] clk: davinci: add a reset lookup table for psc0 Bartosz Golaszewski
2018-03-21 16:01 ` David Lechner [this message]
2018-03-21 16:08 ` Bartosz Golaszewski
2018-03-21 16:17 ` David Lechner
2018-03-23 9:07 ` Bartosz Golaszewski
2018-03-21 12:08 ` [PATCH 5/8] remoteproc: da8xx: add the missing checke for clk_enable() Bartosz Golaszewski
2018-03-21 16:21 ` David Lechner
2018-03-21 12:08 ` [PATCH 6/8] remoteproc: da8xx: prepare and unprepare the clock where needed Bartosz Golaszewski
2018-03-21 12:08 ` [PATCH 7/8] remoteproc: da8xx: use the reset framework Bartosz Golaszewski
2018-03-21 12:08 ` [PATCH 8/8] clk: davinci: kill davinci_clk_reset_assert/deassert() Bartosz Golaszewski
2018-03-21 16:23 ` David Lechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b985ed2-0db0-b4ad-8a9f-b8804e6d4db4@lechnology.com \
--to=david@lechnology.com \
--cc=bgolaszewski@baylibre.com \
--cc=bjorn.andersson@linaro.org \
--cc=brgl@bgdev.pl \
--cc=devicetree@vger.kernel.org \
--cc=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mturquette@baylibre.com \
--cc=nsekhar@ti.com \
--cc=ohad@wizery.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox