linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] ARM: S3C24XX: unify restart functions
@ 2014-01-06 18:35 Heiko Stübner
  2014-01-06 18:37 ` [PATCH 1/5] dt-bindings: document the s3c24xx software-reset register Heiko Stübner
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Heiko Stübner @ 2014-01-06 18:35 UTC (permalink / raw)
  To: linux-arm-kernel

This unifies the restart functions of s3c24xx socs into one single
function and also removes the need for the SWRST register to be
statically mapped in the dt case.

As a result the mach-s3c2416-dt boardfile can also support
other s3c24xx boards in the future.

Because of the clock-reparenting in the s3c2412-swrst it depends
on the conversion of s3c2412 to the common clock framework.

Heiko Stuebner (5):
  dt-bindings: document the s3c24xx software-reset register
  ARM: S3C24XX: add generic handler for swrst resets
  ARM: S3C24XX: add common reset function
  ARM: S3C24XX: convert boards to use common restart function
  ARM: S3C24XX: remove obsolete SoC-specific restart functions

 .../bindings/arm/samsung/s3c24xx-swrst.txt         |   16 ++
 arch/arm/boot/dts/s3c2416.dtsi                     |    5 +
 arch/arm/mach-s3c24xx/Kconfig                      |    8 +
 arch/arm/mach-s3c24xx/Makefile                     |    1 +
 arch/arm/mach-s3c24xx/common.c                     |   31 ++++
 arch/arm/mach-s3c24xx/common.h                     |   23 ++-
 arch/arm/mach-s3c24xx/mach-amlm5900.c              |    2 +-
 arch/arm/mach-s3c24xx/mach-anubis.c                |    2 +-
 arch/arm/mach-s3c24xx/mach-at2440evb.c             |    2 +-
 arch/arm/mach-s3c24xx/mach-bast.c                  |    2 +-
 arch/arm/mach-s3c24xx/mach-gta02.c                 |    2 +-
 arch/arm/mach-s3c24xx/mach-h1940.c                 |    2 +-
 arch/arm/mach-s3c24xx/mach-jive.c                  |    2 +-
 arch/arm/mach-s3c24xx/mach-mini2440.c              |    2 +-
 arch/arm/mach-s3c24xx/mach-n30.c                   |    4 +-
 arch/arm/mach-s3c24xx/mach-nexcoder.c              |    2 +-
 arch/arm/mach-s3c24xx/mach-osiris.c                |    2 +-
 arch/arm/mach-s3c24xx/mach-otom.c                  |    2 +-
 arch/arm/mach-s3c24xx/mach-qt2410.c                |    2 +-
 arch/arm/mach-s3c24xx/mach-rx1950.c                |    2 +-
 arch/arm/mach-s3c24xx/mach-rx3715.c                |    2 +-
 arch/arm/mach-s3c24xx/mach-s3c2416-dt.c            |   11 +-
 arch/arm/mach-s3c24xx/mach-smdk2410.c              |    2 +-
 arch/arm/mach-s3c24xx/mach-smdk2413.c              |    6 +-
 arch/arm/mach-s3c24xx/mach-smdk2416.c              |    2 +-
 arch/arm/mach-s3c24xx/mach-smdk2440.c              |    2 +-
 arch/arm/mach-s3c24xx/mach-smdk2443.c              |    2 +-
 arch/arm/mach-s3c24xx/mach-tct_hammer.c            |    2 +-
 arch/arm/mach-s3c24xx/mach-vr1000.c                |    2 +-
 arch/arm/mach-s3c24xx/mach-vstms.c                 |    2 +-
 arch/arm/mach-s3c24xx/s3c2410.c                    |   12 --
 arch/arm/mach-s3c24xx/s3c2412.c                    |   20 ---
 arch/arm/mach-s3c24xx/s3c2416.c                    |    8 -
 arch/arm/mach-s3c24xx/s3c2443.c                    |    8 -
 arch/arm/mach-s3c24xx/s3c244x.c                    |   11 --
 arch/arm/mach-s3c24xx/swrst-reset.c                |  160 ++++++++++++++++++++
 36 files changed, 275 insertions(+), 91 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/samsung/s3c24xx-swrst.txt
 create mode 100644 arch/arm/mach-s3c24xx/swrst-reset.c

-- 
1.7.10.4

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

* [PATCH 1/5] dt-bindings: document the s3c24xx software-reset register
  2014-01-06 18:35 [PATCH 0/5] ARM: S3C24XX: unify restart functions Heiko Stübner
@ 2014-01-06 18:37 ` Heiko Stübner
  2014-01-23 18:09   ` Tomasz Figa
  2014-01-06 18:38 ` [PATCH 2/5] ARM: S3C24XX: add generic handler for swrst resets Heiko Stübner
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Heiko Stübner @ 2014-01-06 18:37 UTC (permalink / raw)
  To: linux-arm-kernel

The S3C2412/S3C2413 as well as the S3C2443 and following contain a special
register that restarts the system when written to. This adds a simple
binding, so that it gets accessible on dt systems too.

We distinguish between the two types (s3c2412, s3c2443) because the
handling of the swrst register on the s3c2412 also needs to take care
of a hardware glitch at reset time.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 .../devicetree/bindings/arm/samsung/s3c24xx-swrst.txt  |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/samsung/s3c24xx-swrst.txt

diff --git a/Documentation/devicetree/bindings/arm/samsung/s3c24xx-swrst.txt b/Documentation/devicetree/bindings/arm/samsung/s3c24xx-swrst.txt
new file mode 100644
index 0000000..c3cacf2
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/s3c24xx-swrst.txt
@@ -0,0 +1,16 @@
+SAMSUNG S3C24XX software-reset register
+
+Some SoCs of the series contain a special software-reset register
+to let the system restart.
+
+Properties:
+ - compatible : should be one of
+    "samsung,s3c2412-swrst" - for S3C2412, S3C2413
+    "samsung,s3c2443-swrst" - for S3C2416, S3C2443, S3C2450
+ - reg : offset and length of the register.
+
+Example:
+	swrst at 4c000044 {
+		compatible = "samsung,s3c2443-swrst";
+		reg = <0x4c000044 0x4>;
+	};
-- 
1.7.10.4

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

