All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: S5P: Add Support common arch_reset() for S5P SoCs
@ 2010-06-23 22:31 ` Kukjin Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc; +Cc: ben-linux

This patch adds system define for arch_reset() for S5P SoCs
such as S5P6440, S5P6442, S5PC100 and S5PV210/S5PC110.
Now perform reset using Watchdog reset, SWRESET support with
s5p_reset_hook() will be added later.

NOTE: depends on 'Add Watchdog support for S5PC100'

ARM: S5P6442: Add Watchdog Timer map for S5P6442
ARM: S5P: Add System define for arch_reset()
ARM: S5P: Add Support common arch_reset() for S5P SoCs

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

* [PATCH] ARM: S5P: Add Support common arch_reset() for S5P SoCs
@ 2010-06-23 22:31 ` Kukjin Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds system define for arch_reset() for S5P SoCs
such as S5P6440, S5P6442, S5PC100 and S5PV210/S5PC110.
Now perform reset using Watchdog reset, SWRESET support with
s5p_reset_hook() will be added later.

NOTE: depends on 'Add Watchdog support for S5PC100'

ARM: S5P6442: Add Watchdog Timer map for S5P6442
ARM: S5P: Add System define for arch_reset()
ARM: S5P: Add Support common arch_reset() for S5P SoCs

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

* [PATCH 1/3] ARM: S5P6442: Add Watchdog Timer map for S5P6442
  2010-06-23 22:31 ` Kukjin Kim
@ 2010-06-23 22:31   ` Kukjin Kim
  -1 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc; +Cc: ben-linux, Jongpill Lee, Kukjin Kim

From: Jongpill Lee <boyko.lee@samsung.com>

This patch adds definition of Watchdog Timer map.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-s5p6442/include/mach/map.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5p6442/include/mach/map.h b/arch/arm/mach-s5p6442/include/mach/map.h
index 32ca424..281d256 100644
--- a/arch/arm/mach-s5p6442/include/mach/map.h
+++ b/arch/arm/mach-s5p6442/include/mach/map.h
@@ -42,6 +42,8 @@
 
 #define S5P6442_PA_SYSTIMER   	(0xEA100000)
 
+#define S5P6442_PA_WATCHDOG	(0xEA200000)
+
 #define S5P6442_PA_UART		(0xEC000000)
 
 #define S5P_PA_UART0		(S5P6442_PA_UART + 0x0)
@@ -65,6 +67,7 @@
 #define S5P6442_PA_PCM1		0xF2500000
 
 /* compatibiltiy defines. */
+#define S3C_PA_WDT		S5P6442_PA_WATCHDOG
 #define S3C_PA_UART		S5P6442_PA_UART
 #define S3C_PA_IIC		S5P6442_PA_IIC0
 
-- 
1.6.2.5

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

* [PATCH 1/3] ARM: S5P6442: Add Watchdog Timer map for S5P6442
@ 2010-06-23 22:31   ` Kukjin Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jongpill Lee <boyko.lee@samsung.com>

This patch adds definition of Watchdog Timer map.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-s5p6442/include/mach/map.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5p6442/include/mach/map.h b/arch/arm/mach-s5p6442/include/mach/map.h
index 32ca424..281d256 100644
--- a/arch/arm/mach-s5p6442/include/mach/map.h
+++ b/arch/arm/mach-s5p6442/include/mach/map.h
@@ -42,6 +42,8 @@
 
 #define S5P6442_PA_SYSTIMER   	(0xEA100000)
 
+#define S5P6442_PA_WATCHDOG	(0xEA200000)
+
 #define S5P6442_PA_UART		(0xEC000000)
 
 #define S5P_PA_UART0		(S5P6442_PA_UART + 0x0)
@@ -65,6 +67,7 @@
 #define S5P6442_PA_PCM1		0xF2500000
 
 /* compatibiltiy defines. */
+#define S3C_PA_WDT		S5P6442_PA_WATCHDOG
 #define S3C_PA_UART		S5P6442_PA_UART
 #define S3C_PA_IIC		S5P6442_PA_IIC0
 
-- 
1.6.2.5

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

* [PATCH 2/3] ARM: S5P: Add System define for arch_reset()
  2010-06-23 22:31 ` Kukjin Kim
@ 2010-06-23 22:31   ` Kukjin Kim
  -1 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc; +Cc: ben-linux, Jongpill Lee, Kukjin Kim

From: Jongpill Lee <boyko.lee@samsung.com>

This patch adds system define for arch_reset() using Watchdog reset.
And adds IO mapping for using WDT.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/plat-s5p/cpu.c                       |    5 +++++
 arch/arm/plat-s5p/include/plat/system-reset.h |   24 ++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-s5p/include/plat/system-reset.h

diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
index 75cb8c3..1ab55e8 100644
--- a/arch/arm/plat-s5p/cpu.c
+++ b/arch/arm/plat-s5p/cpu.c
@@ -103,6 +103,11 @@ static struct map_desc s5p_iodesc[] __initdata = {
 		.pfn		= __phys_to_pfn(S5P_PA_GPIO),
 		.length		= SZ_4K,
 		.type		= MT_DEVICE,
+	}, {
+		.virtual	= (unsigned long)S3C_VA_WATCHDOG,
+		.pfn		= __phys_to_pfn(S3C_PA_WDT),
+		.length		= SZ_4K,
+		.type		= MT_DEVICE,
 	},
 };
 
diff --git a/arch/arm/plat-s5p/include/plat/system-reset.h b/arch/arm/plat-s5p/include/plat/system-reset.h
new file mode 100644
index 0000000..7f76a16
--- /dev/null
+++ b/arch/arm/plat-s5p/include/plat/system-reset.h
@@ -0,0 +1,24 @@
+/* linux/arch/arm/plat-s5p/include/plat/system-reset.h
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * Based on arch/arm/mach-s3c2410/include/mach/system-reset.h
+ *
+ * S5P - System define for arch_reset()
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <plat/watchdog-reset.h>
+
+static void arch_reset(char mode, const char *cmd)
+{
+	/* Perform reset using Watchdog reset.
+	 * SWRESET support will be added later.
+	 */
+
+	arch_wdt_reset();
+}
-- 
1.6.2.5

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

* [PATCH 2/3] ARM: S5P: Add System define for arch_reset()
@ 2010-06-23 22:31   ` Kukjin Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jongpill Lee <boyko.lee@samsung.com>

This patch adds system define for arch_reset() using Watchdog reset.
And adds IO mapping for using WDT.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/plat-s5p/cpu.c                       |    5 +++++
 arch/arm/plat-s5p/include/plat/system-reset.h |   24 ++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-s5p/include/plat/system-reset.h

diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
index 75cb8c3..1ab55e8 100644
--- a/arch/arm/plat-s5p/cpu.c
+++ b/arch/arm/plat-s5p/cpu.c
@@ -103,6 +103,11 @@ static struct map_desc s5p_iodesc[] __initdata = {
 		.pfn		= __phys_to_pfn(S5P_PA_GPIO),
 		.length		= SZ_4K,
 		.type		= MT_DEVICE,
+	}, {
+		.virtual	= (unsigned long)S3C_VA_WATCHDOG,
+		.pfn		= __phys_to_pfn(S3C_PA_WDT),
+		.length		= SZ_4K,
+		.type		= MT_DEVICE,
 	},
 };
 
