From: icenowy@aosc.io
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
devicetree@vger.kernel.org, Stephen Boyd <sboyd@codeaurora.org>,
Mike Turquette <mturquette@baylibre.com>,
linux-mmc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] clk: sunxi-ng: Provide a default reset hook
Date: Sun, 27 Aug 2017 21:01:04 +0800 [thread overview]
Message-ID: <884514a2d304315f54dc81b8b42aea74@aosc.io> (raw)
In-Reply-To: <20170825094953.3247-1-maxime.ripard@free-electrons.com>
在 2017-08-25 17:49,Maxime Ripard 写道:
> The reset hook was left implemented. Provide a dumb implementation so
> that
> client drivers can depend on it.
I think some clients should also convert to use this.
For example:
- The TCON driver in sun4i-drm. (It now uses reset_control_status, but
this is also not implemented in CCU.)
- The EPHY in dwmac-sun8i driver. (It uses explicit assert then
deassert)
P.S. maybe the status hook should also be implemented?
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
> drivers/clk/sunxi-ng/ccu_reset.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/clk/sunxi-ng/ccu_reset.c
> b/drivers/clk/sunxi-ng/ccu_reset.c
> index 6c31d48783a7..1dc4e98ea802 100644
> --- a/drivers/clk/sunxi-ng/ccu_reset.c
> +++ b/drivers/clk/sunxi-ng/ccu_reset.c
> @@ -8,6 +8,7 @@
> * the License, or (at your option) any later version.
> */
>
> +#include <linux/delay.h>
> #include <linux/io.h>
> #include <linux/reset-controller.h>
>
> @@ -49,7 +50,18 @@ static int ccu_reset_deassert(struct
> reset_controller_dev *rcdev,
> return 0;
> }
>
> +static int ccu_reset_reset(struct reset_controller_dev *rcdev,
> + unsigned long id)
> +{
> + ccu_reset_assert(rcdev, id);
> + udelay(10);
> + ccu_reset_deassert(rcdev, id);
> +
> + return 0;
> +}
> +
> const struct reset_control_ops ccu_reset_ops = {
> .assert = ccu_reset_assert,
> .deassert = ccu_reset_deassert,
> + .reset = ccu_reset_reset,
> };
next prev parent reply other threads:[~2017-08-27 13:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 9:49 [PATCH 1/2] clk: sunxi-ng: Provide a default reset hook Maxime Ripard
2017-08-25 9:49 ` [PATCH 2/2] mmc: sunxi: Reset the device at probe time Maxime Ripard
2017-08-30 13:14 ` Ulf Hansson
2017-08-27 13:01 ` icenowy [this message]
2017-08-27 13:10 ` [PATCH 1/2] clk: sunxi-ng: Provide a default reset hook Chen-Yu Tsai
[not found] ` <20170825094953.3247-1-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-08-30 12:29 ` Ulf Hansson
2017-08-30 12:36 ` Maxime Ripard
2017-08-30 13:14 ` Ulf Hansson
2017-09-01 20:30 ` Stephen Boyd
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=884514a2d304315f54dc81b8b42aea74@aosc.io \
--to=icenowy@aosc.io \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=ulf.hansson@linaro.org \
--cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).