* [PATCH 2/5] ARM: S3C24XX: add generic handler for swrst resets
  2014-01-06 18:35 [PATCH 0/5] ARM: S3C24XX: unify restart functions Heiko Stübner
  2014-01-06 18:37 ` [PATCH 1/5] dt-bindings: document the s3c24xx software-reset register Heiko Stübner
@ 2014-01-06 18:38 ` Heiko Stübner
  2014-01-06 18:39 ` [PATCH 3/5] ARM: S3C24XX: add common reset function Heiko Stübner
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2014-01-06 18:38 UTC (permalink / raw)
  To: linux-arm-kernel

Previously the s3c24xx socs using the swrst machnism simply wrote
the needed value to a statically mapped register.

To generalize and make it usable in the dt case create a reset handler
similar to the already existing watchdog-reset used by different samsung
architectures.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/Kconfig       |    5 ++
 arch/arm/mach-s3c24xx/Makefile      |    1 +
 arch/arm/mach-s3c24xx/common.h      |   16 ++++
 arch/arm/mach-s3c24xx/swrst-reset.c |  160 +++++++++++++++++++++++++++++++++++
 4 files changed, 182 insertions(+)
 create mode 100644 arch/arm/mach-s3c24xx/swrst-reset.c

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index e19e314..bb0f653 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -30,6 +30,11 @@ config S3C2410_COMMON_DCLK
 	  Temporary symbol to build the dclk driver based on the common clock
 	  framework.
 
+config S3C24XX_SWRST
+	bool
+	help
+	  Handle resets using the swrst register available on some s3c24xx SoCs.
+
 menu "SAMSUNG S3C24XX SoCs Support"
 
 comment "S3C24XX SoCs"
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 2235d0d..9cc1d58 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_CPU_S3C2443)	+= s3c2443.o
 # PM
 
 obj-$(CONFIG_PM)		+= pm.o irq-pm.o sleep.o
+obj-$(CONFIG_S3C24XX_SWRST)	+= swrst-reset.o
 
 # common code
 
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index 0f548c5..caf1534 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -131,4 +131,20 @@ void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
 				    void __iomem *reg_base);
 #endif
 
+#ifdef CONFIG_S3C24XX_SWRST
+void s3c24xx_swrst_reset(void);
+bool s3c24xx_swrst_reset_available(void);
+void s3c24xx_swrst_reset_of_init(void);
+void s3c24xx_swrst_reset_init(void __iomem *base, bool is_s3c2412);
+#else
+static inline void s3c24xx_swrst_reset(void) {}
+static inline bool s3c24xx_swrst_reset_available(void)
+{
+	return false;
+}
+static inline void s3c24xx_swrst_reset_of_init(void) {}
+static inline void s3c24xx_swrst_reset_init(void __iomem *base,
+					     bool is_s3c2412) {}
+#endif
+
 #endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
diff --git a/arch/arm/mach-s3c24xx/swrst-reset.c b/arch/arm/mach-s3c24xx/swrst-reset.c
new file mode 100644
index 0000000..d027c4a
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/swrst-reset.c
@@ -0,0 +1,160 @@
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/delay.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+
+/*
+ * Although the manuals state that the string to write to the register
+ * is soc-specific, at least the s3c2416 and s3c2450 do not seem to care
+ * what gets written to the register and have been using the s3c2443
+ * string all along.
+ */
+#define S3C2412_SWRST_RESET		(0x533C2412)
+#define S3C2443_SWRST_RESET		(0x533C2443)
+
+enum s3c_cpu_type {
+	TYPE_S3C2412,
+	TYPE_S3C2443,
+};
+
+struct s3c24xx_swrst_drv_data {
+	int cpu_type;
+};
+
+struct s3c2412_rst_clocks {
+	const char *clk;
+	const char *new_parent;
+};
+
+/* S3C2412 errata "Watch-dog/Software Reset Problem" specifies
+ * that this reset must be done with the SYSCLK sourced from
+ * EXTCLK instead of FOUT to avoid a glitch in the reset
+ * mechanism.
+ *
+ * See the watchdog section of the S3C2412 manual for more
+ * information on this fix.
+ *
+ * The proposed fix is to write "0" to the clksrc register,
+ * to reset the sysclk "which generates the ARMCLK, HCLK, PCLK".
+ * Translated to the clock implementation, this looks like:
+ */
+struct s3c2412_rst_clocks s3c2412_clocks[] = {
+	{ "mdivclk", "xti" },
+	{ "msysclk", "mdivclk" },
+};
+
+static void __iomem *swrst_base;
+static int swrst_type;
+
+void s3c24xx_swrst_reset(void)
+{
+	int i;
+	bool has_faults = true;
+
+	if (!swrst_base) {
+		pr_err("%s: swrst reset not initialized\n", __func__);
+		/* delay to allow the serial port to show the message */
+		mdelay(50);
+		return;
+	}
+
+	switch (swrst_type) {
+	case TYPE_S3C2412:
+		/* handle the needed clock changes */
+		for (i = 0; i < ARRAY_SIZE(s3c2412_clocks); i++) {
+			struct s3c2412_rst_clocks *entry = &s3c2412_clocks[i];
+			struct clk *clk, *new_parent;
+			int ret;
+
+			clk = clk_get(NULL, entry->clk);
+			if (IS_ERR(clk)) {
+				pr_err("s3c24xx-swrst: could not get clock %s, err %ld\n",
+				       entry->clk, PTR_ERR(clk));
+				has_faults = true;
+				continue;
+			}
+
+			new_parent = clk_get(NULL, entry->new_parent);
+			if (IS_ERR(new_parent)) {
+				pr_err("s3c24xx-swrst: could not get clock %s, err %ld\n",
+				       entry->new_parent, PTR_ERR(new_parent));
+				has_faults = true;
+				clk_put(clk);
+				continue;
+			}
+
+			ret = clk_set_parent(clk, new_parent);
+			if (ret) {
+				pr_err("s3c24xx-swrst: could not set the parent clock of %s to %s, err %d\n",
+				       entry->clk, entry->new_parent, ret);
+				has_faults = true;
+			}
+
+			clk_put(new_parent);
+			clk_put(clk);
+		}
+
+		if (has_faults) {
+			pr_warn("s3c24xx-swrst: some clocks could not be set to the needed parent.\n");
+			pr_warn("s3c24xx-swrst: this can trigger a glitch in the s3c2412 soc\n");
+		}
+
+		writel(S3C2412_SWRST_RESET, swrst_base);
+		break;
+	case TYPE_S3C2443:
+		writel(S3C2443_SWRST_RESET, swrst_base);
+		break;
+	}
+}
+
+bool s3c24xx_swrst_reset_available(void)
+{
+	return !!swrst_base;
+}
+
+#ifdef CONFIG_OF
+static struct s3c24xx_swrst_drv_data s3c24xx_swrst_drv_data_array[] = {
+	[TYPE_S3C2412] = { TYPE_S3C2412 },
+	[TYPE_S3C2443] = { TYPE_S3C2443 },
+};
+
+static const struct of_device_id s3c24xx_swrst_match[] = {
+	{
+		.compatible = "samsung,s3c2412-swrst",
+		.data = &s3c24xx_swrst_drv_data_array[TYPE_S3C2412],
+	}, {
+		.compatible = "samsung,s3c2443-swrst",
+		.data = &s3c24xx_swrst_drv_data_array[TYPE_S3C2443],
+	},
+	{},
+};
+
+void __init s3c24xx_swrst_reset_of_init(void)
+{
+	struct device_node *np;
+	const struct of_device_id *match;
+	struct s3c24xx_swrst_drv_data *data;
+
+	np = of_find_matching_node_and_match(NULL, s3c24xx_swrst_match, &match);
+	if (!np)
+		return;
+
+	data = (struct s3c24xx_swrst_drv_data *)match->data;
+	swrst_type = data->cpu_type;
+
+	swrst_base = of_iomap(np, 0);
+	if (!swrst_base) {
+		pr_err("%s: failed to map swrst register\n", __func__);
+		return;
+	}
+
+}
+#endif
+
+void __init s3c24xx_swrst_reset_init(void __iomem *base, bool is_s3c2412)
+{
+	swrst_base = base;
+	swrst_type = (is_s3c2412) ? TYPE_S3C2412 : TYPE_S3C2443;
+}
-- 
1.7.10.4

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

* [PATCH 3/5] ARM: S3C24XX: add common reset function
  2014-01-06 18:35 [PATCH 0/5] ARM: S3C24XX: unify restart functions Heiko Stübner
  2014-01-06 18:37 ` [PATCH 1/5] dt-bindings: document the s3c24xx software-reset register Heiko Stübner
  2014-01-06 18:38 ` [PATCH 2/5] ARM: S3C24XX: add generic handler for swrst resets Heiko Stübner
@ 2014-01-06 18:39 ` Heiko Stübner
  2014-01-06 18:40 ` [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function Heiko Stübner
  2014-01-06 18:40 ` [PATCH 5/5] ARM: S3C24XX: remove obsolete SoC-specific restart functions Heiko Stübner
  4 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2014-01-06 18:39 UTC (permalink / raw)
  To: linux-arm-kernel