diff --git a/arch/arm/plat-s5p/include/plat/system-reset.h b/arch/arm/plat-s5p/include/plat/system-reset.h
new file mode 100644
index 0000000..7f76a16
--- /dev/null
+++ b/arch/arm/plat-s5p/include/plat/system-reset.h
@@ -0,0 +1,24 @@
+/* linux/arch/arm/plat-s5p/include/plat/system-reset.h
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * Based on arch/arm/mach-s3c2410/include/mach/system-reset.h
+ *
+ * S5P - System define for arch_reset()
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <plat/watchdog-reset.h>
+
+static void arch_reset(char mode, const char *cmd)
+{
+	/* Perform reset using Watchdog reset.
+	 * SWRESET support will be added later.
+	 */
+
+	arch_wdt_reset();
+}
-- 
1.6.2.5

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

* [PATCH 3/3] ARM: S5P: Add Support common arch_reset() for S5P SoCs
  2010-06-23 22:31 ` Kukjin Kim
@ 2010-06-23 22:31   ` Kukjin Kim
  -1 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel, linux-samsung-soc; +Cc: ben-linux, Jongpill Lee, Kukjin Kim

From: Jongpill Lee <boyko.lee@samsung.com>

This patch adds support common arch_reset() for
S5P6440, S5P6442, S5PC100 and S5PV210/S5PC110.
Now perform reset using Watchdog reset, SWRESET
support with s5p_reset_hook() will be added later.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-s5p6440/include/mach/system.h |    7 ++-----
 arch/arm/mach-s5p6442/include/mach/system.h |    7 ++-----
 arch/arm/mach-s5pc100/include/mach/system.h |    9 +--------
 arch/arm/mach-s5pv210/include/mach/system.h |    7 ++-----
 4 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-s5p6440/include/mach/system.h b/arch/arm/mach-s5p6440/include/mach/system.h
index d2dd817..a359ee3 100644
--- a/arch/arm/mach-s5p6440/include/mach/system.h
+++ b/arch/arm/mach-s5p6440/include/mach/system.h
@@ -13,12 +13,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-static void arch_idle(void)
-{
-	/* nothing here yet */
-}
+#include <plat/system-reset.h>
 
-static void arch_reset(char mode, const char *cmd)
+static void arch_idle(void)
 {
 	/* nothing here yet */
 }
diff --git a/arch/arm/mach-s5p6442/include/mach/system.h b/arch/arm/mach-s5p6442/include/mach/system.h
index 8bcd8ed..c30c1cc 100644
--- a/arch/arm/mach-s5p6442/include/mach/system.h
+++ b/arch/arm/mach-s5p6442/include/mach/system.h
@@ -13,12 +13,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-static void arch_idle(void)
-{
-	/* nothing here yet */
-}
+#include <plat/system-reset.h>
 
-static void arch_reset(char mode, const char *cmd)
+static void arch_idle(void)
 {
 	/* nothing here yet */
 }
diff --git a/arch/arm/mach-s5pc100/include/mach/system.h b/arch/arm/mach-s5pc100/include/mach/system.h
index 681f626..a9ea57c 100644
--- a/arch/arm/mach-s5pc100/include/mach/system.h
+++ b/arch/arm/mach-s5pc100/include/mach/system.h
@@ -11,18 +11,11 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-#include <linux/io.h>
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+#include <plat/system-reset.h>
 
 static void arch_idle(void)
 {
 	/* nothing here yet */
 }
 
-static void arch_reset(char mode, const char *cmd)
-{
-	__raw_writel(S5PC100_SWRESET_RESETVAL, S5PC100_SWRESET);
-	return;
-}
 #endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-s5pv210/include/mach/system.h b/arch/arm/mach-s5pv210/include/mach/system.h
index 1ca04d5..af8a200 100644
--- a/arch/arm/mach-s5pv210/include/mach/system.h
+++ b/arch/arm/mach-s5pv210/include/mach/system.h
@@ -13,12 +13,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-static void arch_idle(void)
-{
-	/* nothing here yet */
-}
+#include <plat/system-reset.h>
 
-static void arch_reset(char mode, const char *cmd)
+static void arch_idle(void)
 {
 	/* nothing here yet */
 }
-- 
1.6.2.5

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

