linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: tegra: Implement reset control reset
@ 2017-03-02 14:16 Peter De Schrijver
  2017-03-20 13:16 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Peter De Schrijver @ 2017-03-02 14:16 UTC (permalink / raw)
  To: Peter De Schrijver, Prashant Gaikwad, Michael Turquette,
	Stephen Boyd, Stephen Warren, Thierry Reding, Alexandre Courbot,
	linux-clk, linux-tegra, linux-kernel
  Cc: Mikko Perttunen

From: Mikko Perttunen <mperttunen@nvidia.com>

For completeness, also implement this reset framework API for Tegra.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
---
 drivers/clk/tegra/clk.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c
index b2cdd9a..ba923f0 100644
--- a/drivers/clk/tegra/clk.c
+++ b/drivers/clk/tegra/clk.c
@@ -17,6 +17,7 @@
 #include <linux/clkdev.h>
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
+#include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/clk/tegra.h>
 #include <linux/reset-controller.h>
@@ -182,6 +183,20 @@ static int tegra_clk_rst_deassert(struct reset_controller_dev *rcdev,
 	return -EINVAL;
 }
 
+static int tegra_clk_rst_reset(struct reset_controller_dev *rcdev,
+		unsigned long id)
+{
+	int err;
+
+	err = tegra_clk_rst_assert(rcdev, id);
+	if (err)
+		return err;
+
+	udelay(1);
+
+	return tegra_clk_rst_deassert(rcdev, id);
+}
+
 const struct tegra_clk_periph_regs *get_reg_bank(int clkid)
 {
 	int reg_bank = clkid / 32;
@@ -274,6 +289,7 @@ void __init tegra_init_from_table(struct tegra_clk_init_table *tbl,
 static const struct reset_control_ops rst_ops = {
 	.assert = tegra_clk_rst_assert,
 	.deassert = tegra_clk_rst_deassert,
+	.reset = tegra_clk_rst_reset,
 };
 
 static struct reset_controller_dev rst_ctlr = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: tegra: Implement reset control reset
  2017-03-02 14:16 [PATCH] clk: tegra: Implement reset control reset Peter De Schrijver
@ 2017-03-20 13:16 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2017-03-20 13:16 UTC (permalink / raw)
  To: Peter De Schrijver
  Cc: Prashant Gaikwad, Michael Turquette, Stephen Boyd, Stephen Warren,
	Alexandre Courbot, linux-clk, linux-tegra, linux-kernel,
	Mikko Perttunen

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

On Thu, Mar 02, 2017 at 04:16:16PM +0200, Peter De Schrijver wrote:
> From: Mikko Perttunen <mperttunen@nvidia.com>
> 
> For completeness, also implement this reset framework API for Tegra.
> 
> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
> Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
> Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
> ---
>  drivers/clk/tegra/clk.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

This was missing a Signed-off-by: from you because you forwarded the
patch. I've added one before applying, under the assumption that you
merely forgot to add it.

Thanks,
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-20 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-02 14:16 [PATCH] clk: tegra: Implement reset control reset Peter De Schrijver
2017-03-20 13:16 ` Thierry Reding

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).