The function first tries to use a swrst-block if available, then
a watchdog-reset and at the end a soft_restart as last measure.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/common.c |   26 ++++++++++++++++++++++++++
 arch/arm/mach-s3c24xx/common.h |    2 ++
 2 files changed, 28 insertions(+)

diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index a7b1269..a3b1d98 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -587,3 +587,29 @@ struct platform_device s3c2410_device_dclk = {
 	.resource	= s3c2410_dclk_resource,
 };
 #endif
+
+/*
+ * Some S3C24XX-SoCs have a special software-reset register and
+ * all of them seem to support the watchdog reset.
+ */
+void s3c24xx_restart(enum reboot_mode mode, const char *cmd)
+{
+	if (mode == REBOOT_SOFT)
+		soft_restart(0);
+
+	if (s3c24xx_swrst_reset_available()) {
+		pr_debug("s3c24xx: trying swrst-reset\n");
+		s3c24xx_swrst_reset();
+		/* delay to allow the serial port to show the message */
+		mdelay(50);
+	}
+
+#ifdef CONFIG_SAMSUNG_WDT_RESET
+	pr_debug("s3c24xx: trying watchdog-reset\n");
+	samsung_wdt_reset();
+	mdelay(50);
+#endif
+
+	/* we'll take a jump through zero as a poor second */
+	soft_restart(0);
+}
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index caf1534..20829a8 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -147,4 +147,6 @@ static inline void s3c24xx_swrst_reset_init(void __iomem *base,
 					     bool is_s3c2412) {}
 #endif
 
+void s3c24xx_restart(enum reboot_mode mode, const char *cmd);
+
 #endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
-- 
1.7.10.4

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