* [PATCH 3/3] ARM: S5P: Add Support common arch_reset() for S5P SoCs
@ 2010-06-23 22:31   ` Kukjin Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jongpill Lee <boyko.lee@samsung.com>

This patch adds support common arch_reset() for
S5P6440, S5P6442, S5PC100 and S5PV210/S5PC110.
Now perform reset using Watchdog reset, SWRESET
support with s5p_reset_hook() will be added later.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-s5p6440/include/mach/system.h |    7 ++-----
 arch/arm/mach-s5p6442/include/mach/system.h |    7 ++-----
 arch/arm/mach-s5pc100/include/mach/system.h |    9 +--------
 arch/arm/mach-s5pv210/include/mach/system.h |    7 ++-----
 4 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-s5p6440/include/mach/system.h b/arch/arm/mach-s5p6440/include/mach/system.h
index d2dd817..a359ee3 100644
--- a/arch/arm/mach-s5p6440/include/mach/system.h
+++ b/arch/arm/mach-s5p6440/include/mach/system.h
@@ -13,12 +13,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-static void arch_idle(void)
-{
-	/* nothing here yet */
-}
+#include <plat/system-reset.h>
 
-static void arch_reset(char mode, const char *cmd)
+static void arch_idle(void)
 {
 	/* nothing here yet */
 }
diff --git a/arch/arm/mach-s5p6442/include/mach/system.h b/arch/arm/mach-s5p6442/include/mach/system.h
index 8bcd8ed..c30c1cc 100644
--- a/arch/arm/mach-s5p6442/include/mach/system.h
+++ b/arch/arm/mach-s5p6442/include/mach/system.h
@@ -13,12 +13,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-static void arch_idle(void)
-{
-	/* nothing here yet */
-}
+#include <plat/system-reset.h>
 
-static void arch_reset(char mode, const char *cmd)
+static void arch_idle(void)
 {
 	/* nothing here yet */
 }
diff --git a/arch/arm/mach-s5pc100/include/mach/system.h b/arch/arm/mach-s5pc100/include/mach/system.h
index 681f626..a9ea57c 100644
--- a/arch/arm/mach-s5pc100/include/mach/system.h
+++ b/arch/arm/mach-s5pc100/include/mach/system.h
@@ -11,18 +11,11 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-#include <linux/io.h>
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+#include <plat/system-reset.h>
 
 static void arch_idle(void)
 {
 	/* nothing here yet */
 }
 
-static void arch_reset(char mode, const char *cmd)
-{
-	__raw_writel(S5PC100_SWRESET_RESETVAL, S5PC100_SWRESET);
-	return;
-}
 #endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-s5pv210/include/mach/system.h b/arch/arm/mach-s5pv210/include/mach/system.h
index 1ca04d5..af8a200 100644
--- a/arch/arm/mach-s5pv210/include/mach/system.h
+++ b/arch/arm/mach-s5pv210/include/mach/system.h
@@ -13,12 +13,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-static void arch_idle(void)
-{
-	/* nothing here yet */
-}
+#include <plat/system-reset.h>
 
-static void arch_reset(char mode, const char *cmd)
+static void arch_idle(void)
 {
 	/* nothing here yet */
 }
-- 
1.6.2.5

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

* Re: [PATCH 2/3] ARM: S5P: Add System define for arch_reset()
  2010-06-23 22:31   ` Kukjin Kim
