From: kgene.kim@samsung.com (Kukjin Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/12] ARM: restart: S5P64X0: use new restart hook
Date: Wed, 21 Dec 2011 10:38:56 +0900 [thread overview]
Message-ID: <05dc01ccbf81$4df1cb40$e9d561c0$%kim@samsung.com> (raw)
In-Reply-To: <1324385316-6052-5-git-send-email-kgene.kim@samsung.com>
Kukjin Kim wrote:
>
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
> arch/arm/mach-s5p64x0/common.c | 9 +++++++++
> arch/arm/mach-s5p64x0/common.h | 2 ++
> arch/arm/mach-s5p64x0/include/mach/system.h | 2 --
> arch/arm/mach-s5p64x0/mach-smdk6440.c | 1 +
> arch/arm/mach-s5p64x0/mach-smdk6450.c | 1 +
> 5 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c
> index af02dc3..b7555a0 100644
> --- a/arch/arm/mach-s5p64x0/common.c
> +++ b/arch/arm/mach-s5p64x0/common.c
> @@ -45,6 +45,7 @@
> #include <plat/gpio-cfg.h>
> #include <plat/regs-irqtype.h>
> #include <plat/regs-serial.h>
> +#include <plat/watchdog-reset.h>
>
> #include "common.h"
>
> @@ -457,3 +458,11 @@ static int __init s5p64x0_init_irq_eint(void)
> return ret;
> }
> arch_initcall(s5p64x0_init_irq_eint);
> +
> +void s5p64x0_restart(char mode, const char *cmd)
> +{
> + if (mode != 's')
> + arch_wdt_reset();
> +
> + soft_restart(0);
> +}
> diff --git a/arch/arm/mach-s5p64x0/common.h b/arch/arm/mach-s5p64x0/common.h
> index 8a1eca5..f8a60fd 100644
> --- a/arch/arm/mach-s5p64x0/common.h
> +++ b/arch/arm/mach-s5p64x0/common.h
> @@ -22,6 +22,8 @@ void s5p6440_setup_clocks(void);
> void s5p6450_register_clocks(void);
> void s5p6450_setup_clocks(void);
>
> +void s5p64x0_restart(char mode, const char *cmd);
> +
> #ifdef CONFIG_CPU_S5P6440
>
> extern int s5p64x0_init(void);
> diff --git a/arch/arm/mach-s5p64x0/include/mach/system.h b/arch/arm/mach-s5p64x0/include/mach/system.h
> index 60f5753..cf26e09 100644
> --- a/arch/arm/mach-s5p64x0/include/mach/system.h
> +++ b/arch/arm/mach-s5p64x0/include/mach/system.h
> @@ -13,8 +13,6 @@
> #ifndef __ASM_ARCH_SYSTEM_H
> #define __ASM_ARCH_SYSTEM_H __FILE__
>
> -#include <plat/system-reset.h>
> -
> static void arch_idle(void)
> {
> /* nothing here yet */
> diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
> index 74f3f02..34d98a1 100644
> --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
> +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
> @@ -248,4 +248,5 @@ MACHINE_START(SMDK6440, "SMDK6440")
> .map_io = smdk6440_map_io,
> .init_machine = smdk6440_machine_init,
> .timer = &s5p_timer,
> + .restart = s5p64x0_restart,
> MACHINE_END
> diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
> index 193ed2d..135cf5d 100644
> --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
> +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
> @@ -268,4 +268,5 @@ MACHINE_START(SMDK6450, "SMDK6450")
> .map_io = smdk6450_map_io,
> .init_machine = smdk6450_machine_init,
> .timer = &s5p_timer,
> + .restart = s5p64x0_restart,
> MACHINE_END
> --
> 1.7.4.4
From: Kukjin Kim <kgene.kim@samsung.com>
Subject: [PATCH V2 06/12] ARM: restart: S5P64X0: use new restart hook
Hook these platforms restart code into the new restart hook rather
than using arch_reset().
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
Changes since v1:
- fixed the mis-deleting inclusion of <plat/system-reset.h>
which includes arch_reset().
arch/arm/mach-s5p64x0/common.c | 9 +++++++++
arch/arm/mach-s5p64x0/common.h | 2 ++
arch/arm/mach-s5p64x0/mach-smdk6440.c | 1 +
arch/arm/mach-s5p64x0/mach-smdk6450.c | 1 +
4 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c
index af02dc3..b7555a0 100644
--- a/arch/arm/mach-s5p64x0/common.c
+++ b/arch/arm/mach-s5p64x0/common.c
@@ -45,6 +45,7 @@
#include <plat/gpio-cfg.h>
#include <plat/regs-irqtype.h>
#include <plat/regs-serial.h>
+#include <plat/watchdog-reset.h>
#include "common.h"
@@ -457,3 +458,11 @@ static int __init s5p64x0_init_irq_eint(void)
return ret;
}
arch_initcall(s5p64x0_init_irq_eint);
+
+void s5p64x0_restart(char mode, const char *cmd)
+{
+ if (mode != 's')
+ arch_wdt_reset();
+
+ soft_restart(0);
+}
diff --git a/arch/arm/mach-s5p64x0/common.h b/arch/arm/mach-s5p64x0/common.h
index 8a1eca5..f8a60fd 100644
--- a/arch/arm/mach-s5p64x0/common.h
+++ b/arch/arm/mach-s5p64x0/common.h
@@ -22,6 +22,8 @@ void s5p6440_setup_clocks(void);
void s5p6450_register_clocks(void);
void s5p6450_setup_clocks(void);
+void s5p64x0_restart(char mode, const char *cmd);
+
#ifdef CONFIG_CPU_S5P6440
extern int s5p64x0_init(void);
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index 74f3f02..34d98a1 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -248,4 +248,5 @@ MACHINE_START(SMDK6440, "SMDK6440")
.map_io = smdk6440_map_io,
.init_machine = smdk6440_machine_init,
.timer = &s5p_timer,
+ .restart = s5p64x0_restart,
MACHINE_END
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index 193ed2d..135cf5d 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -268,4 +268,5 @@ MACHINE_START(SMDK6450, "SMDK6450")
.map_io = smdk6450_map_io,
.init_machine = smdk6450_machine_init,
.timer = &s5p_timer,
+ .restart = s5p64x0_restart,
MACHINE_END
--
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
next prev parent reply other threads:[~2011-12-21 1:38 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 12:48 [PATCH 00/12] ARM: restart: SAMSUNG: use new restart hook Kukjin Kim
2011-12-20 12:48 ` [PATCH 01/12] ARM: S3C64XX: introduce arch/arm/mach-s3c64xx/common.[ch] Kukjin Kim
2011-12-20 12:48 ` [PATCH 02/12] ARM: restart: S3C64XX: use new restart hook Kukjin Kim
2011-12-21 1:45 ` Kukjin Kim
2012-01-03 11:51 ` Russell King - ARM Linux
2011-12-20 12:48 ` [PATCH 03/12] ARM: S5P64X0: introduce arch/arm/mach-s5p64x0/common.[ch] Kukjin Kim
2011-12-20 12:48 ` [PATCH 04/12] ARM: restart: S5P64X0: use new restart hook Kukjin Kim
2011-12-21 1:38 ` Kukjin Kim [this message]
2011-12-20 12:48 ` [PATCH 05/12] ARM: S5PC100: introduce arch/arm/mach-s5pc100/common.[ch] Kukjin Kim
2011-12-20 12:48 ` [PATCH 06/12] ARM: restart: S5PC100: use new restart hook Kukjin Kim
2011-12-21 1:39 ` Kukjin Kim
2011-12-20 12:48 ` [PATCH 07/12] ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch] Kukjin Kim
2011-12-23 19:14 ` Russell King - ARM Linux
2011-12-20 12:48 ` [PATCH 08/12] ARM: restart: S5PV210: use new restart hook Kukjin Kim
2011-12-21 1:40 ` Kukjin Kim
2011-12-20 12:48 ` [PATCH 09/12] ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch] Kukjin Kim
2011-12-23 19:19 ` Russell King - ARM Linux
2011-12-24 1:10 ` Kukjin Kim
2011-12-27 7:31 ` Kukjin Kim
2012-01-03 10:41 ` Russell King - ARM Linux
2012-01-03 10:49 ` Kukjin Kim
2012-01-03 10:54 ` Russell King - ARM Linux
2012-01-03 11:01 ` Kukjin Kim
2012-01-03 11:20 ` Russell King - ARM Linux
2012-01-03 11:54 ` Kukjin Kim
2012-01-03 12:00 ` Russell King - ARM Linux
2012-01-03 12:07 ` Kukjin Kim
2011-12-20 12:48 ` [PATCH 10/12] ARM: restart: EXYNOS: use new restart hook Kukjin Kim
2011-12-21 1:42 ` Kukjin Kim
2011-12-20 12:48 ` [PATCH 11/12] ARM: restart: S3C24XX: move SWRST based S3C platforms to machine_desc hook Kukjin Kim
2011-12-20 12:48 ` [PATCH 12/12] ARM: restart: S3C24XX: use new restart hook Kukjin Kim
2011-12-20 13:18 ` Heiko Stübner
2011-12-20 13:34 ` Kukjin Kim
2012-01-02 13:14 ` Heiko Stübner
2012-01-02 13:26 ` Mark Brown
2012-01-02 13:33 ` Heiko Stübner
2012-01-02 13:39 ` Mark Brown
2012-01-03 6:08 ` Kukjin Kim
2011-12-21 1:44 ` Kukjin Kim
2011-12-20 21:00 ` [PATCH 00/12] ARM: restart: SAMSUNG: " Russell King - ARM Linux
2011-12-21 1:37 ` Kukjin Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='05dc01ccbf81$4df1cb40$e9d561c0$%kim@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).