* [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
  2014-01-06 18:35 [PATCH 0/5] ARM: S3C24XX: unify restart functions Heiko Stübner
                   ` (2 preceding siblings ...)
  2014-01-06 18:39 ` [PATCH 3/5] ARM: S3C24XX: add common reset function Heiko Stübner
@ 2014-01-06 18:40 ` Heiko Stübner
  2014-01-23 18:12   ` Tomasz Figa
  2014-01-06 18:40 ` [PATCH 5/5] ARM: S3C24XX: remove obsolete SoC-specific restart functions Heiko Stübner
  4 siblings, 1 reply; 14+ messages in thread
From: Heiko Stübner @ 2014-01-06 18:40 UTC (permalink / raw)
  To: linux-arm-kernel

This converts all boards to use the new common restart function instead
of SoC specific ones.

The mach-s3c2416-dt board now tries to setup either a swrst- or watchdog-
reset so that it will be able to handle more s3c24xx-SoCs later on.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/boot/dts/s3c2416.dtsi          |    5 +++++
 arch/arm/mach-s3c24xx/Kconfig           |    3 +++
 arch/arm/mach-s3c24xx/common.c          |    5 +++++
 arch/arm/mach-s3c24xx/mach-amlm5900.c   |    2 +-
 arch/arm/mach-s3c24xx/mach-anubis.c     |    2 +-
 arch/arm/mach-s3c24xx/mach-at2440evb.c  |    2 +-
 arch/arm/mach-s3c24xx/mach-bast.c       |    2 +-
 arch/arm/mach-s3c24xx/mach-gta02.c      |    2 +-
 arch/arm/mach-s3c24xx/mach-h1940.c      |    2 +-
 arch/arm/mach-s3c24xx/mach-jive.c       |    2 +-
 arch/arm/mach-s3c24xx/mach-mini2440.c   |    2 +-
 arch/arm/mach-s3c24xx/mach-n30.c        |    4 ++--
 arch/arm/mach-s3c24xx/mach-nexcoder.c   |    2 +-
 arch/arm/mach-s3c24xx/mach-osiris.c     |    2 +-
 arch/arm/mach-s3c24xx/mach-otom.c       |    2 +-
 arch/arm/mach-s3c24xx/mach-qt2410.c     |    2 +-
 arch/arm/mach-s3c24xx/mach-rx1950.c     |    2 +-
 arch/arm/mach-s3c24xx/mach-rx3715.c     |    2 +-
 arch/arm/mach-s3c24xx/mach-s3c2416-dt.c |   11 ++++++++++-
 arch/arm/mach-s3c24xx/mach-smdk2410.c   |    2 +-
 arch/arm/mach-s3c24xx/mach-smdk2413.c   |    6 +++---
 arch/arm/mach-s3c24xx/mach-smdk2416.c   |    2 +-
 arch/arm/mach-s3c24xx/mach-smdk2440.c   |    2 +-
 arch/arm/mach-s3c24xx/mach-smdk2443.c   |    2 +-
 arch/arm/mach-s3c24xx/mach-tct_hammer.c |    2 +-
 arch/arm/mach-s3c24xx/mach-vr1000.c     |    2 +-
 arch/arm/mach-s3c24xx/mach-vstms.c      |    2 +-
 27 files changed, 49 insertions(+), 27 deletions(-)

diff --git a/arch/arm/boot/dts/s3c2416.dtsi b/arch/arm/boot/dts/s3c2416.dtsi
index c19d99c..a28d30f 100644
--- a/arch/arm/boot/dts/s3c2416.dtsi
+++ b/arch/arm/boot/dts/s3c2416.dtsi
@@ -35,6 +35,11 @@
 		#clock-cells = <1>;
 	};
 
+	swrst at 4c000044 {
+		compatible = "samsung,s3c2443-swrst";
+		reg = <0x4c000044 0x4>;
+	};
+
 	pinctrl at 56000000 {
 		compatible = "samsung,s3c2416-pinctrl";
 	};
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index bb0f653..8748fc3 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -62,6 +62,7 @@ config CPU_S3C2412
 	select S3C2412_COMMON_CLK
 	select S3C2412_DMA if S3C24XX_DMA
 	select S3C2412_PM if PM
+	select S3C24XX_SWRST
 	help
 	  Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
 
@@ -73,6 +74,7 @@ config CPU_S3C2416
 	select S3C2416_PM if PM
 	select S3C2443_COMMON_CLK
 	select S3C2443_DMA if S3C24XX_DMA
+	select S3C24XX_SWRST
 	help
 	  Support for the S3C2416 SoC from the S3C24XX line
 
@@ -110,6 +112,7 @@ config CPU_S3C2443
 	select CPU_LLSERIAL_S3C2440
 	select S3C2443_COMMON_CLK
 	select S3C2443_DMA if S3C24XX_DMA
+	select S3C24XX_SWRST
 	help
 	  Support for the S3C2443 SoC from the S3C24XX line
 
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index a3b1d98..bf57d4c 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -46,6 +46,7 @@
 #include <mach/regs-gpio.h>
 #include <plat/regs-serial.h>
 #include <mach/dma.h>
+#include <mach/regs-s3c2443-clock.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -538,9 +539,11 @@ void __init s3c2410_init_clocks(int xtal)
 #endif
 
 #ifdef CONFIG_CPU_S3C2412
+#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30)
 void __init s3c2412_init_clocks(int xtal)
 {
 	s3c2412_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
+	s3c24xx_swrst_reset_init(S3C2412_SWRST, true);
 }
 #endif
 
@@ -548,6 +551,7 @@ void __init s3c2412_init_clocks(int xtal)
 void __init s3c2416_init_clocks(int xtal)
 {
 	s3c2443_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
+	s3c24xx_swrst_reset_init(S3C2443_SWRST, false);
 }
 #endif
 
@@ -571,6 +575,7 @@ void __init s3c2442_init_clocks(int xtal)
 void __init s3c2443_init_clocks(int xtal)
 {
 	s3c2443_common_clk_init(NULL, xtal, 1, S3C24XX_VA_CLKPWR);
+	s3c24xx_swrst_reset_init(S3C2443_SWRST, false);
 }
 #endif
 
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index ebe06ad..d19cc49 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -246,5 +246,5 @@ MACHINE_START(AML_M5900, "AML_M5900")
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= amlm5900_init,
 	.init_time	= amlm5900_init_time,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index e43f984..43af5fb 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -456,5 +456,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
 	.init_machine	= anubis_init,
 	.init_irq	= s3c2440_init_irq,
 	.init_time	= anubis_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index f3ac0af..4df7f92 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -217,5 +217,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
 	.init_machine	= at2440evb_init,
 	.init_irq	= s3c2440_init_irq,
 	.init_time	= at2440evb_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index a1323bc..6ebb026 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -617,5 +617,5 @@ MACHINE_START(BAST, "Simtec-BAST")
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= bast_init,
 	.init_time	= bast_init_time,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index d8cd88c..60030a0 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -596,5 +596,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
 	.init_irq	= s3c2442_init_irq,
 	.init_machine	= gta02_machine_init,
 	.init_time	= gta02_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 873e452..192b8d2 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -743,5 +743,5 @@ MACHINE_START(H1940, "IPAQ-H1940")
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= h1940_init,
 	.init_time	= h1940_init_time,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 6c1a34f..08ca9c7 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -670,5 +670,5 @@ MACHINE_START(JIVE, "JIVE")
 	.map_io		= jive_map_io,
 	.init_machine	= jive_machine_init,
 	.init_time	= jive_init_time,
-	.restart	= s3c2412_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index d2b38f0..0686901 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -694,5 +694,5 @@ MACHINE_START(MINI2440, "MINI2440")
 	.init_machine	= mini2440_init,
 	.init_irq	= s3c2440_init_irq,
 	.init_time	= mini2440_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 8c9fa09..a083027 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -598,7 +598,7 @@ MACHINE_START(N30, "Acer-N30")
 	.init_machine	= n30_init,
 	.init_irq	= s3c2410_init_irq,
 	.map_io		= n30_map_io,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
 
 MACHINE_START(N35, "Acer-N35")
@@ -609,5 +609,5 @@ MACHINE_START(N35, "Acer-N35")
 	.init_machine	= n30_init,
 	.init_irq	= s3c2410_init_irq,
 	.map_io		= n30_map_io,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index c594071..3f4610e 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -158,5 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
 	.init_machine	= nexcoder_init,
 	.init_irq	= s3c2440_init_irq,
 	.init_time	= nexcoder_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index a0d290b..3382374 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -438,5 +438,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
 	.init_irq	= s3c2440_init_irq,
 	.init_machine	= osiris_init,
 	.init_time	= osiris_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c
index 889f7d7..228477d 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c24xx/mach-otom.c
@@ -122,5 +122,5 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
 	.init_machine	= otom11_init,
 	.init_irq	= s3c2410_init_irq,
 	.init_time	= otom11_init_time,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 96fcf08..e34d8a1 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -351,5 +351,5 @@ MACHINE_START(QT2410, "QT2410")
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= qt2410_machine_init,
 	.init_time	= qt2410_init_time,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index b46312a..2a3e1db 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -824,5 +824,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950")
 	.init_irq	= s3c2442_init_irq,
 	.init_machine = rx1950_init_machine,
 	.init_time	= rx1950_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index d842f45..e3dc759 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -214,5 +214,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
 	.init_irq	= s3c2440_init_irq,
 	.init_machine	= rx3715_init_machine,
 	.init_time	= rx3715_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
index 0a86953..88716fa4 100644
--- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
@@ -24,6 +24,7 @@
 
 #include <plat/cpu.h>
 #include <plat/pm.h>
+#include <plat/watchdog-reset.h>
 
 #include "common.h"
 
@@ -34,6 +35,14 @@ static void __init s3c2416_dt_map_io(void)
 
 static void __init s3c2416_dt_machine_init(void)
 {
+	s3c24xx_swrst_reset_of_init();
+
+#ifdef CONFIG_SAMSUNG_WDT_RESET
+	/* if no special swrst-device exists try to find a watchdog */
+	if (!s3c24xx_swrst_reset_available())
+		samsung_wdt_reset_of_init();
+#endif
+
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 	s3c_pm_init();
 }
@@ -50,5 +59,5 @@ DT_MACHINE_START(S3C2416_DT, "Samsung S3C2416 (Flattened Device Tree)")
 	.map_io		= s3c2416_dt_map_io,
 	.init_irq	= irqchip_init,
 	.init_machine	= s3c2416_dt_machine_init,
-	.restart	= s3c2416_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c
index c961e50..ced3557 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c
@@ -124,5 +124,5 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= smdk2410_init,
 	.init_time	= smdk2410_init_time,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index cb1a0c7..fe01b32 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -140,7 +140,7 @@ MACHINE_START(S3C2413, "S3C2413")
 	.map_io		= smdk2413_map_io,
 	.init_machine	= smdk2413_machine_init,
 	.init_time	= samsung_timer_init,
-	.restart	= s3c2412_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
 
 MACHINE_START(SMDK2412, "SMDK2412")
@@ -152,7 +152,7 @@ MACHINE_START(SMDK2412, "SMDK2412")
 	.map_io		= smdk2413_map_io,
 	.init_machine	= smdk2413_machine_init,
 	.init_time	= samsung_timer_init,
-	.restart	= s3c2412_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
 
 MACHINE_START(SMDK2413, "SMDK2413")
@@ -164,5 +164,5 @@ MACHINE_START(SMDK2413, "SMDK2413")
 	.map_io		= smdk2413_map_io,
 	.init_machine	= smdk2413_machine_init,
 	.init_time	= smdk2413_init_time,
-	.restart	= s3c2412_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index 3ec6d49..c22f2f1 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -262,5 +262,5 @@ MACHINE_START(SMDK2416, "SMDK2416")
 	.map_io		= smdk2416_map_io,
 	.init_machine	= smdk2416_machine_init,
 	.init_time	= smdk2416_init_time,
-	.restart	= s3c2416_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index 335fe26..d8c66b6 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -185,5 +185,5 @@ MACHINE_START(S3C2440, "SMDK2440")
 	.map_io		= smdk2440_map_io,
 	.init_machine	= smdk2440_machine_init,
 	.init_time	= smdk2440_init_time,
-	.restart	= s3c244x_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c
index 58da97b..3cbbd4f 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c
@@ -151,5 +151,5 @@ MACHINE_START(SMDK2443, "SMDK2443")
 	.map_io		= smdk2443_map_io,
 	.init_machine	= smdk2443_machine_init,
 	.init_time	= smdk2443_init_time,
-	.restart	= s3c2443_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
index 3d6afe7..bcc3efa 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -157,5 +157,5 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
 	.init_irq	= s3c2410_init_irq,
 	.init_machine	= tct_hammer_init,
 	.init_time	= tct_hammer_init_time,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index 443c74e..1828b1c 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -366,5 +366,5 @@ MACHINE_START(VR1000, "Thorcom-VR1000")
 	.init_machine	= vr1000_init,
 	.init_irq	= s3c2410_init_irq,
 	.init_time	= vr1000_init_time,
-	.restart	= s3c2410_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index d4ebaf4..63e627b 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -168,5 +168,5 @@ MACHINE_START(VSTMS, "VSTMS")
 	.init_machine	= vstms_init,
 	.map_io		= vstms_map_io,
 	.init_time	= vstms_init_time,
-	.restart	= s3c2412_restart,
+	.restart	= s3c24xx_restart,
 MACHINE_END
-- 
1.7.10.4

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

* [PATCH 5/5] ARM: S3C24XX: remove obsolete SoC-specific restart functions
  2014-01-06 18:35 [PATCH 0/5] ARM: S3C24XX: unify restart functions Heiko Stübner
                   ` (3 preceding siblings ...)
  2014-01-06 18:40 ` [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function Heiko Stübner
@ 2014-01-06 18:40 ` Heiko Stübner
  4 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2014-01-06 18:40 UTC (permalink / raw)
  To: linux-arm-kernel

All of them got replaced by the common s3c24xx_restart, so these can
go away.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/common.h  |    5 -----
 arch/arm/mach-s3c24xx/s3c2410.c |   12 ------------
 arch/arm/mach-s3c24xx/s3c2412.c |   20 --------------------
 arch/arm/mach-s3c24xx/s3c2416.c |    8 --------
 arch/arm/mach-s3c24xx/s3c2443.c |    8 --------
 arch/arm/mach-s3c24xx/s3c244x.c |   11 -----------
 6 files changed, 64 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index 20829a8..73be122 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -22,7 +22,6 @@ extern  int s3c2410a_init(void);
 extern void s3c2410_map_io(void);
 extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 extern void s3c2410_init_clocks(int xtal);
-extern void s3c2410_restart(enum reboot_mode mode, const char *cmd);
 extern void s3c2410_init_irq(void);
 #else
 #define s3c2410_init_clocks NULL
@@ -38,7 +37,6 @@ extern void s3c2412_map_io(void);
 extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 extern void s3c2412_init_clocks(int xtal);
 extern  int s3c2412_baseclk_add(void);
-extern void s3c2412_restart(enum reboot_mode mode, const char *cmd);
 extern void s3c2412_init_irq(void);
 #else
 #define s3c2412_init_clocks NULL
@@ -53,7 +51,6 @@ extern void s3c2416_map_io(void);
 extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 extern void s3c2416_init_clocks(int xtal);
 extern  int s3c2416_baseclk_add(void);
-extern void s3c2416_restart(enum reboot_mode mode, const char *cmd);
 extern void s3c2416_init_irq(void);
 
 extern struct syscore_ops s3c2416_irq_syscore_ops;
@@ -67,7 +64,6 @@ extern struct syscore_ops s3c2416_irq_syscore_ops;
 #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
 extern void s3c244x_map_io(void);
 extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-extern void s3c244x_restart(enum reboot_mode mode, const char *cmd);
 #else
 #define s3c244x_init_uarts NULL
 #endif
@@ -98,7 +94,6 @@ extern void s3c2443_map_io(void);
 extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 extern void s3c2443_init_clocks(int xtal);
 extern  int s3c2443_baseclk_add(void);
-extern void s3c2443_restart(enum reboot_mode mode, const char *cmd);
 extern void s3c2443_init_irq(void);
 #else
 #define s3c2443_init_clocks NULL
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index fef99fe..acb4cc3 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -140,15 +140,3 @@ int __init s3c2410a_init(void)
 	s3c2410_dev.bus = &s3c2410a_subsys;
 	return s3c2410_init();
 }
-
-void s3c2410_restart(enum reboot_mode mode, const char *cmd)
-{
-	if (mode == REBOOT_SOFT) {
-		soft_restart(0);
-	}
-
-	samsung_wdt_reset();
-
-	/* we'll take a jump through zero as a poor second */
-	soft_restart(0);
-}
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 99bb867..d894fbc 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -130,26 +130,6 @@ static void s3c2412_idle(void)
 	cpu_do_idle();
 }
 
-void s3c2412_restart(enum reboot_mode mode, const char *cmd)
-{
-	if (mode == REBOOT_SOFT)
-		soft_restart(0);
-
-	/* errata "Watch-dog/Software Reset Problem" specifies that
-	 * this reset must be done with the SYSCLK sourced from
-	 * EXTCLK instead of FOUT to avoid a glitch in the reset
-	 * mechanism.
-	 *
-	 * See the watchdog section of the S3C2412 manual for more
-	 * information on this fix.
-	 */
-
-	__raw_writel(0x00, S3C2412_CLKSRC);
-	__raw_writel(S3C2412_SWRST_RESET, S3C2412_SWRST);
-
-	mdelay(1);
-}
-
 /* s3c2412_map_io
  *
  * register the standard cpu IO areas, and any passed in from the
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
index 9ef3ccf..e6112c6 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c24xx/s3c2416.c
@@ -80,14 +80,6 @@ static struct device s3c2416_dev = {
 	.bus		= &s3c2416_subsys,
 };
 
-void s3c2416_restart(enum reboot_mode mode, const char *cmd)
-{
-	if (mode == REBOOT_SOFT)
-		soft_restart(0);
-
-	__raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
-}
-
 int __init s3c2416_init(void)
 {
 	printk(KERN_INFO "S3C2416: Initializing architecture\n");
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index b6c7191..2f7730d 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -60,14 +60,6 @@ static struct device s3c2443_dev = {
 	.bus		= &s3c2443_subsys,
 };
 
-void s3c2443_restart(enum reboot_mode mode, const char *cmd)
-{
-	if (mode == REBOOT_SOFT)
-		soft_restart(0);
-
-	__raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
-}
-
 int __init s3c2443_init(void)
 {
 	printk("S3C2443: Initialising architecture\n");
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index c15a1b7..360c69c 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -143,14 +143,3 @@ struct syscore_ops s3c244x_pm_syscore_ops = {
 	.suspend	= s3c244x_suspend,
 	.resume		= s3c244x_resume,
 };
-
-void s3c244x_restart(enum reboot_mode mode, const char *cmd)
-{
-	if (mode == REBOOT_SOFT)
-		soft_restart(0);
-
-	samsung_wdt_reset();
-
-	/* we'll take a jump through zero as a poor second */
-	soft_restart(0);
-}
-- 
1.7.10.4

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

* [PATCH 1/5] dt-bindings: document the s3c24xx software-reset register
  2014-01-06 18:37 ` [PATCH 1/5] dt-bindings: document the s3c24xx software-reset register Heiko Stübner
@ 2014-01-23 18:09   ` Tomasz Figa
  0 siblings, 0 replies; 14+ messages in thread
From: Tomasz Figa @ 2014-01-23 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Heiko,

On 06.01.2014 19:37, Heiko St?bner wrote:
> The S3C2412/S3C2413 as well as the S3C2443 and following contain a special
> register that restarts the system when written to. This adds a simple
> binding, so that it gets accessible on dt systems too.
>
> We distinguish between the two types (s3c2412, s3c2443) because the
> handling of the swrst register on the s3c2412 also needs to take care
> of a hardware glitch at reset time.
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>   .../devicetree/bindings/arm/samsung/s3c24xx-swrst.txt  |   16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/arm/samsung/s3c24xx-swrst.txt

Is there really a need to have separate bindings for this?

As far as I can see, the swreset register is a part of the clock 
controller, so restart function could be provided by clock driver and 
there would be no need to change anything in DT.

Best regards,
Tomasz

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

* [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
  2014-01-06 18:40 ` [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function Heiko Stübner
@ 2014-01-23 18:12   ` Tomasz Figa
  2014-01-23 18:36     ` Heiko Stübner
  0 siblings, 1 reply; 14+ messages in thread
From: Tomasz Figa @ 2014-01-23 18:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Heiko,

On 06.01.2014 19:40, Heiko St?bner wrote:
> This converts all boards to use the new common restart function instead
> of SoC specific ones.
>
> The mach-s3c2416-dt board now tries to setup either a swrst- or watchdog-
> reset so that it will be able to handle more s3c24xx-SoCs later on.
[snip]
> diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> index 0a86953..88716fa4 100644
> --- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> +++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> @@ -24,6 +24,7 @@
>
>   #include <plat/cpu.h>
>   #include <plat/pm.h>
> +#include <plat/watchdog-reset.h>
>
>   #include "common.h"
>
> @@ -34,6 +35,14 @@ static void __init s3c2416_dt_map_io(void)
>
>   static void __init s3c2416_dt_machine_init(void)
>   {
> +	s3c24xx_swrst_reset_of_init();
> +
> +#ifdef CONFIG_SAMSUNG_WDT_RESET
> +	/* if no special swrst-device exists try to find a watchdog */
> +	if (!s3c24xx_swrst_reset_available())
> +		samsung_wdt_reset_of_init();
> +#endif

Hmm... I think it would be safe to assume availability of soft reset, 
especially if you could move the restart code to the clock driver.

Best regards,
Tomasz

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

* [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
  2014-01-23 18:12   ` Tomasz Figa
@ 2014-01-23 18:36     ` Heiko Stübner
  2014-01-23 18:51       ` Tomasz Figa
  0 siblings, 1 reply; 14+ messages in thread
From: Heiko Stübner @ 2014-01-23 18:36 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, 23. Januar 2014, 19:12:04 schrieb Tomasz Figa:
> Hi Heiko,
> 
> On 06.01.2014 19:40, Heiko St?bner wrote:
> > This converts all boards to use the new common restart function instead
> > of SoC specific ones.
> > 
> > The mach-s3c2416-dt board now tries to setup either a swrst- or watchdog-
> > reset so that it will be able to handle more s3c24xx-SoCs later on.
> 
> [snip]
> 
> > diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> > b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c index 0a86953..88716fa4 100644
> > --- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> > +++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> > @@ -24,6 +24,7 @@
> > 
> >   #include <plat/cpu.h>
> >   #include <plat/pm.h>
> > 
> > +#include <plat/watchdog-reset.h>
> > 
> >   #include "common.h"
> > 
> > @@ -34,6 +35,14 @@ static void __init s3c2416_dt_map_io(void)
> > 
> >   static void __init s3c2416_dt_machine_init(void)
> >   {
> > 
> > +	s3c24xx_swrst_reset_of_init();
> > +
> > +#ifdef CONFIG_SAMSUNG_WDT_RESET
> > +	/* if no special swrst-device exists try to find a watchdog */
> > +	if (!s3c24xx_swrst_reset_available())
> > +		samsung_wdt_reset_of_init();
> > +#endif
> 
> Hmm... I think it would be safe to assume availability of soft reset,
> especially if you could move the restart code to the clock driver.

ok, so something like the following:

the boards would simply use samsung_watchdog_reset, which should according to 
the manuals be available on all architectures. And the ccf-driver on 
appropriate architectures would simple replace the arm_pm_restart callback 
with its own SoC specific one?

For the s3c2412 this also means that the clock-logic would get simplified.


Like this, or do I overlook something?


Thanks
Heiko

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

* [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
  2014-01-23 18:36     ` Heiko Stübner
@ 2014-01-23 18:51       ` Tomasz Figa
  2014-01-23 19:02         ` Heiko Stübner
  0 siblings, 1 reply; 14+ messages in thread
From: Tomasz Figa @ 2014-01-23 18:51 UTC (permalink / raw)
  To: linux-arm-kernel

On 23.01.2014 19:36, Heiko St?bner wrote:
> Am Donnerstag, 23. Januar 2014, 19:12:04 schrieb Tomasz Figa:
>> Hi Heiko,
>>
>> On 06.01.2014 19:40, Heiko St?bner wrote:
>>> This converts all boards to use the new common restart function instead
>>> of SoC specific ones.
>>>
>>> The mach-s3c2416-dt board now tries to setup either a swrst- or watchdog-
>>> reset so that it will be able to handle more s3c24xx-SoCs later on.
>>
>> [snip]
>>
>>> diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>> b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c index 0a86953..88716fa4 100644
>>> --- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>> +++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>> @@ -24,6 +24,7 @@
>>>
>>>    #include <plat/cpu.h>
>>>    #include <plat/pm.h>
>>>
>>> +#include <plat/watchdog-reset.h>
>>>
>>>    #include "common.h"
>>>
>>> @@ -34,6 +35,14 @@ static void __init s3c2416_dt_map_io(void)
>>>
>>>    static void __init s3c2416_dt_machine_init(void)
>>>    {
>>>
>>> +	s3c24xx_swrst_reset_of_init();
>>> +
>>> +#ifdef CONFIG_SAMSUNG_WDT_RESET
>>> +	/* if no special swrst-device exists try to find a watchdog */
>>> +	if (!s3c24xx_swrst_reset_available())
>>> +		samsung_wdt_reset_of_init();
>>> +#endif
>>
>> Hmm... I think it would be safe to assume availability of soft reset,
>> especially if you could move the restart code to the clock driver.
>
> ok, so something like the following:
>
> the boards would simply use samsung_watchdog_reset, which should according to
> the manuals be available on all architectures. And the ccf-driver on
> appropriate architectures would simple replace the arm_pm_restart callback
> with its own SoC specific one?
>
> For the s3c2412 this also means that the clock-logic would get simplified.
>
>
> Like this, or do I overlook something?

Hmm, this would mean a dependency on CONFIG_SAMSUNG_WDT_RESET then. Is 
there a need to fall back to it on platforms which support soft reset 
(assuming that CCF driver would always install its restart handler on 
applicable platforms)?

Note that you can make the restart field NULL in mach_desc in board files.

Best regards,
Tomasz

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

* [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
  2014-01-23 18:51       ` Tomasz Figa
@ 2014-01-23 19:02         ` Heiko Stübner
  2014-01-23 22:35           ` Tomasz Figa
  0 siblings, 1 reply; 14+ messages in thread
From: Heiko Stübner @ 2014-01-23 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, 23. Januar 2014, 19:51:34 schrieb Tomasz Figa:
> On 23.01.2014 19:36, Heiko St?bner wrote:
> > Am Donnerstag, 23. Januar 2014, 19:12:04 schrieb Tomasz Figa:
> >> Hi Heiko,
> >> 
> >> On 06.01.2014 19:40, Heiko St?bner wrote:
> >>> This converts all boards to use the new common restart function instead
> >>> of SoC specific ones.
> >>> 
> >>> The mach-s3c2416-dt board now tries to setup either a swrst- or
> >>> watchdog-
> >>> reset so that it will be able to handle more s3c24xx-SoCs later on.
> >> 
> >> [snip]
> >> 
> >>> diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> >>> b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c index 0a86953..88716fa4 100644
> >>> --- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> >>> +++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
> >>> @@ -24,6 +24,7 @@
> >>> 
> >>>    #include <plat/cpu.h>
> >>>    #include <plat/pm.h>
> >>> 
> >>> +#include <plat/watchdog-reset.h>
> >>> 
> >>>    #include "common.h"
> >>> 
> >>> @@ -34,6 +35,14 @@ static void __init s3c2416_dt_map_io(void)
> >>> 
> >>>    static void __init s3c2416_dt_machine_init(void)
> >>>    {
> >>> 
> >>> +	s3c24xx_swrst_reset_of_init();
> >>> +
> >>> +#ifdef CONFIG_SAMSUNG_WDT_RESET
> >>> +	/* if no special swrst-device exists try to find a watchdog */
> >>> +	if (!s3c24xx_swrst_reset_available())
> >>> +		samsung_wdt_reset_of_init();
> >>> +#endif
> >> 
> >> Hmm... I think it would be safe to assume availability of soft reset,
> >> especially if you could move the restart code to the clock driver.
> > 
> > ok, so something like the following:
> > 
> > the boards would simply use samsung_watchdog_reset, which should according
> > to the manuals be available on all architectures. And the ccf-driver on
> > appropriate architectures would simple replace the arm_pm_restart
> > callback with its own SoC specific one?
> > 
> > For the s3c2412 this also means that the clock-logic would get simplified.
> > 
> > 
> > Like this, or do I overlook something?
> 
> Hmm, this would mean a dependency on CONFIG_SAMSUNG_WDT_RESET then. Is
> there a need to fall back to it on platforms which support soft reset
> (assuming that CCF driver would always install its restart handler on
> applicable platforms)?

s3c2410, s3c2440 and s3c2442 do not have the swrst facility. They always use 
samsung_wdt_reset.

In general, I want to try establishing some sort of general restart way, as in 
the future one dt-board should hopefully be enough to cover all s3c24xx soc 
variants.


> Note that you can make the restart field NULL in mach_desc in board files.

As I said above, this is mainly meant for the dt-case. The legacy-board files 
are more or less only secondary, and the affected boards can of course then 
have a NULL restart handle :-) .

So for this the dt-board could simply use the wdt-reset, which then gets 
replaced by the ccf-based reset if appropriate.


Heiko

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

* [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
  2014-01-23 19:02         ` Heiko Stübner
@ 2014-01-23 22:35           ` Tomasz Figa
  2014-01-24  8:03             ` Heiko Stübner
  0 siblings, 1 reply; 14+ messages in thread
From: Tomasz Figa @ 2014-01-23 22:35 UTC (permalink / raw)
  To: linux-arm-kernel



On 23.01.2014 20:02, Heiko St?bner wrote:
> Am Donnerstag, 23. Januar 2014, 19:51:34 schrieb Tomasz Figa:
>> On 23.01.2014 19:36, Heiko St?bner wrote:
>>> Am Donnerstag, 23. Januar 2014, 19:12:04 schrieb Tomasz Figa:
>>>> Hi Heiko,
>>>>
>>>> On 06.01.2014 19:40, Heiko St?bner wrote:
>>>>> This converts all boards to use the new common restart function instead
>>>>> of SoC specific ones.
>>>>>
>>>>> The mach-s3c2416-dt board now tries to setup either a swrst- or
>>>>> watchdog-
>>>>> reset so that it will be able to handle more s3c24xx-SoCs later on.
>>>>
>>>> [snip]
>>>>
>>>>> diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>>>> b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c index 0a86953..88716fa4 100644
>>>>> --- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>>>> +++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>>>> @@ -24,6 +24,7 @@
>>>>>
>>>>>     #include <plat/cpu.h>
>>>>>     #include <plat/pm.h>
>>>>>
>>>>> +#include <plat/watchdog-reset.h>
>>>>>
>>>>>     #include "common.h"
>>>>>
>>>>> @@ -34,6 +35,14 @@ static void __init s3c2416_dt_map_io(void)
>>>>>
>>>>>     static void __init s3c2416_dt_machine_init(void)
>>>>>     {
>>>>>
>>>>> +	s3c24xx_swrst_reset_of_init();
>>>>> +
>>>>> +#ifdef CONFIG_SAMSUNG_WDT_RESET
>>>>> +	/* if no special swrst-device exists try to find a watchdog */
>>>>> +	if (!s3c24xx_swrst_reset_available())
>>>>> +		samsung_wdt_reset_of_init();
>>>>> +#endif
>>>>
>>>> Hmm... I think it would be safe to assume availability of soft reset,
>>>> especially if you could move the restart code to the clock driver.
>>>
>>> ok, so something like the following:
>>>
>>> the boards would simply use samsung_watchdog_reset, which should according
>>> to the manuals be available on all architectures. And the ccf-driver on
>>> appropriate architectures would simple replace the arm_pm_restart
>>> callback with its own SoC specific one?
>>>
>>> For the s3c2412 this also means that the clock-logic would get simplified.
>>>
>>>
>>> Like this, or do I overlook something?
>>
>> Hmm, this would mean a dependency on CONFIG_SAMSUNG_WDT_RESET then. Is
>> there a need to fall back to it on platforms which support soft reset
>> (assuming that CCF driver would always install its restart handler on
>> applicable platforms)?
>
> s3c2410, s3c2440 and s3c2442 do not have the swrst facility. They always use
> samsung_wdt_reset.
>
> In general, I want to try establishing some sort of general restart way, as in
> the future one dt-board should hopefully be enough to cover all s3c24xx soc
> variants.

If you make SAMSUNG_WDT_RESET always selected on S3C24XX then I guess 
it's fine.

>
>
>> Note that you can make the restart field NULL in mach_desc in board files.
>
> As I said above, this is mainly meant for the dt-case. The legacy-board files
> are more or less only secondary, and the affected boards can of course then
> have a NULL restart handle :-) .
>
> So for this the dt-board could simply use the wdt-reset, which then gets
> replaced by the ccf-based reset if appropriate.

OK. By the way, are there any benefits of using this software reset over 
watchdog reset? Maybe all S3C24xx could simply use watchdog reset and no 
special handling of those with swrst would be needed.

Best regards,
Tomasz

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

* [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
  2014-01-23 22:35           ` Tomasz Figa
@ 2014-01-24  8:03             ` Heiko Stübner
  2014-01-24 10:08               ` Tomasz Figa
  0 siblings, 1 reply; 14+ messages in thread
From: Heiko Stübner @ 2014-01-24  8:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 23 January 2014 23:35:29 Tomasz Figa wrote:
> On 23.01.2014 20:02, Heiko St?bner wrote:
> > Am Donnerstag, 23. Januar 2014, 19:51:34 schrieb Tomasz Figa:
> >> On 23.01.2014 19:36, Heiko St?bner wrote:
> > In general, I want to try establishing some sort of general restart way,
> > as in the future one dt-board should hopefully be enough to cover all
> > s3c24xx soc variants.
> 
> If you make SAMSUNG_WDT_RESET always selected on S3C24XX then I guess
> it's fine.
> 
> >> Note that you can make the restart field NULL in mach_desc in board
> >> files.
> > 
> > As I said above, this is mainly meant for the dt-case. The legacy-board
> > files are more or less only secondary, and the affected boards can of
> > course then have a NULL restart handle :-) .
> > 
> > So for this the dt-board could simply use the wdt-reset, which then gets
> > replaced by the ccf-based reset if appropriate.
> 
> OK. By the way, are there any benefits of using this software reset over
> watchdog reset? Maybe all S3C24xx could simply use watchdog reset and no
> special handling of those with swrst would be needed.

According to the manuals I looked at, all S3C24XX SoCs seem to support the 
watchdog reset - I'm not sure why the swrst variant was choosen for the newer 
ones when they were added initially. So yes in theory all of them seem to be 
able to use the watchdog reset.

But in any case the s3c2412 will need its own handling, due to the apparent 
clock problem during resets (mentioned in the code and the manuals of 
s3c2412/s3c2413).


Heiko

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

* [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
  2014-01-24  8:03             ` Heiko Stübner
@ 2014-01-24 10:08               ` Tomasz Figa
  0 siblings, 0 replies; 14+ messages in thread
From: Tomasz Figa @ 2014-01-24 10:08 UTC (permalink / raw)
  To: linux-arm-kernel



On 24.01.2014 09:03, Heiko St?bner wrote:
> On Thursday 23 January 2014 23:35:29 Tomasz Figa wrote:
>> On 23.01.2014 20:02, Heiko St?bner wrote:
>>> Am Donnerstag, 23. Januar 2014, 19:51:34 schrieb Tomasz Figa:
>>>> On 23.01.2014 19:36, Heiko St?bner wrote:
>>> In general, I want to try establishing some sort of general restart way,
>>> as in the future one dt-board should hopefully be enough to cover all
>>> s3c24xx soc variants.
>>
>> If you make SAMSUNG_WDT_RESET always selected on S3C24XX then I guess
>> it's fine.
>>
>>>> Note that you can make the restart field NULL in mach_desc in board
>>>> files.
>>>
>>> As I said above, this is mainly meant for the dt-case. The legacy-board
>>> files are more or less only secondary, and the affected boards can of
>>> course then have a NULL restart handle :-) .
>>>
>>> So for this the dt-board could simply use the wdt-reset, which then gets
>>> replaced by the ccf-based reset if appropriate.
>>
>> OK. By the way, are there any benefits of using this software reset over
>> watchdog reset? Maybe all S3C24xx could simply use watchdog reset and no
>> special handling of those with swrst would be needed.
>
> According to the manuals I looked at, all S3C24XX SoCs seem to support the
> watchdog reset - I'm not sure why the swrst variant was choosen for the newer
> ones when they were added initially. So yes in theory all of them seem to be
> able to use the watchdog reset.
>
> But in any case the s3c2412 will need its own handling, due to the apparent
> clock problem during resets (mentioned in the code and the manuals of
> s3c2412/s3c2413).

OK. So WDT by default (always selected in Kconfig) and override to SWRST 
in clock driver if available should work.

Best regards,
Tomasz

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

end of thread, other threads:[~2014-01-24 10:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-06 18:35 [PATCH 0/5] ARM: S3C24XX: unify restart functions Heiko Stübner
2014-01-06 18:37 ` [PATCH 1/5] dt-bindings: document the s3c24xx software-reset register Heiko Stübner
2014-01-23 18:09   ` Tomasz Figa
2014-01-06 18:38 ` [PATCH 2/5] ARM: S3C24XX: add generic handler for swrst resets Heiko Stübner
2014-01-06 18:39 ` [PATCH 3/5] ARM: S3C24XX: add common reset function Heiko Stübner
2014-01-06 18:40 ` [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function Heiko Stübner
2014-01-23 18:12   ` Tomasz Figa
2014-01-23 18:36     ` Heiko Stübner
2014-01-23 18:51       ` Tomasz Figa
2014-01-23 19:02         ` Heiko Stübner
2014-01-23 22:35           ` Tomasz Figa
2014-01-24  8:03             ` Heiko Stübner
2014-01-24 10:08               ` Tomasz Figa
2014-01-06 18:40 ` [PATCH 5/5] ARM: S3C24XX: remove obsolete SoC-specific restart functions Heiko Stübner

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