@ 2010-06-24  1:35     ` Kyungmin Park
  -1 siblings, 0 replies; 14+ messages in thread
From: Kyungmin Park @ 2010-06-24  1:35 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: linux-arm-kernel, linux-samsung-soc, ben-linux, Jongpill Lee

On Thu, Jun 24, 2010 at 7:31 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> From: Jongpill Lee <boyko.lee@samsung.com>
>
> This patch adds system define for arch_reset() using Watchdog reset.
> And adds IO mapping for using WDT.

Are there any reason to use the WDT to system reset?
As original purpose of WDT. doesn't it better to use system reset?
Since we use the WDT reset at other purpose. but if you add the WDT
reset to system reset.
then we can't control it. bootloader check the reset reason then
report something wrong at previous operation.

So I want to use system reset as original purpose.

Thank you,
Kyungmin Park

>
> Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
>  arch/arm/plat-s5p/cpu.c                       |    5 +++++
>  arch/arm/plat-s5p/include/plat/system-reset.h |   24 ++++++++++++++++++++++++
>  2 files changed, 29 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/plat-s5p/include/plat/system-reset.h
>
> diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
> index 75cb8c3..1ab55e8 100644
> --- a/arch/arm/plat-s5p/cpu.c
> +++ b/arch/arm/plat-s5p/cpu.c
> @@ -103,6 +103,11 @@ static struct map_desc s5p_iodesc[] __initdata = {
>                .pfn            = __phys_to_pfn(S5P_PA_GPIO),
>                .length         = SZ_4K,
>                .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)S3C_VA_WATCHDOG,
> +               .pfn            = __phys_to_pfn(S3C_PA_WDT),
> +               .length         = SZ_4K,
> +               .type           = MT_DEVICE,
>        },
>  };
>
> diff --git a/arch/arm/plat-s5p/include/plat/system-reset.h b/arch/arm/plat-s5p/include/plat/system-reset.h
> new file mode 100644
> index 0000000..7f76a16
> --- /dev/null
> +++ b/arch/arm/plat-s5p/include/plat/system-reset.h
> @@ -0,0 +1,24 @@
> +/* linux/arch/arm/plat-s5p/include/plat/system-reset.h
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com
> + *
> + * Based on arch/arm/mach-s3c2410/include/mach/system-reset.h
> + *
> + * S5P - System define for arch_reset()
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#include <plat/watchdog-reset.h>
> +
> +static void arch_reset(char mode, const char *cmd)
> +{
> +       /* Perform reset using Watchdog reset.
> +        * SWRESET support will be added later.
> +        */
> +
> +       arch_wdt_reset();
> +}
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* [PATCH 2/3] ARM: S5P: Add System define for arch_reset()
@ 2010-06-24  1:35     ` Kyungmin Park
  0 siblings, 0 replies; 14+ messages in thread
From: Kyungmin Park @ 2010-06-24  1:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 24, 2010 at 7:31 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> From: Jongpill Lee <boyko.lee@samsung.com>
>
> This patch adds system define for arch_reset() using Watchdog reset.
> And adds IO mapping for using WDT.

Are there any reason to use the WDT to system reset?
As original purpose of WDT. doesn't it better to use system reset?
Since we use the WDT reset at other purpose. but if you add the WDT
reset to system reset.
then we can't control it. bootloader check the reset reason then
report something wrong at previous operation.

So I want to use system reset as original purpose.

Thank you,
Kyungmin Park

>
> Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
> ?arch/arm/plat-s5p/cpu.c ? ? ? ? ? ? ? ? ? ? ? | ? ?5 +++++
> ?arch/arm/plat-s5p/include/plat/system-reset.h | ? 24 ++++++++++++++++++++++++
> ?2 files changed, 29 insertions(+), 0 deletions(-)
> ?create mode 100644 arch/arm/plat-s5p/include/plat/system-reset.h
>
> diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
> index 75cb8c3..1ab55e8 100644
> --- a/arch/arm/plat-s5p/cpu.c
> +++ b/arch/arm/plat-s5p/cpu.c
> @@ -103,6 +103,11 @@ static struct map_desc s5p_iodesc[] __initdata = {
> ? ? ? ? ? ? ? ?.pfn ? ? ? ? ? ?= __phys_to_pfn(S5P_PA_GPIO),
> ? ? ? ? ? ? ? ?.length ? ? ? ? = SZ_4K,
> ? ? ? ? ? ? ? ?.type ? ? ? ? ? = MT_DEVICE,
> + ? ? ? }, {
> + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S3C_VA_WATCHDOG,
> + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S3C_PA_WDT),
> + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_4K,
> + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
> ? ? ? ?},
> ?};
>
> diff --git a/arch/arm/plat-s5p/include/plat/system-reset.h b/arch/arm/plat-s5p/include/plat/system-reset.h
> new file mode 100644
> index 0000000..7f76a16
> --- /dev/null
> +++ b/arch/arm/plat-s5p/include/plat/system-reset.h
> @@ -0,0 +1,24 @@
> +/* linux/arch/arm/plat-s5p/include/plat/system-reset.h
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + * ? ? ? ? ? ? http://www.samsung.com
> + *
> + * Based on arch/arm/mach-s3c2410/include/mach/system-reset.h
> + *
> + * S5P - System define for arch_reset()
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#include <plat/watchdog-reset.h>
> +
> +static void arch_reset(char mode, const char *cmd)
> +{
> + ? ? ? /* Perform reset using Watchdog reset.
> + ? ? ? ?* SWRESET support will be added later.
> + ? ? ? ?*/
> +
> + ? ? ? arch_wdt_reset();
> +}
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>

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

* RE: [PATCH 2/3] ARM: S5P: Add System define for arch_reset()
  2010-06-24  1:35     ` Kyungmin Park
@ 2010-06-24 13:11       ` Kukjin Kim
  -1 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-24 13:11 UTC (permalink / raw)
  To: 'Kyungmin Park'
  Cc: linux-arm-kernel, linux-samsung-soc, ben-linux, 'Jongpill Lee'

Kyungmin Park wrote:
> 
> On Thu, Jun 24, 2010 at 7:31 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> > From: Jongpill Lee <boyko.lee@samsung.com>
> >
> > This patch adds system define for arch_reset() using Watchdog reset.
> > And adds IO mapping for using WDT.
> 
> Are there any reason to use the WDT to system reset?

Yeah, I already commented about that.
Now Samsung SoC hardware engineer recommends to use the reset of watchdog
instead of software reset by restriction of hardware environment.

> As original purpose of WDT. doesn't it better to use system reset?

Original purpose? I think, WDT can be used as software reset.

> Since we use the WDT reset at other purpose. but if you add the WDT
> reset to system reset.
> then we can't control it. bootloader check the reset reason then
> report something wrong at previous operation.

Yeah, I know your needs. If watchdog reset used as software reset, can't
distinguish who call watchdog reset.
And actually, need to check/debug about abnormal reset status when called
watchdog reset.

> 
> So I want to use system reset as original purpose.
> 
Yes, I think so, if can be used SWRESET, will add that functionality.
But right now...no.

(snip)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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

* [PATCH 2/3] ARM: S5P: Add System define for arch_reset()
@ 2010-06-24 13:11       ` Kukjin Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2010-06-24 13:11 UTC (permalink / raw)
  To: linux-arm-kernel

Kyungmin Park wrote:
> 
> On Thu, Jun 24, 2010 at 7:31 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> > From: Jongpill Lee <boyko.lee@samsung.com>
> >
> > This patch adds system define for arch_reset() using Watchdog reset.
> > And adds IO mapping for using WDT.
> 
> Are there any reason to use the WDT to system reset?

Yeah, I already commented about that.
Now Samsung SoC hardware engineer recommends to use the reset of watchdog
instead of software reset by restriction of hardware environment.

> As original purpose of WDT. doesn't it better to use system reset?

Original purpose? I think, WDT can be used as software reset.

> Since we use the WDT reset at other purpose. but if you add the WDT
> reset to system reset.
> then we can't control it. bootloader check the reset reason then
> report something wrong at previous operation.

Yeah, I know your needs. If watchdog reset used as software reset, can't
distinguish who call watchdog reset.
And actually, need to check/debug about abnormal reset status when called
watchdog reset.

> 
> So I want to use system reset as original purpose.
> 
Yes, I think so, if can be used SWRESET, will add that functionality.
But right now...no.

(snip)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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

* Re: [PATCH 2/3] ARM: S5P: Add System define for arch_reset()
  2010-06-24 13:11       ` Kukjin Kim
@ 2010-06-24 13:19         ` Jassi Brar
  -1 siblings, 0 replies; 14+ messages in thread
From: Jassi Brar @ 2010-06-24 13:19 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Kyungmin Park, linux-arm-kernel, linux-samsung-soc, ben-linux,
	Jongpill Lee

On Thu, Jun 24, 2010 at 10:11 PM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Kyungmin Park wrote:
>>
>> On Thu, Jun 24, 2010 at 7:31 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
>> > From: Jongpill Lee <boyko.lee@samsung.com>
>> >
>> > This patch adds system define for arch_reset() using Watchdog reset.
>> > And adds IO mapping for using WDT.
>>
>> Are there any reason to use the WDT to system reset?
>
> Yeah, I already commented about that.
> Now Samsung SoC hardware engineer recommends to use the reset of watchdog
> instead of software reset by restriction of hardware environment.
>
>> As original purpose of WDT. doesn't it better to use system reset?
>
> Original purpose? I think, WDT can be used as software reset.
I agree with Kyungmin Park.
Ideally WDT shud be used as a way to detect deadlock/starvation. When
the bootloader realizes the reset was due to WDT, different course of action
should be taken than that for reset due to, say, reboot command.

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

* [PATCH 2/3] ARM: S5P: Add System define for arch_reset()
@ 2010-06-24 13:19         ` Jassi Brar
  0 siblings, 0 replies; 14+ messages in thread
From: Jassi Brar @ 2010-06-24 13:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 24, 2010 at 10:11 PM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Kyungmin Park wrote:
>>
>> On Thu, Jun 24, 2010 at 7:31 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
>> > From: Jongpill Lee <boyko.lee@samsung.com>
>> >
>> > This patch adds system define for arch_reset() using Watchdog reset.
>> > And adds IO mapping for using WDT.
>>
>> Are there any reason to use the WDT to system reset?
>
> Yeah, I already commented about that.
> Now Samsung SoC hardware engineer recommends to use the reset of watchdog
> instead of software reset by restriction of hardware environment.
>
>> As original purpose of WDT. doesn't it better to use system reset?
>
> Original purpose? I think, WDT can be used as software reset.
I agree with Kyungmin Park.
Ideally WDT shud be used as a way to detect deadlock/starvation. When
the bootloader realizes the reset was due to WDT, different course of action
should be taken than that for reset due to, say, reboot command.

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

end of thread, other threads:[~2010-06-24 13:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-23 22:31 [PATCH] ARM: S5P: Add Support common arch_reset() for S5P SoCs Kukjin Kim
2010-06-23 22:31 ` Kukjin Kim
2010-06-23 22:31 ` [PATCH 1/3] ARM: S5P6442: Add Watchdog Timer map for S5P6442 Kukjin Kim
2010-06-23 22:31   ` Kukjin Kim
2010-06-23 22:31 ` [PATCH 2/3] ARM: S5P: Add System define for arch_reset() Kukjin Kim
2010-06-23 22:31   ` Kukjin Kim
2010-06-24  1:35   ` Kyungmin Park
2010-06-24  1:35     ` Kyungmin Park
2010-06-24 13:11     ` Kukjin Kim
2010-06-24 13:11       ` Kukjin Kim
2010-06-24 13:19       ` Jassi Brar
2010-06-24 13:19         ` Jassi Brar
2010-06-23 22:31 ` [PATCH 3/3] ARM: S5P: Add Support common arch_reset() for S5P SoCs Kukjin Kim
2010-06-23 22:31   ` Kukjin Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.