[obsolete] clk-rockchip-add-restart-handler.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: clk: rockchip: add restart handler
has been removed from the -mm tree.  Its filename was
     clk-rockchip-add-restart-handler.patch

This patch was dropped because it is obsolete

------------------------------------------------------
From: Heiko Stübner <heiko@xxxxxxxxx>
Subject: clk: rockchip: add restart handler

Add infrastructure to write the correct value to the restart register and
register the restart notifier for both rk3188 (including rk3066) and rk3288.

Signed-off-by: Heiko Stuebner <heiko@xxxxxxxxx>
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Jonas Jensen <jonas.jensen@xxxxxxxxx>
Cc: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Tomasz Figa <t.figa@xxxxxxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Cc: Wim Van Sebroeck <wim@xxxxxxxxx>
Cc: Mike Turquette <mturquette@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/clk/rockchip/clk-rk3188.c |    2 ++
 drivers/clk/rockchip/clk-rk3288.c |    2 ++
 drivers/clk/rockchip/clk.c        |   25 +++++++++++++++++++++++++
 drivers/clk/rockchip/clk.h        |    1 +
 4 files changed, 30 insertions(+)

diff -puN drivers/clk/rockchip/clk-rk3188.c~clk-rockchip-add-restart-handler drivers/clk/rockchip/clk-rk3188.c
--- a/drivers/clk/rockchip/clk-rk3188.c~clk-rockchip-add-restart-handler
+++ a/drivers/clk/rockchip/clk-rk3188.c
@@ -735,6 +735,8 @@ static void __init rk3188_common_clk_ini
 
 	rockchip_register_softrst(np, 9, reg_base + RK2928_SOFTRST_CON(0),
 				  ROCKCHIP_SOFTRST_HIWORD_MASK);
+
+	rockchip_register_restart_notifier(RK2928_GLB_SRST_FST);
 }
 
 static void __init rk3066a_clk_init(struct device_node *np)
diff -puN drivers/clk/rockchip/clk-rk3288.c~clk-rockchip-add-restart-handler drivers/clk/rockchip/clk-rk3288.c
--- a/drivers/clk/rockchip/clk-rk3288.c~clk-rockchip-add-restart-handler
+++ a/drivers/clk/rockchip/clk-rk3288.c
@@ -808,5 +808,7 @@ static void __init rk3288_clk_init(struc
 
 	rockchip_register_softrst(np, 12, reg_base + RK3288_SOFTRST_CON(0),
 				  ROCKCHIP_SOFTRST_HIWORD_MASK);
+
+	rockchip_register_restart_notifier(RK3288_GLB_SRST_FST);
 }
 CLK_OF_DECLARE(rk3288_cru, "rockchip,rk3288-cru", rk3288_clk_init);
diff -puN drivers/clk/rockchip/clk.c~clk-rockchip-add-restart-handler drivers/clk/rockchip/clk.c
--- a/drivers/clk/rockchip/clk.c~clk-rockchip-add-restart-handler
+++ a/drivers/clk/rockchip/clk.c
@@ -25,6 +25,7 @@
 #include <linux/clk-provider.h>
 #include <linux/mfd/syscon.h>
 #include <linux/regmap.h>
+#include <linux/reboot.h>
 #include "clk.h"
 
 /**
@@ -330,3 +331,27 @@ void __init rockchip_clk_protect_critica
 			clk_prepare_enable(clk);
 	}
 }
+
+static unsigned int reg_restart;
+static int rockchip_restart_notify(struct notifier_block *this,
+				   unsigned long mode, void *cmd)
+{
+	writel(0xfdb9, reg_base + reg_restart);
+	return NOTIFY_DONE;
+}
+
+static struct notifier_block rockchip_restart_handler = {
+	.notifier_call = rockchip_restart_notify,
+	.priority = 128,
+};
+
+void __init rockchip_register_restart_notifier(unsigned int reg)
+{
+	int ret;
+
+	reg_restart = reg;
+	ret = register_restart_handler(&rockchip_restart_handler);
+	if (ret)
+		pr_err("%s: cannot register restart handler, %d\n",
+		       __func__, ret);
+}
diff -puN drivers/clk/rockchip/clk.h~clk-rockchip-add-restart-handler drivers/clk/rockchip/clk.h
--- a/drivers/clk/rockchip/clk.h~clk-rockchip-add-restart-handler
+++ a/drivers/clk/rockchip/clk.h
@@ -366,6 +366,7 @@ void rockchip_clk_register_armclk(unsign
 			const struct rockchip_cpuclk_reg_data *reg_data,
 			const struct rockchip_cpuclk_rate_table *rates,
 			int nrates);
+void rockchip_register_restart_notifier(unsigned int reg);
 void rockchip_clk_protect_critical(const char *clocks[], int nclocks);
 
 #define ROCKCHIP_SOFTRST_HIWORD_MASK	BIT(0)
_

Patches currently in -mm which might be from heiko@xxxxxxxxx are

rtc-rk808-add-rtc-driver-for-rk808.patch
rtc-rk808-add-rtc-driver-for-rk808-fix-2.patch
clk-rk808-add-clkout-driver-for-rk808.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux