All of lore.kernel.org
 help / color / mirror / Atom feed
* [01: PATCH 0/7] Preparation for arch_reset changes
@ 2011-11-06 17:31 Russell King - ARM Linux
  2011-11-06 17:31 ` [PATCH 1/7] ARM: restart: add restart hook to machine_desc record Russell King - ARM Linux
                   ` (53 more replies)
  0 siblings, 54 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:31 UTC (permalink / raw)
  To: linux-arm-kernel

This series lays down the ground work for changing the way we handle the
reset (now called restart) handling on ARM.

As a result of these patches, we provide a new hook in the machine_desc
record called 'restart' which is pointed at a function to perform the
appropriate restart actions for the platform.  This is called directly
from machine_restart() with IRQs and caches on.

The 'soft_reboot' flag is changed to a more generic 'restart_mode'
character - which is used to initialize the default reboot mode (which
can be changed via the 'reboot=' command line parameter.)

'soft_restart(addr)' is added which performs a soft restart (iow,
orderly shutdown of caches and MMU and a jump to the passed address),
rather than the old way which separated the tear-down of the caches
and MMU from the code doing the jump.  This will be necessary to
resolve the ARMv6 and ARMv7 CPU restarting problems.

Finally, appropriate 'restart_mode' values are added to several
platforms which were hard-coding the restart mode by intercepting
the restarting via arm_pm_restart.

 arch/arm/include/asm/mach/arch.h                  |    9 +++--
 arch/arm/include/asm/system.h                     |    1 +
 arch/arm/kernel/machine_kexec.c                   |    4 +-
 arch/arm/kernel/process.c                         |   35 ++++++++++++--------
 arch/arm/kernel/setup.c                           |    7 +++-
 arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
 arch/arm/mach-ebsa110/core.c                      |    2 +-
 arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
 arch/arm/mach-ep93xx/include/mach/system.h        |    2 -
 arch/arm/mach-footbridge/cats-hw.c                |    2 +-
 arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
 arch/arm/mach-iop32x/include/mach/system.h        |    4 +--
 arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
 arch/arm/mach-ixp2000/include/mach/system.h       |    2 -
 arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
 arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
 arch/arm/mach-lpc32xx/include/mach/system.h       |    3 --
 arch/arm/mach-mmp/include/mach/system.h           |    4 +-
 arch/arm/mach-mxs/system.c                        |    2 +-
 arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
 arch/arm/mach-pxa/mioa701.c                       |    1 +
 arch/arm/mach-pxa/reset.c                         |    2 +-
 arch/arm/mach-pxa/spitz.c                         |    3 ++
 arch/arm/mach-pxa/tosa.c                          |    1 +
 arch/arm/mach-rpc/include/mach/system.h           |    2 +-
 arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 +-
 arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
 arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
 arch/arm/mach-shark/core.c                        |    1 -
 arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
 arch/arm/mach-u300/include/mach/system.h          |    2 -
 arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
 arch/arm/mm/idmap.c                               |    2 +-
 arch/arm/mm/nommu.c                               |    2 +-
 arch/arm/plat-mxc/system.c                        |    2 +-
 arch/arm/plat-spear/include/plat/system.h         |    2 +-
 36 files changed, 64 insertions(+), 59 deletions(-)

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

* [PATCH 1/7] ARM: restart: add restart hook to machine_desc record
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
@ 2011-11-06 17:31 ` Russell King - ARM Linux
  2011-11-09 22:28   ` Tony Lindgren
  2011-11-11 19:10   ` Linus Walleij
  2011-11-06 17:32 ` [PATCH 2/7] ARM: restart: allow platforms more flexibility specifying restart mode Russell King - ARM Linux
                   ` (52 subsequent siblings)
  53 siblings, 2 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:31 UTC (permalink / raw)
  To: linux-arm-kernel

Add a restart hook to the machine_desc record so we don't have to
populate all platforms with init_early methods to initialize the
arm_pm_restart function pointer.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/include/asm/mach/arch.h |    1 +
 arch/arm/kernel/setup.c          |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 7d19425..8aa397a 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -45,6 +45,7 @@ struct machine_desc {
 #ifdef CONFIG_MULTI_IRQ_HANDLER
 	void			(*handle_irq)(struct pt_regs *);
 #endif
+	void			(*restart)(char, const char *);
 };
 
 /*
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index bda0a21..d187d0a 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -922,6 +922,9 @@ void __init setup_arch(char **cmdline_p)
 	paging_init(mdesc);
 	request_standard_resources(mdesc);
 
+	if (mdesc->restart)
+		arm_pm_restart = mdesc->restart;
+
 	unflatten_device_tree();
 
 #ifdef CONFIG_SMP
-- 
1.7.4.4

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

* [PATCH 2/7] ARM: restart: allow platforms more flexibility specifying restart mode
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
  2011-11-06 17:31 ` [PATCH 1/7] ARM: restart: add restart hook to machine_desc record Russell King - ARM Linux
@ 2011-11-06 17:32 ` Russell King - ARM Linux
  2011-11-06 17:32 ` [PATCH 3/7] ARM: restart: add default restart modes for PXA mioa701, spitz and tosa Russell King - ARM Linux
                   ` (51 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:32 UTC (permalink / raw)
  To: linux-arm-kernel

Change 'soft_reboot' into a more generic 'restart_mode' variable,
allowing the default restart mode to be specified.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/include/asm/mach/arch.h   |    8 ++++----
 arch/arm/kernel/setup.c            |    4 ++--
 arch/arm/mach-ebsa110/core.c       |    2 +-
 arch/arm/mach-footbridge/cats-hw.c |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 8aa397a..6fe6cf0 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -30,10 +30,10 @@ struct machine_desc {
 	unsigned int		video_start;	/* start of video RAM	*/
 	unsigned int		video_end;	/* end of video RAM	*/
 
-	unsigned int		reserve_lp0 :1;	/* never has lp0	*/
-	unsigned int		reserve_lp1 :1;	/* never has lp1	*/
-	unsigned int		reserve_lp2 :1;	/* never has lp2	*/
-	unsigned int		soft_reboot :1;	/* soft reboot		*/
+	unsigned char		reserve_lp0 :1;	/* never has lp0	*/
+	unsigned char		reserve_lp1 :1;	/* never has lp1	*/
+	unsigned char		reserve_lp2 :1;	/* never has lp2	*/
+	char			restart_mode;	/* default restart mode	*/
 	void			(*fixup)(struct tag *, char **,
 					 struct meminfo *);
 	void			(*reserve)(void);/* reserve mem blocks	*/
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index d187d0a..2540b9c 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -902,8 +902,8 @@ void __init setup_arch(char **cmdline_p)
 	machine_desc = mdesc;
 	machine_name = mdesc->name;
 
-	if (mdesc->soft_reboot)
-		reboot_setup("s");
+	if (mdesc->restart_mode)
+		reboot_setup(&mdesc->restart_mode);
 
 	init_mm.start_code = (unsigned long) _text;
 	init_mm.end_code   = (unsigned long) _etext;
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index d0ce8ab..ce3ed24 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -283,7 +283,7 @@ MACHINE_START(EBSA110, "EBSA110")
 	.atag_offset	= 0x400,
 	.reserve_lp0	= 1,
 	.reserve_lp2	= 1,
-	.soft_reboot	= 1,
+	.restart_mode	= 's',
 	.map_io		= ebsa110_map_io,
 	.init_irq	= ebsa110_init_irq,
 	.timer		= &ebsa110_timer,
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
index d5f1785..60b6774 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -86,7 +86,7 @@ fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
 MACHINE_START(CATS, "Chalice-CATS")
 	/* Maintainer: Philip Blundell */
 	.atag_offset	= 0x100,
-	.soft_reboot	= 1,
+	.restart_mode	= 's',
 	.fixup		= fixup_cats,
 	.map_io		= footbridge_map_io,
 	.init_irq	= footbridge_init_irq,
-- 
1.7.4.4

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

* [PATCH 3/7] ARM: restart: add default restart modes for PXA mioa701, spitz and tosa
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
  2011-11-06 17:31 ` [PATCH 1/7] ARM: restart: add restart hook to machine_desc record Russell King - ARM Linux
  2011-11-06 17:32 ` [PATCH 2/7] ARM: restart: allow platforms more flexibility specifying restart mode Russell King - ARM Linux
@ 2011-11-06 17:32 ` Russell King - ARM Linux
  2011-11-07 18:02   ` Robert Jarzmik
  2011-11-06 17:32 ` [PATCH 4/7] ARM: restart: move reboot failure handing into machine_restart() Russell King - ARM Linux
                   ` (50 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:32 UTC (permalink / raw)
  To: linux-arm-kernel

Add a default restart mode to reflect the hard-coded restart mode
found in these files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-pxa/mioa701.c |    1 +
 arch/arm/mach-pxa/spitz.c   |    3 +++
 arch/arm/mach-pxa/tosa.c    |    1 +
 3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index b938fc2..4f47a76 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -752,6 +752,7 @@ static void mioa701_machine_exit(void)
 
 MACHINE_START(MIOA701, "MIO A701")
 	.atag_offset	= 0x100,
+	.restart_mode	= 's',
 	.map_io		= &pxa27x_map_io,
 	.init_irq	= &pxa27x_init_irq,
 	.handle_irq	= &pxa27x_handle_irq,
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index d8dec91..f5bafcc 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -981,6 +981,7 @@ static void __init spitz_fixup(struct tag *tags, char **cmdline,
 
 #ifdef CONFIG_MACH_SPITZ
 MACHINE_START(SPITZ, "SHARP Spitz")
+	.restart_mode	= 'g',
 	.fixup		= spitz_fixup,
 	.map_io		= pxa27x_map_io,
 	.init_irq	= pxa27x_init_irq,
@@ -992,6 +993,7 @@ MACHINE_END
 
 #ifdef CONFIG_MACH_BORZOI
 MACHINE_START(BORZOI, "SHARP Borzoi")
+	.restart_mode	= 'g',
 	.fixup		= spitz_fixup,
 	.map_io		= pxa27x_map_io,
 	.init_irq	= pxa27x_init_irq,
@@ -1003,6 +1005,7 @@ MACHINE_END
 
 #ifdef CONFIG_MACH_AKITA
 MACHINE_START(AKITA, "SHARP Akita")
+	.restart_mode	= 'g',
 	.fixup		= spitz_fixup,
 	.map_io		= pxa27x_map_io,
 	.init_irq	= pxa27x_init_irq,
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 402b0c9..ef64530 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -970,6 +970,7 @@ static void __init fixup_tosa(struct tag *tags, char **cmdline,
 }
 
 MACHINE_START(TOSA, "SHARP Tosa")
+	.restart_mode	= 'g',
 	.fixup          = fixup_tosa,
 	.map_io         = pxa25x_map_io,
 	.nr_irqs	= TOSA_NR_IRQS,
-- 
1.7.4.4

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

* [PATCH 4/7] ARM: restart: move reboot failure handing into machine_restart()
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (2 preceding siblings ...)
  2011-11-06 17:32 ` [PATCH 3/7] ARM: restart: add default restart modes for PXA mioa701, spitz and tosa Russell King - ARM Linux
@ 2011-11-06 17:32 ` Russell King - ARM Linux
  2011-11-09 22:29   ` Tony Lindgren
  2011-11-06 17:33 ` [PATCH 5/7] ARM: restart: remove argument to setup_mm_for_reboot() Russell King - ARM Linux
                   ` (49 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:32 UTC (permalink / raw)
  To: linux-arm-kernel

Move the failure to reboot into machine_restart() to always catch
this condition, even if a platform decides to hook the restarting
via arm_pm_restart().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/kernel/process.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index fd08140..18f1c21 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -114,18 +114,8 @@ void arm_machine_restart(char mode, const char *cmd)
 	/* Push out any further dirty data, and ensure cache is empty */
 	flush_cache_all();
 
-	/*
-	 * Now call the architecture specific reboot code.
-	 */
+	/* Now call the architecture specific reboot code. */
 	arch_reset(mode, cmd);
-
-	/*
-	 * Whoops - the architecture was unable to reboot.
-	 * Tell the user!
-	 */
-	mdelay(1000);
-	printk("Reboot failed -- System halted\n");
-	while (1);
 }
 
 /*
@@ -250,7 +240,15 @@ void machine_power_off(void)
 void machine_restart(char *cmd)
 {
 	machine_shutdown();
+
 	arm_pm_restart(reboot_mode, cmd);
+
+	/* Give a grace period for failure to restart of 1s */
+	mdelay(1000);
+
+	/* Whoops - the platform was unable to reboot. Tell the user! */
+	printk("Reboot failed -- System halted\n");
+	while (1);
 }
 
 void __show_regs(struct pt_regs *regs)
-- 
1.7.4.4

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

* [PATCH 5/7] ARM: restart: remove argument to setup_mm_for_reboot()
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (3 preceding siblings ...)
  2011-11-06 17:32 ` [PATCH 4/7] ARM: restart: move reboot failure handing into machine_restart() Russell King - ARM Linux
@ 2011-11-06 17:33 ` Russell King - ARM Linux
  2011-11-09 22:30   ` Tony Lindgren
  2011-11-06 17:33 ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
                   ` (48 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:33 UTC (permalink / raw)
  To: linux-arm-kernel

setup_mm_for_reboot() doesn't make use of its argument, so remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/kernel/machine_kexec.c |    4 ++--
 arch/arm/kernel/process.c       |    4 ++--
 arch/arm/mm/idmap.c             |    2 +-
 arch/arm/mm/nommu.c             |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index c1b4463..cc40b96 100644
--- a/arch/arm/kernel/machine_kexec.c
+++ b/arch/arm/kernel/machine_kexec.c
@@ -16,7 +16,7 @@
 extern const unsigned char relocate_new_kernel[];
 extern const unsigned int relocate_new_kernel_size;
 
-extern void setup_mm_for_reboot(char mode);
+extern void setup_mm_for_reboot(void);
 
 extern unsigned long kexec_start_address;
 extern unsigned long kexec_indirection_page;
@@ -114,7 +114,7 @@ void machine_kexec(struct kimage *image)
 		kexec_reinit();
 	local_irq_disable();
 	local_fiq_disable();
-	setup_mm_for_reboot(0); /* mode is not used, so just pass 0*/
+	setup_mm_for_reboot();
 	flush_cache_all();
 	outer_flush_all();
 	outer_disable();
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 18f1c21..dca7971 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -57,7 +57,7 @@ static const char *isa_modes[] = {
   "ARM" , "Thumb" , "Jazelle", "ThumbEE"
 };
 
-extern void setup_mm_for_reboot(char mode);
+extern void setup_mm_for_reboot(void);
 
 static volatile int hlt_counter;
 
@@ -103,7 +103,7 @@ void arm_machine_restart(char mode, const char *cmd)
 	 * we may need it to insert some 1:1 mappings so that
 	 * soft boot works.
 	 */
-	setup_mm_for_reboot(mode);
+	setup_mm_for_reboot();
 
 	/* Clean and invalidate caches */
 	flush_cache_all();
diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c
index 2be9139..296ad2e 100644
--- a/arch/arm/mm/idmap.c
+++ b/arch/arm/mm/idmap.c
@@ -78,7 +78,7 @@ void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end)
  * the user-mode pages.  This will then ensure that we have predictable
  * results when turning the mmu off
  */
-void setup_mm_for_reboot(char mode)
+void setup_mm_for_reboot(void)
 {
 	/*
 	 * We need to access to user-mode page tables here. For kernel threads
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 941a98c..8841751 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -43,7 +43,7 @@ void __init paging_init(struct machine_desc *mdesc)
 /*
  * We don't need to do anything here for nommu machines.
  */
-void setup_mm_for_reboot(char mode)
+void setup_mm_for_reboot(void)
 {
 }
 
-- 
1.7.4.4

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (4 preceding siblings ...)
  2011-11-06 17:33 ` [PATCH 5/7] ARM: restart: remove argument to setup_mm_for_reboot() Russell King - ARM Linux
@ 2011-11-06 17:33 ` Russell King - ARM Linux
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
                     ` (2 more replies)
  2011-11-06 17:33 ` [PATCH 7/7] ARM: restart: remove local_irq_disable() from within arch_reset() Russell King - ARM Linux
                   ` (47 subsequent siblings)
  53 siblings, 3 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:33 UTC (permalink / raw)
  To: linux-arm-kernel

We only need to set the system up for a soft-restart if we're going to
be doing a soft-restart.  Provide a new function (soft_restart()) which
does the setup and final call for this, and make platforms use it.
Eliminate the call to setup_restart() from the default handler.

This means that platforms arch_reset() function is no longer called with
the page tables prepared for a soft-restart, and caches will still be
enabled.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/include/asm/system.h                     |    1 +
 arch/arm/kernel/process.c                         |   13 +++++++++++--
 arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
 arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
 arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
 arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
 arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
 arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
 arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
 arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
 arch/arm/mach-mxs/system.c                        |    2 +-
 arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
 arch/arm/mach-pxa/reset.c                         |    2 +-
 arch/arm/mach-rpc/include/mach/system.h           |    2 +-
 arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
 arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
 arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
 arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
 arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
 arch/arm/plat-mxc/system.c                        |    2 +-
 arch/arm/plat-spear/include/plat/system.h         |    2 +-
 21 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 984014b..fe7de75 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
 extern void cpu_init(void);
 
 void arm_machine_restart(char mode, const char *cmd);
+void soft_restart(unsigned long);
 extern void (*arm_pm_restart)(char str, const char *cmd);
 
 #define UDBG_UNDEFINED	(1 << 0)
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index dca7971..52b4306 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
 __setup("nohlt", nohlt_setup);
 __setup("hlt", hlt_setup);
 
-void arm_machine_restart(char mode, const char *cmd)
+void soft_restart(unsigned long addr)
 {
 	/* Disable interrupts first */
 	local_irq_disable();
@@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)
 	/* Push out any further dirty data, and ensure cache is empty */
 	flush_cache_all();
 
-	/* Now call the architecture specific reboot code. */
+	cpu_reset(addr);
+}
+
+void arm_machine_restart(char mode, const char *cmd)
+{
+	/* Disable interrupts first */
+	local_irq_disable();
+	local_fiq_disable();
+
+	/* Call the architecture specific reboot code. */
 	arch_reset(mode, cmd);
 }
 
diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
index f916cd7..6c11993 100644
--- a/arch/arm/mach-clps711x/include/mach/system.h
+++ b/arch/arm/mach-clps711x/include/mach/system.h
@@ -34,7 +34,7 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	cpu_reset(0);
+	soft_restart(0);
 }
 
 #endif
diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
index 9a26245..0d5df72 100644
--- a/arch/arm/mach-ebsa110/include/mach/system.h
+++ b/arch/arm/mach-ebsa110/include/mach/system.h
@@ -34,6 +34,6 @@ static inline void arch_idle(void)
 	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
 }
 
-#define arch_reset(mode, cmd)	cpu_reset(0x80000000)
+#define arch_reset(mode, cmd)	soft_restart(0x80000000)
 
 #endif
diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
index 0b29315..249f895 100644
--- a/arch/arm/mach-footbridge/include/mach/system.h
+++ b/arch/arm/mach-footbridge/include/mach/system.h
@@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)
 		/*
 		 * Jump into the ROM
 		 */
-		cpu_reset(0x41000000);
+		soft_restart(0x41000000);
 	} else {
 		if (machine_is_netwinder()) {
 			/* open up the SuperIO chip
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
index a4b808f..4865a9b 100644
--- a/arch/arm/mach-iop32x/include/mach/system.h
+++ b/arch/arm/mach-iop32x/include/mach/system.h
@@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd)
 	*IOP3XX_PCSR = 0x30;
 
 	/* Jump into ROM at address 0 */
-	cpu_reset(0);
+	soft_restart(0);
 }
diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
index f192a34..86d1b20 100644
--- a/arch/arm/mach-iop33x/include/mach/system.h
+++ b/arch/arm/mach-iop33x/include/mach/system.h
@@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd)
 	*IOP3XX_PCSR = 0x30;
 
 	/* Jump into ROM at address 0 */
-	cpu_reset(0);
+	soft_restart(0);
 }
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
index 54c0af7..24337d9 100644
--- a/arch/arm/mach-ixp4xx/include/mach/system.h
+++ b/arch/arm/mach-ixp4xx/include/mach/system.h
@@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd)
 {
 	if ( 1 && mode == 's') {
 		/* Jump into ROM at address 0 */
-		cpu_reset(0);
+		soft_restart(0);
 	} else {
 		/* Use on-chip reset capability */
 
diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
index fb1dda9..ceb19c9 100644
--- a/arch/arm/mach-ks8695/include/mach/system.h
+++ b/arch/arm/mach-ks8695/include/mach/system.h
@@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
 	unsigned int reg;
 
 	if (mode == 's')
-		cpu_reset(0);
+		soft_restart(0);
 
 	/* disable timer0 */
 	reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
index 1a8a25e..cb06379 100644
--- a/arch/arm/mach-mmp/include/mach/system.h
+++ b/arch/arm/mach-mmp/include/mach/system.h
@@ -19,8 +19,8 @@ static inline void arch_idle(void)
 static inline void arch_reset(char mode, const char *cmd)
 {
 	if (cpu_is_pxa168())
-		cpu_reset(0xffff0000);
+		soft_restart(0xffff0000);
 	else
-		cpu_reset(0);
+		soft_restart(0);
 }
 #endif /* __ASM_MACH_SYSTEM_H */
diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
index 20ec3bd..cab8836 100644
--- a/arch/arm/mach-mxs/system.c
+++ b/arch/arm/mach-mxs/system.c
@@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
 	mdelay(50);
 
 	/* We'll take a jump through zero as a poor second */
-	cpu_reset(0);
+	soft_restart(0);
 }
 
 static int __init mxs_arch_reset_init(void)
diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
index 5dda2bb..5d6384a 100644
--- a/arch/arm/mach-pnx4008/include/mach/system.h
+++ b/arch/arm/mach-pnx4008/include/mach/system.h
@@ -32,7 +32,7 @@ static void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	cpu_reset(0);
+	soft_restart(0);
 }
 
 #endif
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
index 01e9d64..b8bcda1 100644
--- a/arch/arm/mach-pxa/reset.c
+++ b/arch/arm/mach-pxa/reset.c
@@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
 	switch (mode) {
 	case 's':
 		/* Jump into ROM at address 0 */
-		cpu_reset(0);
+		soft_restart(0);
 		break;
 	case 'g':
 		do_gpio_reset();
diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
index 45c7b93..a354f4d 100644
--- a/arch/arm/mach-rpc/include/mach/system.h
+++ b/arch/arm/mach-rpc/include/mach/system.h
@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
 	/*
 	 * Jump into the ROM
 	 */
-	cpu_reset(0);
+	soft_restart(0);
 }
diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
index 6faadce..913893d 100644
--- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
+++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
@@ -19,7 +19,7 @@ static void
 arch_reset(char mode, const char *cmd)
 {
 	if (mode == 's') {
-		cpu_reset(0);
+		soft_restart(0);
 	}
 
 	if (s3c24xx_reset_hook)
@@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
 	arch_wdt_reset();
 
 	/* we'll take a jump through zero as a poor second */
-	cpu_reset(0);
+	soft_restart(0);
 }
diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
index 2e58cb7..d8ca578 100644
--- a/arch/arm/mach-s3c64xx/include/mach/system.h
+++ b/arch/arm/mach-s3c64xx/include/mach/system.h
@@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
 		arch_wdt_reset();
 
 	/* if all else fails, or mode was for soft, jump to 0 */
-	cpu_reset(0);
+	soft_restart(0);
 }
 
 #endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
index ba9da9f..345d35b 100644
--- a/arch/arm/mach-sa1100/include/mach/system.h
+++ b/arch/arm/mach-sa1100/include/mach/system.h
@@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd)
 {
 	if (mode == 's') {
 		/* Jump into ROM at address 0 */
-		cpu_reset(0);
+		soft_restart(0);
 	} else {
 		/* Use on-chip reset capability */
 		RSRR = RSRR_SWR;
diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
index 76a687e..956ac18 100644
--- a/arch/arm/mach-shmobile/include/mach/system.h
+++ b/arch/arm/mach-shmobile/include/mach/system.h
@@ -8,7 +8,7 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	cpu_reset(0);
+	soft_restart(0);
 }
 
 #endif
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
index ce228bd..68875a1 100644
--- a/arch/arm/mach-w90x900/include/mach/system.h
+++ b/arch/arm/mach-w90x900/include/mach/system.h
@@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
 {
 	if (mode == 's') {
 		/* Jump into ROM at address 0 */
-		cpu_reset(0);
+		soft_restart(0);
 	} else {
 		__raw_writel(WTE | WTRE | WTCLK, WTCR);
 	}
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index 9dad8dc..b1cfc6a 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
 	mdelay(50);
 
 	/* we'll take a jump through zero as a poor second */
-	cpu_reset(0);
+	soft_restart(0);
 }
 
 void mxc_arch_reset_init(void __iomem *base)
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
index a235fa0..1171f22 100644
--- a/arch/arm/plat-spear/include/plat/system.h
+++ b/arch/arm/plat-spear/include/plat/system.h
@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
 {
 	if (mode == 's') {
 		/* software reset, Jump into ROM@address 0 */
-		cpu_reset(0);
+		soft_restart(0);
 	} else {
 		/* hardware reset, Use on-chip reset capability */
 		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
-- 
1.7.4.4

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

* [PATCH 7/7] ARM: restart: remove local_irq_disable() from within arch_reset()
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (5 preceding siblings ...)
  2011-11-06 17:33 ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-06 17:33 ` Russell King - ARM Linux
  2011-11-06 17:39 ` [02: PATCH 0/41] Platform arch_reset changes Russell King - ARM Linux
                   ` (46 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:33 UTC (permalink / raw)
  To: linux-arm-kernel

IRQs are already disabled by the time arch_reset() is called, so these
calls to local_irq_disable() instead arch_reset() are redundant.  Remove
them.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-ep93xx/include/mach/system.h  |    2 --
 arch/arm/mach-iop32x/include/mach/system.h  |    2 --
 arch/arm/mach-ixp2000/include/mach/system.h |    2 --
 arch/arm/mach-lpc32xx/include/mach/system.h |    3 ---
 arch/arm/mach-shark/core.c                  |    1 -
 arch/arm/mach-u300/include/mach/system.h    |    2 --
 6 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
index 6d661fe..bdf6c4f 100644
--- a/arch/arm/mach-ep93xx/include/mach/system.h
+++ b/arch/arm/mach-ep93xx/include/mach/system.h
@@ -11,8 +11,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	local_irq_disable();
-
 	/*
 	 * Set then clear the SWRST bit to initiate a software reset
 	 */
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
index 4865a9b..b4f83e5 100644
--- a/arch/arm/mach-iop32x/include/mach/system.h
+++ b/arch/arm/mach-iop32x/include/mach/system.h
@@ -18,8 +18,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	local_irq_disable();
-
 	if (machine_is_n2100()) {
 		gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
 		gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
index de37099..810df7b 100644
--- a/arch/arm/mach-ixp2000/include/mach/system.h
+++ b/arch/arm/mach-ixp2000/include/mach/system.h
@@ -19,8 +19,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	local_irq_disable();
-
 	/*
 	 * Reset flash banking register so that we are pointing at
 	 * RedBoot bank.
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
index df3b0de..d47f3b1 100644
--- a/arch/arm/mach-lpc32xx/include/mach/system.h
+++ b/arch/arm/mach-lpc32xx/include/mach/system.h
@@ -33,9 +33,6 @@ static inline void arch_reset(char mode, const char *cmd)
 	case 'h':
 		printk(KERN_CRIT "RESET: Rebooting system\n");
 
-		/* Disable interrupts */
-		local_irq_disable();
-
 		lpc32xx_watchdog_reset();
 		break;
 
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index feda3ca..f4b25d8 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -29,7 +29,6 @@
 void arch_reset(char mode, const char *cmd)
 {
         short temp;
-        local_irq_disable();
         /* Reset the Machine via pc[3] of the sequoia chipset */
         outw(0x09,0x24);
         temp=inw(0x26);
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
index 8daf136..6b6fef7 100644
--- a/arch/arm/mach-u300/include/mach/system.h
+++ b/arch/arm/mach-u300/include/mach/system.h
@@ -27,8 +27,6 @@ static void arch_reset(char mode, const char *cmd)
 	case 's':
 	case 'h':
 		printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
-		/* Disable interrupts */
-		local_irq_disable();
 #ifdef CONFIG_COH901327_WATCHDOG
 		coh901327_watchdog_reset();
 #endif
-- 
1.7.4.4

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

* [02: PATCH 0/41] Platform arch_reset changes
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (6 preceding siblings ...)
  2011-11-06 17:33 ` [PATCH 7/7] ARM: restart: remove local_irq_disable() from within arch_reset() Russell King - ARM Linux
@ 2011-11-06 17:39 ` Russell King - ARM Linux
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
  2011-11-07 13:38   ` [02: PATCH 0/41] Platform arch_reset changes Will Deacon
  2011-11-06 17:40 ` [PATCH 01/41] ARM: clps711x: consolidate irq/mm/time code into a single file Russell King - ARM Linux
                   ` (45 subsequent siblings)
  53 siblings, 2 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:39 UTC (permalink / raw)
  To: linux-arm-kernel

Part 2. These are the platform updates, so far.

The first patch combines the individual files in mach-clps711x which
contain one or two functions or data structures before changing the
arch_reset stuff.

The majority of the remaining patches address each group of platforms
individually.

The final patch removes the resulting empty arch_reset() functions,
its call site and associated code.  XXX NOTE XXX This results in
anything left with an arch_reset() function having non-functional
restart capability.

 arch/arm/include/asm/hardware/iop3xx.h         |    1 +
 arch/arm/include/asm/system.h                  |    1 -
 arch/arm/kernel/process.c                      |   10 +-
 arch/arm/mach-at91/at91cap9.c                  |    4 +-
 arch/arm/mach-at91/at91rm9200.c                |    4 +-
 arch/arm/mach-at91/at91sam9260.c               |    2 +-
 arch/arm/mach-at91/at91sam9261.c               |    2 +-
 arch/arm/mach-at91/at91sam9263.c               |    2 +-
 arch/arm/mach-at91/at91sam9_alt_reset.S        |    9 +-
 arch/arm/mach-at91/at91sam9g45.c               |    4 +-
 arch/arm/mach-at91/at91sam9rl.c                |    2 +-
 arch/arm/mach-at91/generic.h                   |    3 +-
 arch/arm/mach-at91/include/mach/system.h       |    9 -
 arch/arm/mach-clps711x/Makefile                |    2 +-
 arch/arm/mach-clps711x/autcpu12.c              |    1 +
 arch/arm/mach-clps711x/cdb89712.c              |    1 +
 arch/arm/mach-clps711x/ceiva.c                 |    1 +
 arch/arm/mach-clps711x/clep7312.c              |    1 +
 arch/arm/mach-clps711x/common.c                |  227 ++++++++++++++++++++++++
 arch/arm/mach-clps711x/edb7211-arch.c          |    1 +
 arch/arm/mach-clps711x/fortunet.c              |    1 +
 arch/arm/mach-clps711x/include/mach/system.h   |    5 -
 arch/arm/mach-clps711x/irq.c                   |  143 ---------------
 arch/arm/mach-clps711x/mm.c                    |   48 -----
 arch/arm/mach-clps711x/p720t.c                 |    1 +
 arch/arm/mach-clps711x/time.c                  |   84 ---------
 arch/arm/mach-cns3xxx/cns3420vb.c              |    1 +
 arch/arm/mach-cns3xxx/core.h                   |    1 +
 arch/arm/mach-cns3xxx/include/mach/system.h    |    3 -
 arch/arm/mach-cns3xxx/pm.c                     |    2 +-
 arch/arm/mach-dove/cm-a510.c                   |    1 +
 arch/arm/mach-dove/common.c                    |   16 ++
 arch/arm/mach-dove/common.h                    |    1 +
 arch/arm/mach-dove/dove-db-setup.c             |    1 +
 arch/arm/mach-dove/include/mach/system.h       |   19 --
 arch/arm/mach-ebsa110/core.c                   |    6 +
 arch/arm/mach-ebsa110/include/mach/system.h    |    2 -
 arch/arm/mach-ep93xx/adssphere.c               |    1 +
 arch/arm/mach-ep93xx/core.c                    |   12 ++
 arch/arm/mach-ep93xx/edb93xx.c                 |    8 +
 arch/arm/mach-ep93xx/gesbc9312.c               |    1 +
 arch/arm/mach-ep93xx/include/mach/platform.h   |    2 +
 arch/arm/mach-ep93xx/include/mach/system.h     |   15 --
 arch/arm/mach-ep93xx/micro9.c                  |    4 +
 arch/arm/mach-ep93xx/simone.c                  |    1 +
 arch/arm/mach-ep93xx/snappercl15.c             |    1 +
 arch/arm/mach-ep93xx/ts72xx.c                  |    1 +
 arch/arm/mach-ep93xx/vision_ep9307.c           |    1 +
 arch/arm/mach-footbridge/cats-hw.c             |    1 +
 arch/arm/mach-footbridge/common.c              |   27 +++
 arch/arm/mach-footbridge/common.h              |    1 +
 arch/arm/mach-footbridge/ebsa285.c             |    1 +
 arch/arm/mach-footbridge/include/mach/system.h |   56 ------
 arch/arm/mach-footbridge/netwinder-hw.c        |   27 +++
 arch/arm/mach-footbridge/personal.c            |    1 +
 arch/arm/mach-h720x/common.c                   |    5 +
 arch/arm/mach-h720x/common.h                   |    1 +
 arch/arm/mach-h720x/h7201-eval.c               |    1 +
 arch/arm/mach-h720x/h7202-eval.c               |    1 +
 arch/arm/mach-h720x/include/mach/system.h      |    6 -
 arch/arm/mach-highbank/core.h                  |    1 +
 arch/arm/mach-highbank/highbank.c              |    1 +
 arch/arm/mach-highbank/include/mach/system.h   |    2 -
 arch/arm/mach-highbank/system.c                |    2 +-
 arch/arm/mach-imx/mach-apf9328.c               |    1 +
 arch/arm/mach-imx/mach-armadillo5x0.c          |    1 +
 arch/arm/mach-imx/mach-bug.c                   |    1 +
 arch/arm/mach-imx/mach-cpuimx27.c              |    1 +
 arch/arm/mach-imx/mach-cpuimx35.c              |    1 +
 arch/arm/mach-imx/mach-eukrea_cpuimx25.c       |    1 +
 arch/arm/mach-imx/mach-imx27_visstrim_m10.c    |    1 +
 arch/arm/mach-imx/mach-imx27ipcam.c            |    1 +
 arch/arm/mach-imx/mach-imx27lite.c             |    1 +
 arch/arm/mach-imx/mach-imx6q.c                 |    1 +
 arch/arm/mach-imx/mach-kzm_arm11_01.c          |    1 +
 arch/arm/mach-imx/mach-mx1ads.c                |    2 +
 arch/arm/mach-imx/mach-mx21ads.c               |    1 +
 arch/arm/mach-imx/mach-mx25_3ds.c              |    1 +
 arch/arm/mach-imx/mach-mx27_3ds.c              |    1 +
 arch/arm/mach-imx/mach-mx27ads.c               |    1 +
 arch/arm/mach-imx/mach-mx31_3ds.c              |    1 +
 arch/arm/mach-imx/mach-mx31ads.c               |    1 +
 arch/arm/mach-imx/mach-mx31lilly.c             |    1 +
 arch/arm/mach-imx/mach-mx31lite.c              |    1 +
 arch/arm/mach-imx/mach-mx31moboard.c           |    1 +
 arch/arm/mach-imx/mach-mx35_3ds.c              |    1 +
 arch/arm/mach-imx/mach-mxt_td60.c              |    1 +
 arch/arm/mach-imx/mach-pca100.c                |    1 +
 arch/arm/mach-imx/mach-pcm037.c                |    1 +
 arch/arm/mach-imx/mach-pcm038.c                |    1 +
 arch/arm/mach-imx/mach-pcm043.c                |    1 +
 arch/arm/mach-imx/mach-qong.c                  |    1 +
 arch/arm/mach-imx/mach-scb9328.c               |    1 +
 arch/arm/mach-imx/mach-vpr200.c                |    1 +
 arch/arm/mach-integrator/common.h              |    1 +
 arch/arm/mach-integrator/core.c                |    8 +
 arch/arm/mach-integrator/include/mach/system.h |   11 --
 arch/arm/mach-integrator/integrator_ap.c       |    1 +
 arch/arm/mach-integrator/integrator_cp.c       |    1 +
 arch/arm/mach-iop13xx/include/mach/iop13xx.h   |    1 +
 arch/arm/mach-iop13xx/include/mach/system.h    |   14 --
 arch/arm/mach-iop13xx/iq81340mc.c              |    1 +
 arch/arm/mach-iop13xx/iq81340sc.c              |    1 +
 arch/arm/mach-iop13xx/setup.c                  |   11 ++
 arch/arm/mach-iop32x/em7210.c                  |    1 +
 arch/arm/mach-iop32x/glantank.c                |    1 +
 arch/arm/mach-iop32x/include/mach/system.h     |   19 --
 arch/arm/mach-iop32x/iq31244.c                 |    2 +
 arch/arm/mach-iop32x/iq80321.c                 |    1 +
 arch/arm/mach-iop32x/n2100.c                   |    9 +
 arch/arm/mach-iop33x/include/mach/system.h     |   10 -
 arch/arm/mach-iop33x/iq80331.c                 |    1 +
 arch/arm/mach-iop33x/iq80332.c                 |    1 +
 arch/arm/mach-ixp2000/core.c                   |    4 +
 arch/arm/mach-ixp2000/enp2611.c                |    1 +
 arch/arm/mach-ixp2000/include/mach/platform.h  |    1 +
 arch/arm/mach-ixp2000/include/mach/system.h    |   33 ----
 arch/arm/mach-ixp2000/ixdp2400.c               |    1 +
 arch/arm/mach-ixp2000/ixdp2800.c               |    1 +
 arch/arm/mach-ixp2000/ixdp2x01.c               |   32 ++++
 arch/arm/mach-ixp23xx/core.c                   |    6 +
 arch/arm/mach-ixp23xx/espresso.c               |    1 +
 arch/arm/mach-ixp23xx/include/mach/platform.h  |    1 +
 arch/arm/mach-ixp23xx/include/mach/system.h    |   17 --
 arch/arm/mach-ixp23xx/ixdp2351.c               |   12 ++
 arch/arm/mach-ixp23xx/roadrunner.c             |    1 +
 arch/arm/mach-ixp4xx/avila-setup.c             |    2 +
 arch/arm/mach-ixp4xx/common.c                  |   20 ++
 arch/arm/mach-ixp4xx/coyote-setup.c            |    2 +
 arch/arm/mach-ixp4xx/dsmg600-setup.c           |    1 +
 arch/arm/mach-ixp4xx/fsg-setup.c               |    1 +
 arch/arm/mach-ixp4xx/gateway7001-setup.c       |    1 +
 arch/arm/mach-ixp4xx/goramo_mlr.c              |    1 +
 arch/arm/mach-ixp4xx/gtwx5715-setup.c          |    1 +
 arch/arm/mach-ixp4xx/include/mach/platform.h   |    1 +
 arch/arm/mach-ixp4xx/include/mach/system.h     |   25 ---
 arch/arm/mach-ixp4xx/ixdp425-setup.c           |    1 +
 arch/arm/mach-ixp4xx/nas100d-setup.c           |    1 +
 arch/arm/mach-ixp4xx/nslu2-setup.c             |    1 +
 arch/arm/mach-ixp4xx/omixp-setup.c             |    3 +
 arch/arm/mach-ixp4xx/vulcan-setup.c            |    1 +
 arch/arm/mach-ixp4xx/wg302v2-setup.c           |    1 +
 arch/arm/mach-kirkwood/common.c                |   16 ++
 arch/arm/mach-kirkwood/common.h                |    1 +
 arch/arm/mach-kirkwood/d2net_v2-setup.c        |    1 +
 arch/arm/mach-kirkwood/db88f6281-bp-setup.c    |    1 +
 arch/arm/mach-kirkwood/dockstar-setup.c        |    1 +
 arch/arm/mach-kirkwood/guruplug-setup.c        |    1 +
 arch/arm/mach-kirkwood/include/mach/system.h   |   19 --
 arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |    1 +
 arch/arm/mach-kirkwood/netspace_v2-setup.c     |    3 +
 arch/arm/mach-kirkwood/netxbig_v2-setup.c      |    2 +
 arch/arm/mach-kirkwood/openrd-setup.c          |    3 +
 arch/arm/mach-kirkwood/rd88f6192-nas-setup.c   |    1 +
 arch/arm/mach-kirkwood/rd88f6281-setup.c       |    1 +
 arch/arm/mach-kirkwood/sheevaplug-setup.c      |    2 +
 arch/arm/mach-kirkwood/t5325-setup.c           |    1 +
 arch/arm/mach-kirkwood/ts219-setup.c           |    1 +
 arch/arm/mach-kirkwood/ts41x-setup.c           |    1 +
 arch/arm/mach-lpc32xx/common.c                 |   20 ++-
 arch/arm/mach-lpc32xx/common.h                 |    2 +
 arch/arm/mach-lpc32xx/include/mach/system.h    |   22 ---
 arch/arm/mach-lpc32xx/phy3250.c                |    1 +
 arch/arm/mach-mmp/aspenite.c                   |    2 +
 arch/arm/mach-mmp/avengers_lite.c              |    1 +
 arch/arm/mach-mmp/brownstone.c                 |    1 +
 arch/arm/mach-mmp/common.c                     |    5 +
 arch/arm/mach-mmp/common.h                     |    1 +
 arch/arm/mach-mmp/flint.c                      |    1 +
 arch/arm/mach-mmp/gplugd.c                     |    1 +
 arch/arm/mach-mmp/include/mach/pxa168.h        |    1 +
 arch/arm/mach-mmp/include/mach/system.h        |   10 -
 arch/arm/mach-mmp/jasper.c                     |    1 +
 arch/arm/mach-mmp/pxa168.c                     |    5 +
 arch/arm/mach-mmp/tavorevb.c                   |    1 +
 arch/arm/mach-mmp/teton_bga.c                  |    1 +
 arch/arm/mach-mmp/ttc_dkb.c                    |    1 +
 arch/arm/mach-msm/include/mach/system.h        |    8 -
 arch/arm/mach-mv78xx0/buffalo-wxl-setup.c      |    1 +
 arch/arm/mach-mv78xx0/common.c                 |   16 ++
 arch/arm/mach-mv78xx0/common.h                 |    1 +
 arch/arm/mach-mv78xx0/db78x00-bp-setup.c       |    1 +
 arch/arm/mach-mv78xx0/include/mach/system.h    |   19 --
 arch/arm/mach-mv78xx0/rd78x00-masa-setup.c     |    1 +
 arch/arm/mach-mx5/board-cpuimx51.c             |    1 +
 arch/arm/mach-mx5/board-cpuimx51sd.c           |    1 +
 arch/arm/mach-mx5/board-mx50_rdp.c             |    1 +
 arch/arm/mach-mx5/board-mx51_3ds.c             |    1 +
 arch/arm/mach-mx5/board-mx51_babbage.c         |    1 +
 arch/arm/mach-mx5/board-mx51_efikamx.c         |    3 +-
 arch/arm/mach-mx5/board-mx51_efikasb.c         |    1 +
 arch/arm/mach-mx5/board-mx53_ard.c             |    1 +
 arch/arm/mach-mx5/board-mx53_evk.c             |    1 +
 arch/arm/mach-mx5/board-mx53_loco.c            |    1 +
 arch/arm/mach-mx5/board-mx53_smd.c             |    1 +
 arch/arm/mach-mx5/imx51-dt.c                   |    1 +
 arch/arm/mach-mx5/imx53-dt.c                   |    1 +
 arch/arm/mach-mxs/include/mach/common.h        |    1 +
 arch/arm/mach-mxs/include/mach/system.h        |    2 -
 arch/arm/mach-mxs/mach-m28evk.c                |    1 +
 arch/arm/mach-mxs/mach-mx23evk.c               |    1 +
 arch/arm/mach-mxs/mach-mx28evk.c               |    1 +
 arch/arm/mach-mxs/mach-stmp378x_devb.c         |    1 +
 arch/arm/mach-mxs/mach-tx28.c                  |    1 +
 arch/arm/mach-mxs/system.c                     |    2 +-
 arch/arm/mach-orion5x/common.c                 |   12 ++
 arch/arm/mach-orion5x/common.h                 |    1 +
 arch/arm/mach-orion5x/d2net-setup.c            |    2 +
 arch/arm/mach-orion5x/db88f5281-setup.c        |    1 +
 arch/arm/mach-orion5x/dns323-setup.c           |    1 +
 arch/arm/mach-orion5x/edmini_v2-setup.c        |    1 +
 arch/arm/mach-orion5x/include/mach/system.h    |   14 --
 arch/arm/mach-orion5x/kurobox_pro-setup.c      |    2 +
 arch/arm/mach-orion5x/ls-chl-setup.c           |    3 +-
 arch/arm/mach-orion5x/ls_hgl-setup.c           |    3 +-
 arch/arm/mach-orion5x/lsmini-setup.c           |    3 +-
 arch/arm/mach-orion5x/mss2-setup.c             |    3 +-
 arch/arm/mach-orion5x/mv2120-setup.c           |    3 +-
 arch/arm/mach-orion5x/net2big-setup.c          |    1 +
 arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c   |    1 +
 arch/arm/mach-orion5x/rd88f5181l-ge-setup.c    |    1 +
 arch/arm/mach-orion5x/rd88f5182-setup.c        |    1 +
 arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c   |    1 +
 arch/arm/mach-orion5x/terastation_pro2-setup.c |    1 +
 arch/arm/mach-orion5x/ts209-setup.c            |    1 +
 arch/arm/mach-orion5x/ts409-setup.c            |    1 +
 arch/arm/mach-orion5x/ts78xx-setup.c           |    1 +
 arch/arm/mach-orion5x/wnr854t-setup.c          |    1 +
 arch/arm/mach-orion5x/wrt350n-v2-setup.c       |    1 +
 arch/arm/mach-picoxcell/include/mach/system.h  |    5 -
 arch/arm/mach-pnx4008/core.c                   |    6 +
 arch/arm/mach-pnx4008/include/mach/system.h    |    9 -
 arch/arm/mach-prima2/common.h                  |    1 +
 arch/arm/mach-prima2/include/mach/system.h     |   12 --
 arch/arm/mach-prima2/prima2.c                  |    1 +
 arch/arm/mach-prima2/rstc.c                    |    7 +
 arch/arm/mach-pxa/balloon3.c                   |    1 +
 arch/arm/mach-pxa/capc7117.c                   |    3 +-
 arch/arm/mach-pxa/cm-x2xx.c                    |    1 +
 arch/arm/mach-pxa/cm-x300.c                    |    1 +
 arch/arm/mach-pxa/colibri-pxa270.c             |    2 +
 arch/arm/mach-pxa/colibri-pxa300.c             |    1 +
 arch/arm/mach-pxa/colibri-pxa320.c             |    1 +
 arch/arm/mach-pxa/corgi.c                      |    8 +-
 arch/arm/mach-pxa/csb726.c                     |    1 +
 arch/arm/mach-pxa/em-x270.c                    |    2 +
 arch/arm/mach-pxa/eseries.c                    |    6 +
 arch/arm/mach-pxa/ezx.c                        |    6 +
 arch/arm/mach-pxa/generic.h                    |    2 +
 arch/arm/mach-pxa/gumstix.c                    |    1 +
 arch/arm/mach-pxa/h5000.c                      |    1 +
 arch/arm/mach-pxa/himalaya.c                   |    1 +
 arch/arm/mach-pxa/hx4700.c                     |    1 +
 arch/arm/mach-pxa/icontrol.c                   |    3 +-
 arch/arm/mach-pxa/idp.c                        |    1 +
 arch/arm/mach-pxa/include/mach/system.h        |    8 -
 arch/arm/mach-pxa/littleton.c                  |    1 +
 arch/arm/mach-pxa/lpd270.c                     |    1 +
 arch/arm/mach-pxa/lubbock.c                    |    1 +
 arch/arm/mach-pxa/magician.c                   |    1 +
 arch/arm/mach-pxa/mainstone.c                  |    1 +
 arch/arm/mach-pxa/mioa701.c                    |    6 +-
 arch/arm/mach-pxa/mp900.c                      |    1 +
 arch/arm/mach-pxa/palmld.c                     |    3 +-
 arch/arm/mach-pxa/palmt5.c                     |    3 +-
 arch/arm/mach-pxa/palmtc.c                     |    3 +-
 arch/arm/mach-pxa/palmte2.c                    |    3 +-
 arch/arm/mach-pxa/palmtreo.c                   |    2 +
 arch/arm/mach-pxa/palmtx.c                     |    3 +-
 arch/arm/mach-pxa/palmz72.c                    |    3 +-
 arch/arm/mach-pxa/pcm027.c                     |    1 +
 arch/arm/mach-pxa/poodle.c                     |    9 +-
 arch/arm/mach-pxa/raumfeld.c                   |    3 +
 arch/arm/mach-pxa/reset.c                      |    5 +-
 arch/arm/mach-pxa/saar.c                       |    1 +
 arch/arm/mach-pxa/saarb.c                      |    1 +
 arch/arm/mach-pxa/spitz.c                      |    6 +-
 arch/arm/mach-pxa/stargate2.c                  |    2 +
 arch/arm/mach-pxa/tavorevb.c                   |    1 +
 arch/arm/mach-pxa/tavorevb3.c                  |    1 +
 arch/arm/mach-pxa/tosa.c                       |    4 +-
 arch/arm/mach-pxa/trizeps4.c                   |    2 +
 arch/arm/mach-pxa/viper.c                      |    1 +
 arch/arm/mach-pxa/vpac270.c                    |    3 +-
 arch/arm/mach-pxa/xcep.c                       |    1 +
 arch/arm/mach-pxa/z2.c                         |    1 +
 arch/arm/mach-pxa/zeus.c                       |    1 +
 arch/arm/mach-pxa/zylonite.c                   |    1 +
 arch/arm/mach-realview/core.h                  |    1 -
 arch/arm/mach-realview/include/mach/system.h   |   17 --
 arch/arm/mach-realview/realview_eb.c           |    5 +-
 arch/arm/mach-realview/realview_pb1176.c       |    5 +-
 arch/arm/mach-realview/realview_pb11mp.c       |    5 +-
 arch/arm/mach-realview/realview_pba8.c         |    5 +-
 arch/arm/mach-realview/realview_pbx.c          |    5 +-
 arch/arm/mach-rpc/include/mach/system.h        |   14 --
 arch/arm/mach-rpc/riscpc.c                     |   12 ++
 arch/arm/mach-sa1100/assabet.c                 |    1 +
 arch/arm/mach-sa1100/badge4.c                  |    1 +
 arch/arm/mach-sa1100/cerf.c                    |    1 +
 arch/arm/mach-sa1100/collie.c                  |    1 +
 arch/arm/mach-sa1100/generic.c                 |   11 ++
 arch/arm/mach-sa1100/generic.h                 |    1 +
 arch/arm/mach-sa1100/h3100.c                   |    1 +
 arch/arm/mach-sa1100/h3600.c                   |    1 +
 arch/arm/mach-sa1100/hackkit.c                 |    1 +
 arch/arm/mach-sa1100/include/mach/system.h     |   13 --
 arch/arm/mach-sa1100/jornada720.c              |    1 +
 arch/arm/mach-sa1100/lart.c                    |    1 +
 arch/arm/mach-sa1100/nanoengine.c              |    1 +
 arch/arm/mach-sa1100/pleb.c                    |    1 +
 arch/arm/mach-sa1100/shannon.c                 |    1 +
 arch/arm/mach-sa1100/simpad.c                  |    1 +
 arch/arm/mach-shark/core.c                     |    3 +-
 arch/arm/mach-shark/include/mach/system.h      |    3 -
 arch/arm/mach-spear3xx/include/mach/generic.h  |    2 +
 arch/arm/mach-spear3xx/spear300_evb.c          |    1 +
 arch/arm/mach-spear3xx/spear310_evb.c          |    1 +
 arch/arm/mach-spear3xx/spear320_evb.c          |    1 +
 arch/arm/mach-spear6xx/include/mach/generic.h  |    2 +
 arch/arm/mach-spear6xx/spear600_evb.c          |    1 +
 arch/arm/mach-tegra/common.c                   |    5 +-
 arch/arm/mach-tegra/include/mach/system.h      |    4 -
 arch/arm/mach-u300/core.c                      |   20 ++
 arch/arm/mach-u300/include/mach/platform.h     |    1 +
 arch/arm/mach-u300/include/mach/system.h       |   26 ---
 arch/arm/mach-u300/u300.c                      |    1 +
 arch/arm/mach-ux500/include/mach/system.h      |    5 -
 arch/arm/mach-versatile/core.c                 |   13 ++
 arch/arm/mach-versatile/core.h                 |    1 +
 arch/arm/mach-versatile/include/mach/system.h  |   16 --
 arch/arm/mach-versatile/versatile_ab.c         |    1 +
 arch/arm/mach-versatile/versatile_dt.c         |    1 +
 arch/arm/mach-versatile/versatile_pb.c         |    1 +
 arch/arm/mach-vexpress/include/mach/system.h   |    4 -
 arch/arm/mach-vexpress/v2m.c                   |    2 +-
 arch/arm/mach-w90x900/cpu.c                    |   15 ++
 arch/arm/mach-w90x900/cpu.h                    |    1 +
 arch/arm/mach-w90x900/include/mach/system.h    |   22 ---
 arch/arm/mach-w90x900/mach-nuc910evb.c         |    1 +
 arch/arm/mach-w90x900/mach-nuc950evb.c         |    1 +
 arch/arm/mach-w90x900/mach-nuc960evb.c         |    1 +
 arch/arm/mach-zynq/include/mach/system.h       |    5 -
 arch/arm/plat-iop/Makefile                     |    2 +
 arch/arm/plat-iop/restart.c                    |   19 ++
 arch/arm/plat-mxc/include/mach/common.h        |    2 +-
 arch/arm/plat-mxc/include/mach/system.h        |    2 -
 arch/arm/plat-mxc/system.c                     |    9 +-
 arch/arm/plat-s3c24xx/cpu.c                    |   23 ---
 arch/arm/plat-spear/Makefile                   |    2 +-
 arch/arm/plat-spear/include/plat/system.h      |   15 --
 arch/arm/plat-spear/restart.c                  |   27 +++
 352 files changed, 995 insertions(+), 910 deletions(-)
 create mode 100644 arch/arm/mach-clps711x/common.c
 delete mode 100644 arch/arm/mach-clps711x/irq.c
 delete mode 100644 arch/arm/mach-clps711x/mm.c
 delete mode 100644 arch/arm/mach-clps711x/time.c
 create mode 100644 arch/arm/plat-iop/restart.c
 create mode 100644 arch/arm/plat-spear/restart.c

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

* [PATCH 01/41] ARM: clps711x: consolidate irq/mm/time code into a single file
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (7 preceding siblings ...)
  2011-11-06 17:39 ` [02: PATCH 0/41] Platform arch_reset changes Russell King - ARM Linux
@ 2011-11-06 17:40 ` Russell King - ARM Linux
  2011-11-06 17:40 ` [PATCH 02/41] ARM: restart: remove poodle restart handler Russell King - ARM Linux
                   ` (44 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

The separate files for clps711x which contain maybe one or two data
structures or functions is an inefficient use of files, and encourages
further small files as other changes happen.  Collapse down these into
a single core.c file.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-clps711x/Makefile |    2 +-
 arch/arm/mach-clps711x/common.c |  222 +++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-clps711x/irq.c    |  143 -------------------------
 arch/arm/mach-clps711x/mm.c     |   48 ---------
 arch/arm/mach-clps711x/time.c   |   84 ---------------
 5 files changed, 223 insertions(+), 276 deletions(-)
 create mode 100644 arch/arm/mach-clps711x/common.c
 delete mode 100644 arch/arm/mach-clps711x/irq.c
 delete mode 100644 arch/arm/mach-clps711x/mm.c
 delete mode 100644 arch/arm/mach-clps711x/time.c

diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile
index 4a19731..f2f0256 100644
--- a/arch/arm/mach-clps711x/Makefile
+++ b/arch/arm/mach-clps711x/Makefile
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y			:= irq.o mm.o time.o
+obj-y			:= common.o
 obj-m			:=
 obj-n			:=
 obj-			:=
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
new file mode 100644
index 0000000..aa273e7
--- /dev/null
+++ b/arch/arm/mach-clps711x/common.c
@@ -0,0 +1,222 @@
+/*
+ *  linux/arch/arm/mach-clps711x/core.c
+ *
+ *  Core support for the CLPS711x-based machines.
+ *
+ *  Copyright (C) 2001,2011 Deep Blue Solutions Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/irq.h>
+#include <linux/sched.h>
+#include <linux/timex.h>
+
+#include <asm/sizes.h>
+#include <mach/hardware.h>
+#include <asm/irq.h>
+#include <asm/leds.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/mach/map.h>
+#include <asm/mach/time.h>
+#include <asm/hardware/clps7111.h>
+
+/*
+ * This maps the generic CLPS711x registers
+ */
+static struct map_desc clps711x_io_desc[] __initdata = {
+	{
+		.virtual	= CLPS7111_VIRT_BASE,
+		.pfn		= __phys_to_pfn(CLPS7111_PHYS_BASE),
+		.length		= SZ_1M,
+		.type		= MT_DEVICE
+	}
+};
+
+void __init clps711x_map_io(void)
+{
+	iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
+}
+
+static void int1_mask(struct irq_data *d)
+{
+	u32 intmr1;
+
+	intmr1 = clps_readl(INTMR1);
+	intmr1 &= ~(1 << d->irq);
+	clps_writel(intmr1, INTMR1);
+}
+
+static void int1_ack(struct irq_data *d)
+{
+	u32 intmr1;
+
+	intmr1 = clps_readl(INTMR1);
+	intmr1 &= ~(1 << d->irq);
+	clps_writel(intmr1, INTMR1);
+
+	switch (d->irq) {
+	case IRQ_CSINT:  clps_writel(0, COEOI);  break;
+	case IRQ_TC1OI:  clps_writel(0, TC1EOI); break;
+	case IRQ_TC2OI:  clps_writel(0, TC2EOI); break;
+	case IRQ_RTCMI:  clps_writel(0, RTCEOI); break;
+	case IRQ_TINT:   clps_writel(0, TEOI);   break;
+	case IRQ_UMSINT: clps_writel(0, UMSEOI); break;
+	}
+}
+
+static void int1_unmask(struct irq_data *d)
+{
+	u32 intmr1;
+
+	intmr1 = clps_readl(INTMR1);
+	intmr1 |= 1 << d->irq;
+	clps_writel(intmr1, INTMR1);
+}
+
+static struct irq_chip int1_chip = {
+	.irq_ack	= int1_ack,
+	.irq_mask	= int1_mask,
+	.irq_unmask	= int1_unmask,
+};
+
+static void int2_mask(struct irq_data *d)
+{
+	u32 intmr2;
+
+	intmr2 = clps_readl(INTMR2);
+	intmr2 &= ~(1 << (d->irq - 16));
+	clps_writel(intmr2, INTMR2);
+}
+
+static void int2_ack(struct irq_data *d)
+{
+	u32 intmr2;
+
+	intmr2 = clps_readl(INTMR2);
+	intmr2 &= ~(1 << (d->irq - 16));
+	clps_writel(intmr2, INTMR2);
+
+	switch (d->irq) {
+	case IRQ_KBDINT: clps_writel(0, KBDEOI); break;
+	}
+}
+
+static void int2_unmask(struct irq_data *d)
+{
+	u32 intmr2;
+
+	intmr2 = clps_readl(INTMR2);
+	intmr2 |= 1 << (d->irq - 16);
+	clps_writel(intmr2, INTMR2);
+}
+
+static struct irq_chip int2_chip = {
+	.irq_ack	= int2_ack,
+	.irq_mask	= int2_mask,
+	.irq_unmask	= int2_unmask,
+};
+
+void __init clps711x_init_irq(void)
+{
+	unsigned int i;
+
+	for (i = 0; i < NR_IRQS; i++) {
+	        if (INT1_IRQS & (1 << i)) {
+	        	irq_set_chip_and_handler(i, &int1_chip,
+						 handle_level_irq);
+	        	set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		}
+		if (INT2_IRQS & (1 << i)) {
+			irq_set_chip_and_handler(i, &int2_chip,
+						 handle_level_irq);
+			set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+		}			
+	}
+
+	/*
+	 * Disable interrupts
+	 */
+	clps_writel(0, INTMR1);
+	clps_writel(0, INTMR2);
+
+	/*
+	 * Clear down any pending interrupts
+	 */
+	clps_writel(0, COEOI);
+	clps_writel(0, TC1EOI);
+	clps_writel(0, TC2EOI);
+	clps_writel(0, RTCEOI);
+	clps_writel(0, TEOI);
+	clps_writel(0, UMSEOI);
+	clps_writel(0, SYNCIO);
+	clps_writel(0, KBDEOI);
+}
+
+/*
+ * gettimeoffset() returns time since last timer tick, in usecs.
+ *
+ * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
+ * 'tick' is usecs per jiffy.
+ */
+static unsigned long clps711x_gettimeoffset(void)
+{
+	unsigned long hwticks;
+	hwticks = LATCH - (clps_readl(TC2D) & 0xffff);	/* since last underflow */
+	return (hwticks * (tick_nsec / 1000)) / LATCH;
+}
+
+/*
+ * IRQ handler for the timer
+ */
+static irqreturn_t p720t_timer_interrupt(int irq, void *dev_id)
+{
+	timer_tick();
+	return IRQ_HANDLED;
+}
+
+static struct irqaction clps711x_timer_irq = {
+	.name		= "CLPS711x Timer Tick",
+	.flags		= IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
+	.handler	= p720t_timer_interrupt,
+};
+
+static void __init clps711x_timer_init(void)
+{
+	struct timespec tv;
+	unsigned int syscon;
+
+	syscon = clps_readl(SYSCON1);
+	syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
+	clps_writel(syscon, SYSCON1);
+
+	clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
+
+	setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
+
+	tv.tv_nsec = 0;
+	tv.tv_sec = clps_readl(RTCDR);
+	do_settimeofday(&tv);
+}
+
+struct sys_timer clps711x_timer = {
+	.init		= clps711x_timer_init,
+	.offset		= clps711x_gettimeoffset,
+};
diff --git a/arch/arm/mach-clps711x/irq.c b/arch/arm/mach-clps711x/irq.c
deleted file mode 100644
index c2eceee..0000000
--- a/arch/arm/mach-clps711x/irq.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- *  linux/arch/arm/mach-clps711x/irq.c
- *
- *  Copyright (C) 2000 Deep Blue Solutions Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/init.h>
-#include <linux/list.h>
-#include <linux/io.h>
-
-#include <asm/mach/irq.h>
-#include <mach/hardware.h>
-#include <asm/irq.h>
-
-#include <asm/hardware/clps7111.h>
-
-static void int1_mask(struct irq_data *d)
-{
-	u32 intmr1;
-
-	intmr1 = clps_readl(INTMR1);
-	intmr1 &= ~(1 << d->irq);
-	clps_writel(intmr1, INTMR1);
-}
-
-static void int1_ack(struct irq_data *d)
-{
-	u32 intmr1;
-
-	intmr1 = clps_readl(INTMR1);
-	intmr1 &= ~(1 << d->irq);
-	clps_writel(intmr1, INTMR1);
-
-	switch (d->irq) {
-	case IRQ_CSINT:  clps_writel(0, COEOI);  break;
-	case IRQ_TC1OI:  clps_writel(0, TC1EOI); break;
-	case IRQ_TC2OI:  clps_writel(0, TC2EOI); break;
-	case IRQ_RTCMI:  clps_writel(0, RTCEOI); break;
-	case IRQ_TINT:   clps_writel(0, TEOI);   break;
-	case IRQ_UMSINT: clps_writel(0, UMSEOI); break;
-	}
-}
-
-static void int1_unmask(struct irq_data *d)
-{
-	u32 intmr1;
-
-	intmr1 = clps_readl(INTMR1);
-	intmr1 |= 1 << d->irq;
-	clps_writel(intmr1, INTMR1);
-}
-
-static struct irq_chip int1_chip = {
-	.irq_ack	= int1_ack,
-	.irq_mask	= int1_mask,
-	.irq_unmask	= int1_unmask,
-};
-
-static void int2_mask(struct irq_data *d)
-{
-	u32 intmr2;
-
-	intmr2 = clps_readl(INTMR2);
-	intmr2 &= ~(1 << (d->irq - 16));
-	clps_writel(intmr2, INTMR2);
-}
-
-static void int2_ack(struct irq_data *d)
-{
-	u32 intmr2;
-
-	intmr2 = clps_readl(INTMR2);
-	intmr2 &= ~(1 << (d->irq - 16));
-	clps_writel(intmr2, INTMR2);
-
-	switch (d->irq) {
-	case IRQ_KBDINT: clps_writel(0, KBDEOI); break;
-	}
-}
-
-static void int2_unmask(struct irq_data *d)
-{
-	u32 intmr2;
-
-	intmr2 = clps_readl(INTMR2);
-	intmr2 |= 1 << (d->irq - 16);
-	clps_writel(intmr2, INTMR2);
-}
-
-static struct irq_chip int2_chip = {
-	.irq_ack	= int2_ack,
-	.irq_mask	= int2_mask,
-	.irq_unmask	= int2_unmask,
-};
-
-void __init clps711x_init_irq(void)
-{
-	unsigned int i;
-
-	for (i = 0; i < NR_IRQS; i++) {
-	        if (INT1_IRQS & (1 << i)) {
-	        	irq_set_chip_and_handler(i, &int1_chip,
-						 handle_level_irq);
-	        	set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
-		}
-		if (INT2_IRQS & (1 << i)) {
-			irq_set_chip_and_handler(i, &int2_chip,
-						 handle_level_irq);
-			set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
-		}			
-	}
-
-	/*
-	 * Disable interrupts
-	 */
-	clps_writel(0, INTMR1);
-	clps_writel(0, INTMR2);
-
-	/*
-	 * Clear down any pending interrupts
-	 */
-	clps_writel(0, COEOI);
-	clps_writel(0, TC1EOI);
-	clps_writel(0, TC2EOI);
-	clps_writel(0, RTCEOI);
-	clps_writel(0, TEOI);
-	clps_writel(0, UMSEOI);
-	clps_writel(0, SYNCIO);
-	clps_writel(0, KBDEOI);
-}
diff --git a/arch/arm/mach-clps711x/mm.c b/arch/arm/mach-clps711x/mm.c
deleted file mode 100644
index 9865921..0000000
--- a/arch/arm/mach-clps711x/mm.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  linux/arch/arm/mach-clps711x/mm.c
- *
- *  Generic MM setup for the CLPS711x-based machines.
- *
- *  Copyright (C) 2001 Deep Blue Solutions Ltd
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-
-#include <asm/sizes.h>
-#include <mach/hardware.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
-#include <asm/mach/map.h>
-#include <asm/hardware/clps7111.h>
-
-/*
- * This maps the generic CLPS711x registers
- */
-static struct map_desc clps711x_io_desc[] __initdata = {
-	{
-		.virtual	= CLPS7111_VIRT_BASE,
-		.pfn		= __phys_to_pfn(CLPS7111_PHYS_BASE),
-		.length		= SZ_1M,
-		.type		= MT_DEVICE
-	}
-};
-
-void __init clps711x_map_io(void)
-{
-	iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
-}
diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c
deleted file mode 100644
index d581ef0..0000000
--- a/arch/arm/mach-clps711x/time.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *  linux/arch/arm/mach-clps711x/time.c
- *
- *  Copyright (C) 2001 Deep Blue Solutions Ltd.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/timex.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/sched.h>
-#include <linux/io.h>
-
-#include <mach/hardware.h>
-#include <asm/irq.h>
-#include <asm/leds.h>
-#include <asm/hardware/clps7111.h>
-
-#include <asm/mach/time.h>
-
-
-/*
- * gettimeoffset() returns time since last timer tick, in usecs.
- *
- * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
- * 'tick' is usecs per jiffy.
- */
-static unsigned long clps711x_gettimeoffset(void)
-{
-	unsigned long hwticks;
-	hwticks = LATCH - (clps_readl(TC2D) & 0xffff);	/* since last underflow */
-	return (hwticks * (tick_nsec / 1000)) / LATCH;
-}
-
-/*
- * IRQ handler for the timer
- */
-static irqreturn_t
-p720t_timer_interrupt(int irq, void *dev_id)
-{
-	timer_tick();
-	return IRQ_HANDLED;
-}
-
-static struct irqaction clps711x_timer_irq = {
-	.name		= "CLPS711x Timer Tick",
-	.flags		= IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-	.handler	= p720t_timer_interrupt,
-};
-
-static void __init clps711x_timer_init(void)
-{
-	struct timespec tv;
-	unsigned int syscon;
-
-	syscon = clps_readl(SYSCON1);
-	syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
-	clps_writel(syscon, SYSCON1);
-
-	clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
-
-	setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
-
-	tv.tv_nsec = 0;
-	tv.tv_sec = clps_readl(RTCDR);
-	do_settimeofday(&tv);
-}
-
-struct sys_timer clps711x_timer = {
-	.init		= clps711x_timer_init,
-	.offset		= clps711x_gettimeoffset,
-};
-- 
1.7.4.4

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

* [PATCH 02/41] ARM: restart: remove poodle restart handler
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (8 preceding siblings ...)
  2011-11-06 17:40 ` [PATCH 01/41] ARM: clps711x: consolidate irq/mm/time code into a single file Russell King - ARM Linux
@ 2011-11-06 17:40 ` Russell King - ARM Linux
  2011-11-17 17:24   ` Russell King - ARM Linux
  2011-11-06 17:40 ` [PATCH 03/41] ARM: restart: remove s3c24xx " Russell King - ARM Linux
                   ` (43 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

The poodle restart handler was added in 74617fb6b8 (3593/1: Add reboot
and shutdown handlers for Zaurus handhelds), and at that time it was
necessary to deal with the RCSR register.  This commit also forced all
restarts to use the 'hard' restart method.

In dc38e2ad53 (pxa: Fix RCSR handling), the RCSR handling was removed,
leaving just the forcing to use a 'hard' restart.  As hard restarts are
the default (in the absense of a reboot= command line argument), this
seems pointless.  In any case, Richard Purdie says:

> From what I remember that hardware either always reboots or always
> halts. I think the option was therefore left hardcoded to make it clear
> it wasn't expected to work. Later Zaurii models could do either but
> required some manual poking of registers to make it happen iirc.
>
> Regardless, you can probably clean this up as you suggest now.

So, lets remove the unnecessary interception and rely on the default
restart mode.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-pxa/poodle.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 948ce3e..1c597ad 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -419,17 +419,11 @@ static void poodle_poweroff(void)
 	arm_machine_restart('h', NULL);
 }
 
-static void poodle_restart(char mode, const char *cmd)
-{
-	arm_machine_restart('h', cmd);
-}
-
 static void __init poodle_init(void)
 {
 	int ret = 0;
 
 	pm_power_off = poodle_poweroff;
-	arm_pm_restart = poodle_restart;
 
 	PCFR |= PCFR_OPDE;
 
-- 
1.7.4.4

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

* [PATCH 03/41] ARM: restart: remove s3c24xx restart handler
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (9 preceding siblings ...)
  2011-11-06 17:40 ` [PATCH 02/41] ARM: restart: remove poodle restart handler Russell King - ARM Linux
@ 2011-11-06 17:40 ` Russell King - ARM Linux
  2011-11-08  5:00   ` Kukjin Kim
  2011-11-06 17:41 ` [PATCH 04/41] ARM: restart: at91: use new restart hook Russell King - ARM Linux
                   ` (42 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the s3c24xx restart handler, which is trying to work around
a chip bug by keeping caches on but flushed.  As we now only disable
caches when performing a soft reboot, there doesn't need to be a
work-around to do that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/plat-s3c24xx/cpu.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 3c63353..1121df1 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -192,27 +192,6 @@ static unsigned long s3c24xx_read_idcode_v4(void)
 	return __raw_readl(S3C2410_GSTATUS1);
 }
 
-/* Hook for arm_pm_restart to ensure we execute the reset code
- * with the caches enabled. It seems at least the S3C2440 has a problem
- * resetting if there is bus activity interrupted by the reset.
- */
-static void s3c24xx_pm_restart(char mode, const char *cmd)
-{
-	if (mode != 's') {
-		unsigned long flags;
-
-		local_irq_save(flags);
-		__cpuc_flush_kern_all();
-		__cpuc_flush_user_all();
-
-		arch_reset(mode, cmd);
-		local_irq_restore(flags);
-	}
-
-	/* fallback, or unhandled */
-	arm_machine_restart(mode, cmd);
-}
-
 void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
 {
 	/* initialise the io descriptors we need for initialisation */
@@ -226,7 +205,5 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
 	}
 	s3c24xx_init_cpu();
 
-	arm_pm_restart = s3c24xx_pm_restart;
-
 	s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
 }
-- 
1.7.4.4

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

* [PATCH 04/41] ARM: restart: at91: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (10 preceding siblings ...)
  2011-11-06 17:40 ` [PATCH 03/41] ARM: restart: remove s3c24xx " Russell King - ARM Linux
@ 2011-11-06 17:41 ` Russell King - ARM Linux
  2011-11-15  1:16   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-11-06 17:41 ` [PATCH 05/41] ARM: restart: clps711x: " Russell King - ARM Linux
                   ` (41 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

Rather than using a private function pointer, use the existing
arm_pm_restart function pointer instead.  We no longer need to enable
the I-cache in at91sam9_alt_reset() as the caches will now be on when
this function is called.

Update the function names to use the 'restart' terminology rather than
the 'reboot' terminology.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-at91/at91cap9.c            |    4 ++--
 arch/arm/mach-at91/at91rm9200.c          |    4 ++--
 arch/arm/mach-at91/at91sam9260.c         |    2 +-
 arch/arm/mach-at91/at91sam9261.c         |    2 +-
 arch/arm/mach-at91/at91sam9263.c         |    2 +-
 arch/arm/mach-at91/at91sam9_alt_reset.S  |    9 ++-------
 arch/arm/mach-at91/at91sam9g45.c         |    4 ++--
 arch/arm/mach-at91/at91sam9rl.c          |    2 +-
 arch/arm/mach-at91/generic.h             |    3 +--
 arch/arm/mach-at91/include/mach/system.h |    5 -----
 10 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c
index ecdd54d..2937339 100644
--- a/arch/arm/mach-at91/at91cap9.c
+++ b/arch/arm/mach-at91/at91cap9.c
@@ -313,7 +313,7 @@ static struct at91_gpio_bank at91cap9_gpio[] = {
 	}
 };
 
-static void at91cap9_reset(void)
+static void at91cap9_restart(char mode, const char *cmd)
 {
 	at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
 }
@@ -335,7 +335,7 @@ static void __init at91cap9_map_io(void)
 
 static void __init at91cap9_initialize(void)
 {
-	at91_arch_reset = at91cap9_reset;
+	arm_pm_restart = at91cap9_restart;
 	pm_power_off = at91cap9_poweroff;
 	at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
 
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 713d3bd..430a9fd 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -288,7 +288,7 @@ static struct at91_gpio_bank at91rm9200_gpio[] = {
 	}
 };
 
-static void at91rm9200_reset(void)
+static void at91rm9200_restart(char mode, const char *cmd)
 {
 	/*
 	 * Perform a hardware reset with the use of the Watchdog timer.
@@ -309,7 +309,7 @@ static void __init at91rm9200_map_io(void)
 
 static void __init at91rm9200_initialize(void)
 {
-	at91_arch_reset = at91rm9200_reset;
+	arm_pm_restart = at91rm9200_restart;
 	at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
 			| (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3)
 			| (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5)
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index b84a9f6..ec9e23d 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -327,7 +327,7 @@ static void __init at91sam9260_map_io(void)
 
 static void __init at91sam9260_initialize(void)
 {
-	at91_arch_reset = at91sam9_alt_reset;
+	arm_pm_restart = at91sam9_alt_restart;
 	pm_power_off = at91sam9260_poweroff;
 	at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
 			| (1 << AT91SAM9260_ID_IRQ2);
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 658a518..19ac7c0 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -287,7 +287,7 @@ static void __init at91sam9261_map_io(void)
 
 static void __init at91sam9261_initialize(void)
 {
-	at91_arch_reset = at91sam9_alt_reset;
+	arm_pm_restart = at91sam9_alt_restart;
 	pm_power_off = at91sam9261_poweroff;
 	at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
 			| (1 << AT91SAM9261_ID_IRQ2);
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index f83fbb0..50d0163 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -305,7 +305,7 @@ static void __init at91sam9263_map_io(void)
 
 static void __init at91sam9263_initialize(void)
 {
-	at91_arch_reset = at91sam9_alt_reset;
+	arm_pm_restart = at91sam9_alt_restart;
 	pm_power_off = at91sam9263_poweroff;
 	at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
 
diff --git a/arch/arm/mach-at91/at91sam9_alt_reset.S b/arch/arm/mach-at91/at91sam9_alt_reset.S
index e0256de..d3f931c 100644
--- a/arch/arm/mach-at91/at91sam9_alt_reset.S
+++ b/arch/arm/mach-at91/at91sam9_alt_reset.S
@@ -14,20 +14,15 @@
  */
 
 #include <linux/linkage.h>
-#include <asm/system.h>
 #include <mach/hardware.h>
 #include <mach/at91sam9_sdramc.h>
 #include <mach/at91_rstc.h>
 
 			.arm
 
-			.globl	at91sam9_alt_reset
+			.globl	at91sam9_alt_restart
 
-at91sam9_alt_reset:	mrc	p15, 0, r0, c1, c0, 0
-			orr	r0, r0, #CR_I
-			mcr	p15, 0, r0, c1, c0, 0		@ enable I-cache
-
-			ldr	r0, .at91_va_base_sdramc	@ preload constants
+at91sam9_alt_restart:	ldr	r0, .at91_va_base_sdramc	@ preload constants
 			ldr	r1, .at91_va_base_rstc_cr
 
 			mov	r2, #1
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 318b040..ff21f7a 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -317,7 +317,7 @@ static struct at91_gpio_bank at91sam9g45_gpio[] = {
 	}
 };
 
-static void at91sam9g45_reset(void)
+static void at91sam9g45_restart(char mode, const char *cmd)
 {
 	at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
 }
@@ -340,7 +340,7 @@ static void __init at91sam9g45_map_io(void)
 
 static void __init at91sam9g45_initialize(void)
 {
-	at91_arch_reset = at91sam9g45_reset;
+	arm_pm_restart = at91sam9g45_restart;
 	pm_power_off = at91sam9g45_poweroff;
 	at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
 
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index a238105..61cbb46 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -292,7 +292,7 @@ static void __init at91sam9rl_map_io(void)
 
 static void __init at91sam9rl_initialize(void)
 {
-	at91_arch_reset = at91sam9_alt_reset;
+	arm_pm_restart = at91sam9_alt_restart;
 	pm_power_off = at91sam9rl_poweroff;
 	at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
 
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index 938b34f..7f4503b 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -57,7 +57,7 @@ extern void at91_irq_suspend(void);
 extern void at91_irq_resume(void);
 
 /* reset */
-extern void at91sam9_alt_reset(void);
+extern void at91sam9_alt_restart(char, const char *);
 
  /* GPIO */
 #define AT91RM9200_PQFP		3	/* AT91RM9200 PQFP package has 3 banks */
@@ -71,5 +71,4 @@ struct at91_gpio_bank {
 extern void __init at91_gpio_init(struct at91_gpio_bank *, int nr_banks);
 extern void __init at91_gpio_irq_setup(void);
 
-extern void (*at91_arch_reset)(void);
 extern int at91_extern_irq;
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
index 36af14b..079eb12 100644
--- a/arch/arm/mach-at91/include/mach/system.h
+++ b/arch/arm/mach-at91/include/mach/system.h
@@ -47,13 +47,8 @@ static inline void arch_idle(void)
 #endif
 }
 
-void (*at91_arch_reset)(void);
-
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/* call the CPU-specific reset function */
-	if (at91_arch_reset)
-		(at91_arch_reset)();
 }
 
 #endif
-- 
1.7.4.4

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

* [PATCH 05/41] ARM: restart: clps711x: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (11 preceding siblings ...)
  2011-11-06 17:41 ` [PATCH 04/41] ARM: restart: at91: use new restart hook Russell King - ARM Linux
@ 2011-11-06 17:41 ` Russell King - ARM Linux
  2011-11-06 17:41 ` [PATCH 06/41] ARM: restart: cns3xxx: " Russell King - ARM Linux
                   ` (40 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-clps711x/autcpu12.c            |    1 +
 arch/arm/mach-clps711x/cdb89712.c            |    1 +
 arch/arm/mach-clps711x/ceiva.c               |    1 +
 arch/arm/mach-clps711x/clep7312.c            |    1 +
 arch/arm/mach-clps711x/common.c              |    5 +++++
 arch/arm/mach-clps711x/edb7211-arch.c        |    1 +
 arch/arm/mach-clps711x/fortunet.c            |    1 +
 arch/arm/mach-clps711x/include/mach/system.h |    1 -
 arch/arm/mach-clps711x/p720t.c               |    1 +
 9 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c
index 0276091..3fb79a1 100644
--- a/arch/arm/mach-clps711x/autcpu12.c
+++ b/arch/arm/mach-clps711x/autcpu12.c
@@ -68,5 +68,6 @@ MACHINE_START(AUTCPU12, "autronix autcpu12")
 	.map_io		= autcpu12_map_io,
 	.init_irq	= clps711x_init_irq,
 	.timer		= &clps711x_timer,
+	.restart	= clps711x_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c
index 25b3bfd..c314f49 100644
--- a/arch/arm/mach-clps711x/cdb89712.c
+++ b/arch/arm/mach-clps711x/cdb89712.c
@@ -59,4 +59,5 @@ MACHINE_START(CDB89712, "Cirrus-CDB89712")
 	.map_io		= cdb89712_map_io,
 	.init_irq	= clps711x_init_irq,
 	.timer		= &clps711x_timer,
+	.restart	= clps711x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-clps711x/ceiva.c b/arch/arm/mach-clps711x/ceiva.c
index 1df9ec6..a70147e 100644
--- a/arch/arm/mach-clps711x/ceiva.c
+++ b/arch/arm/mach-clps711x/ceiva.c
@@ -60,4 +60,5 @@ MACHINE_START(CEIVA, "CEIVA/Polaroid Photo MAX Digital Picture Frame")
 	.map_io		= ceiva_map_io,
 	.init_irq	= clps711x_init_irq,
 	.timer		= &clps711x_timer,
+	.restart	= clps711x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-clps711x/clep7312.c b/arch/arm/mach-clps711x/clep7312.c
index 80496c0..dbc7842 100644
--- a/arch/arm/mach-clps711x/clep7312.c
+++ b/arch/arm/mach-clps711x/clep7312.c
@@ -41,5 +41,6 @@ MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
 	.map_io		= clps711x_map_io,
 	.init_irq	= clps711x_init_irq,
 	.timer		= &clps711x_timer,
+	.restart	= clps711x_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index aa273e7..fedf0e3 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -220,3 +220,8 @@ struct sys_timer clps711x_timer = {
 	.init		= clps711x_timer_init,
 	.offset		= clps711x_gettimeoffset,
 };
+
+void clps711x_restart(char mode, const char *cmd)
+{
+	soft_restart(0);
+}
diff --git a/arch/arm/mach-clps711x/edb7211-arch.c b/arch/arm/mach-clps711x/edb7211-arch.c
index 9721f61..5fad0b4 100644
--- a/arch/arm/mach-clps711x/edb7211-arch.c
+++ b/arch/arm/mach-clps711x/edb7211-arch.c
@@ -62,4 +62,5 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
 	.reserve	= edb7211_reserve,
 	.init_irq	= clps711x_init_irq,
 	.timer		= &clps711x_timer,
+	.restart	= clps711x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/fortunet.c
index d992566..3a3f0b7 100644
--- a/arch/arm/mach-clps711x/fortunet.c
+++ b/arch/arm/mach-clps711x/fortunet.c
@@ -78,4 +78,5 @@ MACHINE_START(FORTUNET, "ARM-FortuNet")
 	.map_io		= clps711x_map_io,
 	.init_irq	= clps711x_init_irq,
 	.timer		= &clps711x_timer,
+	.restart	= clps711x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
index 6c11993..9982deb 100644
--- a/arch/arm/mach-clps711x/include/mach/system.h
+++ b/arch/arm/mach-clps711x/include/mach/system.h
@@ -34,7 +34,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	soft_restart(0);
 }
 
 #endif
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index 6ecea95..42ee8f3 100644
--- a/arch/arm/mach-clps711x/p720t.c
+++ b/arch/arm/mach-clps711x/p720t.c
@@ -93,6 +93,7 @@ MACHINE_START(P720T, "ARM-Prospector720T")
 	.map_io		= p720t_map_io,
 	.init_irq	= clps711x_init_irq,
 	.timer		= &clps711x_timer,
+	.restart	= clps711x_restart,
 MACHINE_END
 
 static int p720t_hw_init(void)
-- 
1.7.4.4

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

* [PATCH 06/41] ARM: restart: cns3xxx: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (12 preceding siblings ...)
  2011-11-06 17:41 ` [PATCH 05/41] ARM: restart: clps711x: " Russell King - ARM Linux
@ 2011-11-06 17:41 ` Russell King - ARM Linux
  2011-11-24 20:30   ` Russell King - ARM Linux
  2011-11-06 17:42 ` [PATCH 07/41] ARM: restart: dove: " Russell King - ARM Linux
                   ` (39 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-cns3xxx/cns3420vb.c           |    1 +
 arch/arm/mach-cns3xxx/core.h                |    1 +
 arch/arm/mach-cns3xxx/include/mach/system.h |    5 +++--
 arch/arm/mach-cns3xxx/pm.c                  |    2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
index 55f7b4b..9b8c3d5 100644
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
@@ -202,4 +202,5 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board")
 	.init_irq	= cns3xxx_init_irq,
 	.timer		= &cns3xxx_timer,
 	.init_machine	= cns3420_init,
+	.restart	= cns3xxx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-cns3xxx/core.h b/arch/arm/mach-cns3xxx/core.h
index fcd2253..4894b8c 100644
--- a/arch/arm/mach-cns3xxx/core.h
+++ b/arch/arm/mach-cns3xxx/core.h
@@ -22,5 +22,6 @@ static inline void cns3xxx_l2x0_init(void) {}
 void __init cns3xxx_map_io(void);
 void __init cns3xxx_init_irq(void);
 void cns3xxx_power_off(void);
+void cns3xxx_restart(char, const char *);
 
 #endif /* __CNS3XXX_CORE_H */
diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h
index 4f16c9b..f92540d 100644
--- a/arch/arm/mach-cns3xxx/include/mach/system.h
+++ b/arch/arm/mach-cns3xxx/include/mach/system.h
@@ -11,7 +11,6 @@
 #ifndef __MACH_SYSTEM_H
 #define __MACH_SYSTEM_H
 
-#include <linux/io.h>
 #include <asm/proc-fns.h>
 
 static inline void arch_idle(void)
@@ -23,6 +22,8 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-void arch_reset(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 #endif
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c
index 0c04678..5136c4c 100644
--- a/arch/arm/mach-cns3xxx/pm.c
+++ b/arch/arm/mach-cns3xxx/pm.c
@@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block)
 }
 EXPORT_SYMBOL(cns3xxx_pwr_soft_rst);
 
-void arch_reset(char mode, const char *cmd)
+void cns3xxx_restart(char mode, const char *cmd)
 {
 	/*
 	 * To reset, we hit the on-board reset register
-- 
1.7.4.4

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

* [PATCH 07/41] ARM: restart: dove: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (13 preceding siblings ...)
  2011-11-06 17:41 ` [PATCH 06/41] ARM: restart: cns3xxx: " Russell King - ARM Linux
@ 2011-11-06 17:42 ` Russell King - ARM Linux
  2011-11-24 22:07   ` Nicolas Pitre
  2011-11-06 17:42 ` [PATCH 08/41] ARM: restart: ebsa110: " Russell King - ARM Linux
                   ` (38 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-dove/cm-a510.c             |    1 +
 arch/arm/mach-dove/common.c              |   16 ++++++++++++++++
 arch/arm/mach-dove/common.h              |    1 +
 arch/arm/mach-dove/dove-db-setup.c       |    1 +
 arch/arm/mach-dove/include/mach/system.h |   14 --------------
 5 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-dove/cm-a510.c b/arch/arm/mach-dove/cm-a510.c
index c8a406f..792b4e2 100644
--- a/arch/arm/mach-dove/cm-a510.c
+++ b/arch/arm/mach-dove/cm-a510.c
@@ -93,4 +93,5 @@ MACHINE_START(CM_A510, "Compulab CM-A510 Board")
 	.init_early	= dove_init_early,
 	.init_irq	= dove_init_irq,
 	.timer		= &dove_timer,
+	.restart	= dove_restart,
 MACHINE_END
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index a9e0dae..13bb236 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -292,3 +292,19 @@ void __init dove_init(void)
 	dove_xor0_init();
 	dove_xor1_init();
 }
+
+void dove_restart(char mode, const char *cmd)
+{
+	/*
+	 * Enable soft reset to assert RSTOUTn.
+	 */
+	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
+
+	/*
+	 * Assert soft reset.
+	 */
+	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
+
+	while (1)
+		;
+}
diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h
index 6a2046e..4202730 100644
--- a/arch/arm/mach-dove/common.h
+++ b/arch/arm/mach-dove/common.h
@@ -39,5 +39,6 @@ void dove_spi1_init(void);
 void dove_i2c_init(void);
 void dove_sdio0_init(void);
 void dove_sdio1_init(void);
+void dove_restart(char, const char *);
 
 #endif
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c
index 11ea34e..ea77ae4 100644
--- a/arch/arm/mach-dove/dove-db-setup.c
+++ b/arch/arm/mach-dove/dove-db-setup.c
@@ -100,4 +100,5 @@ MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board")
 	.init_early	= dove_init_early,
 	.init_irq	= dove_init_irq,
 	.timer		= &dove_timer,
+	.restart	= dove_restart,
 MACHINE_END
diff --git a/arch/arm/mach-dove/include/mach/system.h b/arch/arm/mach-dove/include/mach/system.h
index 356afda..25a3a65 100644
--- a/arch/arm/mach-dove/include/mach/system.h
+++ b/arch/arm/mach-dove/include/mach/system.h
@@ -9,8 +9,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <mach/bridge-regs.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -18,18 +16,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * Enable soft reset to assert RSTOUTn.
-	 */
-	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
-
-	/*
-	 * Assert soft reset.
-	 */
-	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
-
-	while (1)
-		;
 }
 
 
-- 
1.7.4.4

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

* [PATCH 08/41] ARM: restart: ebsa110: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (14 preceding siblings ...)
  2011-11-06 17:42 ` [PATCH 07/41] ARM: restart: dove: " Russell King - ARM Linux
@ 2011-11-06 17:42 ` Russell King - ARM Linux
  2011-11-06 17:43 ` [PATCH 09/41] ARM: restart: ep93xx: " Russell King - ARM Linux
                   ` (37 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hook the EBSA110 platform restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-ebsa110/core.c                |    6 ++++++
 arch/arm/mach-ebsa110/include/mach/system.h |    4 +++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index ce3ed24..294aad0 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -278,6 +278,11 @@ static int __init ebsa110_init(void)
 
 arch_initcall(ebsa110_init);
 
+static void ebsa110_restart(char mode, const char *cmd)
+{
+	soft_restart(0x80000000);
+}
+
 MACHINE_START(EBSA110, "EBSA110")
 	/* Maintainer: Russell King */
 	.atag_offset	= 0x400,
@@ -287,4 +292,5 @@ MACHINE_START(EBSA110, "EBSA110")
 	.map_io		= ebsa110_map_io,
 	.init_irq	= ebsa110_init_irq,
 	.timer		= &ebsa110_timer,
+	.restart	= ebsa110_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
index 0d5df72..574e633 100644
--- a/arch/arm/mach-ebsa110/include/mach/system.h
+++ b/arch/arm/mach-ebsa110/include/mach/system.h
@@ -34,6 +34,8 @@ static inline void arch_idle(void)
 	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
 }
 
-#define arch_reset(mode, cmd)	soft_restart(0x80000000)
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 #endif
-- 
1.7.4.4

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

* [PATCH 09/41] ARM: restart: ep93xx: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (15 preceding siblings ...)
  2011-11-06 17:42 ` [PATCH 08/41] ARM: restart: ebsa110: " Russell King - ARM Linux
@ 2011-11-06 17:43 ` Russell King - ARM Linux
  2011-11-07 17:10   ` H Hartley Sweeten
  2011-11-06 17:43 ` [PATCH 10/41] ARM: restart: footbridge: " Russell King - ARM Linux
                   ` (36 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-ep93xx/adssphere.c             |    1 +
 arch/arm/mach-ep93xx/core.c                  |   12 ++++++++++++
 arch/arm/mach-ep93xx/edb93xx.c               |    8 ++++++++
 arch/arm/mach-ep93xx/gesbc9312.c             |    1 +
 arch/arm/mach-ep93xx/include/mach/platform.h |    2 ++
 arch/arm/mach-ep93xx/include/mach/system.h   |   11 -----------
 arch/arm/mach-ep93xx/micro9.c                |    4 ++++
 arch/arm/mach-ep93xx/simone.c                |    1 +
 arch/arm/mach-ep93xx/snappercl15.c           |    1 +
 arch/arm/mach-ep93xx/ts72xx.c                |    1 +
 arch/arm/mach-ep93xx/vision_ep9307.c         |    1 +
 11 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index 0713448..7b41651 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -38,4 +38,5 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= adssphere_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 94c78bc..348e13e 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -905,3 +905,15 @@ void __init ep93xx_init_devices(void)
 	platform_device_register(&ep93xx_ohci_device);
 	platform_device_register(&ep93xx_leds);
 }
+
+void ep93xx_restart(char mode, const char *cmd)
+{
+	/*
+	 * Set then clear the SWRST bit to initiate a software reset
+	 */
+	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_SWRST);
+	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_SWRST);
+
+	while (1)
+		;
+}
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index 70ef8c5..c5731c6 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -252,6 +252,7 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= edb93xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -263,6 +264,7 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= edb93xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -274,6 +276,7 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= edb93xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -285,6 +288,7 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= edb93xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -296,6 +300,7 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= edb93xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -307,6 +312,7 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= edb93xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -318,6 +324,7 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= edb93xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -329,5 +336,6 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= edb93xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index 45ee205..7b89e8a 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -38,4 +38,5 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= gesbc9312_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index 5066045..d4c9349 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -66,4 +66,6 @@ void ep93xx_register_ac97(void);
 void ep93xx_init_devices(void);
 extern struct sys_timer ep93xx_timer;
 
+void ep93xx_restart(char, const char *);
+
 #endif
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
index bdf6c4f..b27a654 100644
--- a/arch/arm/mach-ep93xx/include/mach/system.h
+++ b/arch/arm/mach-ep93xx/include/mach/system.h
@@ -1,9 +1,6 @@
 /*
  * arch/arm/mach-ep93xx/include/mach/system.h
  */
-
-#include <mach/hardware.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -11,12 +8,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * Set then clear the SWRST bit to initiate a software reset
-	 */
-	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_SWRST);
-	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_SWRST);
-
-	while (1)
-		;
 }
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index e72f736..050ce92 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -82,6 +82,7 @@ MACHINE_START(MICRO9, "Contec Micro9-High")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= micro9_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -93,6 +94,7 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= micro9_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -104,6 +106,7 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= micro9_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
 
@@ -115,5 +118,6 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= micro9_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 52e090d..188cbdb 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -82,4 +82,5 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= simone_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index 8121e3a..797afde 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -179,4 +179,5 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
 	.init_irq	= ep93xx_init_irq,
 	.timer 		= &ep93xx_timer,
 	.init_machine	= snappercl15_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 1ade3c3..8fa6169 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -262,4 +262,5 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= ts72xx_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index d96e4db..03dd401 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -361,4 +361,5 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
 	.init_irq	= ep93xx_init_irq,
 	.timer		= &ep93xx_timer,
 	.init_machine	= vision_init_machine,
+	.restart	= ep93xx_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 10/41] ARM: restart: footbridge: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (16 preceding siblings ...)
  2011-11-06 17:43 ` [PATCH 09/41] ARM: restart: ep93xx: " Russell King - ARM Linux
@ 2011-11-06 17:43 ` Russell King - ARM Linux
  2011-11-06 17:43 ` [PATCH 11/41] ARM: restart: h720x: " Russell King - ARM Linux
                   ` (35 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-footbridge/cats-hw.c             |    1 +
 arch/arm/mach-footbridge/common.c              |   27 ++++++++++++
 arch/arm/mach-footbridge/common.h              |    1 +
 arch/arm/mach-footbridge/ebsa285.c             |    1 +
 arch/arm/mach-footbridge/include/mach/system.h |   52 ------------------------
 arch/arm/mach-footbridge/netwinder-hw.c        |   27 ++++++++++++
 arch/arm/mach-footbridge/personal.c            |    1 +
 7 files changed, 58 insertions(+), 52 deletions(-)

diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
index 60b6774..25b4536 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -91,4 +91,5 @@ MACHINE_START(CATS, "Chalice-CATS")
 	.map_io		= footbridge_map_io,
 	.init_irq	= footbridge_init_irq,
 	.timer		= &isa_timer,
+	.restart	= footbridge_restart,
 MACHINE_END
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index 38a44f9..41978ee 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -199,6 +199,33 @@ void __init footbridge_map_io(void)
 		iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc));
 }
 
+void footbridge_restart(char mode, const char *cmd)
+{
+	if (mode == 's') {
+		/* Jump into the ROM */
+		soft_restart(0x41000000);
+	} else {
+		/*
+		 * Force the watchdog to do a CPU reset.
+		 *
+		 * After making sure that the watchdog is disabled
+		 * (so we can change the timer registers) we first
+		 * enable the timer to autoreload itself.  Next, the
+		 * timer interval is set really short and any
+		 * current interrupt request is cleared (so we can
+		 * see an edge transition).  Finally, TIMER4 is
+		 * enabled as the watchdog.
+		 */
+		*CSR_SA110_CNTL &= ~(1 << 13);
+		*CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE |
+				   TIMER_CNTL_AUTORELOAD |
+				   TIMER_CNTL_DIV16;
+		*CSR_TIMER4_LOAD = 0x2;
+		*CSR_TIMER4_CLR  = 0;
+		*CSR_SA110_CNTL |= (1 << 13);
+	}
+}
+
 #ifdef CONFIG_FOOTBRIDGE_ADDIN
 
 static inline unsigned long fb_bus_sdram_offset(void)
diff --git a/arch/arm/mach-footbridge/common.h b/arch/arm/mach-footbridge/common.h
index b05e662..c9767b8 100644
--- a/arch/arm/mach-footbridge/common.h
+++ b/arch/arm/mach-footbridge/common.h
@@ -8,3 +8,4 @@ extern void footbridge_map_io(void);
 extern void footbridge_init_irq(void);
 
 extern void isa_init_irq(unsigned int irq);
+extern void footbridge_restart(char, const char *);
diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c
index 012210c..27716a7 100644
--- a/arch/arm/mach-footbridge/ebsa285.c
+++ b/arch/arm/mach-footbridge/ebsa285.c
@@ -21,5 +21,6 @@ MACHINE_START(EBSA285, "EBSA285")
 	.map_io		= footbridge_map_io,
 	.init_irq	= footbridge_init_irq,
 	.timer		= &footbridge_timer,
+	.restart	= footbridge_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
index 249f895..794a02c 100644
--- a/arch/arm/mach-footbridge/include/mach/system.h
+++ b/arch/arm/mach-footbridge/include/mach/system.h
@@ -7,12 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/io.h>
-#include <asm/hardware/dec21285.h>
-#include <mach/hardware.h>
-#include <asm/leds.h>
-#include <asm/mach-types.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -20,50 +14,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	if (mode == 's') {
-		/*
-		 * Jump into the ROM
-		 */
-		soft_restart(0x41000000);
-	} else {
-		if (machine_is_netwinder()) {
-			/* open up the SuperIO chip
-			 */
-			outb(0x87, 0x370);
-			outb(0x87, 0x370);
-
-			/* aux function group 1 (logical device 7)
-			 */
-			outb(0x07, 0x370);
-			outb(0x07, 0x371);
-
-			/* set GP16 for WD-TIMER output
-			 */
-			outb(0xe6, 0x370);
-			outb(0x00, 0x371);
-
-			/* set a RED LED and toggle WD_TIMER for rebooting
-			 */
-			outb(0xc4, 0x338);
-		} else {
-			/* 
-			 * Force the watchdog to do a CPU reset.
-			 *
-			 * After making sure that the watchdog is disabled
-			 * (so we can change the timer registers) we first
-			 * enable the timer to autoreload itself.  Next, the
-			 * timer interval is set really short and any
-			 * current interrupt request is cleared (so we can
-			 * see an edge transition).  Finally, TIMER4 is
-			 * enabled as the watchdog.
-			 */
-			*CSR_SA110_CNTL &= ~(1 << 13);
-			*CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE |
-					   TIMER_CNTL_AUTORELOAD |
-					   TIMER_CNTL_DIV16;
-			*CSR_TIMER4_LOAD = 0x2;
-			*CSR_TIMER4_CLR  = 0;
-			*CSR_SA110_CNTL |= (1 << 13);
-		}
-	}
 }
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index 0d3846f..80a1c5c 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -645,6 +645,32 @@ fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi)
 #endif
 }
 
+static void netwinder_restart(char mode, const char *cmd)
+{
+	if (mode == 's') {
+		/* Jump into the ROM */
+		soft_restart(0x41000000);
+	} else {
+		local_irq_disable();
+		local_fiq_disable();
+
+		/* open up the SuperIO chip */
+		outb(0x87, 0x370);
+		outb(0x87, 0x370);
+
+		/* aux function group 1 (logical device 7) */
+		outb(0x07, 0x370);
+		outb(0x07, 0x371);
+
+		/* set GP16 for WD-TIMER output */
+		outb(0xe6, 0x370);
+		outb(0x00, 0x371);
+
+		/* set a RED LED and toggle WD_TIMER for rebooting */
+		outb(0xc4, 0x338);
+	}
+}
+
 MACHINE_START(NETWINDER, "Rebel-NetWinder")
 	/* Maintainer: Russell King/Rebel.com */
 	.atag_offset	= 0x100,
@@ -656,4 +682,5 @@ MACHINE_START(NETWINDER, "Rebel-NetWinder")
 	.map_io		= footbridge_map_io,
 	.init_irq	= footbridge_init_irq,
 	.timer		= &isa_timer,
+	.restart	= netwinder_restart,
 MACHINE_END
diff --git a/arch/arm/mach-footbridge/personal.c b/arch/arm/mach-footbridge/personal.c
index f41dba3..e1e9990 100644
--- a/arch/arm/mach-footbridge/personal.c
+++ b/arch/arm/mach-footbridge/personal.c
@@ -19,5 +19,6 @@ MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
 	.map_io		= footbridge_map_io,
 	.init_irq	= footbridge_init_irq,
 	.timer		= &footbridge_timer,
+	.restart	= footbridge_restart,
 MACHINE_END
 
-- 
1.7.4.4

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

* [PATCH 11/41] ARM: restart: h720x: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (17 preceding siblings ...)
  2011-11-06 17:43 ` [PATCH 10/41] ARM: restart: footbridge: " Russell King - ARM Linux
@ 2011-11-06 17:43 ` Russell King - ARM Linux
  2011-11-06 17:44 ` [PATCH 12/41] ARM: restart: highbank: " Russell King - ARM Linux
                   ` (34 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-h720x/common.c              |    5 +++++
 arch/arm/mach-h720x/common.h              |    1 +
 arch/arm/mach-h720x/h7201-eval.c          |    1 +
 arch/arm/mach-h720x/h7202-eval.c          |    1 +
 arch/arm/mach-h720x/include/mach/system.h |    4 +---
 5 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c
index 51d4e44..f8a2f6b 100644
--- a/arch/arm/mach-h720x/common.c
+++ b/arch/arm/mach-h720x/common.c
@@ -242,3 +242,8 @@ void __init h720x_map_io(void)
 {
 	iotable_init(h720x_io_desc,ARRAY_SIZE(h720x_io_desc));
 }
+
+void h720x_restart(char mode, const char *cmd)
+{
+	CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
+}
diff --git a/arch/arm/mach-h720x/common.h b/arch/arm/mach-h720x/common.h
index 7dd5fa6..2489537 100644
--- a/arch/arm/mach-h720x/common.h
+++ b/arch/arm/mach-h720x/common.h
@@ -16,6 +16,7 @@
 extern unsigned long h720x_gettimeoffset(void);
 extern void __init h720x_init_irq(void);
 extern void __init h720x_map_io(void);
+extern void h720x_restart(char, const char *);
 
 #ifdef CONFIG_ARCH_H7202
 extern struct sys_timer h7202_timer;
diff --git a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c
index 9886f19..5fdb20c 100644
--- a/arch/arm/mach-h720x/h7201-eval.c
+++ b/arch/arm/mach-h720x/h7201-eval.c
@@ -34,4 +34,5 @@ MACHINE_START(H7201, "Hynix GMS30C7201")
 	.init_irq	= h720x_init_irq,
 	.timer		= &h7201_timer,
 	.dma_zone_size	= SZ_256M,
+	.restart	= h720x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c
index 284a134..1696730 100644
--- a/arch/arm/mach-h720x/h7202-eval.c
+++ b/arch/arm/mach-h720x/h7202-eval.c
@@ -77,4 +77,5 @@ MACHINE_START(H7202, "Hynix HMS30C7202")
 	.timer		= &h7202_timer,
 	.init_machine	= init_eval_h7202,
 	.dma_zone_size	= SZ_256M,
+	.restart	= h720x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-h720x/include/mach/system.h b/arch/arm/mach-h720x/include/mach/system.h
index a708d24..b04f08d 100644
--- a/arch/arm/mach-h720x/include/mach/system.h
+++ b/arch/arm/mach-h720x/include/mach/system.h
@@ -24,10 +24,8 @@ static void arch_idle(void)
 	nop();
 }
 
-
-static __inline__ void arch_reset(char mode, const char *cmd)
+static inline void arch_reset(char mode, const char *cmd)
 {
-	CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
 }
 
 #endif
-- 
1.7.4.4

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

* [PATCH 12/41] ARM: restart: highbank: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (18 preceding siblings ...)
  2011-11-06 17:43 ` [PATCH 11/41] ARM: restart: h720x: " Russell King - ARM Linux
@ 2011-11-06 17:44 ` Russell King - ARM Linux
  2011-11-07 15:43   ` Rob Herring
  2011-11-06 17:44 ` [PATCH 13/41] ARM: restart: integrator: " Russell King - ARM Linux
                   ` (33 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-highbank/core.h                |    1 +
 arch/arm/mach-highbank/highbank.c            |    1 +
 arch/arm/mach-highbank/include/mach/system.h |    4 +++-
 arch/arm/mach-highbank/system.c              |    2 +-
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
index 7e33fc9..d8e2d0b 100644
--- a/arch/arm/mach-highbank/core.h
+++ b/arch/arm/mach-highbank/core.h
@@ -1,5 +1,6 @@
 extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
 extern void highbank_clocks_init(void);
+extern void highbank_restart(char, const char *);
 extern void __iomem *scu_base_addr;
 #ifdef CONFIG_DEBUG_HIGHBANK_UART
 extern void highbank_lluart_map_io(void);
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index b82dcf0..9d356a1 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -142,4 +142,5 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
 	.timer		= &highbank_timer,
 	.init_machine	= highbank_init,
 	.dt_compat	= highbank_match,
+	.restart	= highbank_restart,
 MACHINE_END
diff --git a/arch/arm/mach-highbank/include/mach/system.h b/arch/arm/mach-highbank/include/mach/system.h
index 7e81922..0754c79 100644
--- a/arch/arm/mach-highbank/include/mach/system.h
+++ b/arch/arm/mach-highbank/include/mach/system.h
@@ -21,6 +21,8 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-extern void arch_reset(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 #endif
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c
index 53f0c4c..82c2723 100644
--- a/arch/arm/mach-highbank/system.c
+++ b/arch/arm/mach-highbank/system.c
@@ -20,7 +20,7 @@
 #include "core.h"
 #include "sysregs.h"
 
-void arch_reset(char mode, const char *cmd)
+void highbank_restart(char mode, const char *cmd)
 {
 	if (mode == 'h')
 		hignbank_set_pwr_hard_reset();
-- 
1.7.4.4

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

* [PATCH 13/41] ARM: restart: integrator: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (19 preceding siblings ...)
  2011-11-06 17:44 ` [PATCH 12/41] ARM: restart: highbank: " Russell King - ARM Linux
@ 2011-11-06 17:44 ` Russell King - ARM Linux
  2011-11-25 21:41   ` Linus Walleij
  2011-11-06 17:44 ` [PATCH 14/41] ARM: restart: iop3xx: " Russell King - ARM Linux
                   ` (32 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-integrator/common.h              |    1 +
 arch/arm/mach-integrator/core.c                |    8 ++++++++
 arch/arm/mach-integrator/include/mach/system.h |    7 -------
 arch/arm/mach-integrator/integrator_ap.c       |    1 +
 arch/arm/mach-integrator/integrator_cp.c       |    1 +
 5 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h
index a08f9b0..899561d 100644
--- a/arch/arm/mach-integrator/common.h
+++ b/arch/arm/mach-integrator/common.h
@@ -1,2 +1,3 @@
 void integrator_init_early(void);
 void integrator_reserve(void);
+void integrator_restart(char, const char *);
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 4b38e13..0a3e097 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -238,3 +238,11 @@ void __init integrator_reserve(void)
 {
 	memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET);
 }
+
+/*
+ * To reset, we hit the on-board reset register in the system FPGA
+ */
+void integrator_restart(char mode, const char *cmd)
+{
+	cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
+}
diff --git a/arch/arm/mach-integrator/include/mach/system.h b/arch/arm/mach-integrator/include/mach/system.h
index e1551b8..12fc8c3 100644
--- a/arch/arm/mach-integrator/include/mach/system.h
+++ b/arch/arm/mach-integrator/include/mach/system.h
@@ -21,8 +21,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <mach/cm.h>
-
 static inline void arch_idle(void)
 {
 	/*
@@ -34,11 +32,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * To reset, we hit the on-board reset register
-	 * in the system FPGA
-	 */
-	cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
 }
 
 #endif
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index a1769f3..21a1d6c 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -472,4 +472,5 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator")
 	.init_irq	= ap_init_irq,
 	.timer		= &ap_timer,
 	.init_machine	= ap_init,
+	.restart	= integrator_restart,
 MACHINE_END
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 5de49c3..3a730d44 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -499,4 +499,5 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
 	.init_irq	= intcp_init_irq,
 	.timer		= &cp_timer,
 	.init_machine	= intcp_init,
+	.restart	= integrator_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 14/41] ARM: restart: iop3xx: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (20 preceding siblings ...)
  2011-11-06 17:44 ` [PATCH 13/41] ARM: restart: integrator: " Russell King - ARM Linux
@ 2011-11-06 17:44 ` Russell King - ARM Linux
  2011-11-17 17:28   ` Russell King - ARM Linux
  2011-11-06 17:45 ` [PATCH 15/41] ARM: restart: iop13xx: " Russell King - ARM Linux
                   ` (31 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the arm_pm_restart hook rather
than using arch_reset().

In doing so, we split out the n2100 platform specific restart handler
into the n2100 platform file.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/include/asm/hardware/iop3xx.h     |    1 +
 arch/arm/mach-iop32x/em7210.c              |    1 +
 arch/arm/mach-iop32x/glantank.c            |    1 +
 arch/arm/mach-iop32x/include/mach/system.h |   15 ---------------
 arch/arm/mach-iop32x/iq31244.c             |    2 ++
 arch/arm/mach-iop32x/iq80321.c             |    1 +
 arch/arm/mach-iop32x/n2100.c               |    9 +++++++++
 arch/arm/mach-iop33x/include/mach/system.h |    6 ------
 arch/arm/mach-iop33x/iq80331.c             |    1 +
 arch/arm/mach-iop33x/iq80332.c             |    1 +
 arch/arm/plat-iop/Makefile                 |    2 ++
 arch/arm/plat-iop/restart.c                |   19 +++++++++++++++++++
 12 files changed, 38 insertions(+), 21 deletions(-)
 create mode 100644 arch/arm/plat-iop/restart.c

diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h
index 5daea29..077c323 100644
--- a/arch/arm/include/asm/hardware/iop3xx.h
+++ b/arch/arm/include/asm/hardware/iop3xx.h
@@ -234,6 +234,7 @@ extern int iop3xx_get_init_atu(void);
 void iop3xx_map_io(void);
 void iop_init_cp6_handler(void);
 void iop_init_time(unsigned long tickrate);
+void iop3xx_restart(char, const char *);
 
 static inline u32 read_tmr0(void)
 {
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c
index 4325055..24069e0 100644
--- a/arch/arm/mach-iop32x/em7210.c
+++ b/arch/arm/mach-iop32x/em7210.c
@@ -208,4 +208,5 @@ MACHINE_START(EM7210, "Lanner EM7210")
 	.init_irq	= iop32x_init_irq,
 	.timer		= &em7210_timer,
 	.init_machine	= em7210_init_machine,
+	.restart	= iop3xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 0edc880..204e1d1 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -212,4 +212,5 @@ MACHINE_START(GLANTANK, "GLAN Tank")
 	.init_irq	= iop32x_init_irq,
 	.timer		= &glantank_timer,
 	.init_machine	= glantank_init_machine,
+	.restart	= iop3xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
index b4f83e5..44e46f2 100644
--- a/arch/arm/mach-iop32x/include/mach/system.h
+++ b/arch/arm/mach-iop32x/include/mach/system.h
@@ -7,10 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <asm/mach-types.h>
-#include <asm/hardware/iop3xx.h>
-#include <mach/n2100.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -18,15 +14,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	if (machine_is_n2100()) {
-		gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
-		gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
-		while (1)
-			;
-	}
-
-	*IOP3XX_PCSR = 0x30;
-
-	/* Jump into ROM at address 0 */
-	soft_restart(0);
 }
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index 9e7aacc..3eb642a 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -318,6 +318,7 @@ MACHINE_START(IQ31244, "Intel IQ31244")
 	.init_irq	= iop32x_init_irq,
 	.timer		= &iq31244_timer,
 	.init_machine	= iq31244_init_machine,
+	.restart	= iop3xx_restart,
 MACHINE_END
 
 /* There should have been an ep80219 machine identifier from the beginning.
@@ -332,4 +333,5 @@ MACHINE_START(EP80219, "Intel EP80219")
 	.init_irq	= iop32x_init_irq,
 	.timer		= &iq31244_timer,
 	.init_machine	= iq31244_init_machine,
+	.restart	= iop3xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index 53ea86f..2ec724b 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -191,4 +191,5 @@ MACHINE_START(IQ80321, "Intel IQ80321")
 	.init_irq	= iop32x_init_irq,
 	.timer		= &iq80321_timer,
 	.init_machine	= iq80321_init_machine,
+	.restart	= iop3xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index d726927..6b6d559 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -291,6 +291,14 @@ static void n2100_power_off(void)
 		;
 }
 
+static void n2100_restart(char mode, const char *cmd)
+{
+	gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
+	gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
+	while (1)
+		;
+}
+
 
 static struct timer_list power_button_poll_timer;
 
@@ -332,4 +340,5 @@ MACHINE_START(N2100, "Thecus N2100")
 	.init_irq	= iop32x_init_irq,
 	.timer		= &n2100_timer,
 	.init_machine	= n2100_init_machine,
+	.restart	= n2100_restart,
 MACHINE_END
diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
index 86d1b20..696d88c 100644
--- a/arch/arm/mach-iop33x/include/mach/system.h
+++ b/arch/arm/mach-iop33x/include/mach/system.h
@@ -7,8 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <asm/hardware/iop3xx.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -16,8 +14,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	*IOP3XX_PCSR = 0x30;
-
-	/* Jump into ROM at address 0 */
-	soft_restart(0);
 }
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index 9e14ccc..abce934 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -146,4 +146,5 @@ MACHINE_START(IQ80331, "Intel IQ80331")
 	.init_irq	= iop33x_init_irq,
 	.timer		= &iq80331_timer,
 	.init_machine	= iq80331_init_machine,
+	.restart	= iop3xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index 09c899a..7513559 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -146,4 +146,5 @@ MACHINE_START(IQ80332, "Intel IQ80332")
 	.init_irq	= iop33x_init_irq,
 	.timer		= &iq80332_timer,
 	.init_machine	= iq80332_init_machine,
+	.restart	= iop3xx_restart,
 MACHINE_END
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile
index 69b09c1..f5aebfe 100644
--- a/arch/arm/plat-iop/Makefile
+++ b/arch/arm/plat-iop/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_IOP32X) += io.o
 obj-$(CONFIG_ARCH_IOP32X) += cp6.o
 obj-$(CONFIG_ARCH_IOP32X) += adma.o
 obj-$(CONFIG_ARCH_IOP32X) += pmu.o
+obj-$(CONFIG_ARCH_IOP32X) += restart.o
 
 # IOP33X
 obj-$(CONFIG_ARCH_IOP33X) += gpio.o
@@ -25,6 +26,7 @@ obj-$(CONFIG_ARCH_IOP33X) += io.o
 obj-$(CONFIG_ARCH_IOP33X) += cp6.o
 obj-$(CONFIG_ARCH_IOP33X) += adma.o
 obj-$(CONFIG_ARCH_IOP33X) += pmu.o
+obj-$(CONFIG_ARCH_IOP33X) += restart.o
 
 # IOP13XX
 obj-$(CONFIG_ARCH_IOP13XX) += cp6.o
diff --git a/arch/arm/plat-iop/restart.c b/arch/arm/plat-iop/restart.c
new file mode 100644
index 0000000..6a85a0c
--- /dev/null
+++ b/arch/arm/plat-iop/restart.c
@@ -0,0 +1,19 @@
+/*
+ * restart.c
+ *
+ * Copyright (C) 2001 MontaVista Software, Inc.
+ *
+ * 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 <asm/hardware/iop3xx.h>
+#include <mach/hardware.h>
+
+void iop3xx_restart(char mode, const char *cmd)
+{
+	*IOP3XX_PCSR = 0x30;
+
+	/* Jump into ROM at address 0 */
+	soft_restart(0);
+}
-- 
1.7.4.4

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

* [PATCH 15/41] ARM: restart: iop13xx: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (21 preceding siblings ...)
  2011-11-06 17:44 ` [PATCH 14/41] ARM: restart: iop3xx: " Russell King - ARM Linux
@ 2011-11-06 17:45 ` Russell King - ARM Linux
  2011-11-17 17:29   ` Russell King - ARM Linux
  2011-11-06 17:45 ` [PATCH 16/41] ARM: restart: ixp2000: " Russell King - ARM Linux
                   ` (30 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-iop13xx/include/mach/iop13xx.h |    1 +
 arch/arm/mach-iop13xx/include/mach/system.h  |   10 ----------
 arch/arm/mach-iop13xx/iq81340mc.c            |    1 +
 arch/arm/mach-iop13xx/iq81340sc.c            |    1 +
 arch/arm/mach-iop13xx/setup.c                |   11 +++++++++++
 5 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-iop13xx/include/mach/iop13xx.h b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
index 52b7fab..07e9ff7 100644
--- a/arch/arm/mach-iop13xx/include/mach/iop13xx.h
+++ b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
@@ -10,6 +10,7 @@ void iop13xx_map_io(void);
 void iop13xx_platform_init(void);
 void iop13xx_add_tpmi_devices(void);
 void iop13xx_init_irq(void);
+void iop13xx_restart(char, const char *);
 
 /* CPUID CP6 R0 Page 0 */
 static inline int iop13xx_cpu_id(void)
diff --git a/arch/arm/mach-iop13xx/include/mach/system.h b/arch/arm/mach-iop13xx/include/mach/system.h
index d0c66ef..7f798dc 100644
--- a/arch/arm/mach-iop13xx/include/mach/system.h
+++ b/arch/arm/mach-iop13xx/include/mach/system.h
@@ -7,7 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <mach/iop13xx.h>
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -15,13 +14,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * Reset the internal bus (warning both cores are reset)
-	 */
-	write_wdtcr(IOP_WDTCR_EN_ARM);
-	write_wdtcr(IOP_WDTCR_EN);
-	write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET);
-	write_wdtcr(0x1000);
-
-	for(;;);
 }
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index 4cf2cc4..abaee88 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -96,4 +96,5 @@ MACHINE_START(IQ81340MC, "Intel IQ81340MC")
 	.init_irq       = iop13xx_init_irq,
 	.timer          = &iq81340mc_timer,
 	.init_machine   = iq81340mc_init,
+	.restart	= iop13xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index cd9e274..690916a 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -98,4 +98,5 @@ MACHINE_START(IQ81340SC, "Intel IQ81340SC")
 	.init_irq       = iop13xx_init_irq,
 	.timer          = &iq81340sc_timer,
 	.init_machine   = iq81340sc_init,
+	.restart	= iop13xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index a5b9897..daabb1f 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -606,3 +606,14 @@ static int __init iop13xx_init_adma_setup(char *str)
 __setup("iop13xx_init_adma", iop13xx_init_adma_setup);
 __setup("iop13xx_init_uart", iop13xx_init_uart_setup);
 __setup("iop13xx_init_i2c", iop13xx_init_i2c_setup);
+
+void iop13xx_restart(char mode, const char *cmd)
+{
+	/*
+	 * Reset the internal bus (warning both cores are reset)
+	 */
+	write_wdtcr(IOP_WDTCR_EN_ARM);
+	write_wdtcr(IOP_WDTCR_EN);
+	write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET);
+	write_wdtcr(0x1000);
+}
-- 
1.7.4.4

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

* [PATCH 16/41] ARM: restart: ixp2000: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (22 preceding siblings ...)
  2011-11-06 17:45 ` [PATCH 15/41] ARM: restart: iop13xx: " Russell King - ARM Linux
@ 2011-11-06 17:45 ` Russell King - ARM Linux
  2011-11-17 17:29   ` Russell King - ARM Linux
  2011-11-06 17:45 ` [PATCH 17/41] ARM: restart: ixp23xx: " Russell King - ARM Linux
                   ` (29 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

In doing so, we split out the IXDP2401, IXDP2801 and IXDP2805 platform
specific restart code into their own platform files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-ixp2000/core.c                  |    4 +++
 arch/arm/mach-ixp2000/enp2611.c               |    1 +
 arch/arm/mach-ixp2000/include/mach/platform.h |    1 +
 arch/arm/mach-ixp2000/include/mach/system.h   |   29 ----------------------
 arch/arm/mach-ixp2000/ixdp2400.c              |    1 +
 arch/arm/mach-ixp2000/ixdp2800.c              |    1 +
 arch/arm/mach-ixp2000/ixdp2x01.c              |   32 +++++++++++++++++++++++++
 7 files changed, 40 insertions(+), 29 deletions(-)

diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index 59a5126..e5916b7 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -514,3 +514,7 @@ void __init ixp2000_init_irq(void)
 	}
 }
 
+void ixp2000_restart(char mode, const char *cmd)
+{
+	ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
+}
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
index af99945..ee52541 100644
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ b/arch/arm/mach-ixp2000/enp2611.c
@@ -259,6 +259,7 @@ MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board")
 	.init_irq	= ixp2000_init_irq,
 	.timer		= &enp2611_timer,
 	.init_machine	= enp2611_init_machine,
+	.restart	= ixp2000_restart,
 MACHINE_END
 
 
diff --git a/arch/arm/mach-ixp2000/include/mach/platform.h b/arch/arm/mach-ixp2000/include/mach/platform.h
index 42182c79..bb0f8dc 100644
--- a/arch/arm/mach-ixp2000/include/mach/platform.h
+++ b/arch/arm/mach-ixp2000/include/mach/platform.h
@@ -122,6 +122,7 @@ void ixp2000_map_io(void);
 void ixp2000_uart_init(void);
 void ixp2000_init_irq(void);
 void ixp2000_init_time(unsigned long);
+void ixp2000_restart(char, const char *);
 unsigned long ixp2000_gettimeoffset(void);
 
 struct pci_sys_data;
diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
index 810df7b..e981fd2 100644
--- a/arch/arm/mach-ixp2000/include/mach/system.h
+++ b/arch/arm/mach-ixp2000/include/mach/system.h
@@ -8,10 +8,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-
-#include <mach/hardware.h>
-#include <asm/mach-types.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -19,29 +15,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * Reset flash banking register so that we are pointing at
-	 * RedBoot bank.
-	 */
-	if (machine_is_ixdp2401()) {
-		ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
-					((0 >> IXDP2X01_FLASH_WINDOW_BITS)
-						| IXDP2X01_CPLD_FLASH_INTERN));
-		ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
-	}
-
-	/*
-	 * On IXDP2801 we need to write this magic sequence to the CPLD
-	 * to cause a complete reset of the CPU and all external devices
-	 * and move the flash bank register back to 0.
-	 */
-	if (machine_is_ixdp2801() || machine_is_ixdp28x5()) {
-		unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
-
-		reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
-		ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
-		ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
-	}
-
-	ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
 }
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
index f7dfd97..f53e911 100644
--- a/arch/arm/mach-ixp2000/ixdp2400.c
+++ b/arch/arm/mach-ixp2000/ixdp2400.c
@@ -176,5 +176,6 @@ MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform")
 	.init_irq	= ixdp2400_init_irq,
 	.timer		= &ixdp2400_timer,
 	.init_machine	= ixdp2x00_init_machine,
+	.restart	= ixp2000_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
index d33bcac..a2e7c39 100644
--- a/arch/arm/mach-ixp2000/ixdp2800.c
+++ b/arch/arm/mach-ixp2000/ixdp2800.c
@@ -291,5 +291,6 @@ MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform")
 	.init_irq	= ixdp2800_init_irq,
 	.timer		= &ixdp2800_timer,
 	.init_machine	= ixdp2x00_init_machine,
+	.restart	= ixp2000_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index 61a2867..7632bea 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -413,6 +413,35 @@ static void __init ixdp2x01_init_machine(void)
 	ixdp2x01_uart_init();
 }
 
+static void ixdp2401_restart(char mode, const char *cmd)
+{
+	/*
+	 * Reset flash banking register so that we are pointing at
+	 * RedBoot bank.
+	 */
+	ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
+				((0 >> IXDP2X01_FLASH_WINDOW_BITS)
+					| IXDP2X01_CPLD_FLASH_INTERN));
+	ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
+
+	ixp2000_restart(mode, cmd);
+}
+
+static void ixdp280x_restart(char mode, const char *cmd)
+{
+	/*
+	 * On IXDP2801 we need to write this magic sequence to the CPLD
+	 * to cause a complete reset of the CPU and all external devices
+	 * and move the flash bank register back to 0.
+	 */
+	unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
+
+	reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
+	ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
+	ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
+
+	ixp2000_restart(mode, cmd);
+}
 
 #ifdef CONFIG_ARCH_IXDP2401
 MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform")
@@ -422,6 +451,7 @@ MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform")
 	.init_irq	= ixdp2x01_init_irq,
 	.timer		= &ixdp2x01_timer,
 	.init_machine	= ixdp2x01_init_machine,
+	.restart	= ixdp2401_restart,
 MACHINE_END
 #endif
 
@@ -433,6 +463,7 @@ MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform")
 	.init_irq	= ixdp2x01_init_irq,
 	.timer		= &ixdp2x01_timer,
 	.init_machine	= ixdp2x01_init_machine,
+	.restart	= ixdp280x_restart,
 MACHINE_END
 
 /*
@@ -446,6 +477,7 @@ MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform")
 	.init_irq	= ixdp2x01_init_irq,
 	.timer		= &ixdp2x01_timer,
 	.init_machine	= ixdp2x01_init_machine,
+	.restart	= ixdp280x_restart,
 MACHINE_END
 #endif
 
-- 
1.7.4.4

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

* [PATCH 17/41] ARM: restart: ixp23xx: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (23 preceding siblings ...)
  2011-11-06 17:45 ` [PATCH 16/41] ARM: restart: ixp2000: " Russell King - ARM Linux
@ 2011-11-06 17:45 ` Russell King - ARM Linux
  2011-11-17 17:30   ` Russell King - ARM Linux
  2011-11-06 17:46 ` [PATCH 18/41] ARM: restart: ixp4xx: " Russell King - ARM Linux
                   ` (28 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

In doing so, we split out the ixdp2351 restart code into its own
platform file.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-ixp23xx/core.c                  |    6 ++++++
 arch/arm/mach-ixp23xx/espresso.c              |    1 +
 arch/arm/mach-ixp23xx/include/mach/platform.h |    1 +
 arch/arm/mach-ixp23xx/include/mach/system.h   |   13 -------------
 arch/arm/mach-ixp23xx/ixdp2351.c              |   12 ++++++++++++
 arch/arm/mach-ixp23xx/roadrunner.c            |    1 +
 6 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
index a1bee33..0923bb9 100644
--- a/arch/arm/mach-ixp23xx/core.c
+++ b/arch/arm/mach-ixp23xx/core.c
@@ -444,3 +444,9 @@ void __init ixp23xx_sys_init(void)
 	*IXP23XX_EXP_UNIT_FUSE |= 0xf;
 	platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices));
 }
+
+void ixp23xx_restart(char mode, const char *cmd)
+{
+	/* Use on-chip reset capability */
+	*IXP23XX_RESET0 |= IXP23XX_RST_ALL;
+}
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c
index 30dd316..8f2487e 100644
--- a/arch/arm/mach-ixp23xx/espresso.c
+++ b/arch/arm/mach-ixp23xx/espresso.c
@@ -90,4 +90,5 @@ MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso")
 	.timer		= &ixp23xx_timer,
 	.atag_offset	= 0x100,
 	.init_machine	= espresso_init,
+	.restart	= ixp23xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ixp23xx/include/mach/platform.h b/arch/arm/mach-ixp23xx/include/mach/platform.h
index db9d941..50de558 100644
--- a/arch/arm/mach-ixp23xx/include/mach/platform.h
+++ b/arch/arm/mach-ixp23xx/include/mach/platform.h
@@ -34,6 +34,7 @@ struct pci_sys_data;
 void ixp23xx_map_io(void);
 void ixp23xx_init_irq(void);
 void ixp23xx_sys_init(void);
+void ixp23xx_restart(char, const char *);
 int ixp23xx_pci_setup(int, struct pci_sys_data *);
 void ixp23xx_pci_preinit(void);
 struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*);
diff --git a/arch/arm/mach-ixp23xx/include/mach/system.h b/arch/arm/mach-ixp23xx/include/mach/system.h
index 8920ff2..7a1b96a 100644
--- a/arch/arm/mach-ixp23xx/include/mach/system.h
+++ b/arch/arm/mach-ixp23xx/include/mach/system.h
@@ -7,10 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-
-#include <mach/hardware.h>
-#include <asm/mach-types.h>
-
 static inline void arch_idle(void)
 {
 #if 0
@@ -21,13 +17,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/* First try machine specific support */
-	if (machine_is_ixdp2351()) {
-		*IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC;
-		(void) *IXDP2351_CPLD_RESET1_REG;
-		*IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE;
-	}
-
-	/* Use on-chip reset capability */
-	*IXP23XX_RESET0 |= IXP23XX_RST_ALL;
 }
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c
index b3a57e0..5d5dd3e 100644
--- a/arch/arm/mach-ixp23xx/ixdp2351.c
+++ b/arch/arm/mach-ixp23xx/ixdp2351.c
@@ -326,6 +326,17 @@ static void __init ixdp2351_init(void)
 	ixp23xx_sys_init();
 }
 
+static void ixdp2351_restart(char mode, const char *cmd)
+{
+	/* First try machine specific support */
+
+	*IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC;
+	(void) *IXDP2351_CPLD_RESET1_REG;
+	*IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE;
+
+	ixp23xx_restart(mode, cmd);
+}
+
 MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform")
 	/* Maintainer: MontaVista Software, Inc. */
 	.map_io		= ixdp2351_map_io,
@@ -333,4 +344,5 @@ MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform")
 	.timer		= &ixp23xx_timer,
 	.atag_offset	= 0x100,
 	.init_machine	= ixdp2351_init,
+	.restart	= ixdp2351_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c
index 8f4dcbb..377283f 100644
--- a/arch/arm/mach-ixp23xx/roadrunner.c
+++ b/arch/arm/mach-ixp23xx/roadrunner.c
@@ -177,4 +177,5 @@ MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform")
 	.timer		= &ixp23xx_timer,
 	.atag_offset	= 0x100,
 	.init_machine	= roadrunner_init,
+	.restart	= ixp23xx_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 18/41] ARM: restart: ixp4xx: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (24 preceding siblings ...)
  2011-11-06 17:45 ` [PATCH 17/41] ARM: restart: ixp23xx: " Russell King - ARM Linux
@ 2011-11-06 17:46 ` Russell King - ARM Linux
  2011-11-17 17:30   ` Russell King - ARM Linux
  2011-11-06 17:46 ` [PATCH 19/41] ARM: restart: kirkwood: " Russell King - ARM Linux
                   ` (27 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-ixp4xx/avila-setup.c           |    2 ++
 arch/arm/mach-ixp4xx/common.c                |   20 ++++++++++++++++++++
 arch/arm/mach-ixp4xx/coyote-setup.c          |    2 ++
 arch/arm/mach-ixp4xx/dsmg600-setup.c         |    1 +
 arch/arm/mach-ixp4xx/fsg-setup.c             |    1 +
 arch/arm/mach-ixp4xx/gateway7001-setup.c     |    1 +
 arch/arm/mach-ixp4xx/goramo_mlr.c            |    1 +
 arch/arm/mach-ixp4xx/gtwx5715-setup.c        |    1 +
 arch/arm/mach-ixp4xx/include/mach/platform.h |    1 +
 arch/arm/mach-ixp4xx/include/mach/system.h   |   21 ---------------------
 arch/arm/mach-ixp4xx/ixdp425-setup.c         |    1 +
 arch/arm/mach-ixp4xx/nas100d-setup.c         |    1 +
 arch/arm/mach-ixp4xx/nslu2-setup.c           |    1 +
 arch/arm/mach-ixp4xx/omixp-setup.c           |    3 +++
 arch/arm/mach-ixp4xx/vulcan-setup.c          |    1 +
 arch/arm/mach-ixp4xx/wg302v2-setup.c         |    1 +
 16 files changed, 38 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
index 37609a2..a7277ad 100644
--- a/arch/arm/mach-ixp4xx/avila-setup.c
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -172,6 +172,7 @@ MACHINE_START(AVILA, "Gateworks Avila Network Platform")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 
  /*
@@ -190,6 +191,7 @@ MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
 
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 0777257..4a02619 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)
 
 	clockevents_register_device(&clockevent_ixp4xx);
 }
+
+void ixp4xx_restart(char mode, const char *cmd)
+{
+	if ( 1 && mode == 's') {
+		/* Jump into ROM at address 0 */
+		soft_restart(0);
+	} else {
+		/* Use on-chip reset capability */
+
+		/* set the "key" register to enable access to
+		 * "timer" and "enable" registers
+		 */
+		*IXP4XX_OSWK = IXP4XX_WDT_KEY;
+
+		/* write 0 to the timer register for an immediate reset */
+		*IXP4XX_OSWT = 0;
+
+		*IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;
+	}
+}
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index 81dfec3..a74f86c 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -117,6 +117,7 @@ MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
 
@@ -132,6 +133,7 @@ MACHINE_START(IXDPG425, "Intel IXDPG425")
 	.timer		= &ixp4xx_timer,
 	.atag_offset	= 0x100,
 	.init_machine	= coyote_init,
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
 
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index 8837fbc..67be177 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -286,4 +286,5 @@ MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
index 2887c35..6d58182 100644
--- a/arch/arm/mach-ixp4xx/fsg-setup.c
+++ b/arch/arm/mach-ixp4xx/fsg-setup.c
@@ -277,5 +277,6 @@ MACHINE_START(FSG, "Freecom FSG-3")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c
index d69d1b0..7ecf9b2 100644
--- a/arch/arm/mach-ixp4xx/gateway7001-setup.c
+++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
@@ -104,5 +104,6 @@ MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c
index bf6678d..c0e3d69 100644
--- a/arch/arm/mach-ixp4xx/goramo_mlr.c
+++ b/arch/arm/mach-ixp4xx/goramo_mlr.c
@@ -504,4 +504,5 @@ MACHINE_START(GORAMO_MLR, "MultiLink")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
index aa029fc..a23f893 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
@@ -172,6 +172,7 @@ MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 
 
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h
index e824c02..df9250b 100644
--- a/arch/arm/mach-ixp4xx/include/mach/platform.h
+++ b/arch/arm/mach-ixp4xx/include/mach/platform.h
@@ -125,6 +125,7 @@ extern void ixp4xx_init_irq(void);
 extern void ixp4xx_sys_init(void);
 extern void ixp4xx_timer_init(void);
 extern struct sys_timer ixp4xx_timer;
+extern void ixp4xx_restart(char, const char *);
 extern void ixp4xx_pci_preinit(void);
 struct pci_sys_data;
 extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
index 24337d9..72db2bb 100644
--- a/arch/arm/mach-ixp4xx/include/mach/system.h
+++ b/arch/arm/mach-ixp4xx/include/mach/system.h
@@ -8,9 +8,6 @@
  * published by the Free Software Foundation.
  *
  */
-
-#include <mach/hardware.h>
-
 static inline void arch_idle(void)
 {
 	/* ixp4xx does not implement the XScale PWRMODE register,
@@ -21,24 +18,6 @@ static inline void arch_idle(void)
 #endif
 }
 
-
 static inline void arch_reset(char mode, const char *cmd)
 {
-	if ( 1 && mode == 's') {
-		/* Jump into ROM at address 0 */
-		soft_restart(0);
-	} else {
-		/* Use on-chip reset capability */
-
-		/* set the "key" register to enable access to
-		 * "timer" and "enable" registers
-		 */
-		*IXP4XX_OSWK = IXP4XX_WDT_KEY;
-
-		/* write 0 to the timer register for an immediate reset */
-		*IXP4XX_OSWT = 0;
-
-		*IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;
-	}
 }
-
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index f235f82..8a38b39 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -261,6 +261,7 @@ MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
 
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index de716fa..1010eb7 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -321,4 +321,5 @@ MACHINE_START(NAS100D, "Iomega NAS 100d")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index ac81ccb..aa355c3 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -307,4 +307,5 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ixp4xx/omixp-setup.c b/arch/arm/mach-ixp4xx/omixp-setup.c
index 3b6a81a..0940869 100644
--- a/arch/arm/mach-ixp4xx/omixp-setup.c
+++ b/arch/arm/mach-ixp4xx/omixp-setup.c
@@ -246,6 +246,7 @@ MACHINE_START(DEVIXP, "Omicron DEVIXP")
 	.init_irq	= ixp4xx_init_irq,
 	.timer          = &ixp4xx_timer,
 	.init_machine	= omixp_init,
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
 
@@ -259,6 +260,7 @@ MACHINE_START(MICCPT, "Omicron MICCPT")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
 
@@ -269,5 +271,6 @@ MACHINE_START(MIC256, "Omicron MIC256")
 	.init_irq	= ixp4xx_init_irq,
 	.timer          = &ixp4xx_timer,
 	.init_machine	= omixp_init,
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-ixp4xx/vulcan-setup.c b/arch/arm/mach-ixp4xx/vulcan-setup.c
index 27e469e..9dec206 100644
--- a/arch/arm/mach-ixp4xx/vulcan-setup.c
+++ b/arch/arm/mach-ixp4xx/vulcan-setup.c
@@ -244,4 +244,5 @@ MACHINE_START(ARCOM_VULCAN, "Arcom/Eurotech Vulcan")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c
index b14144b..5ac0f0a 100644
--- a/arch/arm/mach-ixp4xx/wg302v2-setup.c
+++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
@@ -105,5 +105,6 @@ MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
 #endif
-- 
1.7.4.4

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

* [PATCH 19/41] ARM: restart: kirkwood: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (25 preceding siblings ...)
  2011-11-06 17:46 ` [PATCH 18/41] ARM: restart: ixp4xx: " Russell King - ARM Linux
@ 2011-11-06 17:46 ` Russell King - ARM Linux
  2011-11-07  2:58   ` Nicolas Pitre
  2011-11-06 17:46 ` [PATCH 20/41] ARM: restart: lpc32xx: " Russell King - ARM Linux
                   ` (26 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-kirkwood/common.c                |   16 ++++++++++++++++
 arch/arm/mach-kirkwood/common.h                |    1 +
 arch/arm/mach-kirkwood/d2net_v2-setup.c        |    1 +
 arch/arm/mach-kirkwood/db88f6281-bp-setup.c    |    1 +
 arch/arm/mach-kirkwood/dockstar-setup.c        |    1 +
 arch/arm/mach-kirkwood/guruplug-setup.c        |    1 +
 arch/arm/mach-kirkwood/include/mach/system.h   |   15 ---------------
 arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |    1 +
 arch/arm/mach-kirkwood/netspace_v2-setup.c     |    3 +++
 arch/arm/mach-kirkwood/netxbig_v2-setup.c      |    2 ++
 arch/arm/mach-kirkwood/openrd-setup.c          |    3 +++
 arch/arm/mach-kirkwood/rd88f6192-nas-setup.c   |    1 +
 arch/arm/mach-kirkwood/rd88f6281-setup.c       |    1 +
 arch/arm/mach-kirkwood/sheevaplug-setup.c      |    2 ++
 arch/arm/mach-kirkwood/t5325-setup.c           |    1 +
 arch/arm/mach-kirkwood/ts219-setup.c           |    1 +
 arch/arm/mach-kirkwood/ts41x-setup.c           |    1 +
 17 files changed, 37 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index f3248cf..0bff4a9 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -534,3 +534,19 @@ static int __init kirkwood_clock_gate(void)
 	return 0;
 }
 late_initcall(kirkwood_clock_gate);
+
+void kirkwood_restart(char mode, const char *cmd)
+{
+	/*
+	 * Enable soft reset to assert RSTOUTn.
+	 */
+	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
+
+	/*
+	 * Assert soft reset.
+	 */
+	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
+
+	while (1)
+		;
+}
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index b9b0f09..1529280 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -50,6 +50,7 @@ void kirkwood_uart1_init(void);
 void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
 void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
 void kirkwood_audio_init(void);
+void kirkwood_restart(char, const char *);
 
 extern int kirkwood_tclk;
 extern struct sys_timer kirkwood_timer;
diff --git a/arch/arm/mach-kirkwood/d2net_v2-setup.c b/arch/arm/mach-kirkwood/d2net_v2-setup.c
index f457e07..6e1bac9 100644
--- a/arch/arm/mach-kirkwood/d2net_v2-setup.c
+++ b/arch/arm/mach-kirkwood/d2net_v2-setup.c
@@ -227,4 +227,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
index ff4c21c..d933593 100644
--- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
@@ -103,4 +103,5 @@ MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c
index e4d199b..61d9a55 100644
--- a/arch/arm/mach-kirkwood/dockstar-setup.c
+++ b/arch/arm/mach-kirkwood/dockstar-setup.c
@@ -108,4 +108,5 @@ MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c
index 6c40f78..bdaed38 100644
--- a/arch/arm/mach-kirkwood/guruplug-setup.c
+++ b/arch/arm/mach-kirkwood/guruplug-setup.c
@@ -127,4 +127,5 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h
index 7568e95..8a94d97 100644
--- a/arch/arm/mach-kirkwood/include/mach/system.h
+++ b/arch/arm/mach-kirkwood/include/mach/system.h
@@ -9,8 +9,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <mach/bridge-regs.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -18,19 +16,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * Enable soft reset to assert RSTOUTn.
-	 */
-	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
-
-	/*
-	 * Assert soft reset.
-	 */
-	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
-
-	while (1)
-		;
 }
 
-
 #endif
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 9a1e917..85f6169 100644
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
@@ -169,4 +169,5 @@ MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c
index 8849bcc..e6bba01 100644
--- a/arch/arm/mach-kirkwood/netspace_v2-setup.c
+++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c
@@ -264,6 +264,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
 
@@ -275,6 +276,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
 
@@ -286,5 +288,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
index 1ba12c4..31ae8de 100644
--- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c
+++ b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
@@ -405,6 +405,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
 
@@ -416,5 +417,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
index 5660ca6..01f8c89 100644
--- a/arch/arm/mach-kirkwood/openrd-setup.c
+++ b/arch/arm/mach-kirkwood/openrd-setup.c
@@ -220,6 +220,7 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
 
@@ -232,6 +233,7 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
 
@@ -244,5 +246,6 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 6663869..fd2c9c8 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -85,4 +85,5 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c
index 66b3c05..ef92207 100644
--- a/arch/arm/mach-kirkwood/rd88f6281-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
@@ -121,4 +121,5 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c
index 8b102d6..85bff6b 100644
--- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
+++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
@@ -144,6 +144,7 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
 
@@ -155,5 +156,6 @@ MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c
index ea104fb..966b2b3 100644
--- a/arch/arm/mach-kirkwood/t5325-setup.c
+++ b/arch/arm/mach-kirkwood/t5325-setup.c
@@ -207,4 +207,5 @@ MACHINE_START(T5325, "HP t5325 Thin Client")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c
index 262c034..73e2b6c 100644
--- a/arch/arm/mach-kirkwood/ts219-setup.c
+++ b/arch/arm/mach-kirkwood/ts219-setup.c
@@ -138,4 +138,5 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c
index b68f5b4..5bbca26 100644
--- a/arch/arm/mach-kirkwood/ts41x-setup.c
+++ b/arch/arm/mach-kirkwood/ts41x-setup.c
@@ -182,4 +182,5 @@ MACHINE_START(TS41X, "QNAP TS-41x")
 	.init_early	= kirkwood_init_early,
 	.init_irq	= kirkwood_init_irq,
 	.timer		= &kirkwood_timer,
+	.restart	= kirkwood_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 20/41] ARM: restart: lpc32xx: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (26 preceding siblings ...)
  2011-11-06 17:46 ` [PATCH 19/41] ARM: restart: kirkwood: " Russell King - ARM Linux
@ 2011-11-06 17:46 ` Russell King - ARM Linux
  2011-11-06 17:47 ` [PATCH 21/41] ARM: restart: mmp: " Russell King - ARM Linux
                   ` (25 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the arm_pm_restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-lpc32xx/common.c              |   22 +++++++++++++++++++++-
 arch/arm/mach-lpc32xx/common.h              |    2 ++
 arch/arm/mach-lpc32xx/include/mach/system.h |   18 ------------------
 arch/arm/mach-lpc32xx/phy3250.c             |    1 +
 4 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c
index 205b2db..b049fd1 100644
--- a/arch/arm/mach-lpc32xx/common.c
+++ b/arch/arm/mach-lpc32xx/common.c
@@ -164,7 +164,7 @@ int clk_is_sysclk_mainosc(void)
 /*
  * System reset via the watchdog timer
  */
-void lpc32xx_watchdog_reset(void)
+static void lpc32xx_watchdog_reset(void)
 {
 	/* Make sure WDT clocks are enabled */
 	__raw_writel(LPC32XX_CLKPWR_PWMCLK_WDOG_EN,
@@ -311,3 +311,23 @@ void __init lpc32xx_map_io(void)
 {
 	iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc));
 }
+
+void lpc23xx_restart(char mode, const char *cmd)
+{
+	switch (mode) {
+	case 's':
+	case 'h':
+		printk(KERN_CRIT "RESET: Rebooting system\n");
+
+		lpc32xx_watchdog_reset();
+		break;
+
+	default:
+		/* Do nothing */
+		break;
+	}
+
+	/* Wait for watchdog to reset system */
+	while (1)
+		;
+}
diff --git a/arch/arm/mach-lpc32xx/common.h b/arch/arm/mach-lpc32xx/common.h
index 5583f52..4b4e700 100644
--- a/arch/arm/mach-lpc32xx/common.h
+++ b/arch/arm/mach-lpc32xx/common.h
@@ -39,6 +39,8 @@ extern void __init lpc32xx_init_irq(void);
 extern void __init lpc32xx_map_io(void);
 extern void __init lpc32xx_serial_init(void);
 extern void __init lpc32xx_gpio_init(void);
+extern void lpc23xx_restart(char, const char *);
+
 
 /*
  * Structure used for setting up and querying the PLLS
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
index d47f3b1..9c6cc0c 100644
--- a/arch/arm/mach-lpc32xx/include/mach/system.h
+++ b/arch/arm/mach-lpc32xx/include/mach/system.h
@@ -26,24 +26,6 @@ static void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	extern void lpc32xx_watchdog_reset(void);
-
-	switch (mode) {
-	case 's':
-	case 'h':
-		printk(KERN_CRIT "RESET: Rebooting system\n");
-
-		lpc32xx_watchdog_reset();
-		break;
-
-	default:
-		/* Do nothing */
-		break;
-	}
-
-	/* Wait for watchdog to reset system */
-	while (1)
-		;
 }
 
 #endif
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index 6d2f0d1..ecb9411 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -388,4 +388,5 @@ MACHINE_START(PHY3250, "Phytec 3250 board with the LPC3250 Microcontroller")
 	.init_irq	= lpc32xx_init_irq,
 	.timer		= &lpc32xx_timer,
 	.init_machine	= phy3250_board_init,
+	.restart	= lpc23xx_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 21/41] ARM: restart: mmp: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (27 preceding siblings ...)
  2011-11-06 17:46 ` [PATCH 20/41] ARM: restart: lpc32xx: " Russell King - ARM Linux
@ 2011-11-06 17:47 ` Russell King - ARM Linux
  2011-11-06 17:47 ` [PATCH 22/41] ARM: restart: mv78xx0: " Russell King - ARM Linux
                   ` (24 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hook the Shark restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-mmp/aspenite.c            |    2 ++
 arch/arm/mach-mmp/avengers_lite.c       |    1 +
 arch/arm/mach-mmp/brownstone.c          |    1 +
 arch/arm/mach-mmp/common.c              |    5 +++++
 arch/arm/mach-mmp/common.h              |    1 +
 arch/arm/mach-mmp/flint.c               |    1 +
 arch/arm/mach-mmp/gplugd.c              |    1 +
 arch/arm/mach-mmp/include/mach/pxa168.h |    1 +
 arch/arm/mach-mmp/include/mach/system.h |    6 ------
 arch/arm/mach-mmp/jasper.c              |    1 +
 arch/arm/mach-mmp/pxa168.c              |    5 +++++
 arch/arm/mach-mmp/tavorevb.c            |    1 +
 arch/arm/mach-mmp/teton_bga.c           |    1 +
 arch/arm/mach-mmp/ttc_dkb.c             |    1 +
 14 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
index 06b5ad7..45d21e8 100644
--- a/arch/arm/mach-mmp/aspenite.c
+++ b/arch/arm/mach-mmp/aspenite.c
@@ -242,6 +242,7 @@ MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
 	.init_irq       = pxa168_init_irq,
 	.timer          = &pxa168_timer,
 	.init_machine   = common_init,
+	.restart	= pxa168_restart,
 MACHINE_END
 
 MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
@@ -250,4 +251,5 @@ MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
 	.init_irq       = pxa168_init_irq,
 	.timer          = &pxa168_timer,
 	.init_machine   = common_init,
+	.restart	= pxa168_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mmp/avengers_lite.c b/arch/arm/mach-mmp/avengers_lite.c
index 39f0878..8de3dc6 100644
--- a/arch/arm/mach-mmp/avengers_lite.c
+++ b/arch/arm/mach-mmp/avengers_lite.c
@@ -45,4 +45,5 @@ MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
 	.init_irq       = pxa168_init_irq,
 	.timer          = &pxa168_timer,
 	.init_machine   = avengers_lite_init,
+	.restart	= pxa168_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
index 983cfb1..e16f04b 100644
--- a/arch/arm/mach-mmp/brownstone.c
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -219,4 +219,5 @@ MACHINE_START(BROWNSTONE, "Brownstone Development Platform")
 	.init_irq	= mmp2_init_irq,
 	.timer		= &mmp2_timer,
 	.init_machine	= brownstone_init,
+	.restart	= mmp_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mmp/common.c b/arch/arm/mach-mmp/common.c
index 5720674..062b5b9 100644
--- a/arch/arm/mach-mmp/common.c
+++ b/arch/arm/mach-mmp/common.c
@@ -45,3 +45,8 @@ void __init mmp_map_io(void)
 	/* this is early, initialize mmp_chip_id here */
 	mmp_chip_id = __raw_readl(MMP_CHIPID);
 }
+
+void mmp_restart(char mode, const char *cmd)
+{
+	soft_restart(0);
+}
diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
index ec8d65d..1c9d6c1 100644
--- a/arch/arm/mach-mmp/common.h
+++ b/arch/arm/mach-mmp/common.h
@@ -6,3 +6,4 @@ extern void timer_init(int irq);
 
 extern void __init icu_init_irq(void);
 extern void __init mmp_map_io(void);
+extern void mmp_restart(char, const char *);
diff --git a/arch/arm/mach-mmp/flint.c b/arch/arm/mach-mmp/flint.c
index c4fd806..5a6a27a 100644
--- a/arch/arm/mach-mmp/flint.c
+++ b/arch/arm/mach-mmp/flint.c
@@ -121,4 +121,5 @@ MACHINE_START(FLINT, "Flint Development Platform")
 	.init_irq       = mmp2_init_irq,
 	.timer          = &mmp2_timer,
 	.init_machine   = flint_init,
+	.restart	= mmp_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c
index 6915656..a87f2f5 100644
--- a/arch/arm/mach-mmp/gplugd.c
+++ b/arch/arm/mach-mmp/gplugd.c
@@ -194,4 +194,5 @@ MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform")
 	.init_irq       = pxa168_init_irq,
 	.timer          = &pxa168_timer,
 	.init_machine   = gplugd_init,
+	.restart	= pxa168_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index 7fb568d..a677aa7 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -5,6 +5,7 @@ struct sys_timer;
 
 extern struct sys_timer pxa168_timer;
 extern void __init pxa168_init_irq(void);
+extern void pxa168_restart(char, const char *);
 extern void pxa168_clear_keypad_wakeup(void);
 
 #include <linux/i2c.h>
diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
index cb06379..c434f3a 100644
--- a/arch/arm/mach-mmp/include/mach/system.h
+++ b/arch/arm/mach-mmp/include/mach/system.h
@@ -9,8 +9,6 @@
 #ifndef __ASM_MACH_SYSTEM_H
 #define __ASM_MACH_SYSTEM_H
 
-#include <mach/cputype.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -18,9 +16,5 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	if (cpu_is_pxa168())
-		soft_restart(0xffff0000);
-	else
-		soft_restart(0);
 }
 #endif /* __ASM_MACH_SYSTEM_H */
diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c
index 8bfac66..96cf5c8 100644
--- a/arch/arm/mach-mmp/jasper.c
+++ b/arch/arm/mach-mmp/jasper.c
@@ -175,4 +175,5 @@ MACHINE_START(MARVELL_JASPER, "Jasper Development Platform")
 	.init_irq       = mmp2_init_irq,
 	.timer          = &mmp2_timer,
 	.init_machine   = jasper_init,
+	.restart	= mmp_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index 76ca15c..13f2386 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -214,3 +214,8 @@ int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata)
 	pxa168_device_usb_host.dev.platform_data = pdata;
 	return platform_device_register(&pxa168_device_usb_host);
 }
+
+void pxa168_restart(char mode, const char *cmd)
+{
+	soft_restart(0xffff0000);
+}
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c
index eb5be87..257a212 100644
--- a/arch/arm/mach-mmp/tavorevb.c
+++ b/arch/arm/mach-mmp/tavorevb.c
@@ -103,4 +103,5 @@ MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
 	.init_irq       = pxa910_init_irq,
 	.timer          = &pxa910_timer,
 	.init_machine   = tavorevb_init,
+	.restart	= mmp_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mmp/teton_bga.c b/arch/arm/mach-mmp/teton_bga.c
index bbe4727..8ac22a6 100644
--- a/arch/arm/mach-mmp/teton_bga.c
+++ b/arch/arm/mach-mmp/teton_bga.c
@@ -86,4 +86,5 @@ MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform")
 	.init_irq       = pxa168_init_irq,
 	.timer          = &pxa168_timer,
 	.init_machine   = teton_bga_init,
+	.restart	= pxa168_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index 176515a..f026588 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -159,4 +159,5 @@ MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
 	.init_irq       = pxa910_init_irq,
 	.timer          = &pxa910_timer,
 	.init_machine   = ttc_dkb_init,
+	.restart	= mmp_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 22/41] ARM: restart: mv78xx0: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (28 preceding siblings ...)
  2011-11-06 17:47 ` [PATCH 21/41] ARM: restart: mmp: " Russell King - ARM Linux
@ 2011-11-06 17:47 ` Russell King - ARM Linux
  2011-11-24 22:02   ` Nicolas Pitre
  2011-11-06 17:47 ` [PATCH 23/41] ARM: restart: mxc: " Russell King - ARM Linux
                   ` (23 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-mv78xx0/buffalo-wxl-setup.c   |    1 +
 arch/arm/mach-mv78xx0/common.c              |   16 ++++++++++++++++
 arch/arm/mach-mv78xx0/common.h              |    1 +
 arch/arm/mach-mv78xx0/db78x00-bp-setup.c    |    1 +
 arch/arm/mach-mv78xx0/include/mach/system.h |   14 --------------
 arch/arm/mach-mv78xx0/rd78x00-masa-setup.c  |    1 +
 6 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
index 0e94268..ee74ec9 100644
--- a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
+++ b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
@@ -151,4 +151,5 @@ MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL")
 	.init_early	= mv78xx0_init_early,
 	.init_irq	= mv78xx0_init_irq,
 	.timer		= &mv78xx0_timer,
+	.restart	= mv78xx0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
index 23d3980..5b9632b 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-mv78xx0/common.c
@@ -401,3 +401,19 @@ void __init mv78xx0_init(void)
 	feroceon_l2_init(is_l2_writethrough());
 #endif
 }
+
+void mv78xx0_restart(char mode, const char *cmd)
+{
+	/*
+	 * Enable soft reset to assert RSTOUTn.
+	 */
+	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
+
+	/*
+	 * Assert soft reset.
+	 */
+	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
+
+	while (1)
+		;
+}
diff --git a/arch/arm/mach-mv78xx0/common.h b/arch/arm/mach-mv78xx0/common.h
index 632e63d..07d5f8f 100644
--- a/arch/arm/mach-mv78xx0/common.h
+++ b/arch/arm/mach-mv78xx0/common.h
@@ -46,6 +46,7 @@ void mv78xx0_uart1_init(void);
 void mv78xx0_uart2_init(void);
 void mv78xx0_uart3_init(void);
 void mv78xx0_i2c_init(void);
+void mv78xx0_restart(char, const char *);
 
 extern struct sys_timer mv78xx0_timer;
 
diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
index 50b85ae..4d6d48b 100644
--- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
+++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
@@ -99,4 +99,5 @@ MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
 	.init_early	= mv78xx0_init_early,
 	.init_irq	= mv78xx0_init_irq,
 	.timer		= &mv78xx0_timer,
+	.restart	= mv78xx0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mv78xx0/include/mach/system.h b/arch/arm/mach-mv78xx0/include/mach/system.h
index 66e7ce4..1ae3585 100644
--- a/arch/arm/mach-mv78xx0/include/mach/system.h
+++ b/arch/arm/mach-mv78xx0/include/mach/system.h
@@ -9,8 +9,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <mach/bridge-regs.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -18,18 +16,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * Enable soft reset to assert RSTOUTn.
-	 */
-	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
-
-	/*
-	 * Assert soft reset.
-	 */
-	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
-
-	while (1)
-		;
 }
 
 
diff --git a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
index e85222e..9a88270 100644
--- a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
+++ b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
@@ -84,4 +84,5 @@ MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board")
 	.init_early	= mv78xx0_init_early,
 	.init_irq	= mv78xx0_init_irq,
 	.timer		= &mv78xx0_timer,
+	.restart	= mv78xx0_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 23/41] ARM: restart: mxc: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (29 preceding siblings ...)
  2011-11-06 17:47 ` [PATCH 22/41] ARM: restart: mv78xx0: " Russell King - ARM Linux
@ 2011-11-06 17:47 ` Russell King - ARM Linux
  2011-11-24 20:31   ` Russell King - ARM Linux
  2011-11-06 17:48 ` [PATCH 24/41] ARM: restart: mxs: " Russell King - ARM Linux
                   ` (22 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-imx/mach-apf9328.c            |    1 +
 arch/arm/mach-imx/mach-armadillo5x0.c       |    1 +
 arch/arm/mach-imx/mach-bug.c                |    1 +
 arch/arm/mach-imx/mach-cpuimx27.c           |    1 +
 arch/arm/mach-imx/mach-cpuimx35.c           |    1 +
 arch/arm/mach-imx/mach-eukrea_cpuimx25.c    |    1 +
 arch/arm/mach-imx/mach-imx27_visstrim_m10.c |    1 +
 arch/arm/mach-imx/mach-imx27ipcam.c         |    1 +
 arch/arm/mach-imx/mach-imx27lite.c          |    1 +
 arch/arm/mach-imx/mach-imx6q.c              |    1 +
 arch/arm/mach-imx/mach-kzm_arm11_01.c       |    1 +
 arch/arm/mach-imx/mach-mx1ads.c             |    2 ++
 arch/arm/mach-imx/mach-mx21ads.c            |    1 +
 arch/arm/mach-imx/mach-mx25_3ds.c           |    1 +
 arch/arm/mach-imx/mach-mx27_3ds.c           |    1 +
 arch/arm/mach-imx/mach-mx27ads.c            |    1 +
 arch/arm/mach-imx/mach-mx31_3ds.c           |    1 +
 arch/arm/mach-imx/mach-mx31ads.c            |    1 +
 arch/arm/mach-imx/mach-mx31lilly.c          |    1 +
 arch/arm/mach-imx/mach-mx31lite.c           |    1 +
 arch/arm/mach-imx/mach-mx31moboard.c        |    1 +
 arch/arm/mach-imx/mach-mx35_3ds.c           |    1 +
 arch/arm/mach-imx/mach-mxt_td60.c           |    1 +
 arch/arm/mach-imx/mach-pca100.c             |    1 +
 arch/arm/mach-imx/mach-pcm037.c             |    1 +
 arch/arm/mach-imx/mach-pcm038.c             |    1 +
 arch/arm/mach-imx/mach-pcm043.c             |    1 +
 arch/arm/mach-imx/mach-qong.c               |    1 +
 arch/arm/mach-imx/mach-scb9328.c            |    1 +
 arch/arm/mach-imx/mach-vpr200.c             |    1 +
 arch/arm/mach-mx5/board-cpuimx51.c          |    1 +
 arch/arm/mach-mx5/board-cpuimx51sd.c        |    1 +
 arch/arm/mach-mx5/board-mx50_rdp.c          |    1 +
 arch/arm/mach-mx5/board-mx51_3ds.c          |    1 +
 arch/arm/mach-mx5/board-mx51_babbage.c      |    1 +
 arch/arm/mach-mx5/board-mx51_efikamx.c      |    3 ++-
 arch/arm/mach-mx5/board-mx51_efikasb.c      |    1 +
 arch/arm/mach-mx5/board-mx53_ard.c          |    1 +
 arch/arm/mach-mx5/board-mx53_evk.c          |    1 +
 arch/arm/mach-mx5/board-mx53_loco.c         |    1 +
 arch/arm/mach-mx5/board-mx53_smd.c          |    1 +
 arch/arm/mach-mx5/imx51-dt.c                |    1 +
 arch/arm/mach-mx5/imx53-dt.c                |    1 +
 arch/arm/plat-mxc/include/mach/common.h     |    2 +-
 arch/arm/plat-mxc/include/mach/system.h     |    4 +++-
 arch/arm/plat-mxc/system.c                  |    9 +--------
 46 files changed, 50 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c
index 1e486e6..146a4f0 100644
--- a/arch/arm/mach-imx/mach-apf9328.c
+++ b/arch/arm/mach-imx/mach-apf9328.c
@@ -139,4 +139,5 @@ MACHINE_START(APF9328, "Armadeus APF9328")
 	.handle_irq   = imx1_handle_irq,
 	.timer        = &apf9328_timer,
 	.init_machine = apf9328_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
index c9a9cf6..e4f426a 100644
--- a/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -561,4 +561,5 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500")
 	.handle_irq = imx31_handle_irq,
 	.timer = &armadillo5x0_timer,
 	.init_machine = armadillo5x0_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c
index 313f62d..9a98977 100644
--- a/arch/arm/mach-imx/mach-bug.c
+++ b/arch/arm/mach-imx/mach-bug.c
@@ -65,4 +65,5 @@ MACHINE_START(BUG, "BugLabs BUGBase")
 	.handle_irq = imx31_handle_irq,
 	.timer = &bug_timer,
 	.init_machine = bug_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index edb3730..d085aea 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -318,4 +318,5 @@ MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
 	.handle_irq = imx27_handle_irq,
 	.timer = &eukrea_cpuimx27_timer,
 	.init_machine = eukrea_cpuimx27_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
index 66af2e8..012e120 100644
--- a/arch/arm/mach-imx/mach-cpuimx35.c
+++ b/arch/arm/mach-imx/mach-cpuimx35.c
@@ -201,4 +201,5 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35")
 	.handle_irq = imx35_handle_irq,
 	.timer = &eukrea_cpuimx35_timer,
 	.init_machine = eukrea_cpuimx35_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
index ab8fbcc..76a97a5 100644
--- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
@@ -170,4 +170,5 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
 	.handle_irq = imx25_handle_irq,
 	.timer = &eukrea_cpuimx25_timer,
 	.init_machine = eukrea_cpuimx25_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 38eb9e4..c2766ae 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -282,4 +282,5 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
 	.handle_irq = imx27_handle_irq,
 	.timer = &visstrim_m10_timer,
 	.init_machine = visstrim_m10_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c
index 7052155..c9d350c 100644
--- a/arch/arm/mach-imx/mach-imx27ipcam.c
+++ b/arch/arm/mach-imx/mach-imx27ipcam.c
@@ -78,4 +78,5 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
 	.handle_irq = imx27_handle_irq,
 	.timer = &mx27ipcam_timer,
 	.init_machine = mx27ipcam_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c
index 8d6a635..1f45b91 100644
--- a/arch/arm/mach-imx/mach-imx27lite.c
+++ b/arch/arm/mach-imx/mach-imx27lite.c
@@ -84,4 +84,5 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
 	.handle_irq = imx27_handle_irq,
 	.timer = &mx27lite_timer,
 	.init_machine = mx27lite_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 8bf5fa3..dc8b6e2 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -81,4 +81,5 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)")
 	.timer		= &imx6q_timer,
 	.init_machine	= imx6q_init_machine,
 	.dt_compat	= imx6q_dt_compat,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c
index 5f37f89..fc78e80 100644
--- a/arch/arm/mach-imx/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c
@@ -279,4 +279,5 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
 	.handle_irq = imx31_handle_irq,
 	.timer = &kzm_timer,
 	.init_machine = kzm_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
index fc49785..9704608 100644
--- a/arch/arm/mach-imx/mach-mx1ads.c
+++ b/arch/arm/mach-imx/mach-mx1ads.c
@@ -147,6 +147,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
 	.handle_irq = imx1_handle_irq,
 	.timer = &mx1ads_timer,
 	.init_machine = mx1ads_init,
+	.restart	= mxc_restart,
 MACHINE_END
 
 MACHINE_START(MXLADS, "Freescale MXLADS")
@@ -157,4 +158,5 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
 	.handle_irq = imx1_handle_irq,
 	.timer = &mx1ads_timer,
 	.init_machine = mx1ads_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c
index 25f8402..8d9f955 100644
--- a/arch/arm/mach-imx/mach-mx21ads.c
+++ b/arch/arm/mach-imx/mach-mx21ads.c
@@ -312,4 +312,5 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
 	.handle_irq = imx21_handle_irq,
 	.timer = &mx21ads_timer,
 	.init_machine = mx21ads_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
index 88dccf1..f267342 100644
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ b/arch/arm/mach-imx/mach-mx25_3ds.c
@@ -270,4 +270,5 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
 	.handle_irq = imx25_handle_irq,
 	.timer = &mx25pdk_timer,
 	.init_machine = mx25pdk_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index ba232d7..18f3581 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -425,4 +425,5 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK")
 	.handle_irq = imx27_handle_irq,
 	.timer = &mx27pdk_timer,
 	.init_machine = mx27pdk_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c
index 74dd573..0228d2e 100644
--- a/arch/arm/mach-imx/mach-mx27ads.c
+++ b/arch/arm/mach-imx/mach-mx27ads.c
@@ -351,4 +351,5 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
 	.handle_irq = imx27_handle_irq,
 	.timer = &mx27ads_timer,
 	.init_machine = mx27ads_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c
index b8c54b8..2b565c3 100644
--- a/arch/arm/mach-imx/mach-mx31_3ds.c
+++ b/arch/arm/mach-imx/mach-mx31_3ds.c
@@ -770,4 +770,5 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
 	.timer = &mx31_3ds_timer,
 	.init_machine = mx31_3ds_init,
 	.reserve = mx31_3ds_reserve,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index 9cc1a49..4917aab 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -542,4 +542,5 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
 	.handle_irq = imx31_handle_irq,
 	.timer = &mx31ads_timer,
 	.init_machine = mx31ads_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c
index 5defd8e..1e0db94 100644
--- a/arch/arm/mach-imx/mach-mx31lilly.c
+++ b/arch/arm/mach-imx/mach-mx31lilly.c
@@ -302,4 +302,5 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
 	.handle_irq = imx31_handle_irq,
 	.timer = &mx31lilly_timer,
 	.init_machine = mx31lilly_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
index 05f1c71..67e538d 100644
--- a/arch/arm/mach-imx/mach-mx31lite.c
+++ b/arch/arm/mach-imx/mach-mx31lite.c
@@ -286,4 +286,5 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
 	.handle_irq = imx31_handle_irq,
 	.timer = &mx31lite_timer,
 	.init_machine = mx31lite_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 07034f4..f1e1b7d 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -599,4 +599,5 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
 	.handle_irq = imx31_handle_irq,
 	.timer = &mx31moboard_timer,
 	.init_machine = mx31moboard_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 7a46202..0af6c9c 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -224,4 +224,5 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
 	.handle_irq = imx35_handle_irq,
 	.timer = &mx35pdk_timer,
 	.init_machine = mx35_3ds_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c
index 125c196..8b3d3f0 100644
--- a/arch/arm/mach-imx/mach-mxt_td60.c
+++ b/arch/arm/mach-imx/mach-mxt_td60.c
@@ -274,4 +274,5 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
 	.handle_irq = imx27_handle_irq,
 	.timer = &mxt_td60_timer,
 	.init_machine = mxt_td60_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index 26072f4..d3b9c6b 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -442,4 +442,5 @@ MACHINE_START(PCA100, "phyCARD-i.MX27")
 	.handle_irq = imx27_handle_irq,
 	.init_machine = pca100_init,
 	.timer = &pca100_timer,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index efd6b53..d7e1516 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -696,4 +696,5 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
 	.handle_irq = imx31_handle_irq,
 	.timer = &pcm037_timer,
 	.init_machine = pcm037_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
index a17e9c7..16f126d 100644
--- a/arch/arm/mach-imx/mach-pcm038.c
+++ b/arch/arm/mach-imx/mach-pcm038.c
@@ -357,4 +357,5 @@ MACHINE_START(PCM038, "phyCORE-i.MX27")
 	.handle_irq = imx27_handle_irq,
 	.timer = &pcm038_timer,
 	.init_machine = pcm038_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index 7366c2a..06dc106 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -425,4 +425,5 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
 	.handle_irq = imx35_handle_irq,
 	.timer = &pcm043_timer,
 	.init_machine = pcm043_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c
index 4ff5faf..2606210 100644
--- a/arch/arm/mach-imx/mach-qong.c
+++ b/arch/arm/mach-imx/mach-qong.c
@@ -273,4 +273,5 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
 	.handle_irq = imx31_handle_irq,
 	.timer = &qong_timer,
 	.init_machine = qong_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c
index bb6e5b2..cb9ceae 100644
--- a/arch/arm/mach-imx/mach-scb9328.c
+++ b/arch/arm/mach-imx/mach-scb9328.c
@@ -144,4 +144,5 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
 	.handle_irq = imx1_handle_irq,
 	.timer = &scb9328_timer,
 	.init_machine = scb9328_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index 6909245..033257e 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -322,4 +322,5 @@ MACHINE_START(VPR200, "VPR200")
 	.handle_irq = imx35_handle_irq,
 	.timer = &vpr200_timer,
 	.init_machine = vpr200_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
index 1fc1103..944025d 100644
--- a/arch/arm/mach-mx5/board-cpuimx51.c
+++ b/arch/arm/mach-mx5/board-cpuimx51.c
@@ -297,4 +297,5 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
 	.handle_irq = imx51_handle_irq,
 	.timer = &mxc_timer,
 	.init_machine = eukrea_cpuimx51_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
index 52a11c1..9fbe923 100644
--- a/arch/arm/mach-mx5/board-cpuimx51sd.c
+++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
@@ -335,4 +335,5 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
 	.handle_irq = imx51_handle_irq,
 	.timer = &mxc_timer,
 	.init_machine = eukrea_cpuimx51sd_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
index fc3621d..42b66e8 100644
--- a/arch/arm/mach-mx5/board-mx50_rdp.c
+++ b/arch/arm/mach-mx5/board-mx50_rdp.c
@@ -222,4 +222,5 @@ MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform")
 	.handle_irq = imx50_handle_irq,
 	.timer = &mx50_rdp_timer,
 	.init_machine = mx50_rdp_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index 0578390..83eab41 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -175,4 +175,5 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
 	.handle_irq = imx51_handle_irq,
 	.timer = &mx51_3ds_timer,
 	.init_machine = mx51_3ds_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index 5c83760..68cdfda 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -426,4 +426,5 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
 	.handle_irq = imx51_handle_irq,
 	.timer = &mx51_babbage_timer,
 	.init_machine = mx51_babbage_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
index a9e4866..3a5ed2d 100644
--- a/arch/arm/mach-mx5/board-mx51_efikamx.c
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -182,7 +182,7 @@ static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initcon
 	.nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey),
 };
 
-void mx51_efikamx_reset(void)
+static void mx51_efikamx_restart(char mode, const char *cmd)
 {
 	if (system_rev == 0x11)
 		gpio_direction_output(EFIKAMX_RESET1_1, 0);
@@ -292,4 +292,5 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
 	.handle_irq = imx51_handle_irq,
 	.timer = &mx51_efikamx_timer,
 	.init_machine = mx51_efikamx_init,
+	.restart = mx51_efikamx_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c
index 38c4a3e..ea5f65b 100644
--- a/arch/arm/mach-mx5/board-mx51_efikasb.c
+++ b/arch/arm/mach-mx5/board-mx51_efikasb.c
@@ -287,4 +287,5 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
 	.handle_irq = imx51_handle_irq,
 	.init_machine =  efikasb_board_init,
 	.timer = &mx51_efikasb_timer,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c
index 0d7f0ff..5f224f1 100644
--- a/arch/arm/mach-mx5/board-mx53_ard.c
+++ b/arch/arm/mach-mx5/board-mx53_ard.c
@@ -257,4 +257,5 @@ MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board")
 	.handle_irq = imx53_handle_irq,
 	.timer = &mx53_ard_timer,
 	.init_machine = mx53_ard_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
index 6bea31a..c2d27cf 100644
--- a/arch/arm/mach-mx5/board-mx53_evk.c
+++ b/arch/arm/mach-mx5/board-mx53_evk.c
@@ -175,4 +175,5 @@ MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board")
 	.handle_irq = imx53_handle_irq,
 	.timer = &mx53_evk_timer,
 	.init_machine = mx53_evk_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c
index 7678f77..62f4aa3 100644
--- a/arch/arm/mach-mx5/board-mx53_loco.c
+++ b/arch/arm/mach-mx5/board-mx53_loco.c
@@ -317,4 +317,5 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board")
 	.handle_irq = imx53_handle_irq,
 	.timer = &mx53_loco_timer,
 	.init_machine = mx53_loco_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c
index 59c0845..2a78e62 100644
--- a/arch/arm/mach-mx5/board-mx53_smd.c
+++ b/arch/arm/mach-mx5/board-mx53_smd.c
@@ -164,4 +164,5 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board")
 	.handle_irq = imx53_handle_irq,
 	.timer = &mx53_smd_timer,
 	.init_machine = mx53_smd_board_init,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/imx51-dt.c b/arch/arm/mach-mx5/imx51-dt.c
index ccc6158..edf2c4c 100644
--- a/arch/arm/mach-mx5/imx51-dt.c
+++ b/arch/arm/mach-mx5/imx51-dt.c
@@ -113,4 +113,5 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
 	.timer		= &imx51_timer,
 	.init_machine	= imx51_dt_init,
 	.dt_compat	= imx51_dt_board_compat,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/imx53-dt.c b/arch/arm/mach-mx5/imx53-dt.c
index ccaa0b8..106070a 100644
--- a/arch/arm/mach-mx5/imx53-dt.c
+++ b/arch/arm/mach-mx5/imx53-dt.c
@@ -123,4 +123,5 @@ DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
 	.timer		= &imx53_timer,
 	.init_machine	= imx53_dt_init,
 	.dt_compat	= imx53_dt_board_compat,
+	.restart	= mxc_restart,
 MACHINE_END
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 83b745a..4ee98d5 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -71,8 +71,8 @@ extern int mx6q_clocks_init(void);
 extern struct platform_device *mxc_register_gpio(char *name, int id,
 	resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
 extern void mxc_set_cpu_type(unsigned int type);
+extern void mxc_restart(char, const char *);
 extern void mxc_arch_reset_init(void __iomem *);
-extern void mx51_efikamx_reset(void);
 extern int mx53_revision(void);
 extern int mx53_display_revision(void);
 
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
index cf88b35..22b8911 100644
--- a/arch/arm/plat-mxc/include/mach/system.h
+++ b/arch/arm/plat-mxc/include/mach/system.h
@@ -27,6 +27,8 @@ static inline void arch_idle(void)
 		cpu_do_idle();
 }
 
-void arch_reset(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index b1cfc6a..80de9e2 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -36,17 +36,10 @@ static void __iomem *wdog_base;
 /*
  * Reset the system. It is called by machine_restart().
  */
-void arch_reset(char mode, const char *cmd)
+void mxc_restart(char mode, const char *cmd)
 {
 	unsigned int wcr_enable;
 
-#ifdef CONFIG_MACH_MX51_EFIKAMX
-	if (machine_is_mx51_efikamx()) {
-		mx51_efikamx_reset();
-		return;
-	}
-#endif
-
 	if (cpu_is_mx1()) {
 		wcr_enable = (1 << 0);
 	} else {
-- 
1.7.4.4

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

* [PATCH 24/41] ARM: restart: mxs: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (30 preceding siblings ...)
  2011-11-06 17:47 ` [PATCH 23/41] ARM: restart: mxc: " Russell King - ARM Linux
@ 2011-11-06 17:48 ` Russell King - ARM Linux
  2011-11-11  4:02   ` Shawn Guo
  2011-11-06 17:48 ` [PATCH 25/41] ARM: restart: orion5x: " Russell King - ARM Linux
                   ` (21 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-mxs/include/mach/common.h |    1 +
 arch/arm/mach-mxs/include/mach/system.h |    4 +++-
 arch/arm/mach-mxs/mach-m28evk.c         |    1 +
 arch/arm/mach-mxs/mach-mx23evk.c        |    1 +
 arch/arm/mach-mxs/mach-mx28evk.c        |    1 +
 arch/arm/mach-mxs/mach-stmp378x_devb.c  |    1 +
 arch/arm/mach-mxs/mach-tx28.c           |    1 +
 arch/arm/mach-mxs/system.c              |    2 +-
 8 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mxs/include/mach/common.h b/arch/arm/mach-mxs/include/mach/common.h
index 635bb5d..1388485 100644
--- a/arch/arm/mach-mxs/include/mach/common.h
+++ b/arch/arm/mach-mxs/include/mach/common.h
@@ -16,6 +16,7 @@ struct clk;
 extern const u32 *mxs_get_ocotp(void);
 extern int mxs_reset_block(void __iomem *);
 extern void mxs_timer_init(struct clk *, int);
+extern void mxs_restart(char, const char *);
 
 extern int mx23_register_gpios(void);
 extern int mx23_clocks_init(void);
diff --git a/arch/arm/mach-mxs/include/mach/system.h b/arch/arm/mach-mxs/include/mach/system.h
index 0e42823..bcd8989 100644
--- a/arch/arm/mach-mxs/include/mach/system.h
+++ b/arch/arm/mach-mxs/include/mach/system.h
@@ -22,6 +22,8 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-void arch_reset(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 #endif /* __MACH_MXS_SYSTEM_H__ */
diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c
index 3b1681e..7799cd9 100644
--- a/arch/arm/mach-mxs/mach-m28evk.c
+++ b/arch/arm/mach-mxs/mach-m28evk.c
@@ -363,4 +363,5 @@ MACHINE_START(M28EVK, "DENX M28 EVK")
 	.init_irq	= mx28_init_irq,
 	.init_machine	= m28evk_init,
 	.timer		= &m28evk_timer,
+	.restart	= mxs_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c
index c325fbe..5ea1c57 100644
--- a/arch/arm/mach-mxs/mach-mx23evk.c
+++ b/arch/arm/mach-mxs/mach-mx23evk.c
@@ -184,4 +184,5 @@ MACHINE_START(MX23EVK, "Freescale MX23 EVK")
 	.init_irq	= mx23_init_irq,
 	.timer		= &mx23evk_timer,
 	.init_machine	= mx23evk_init,
+	.restart	= mxs_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index ac2316d..1d2548f 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -501,4 +501,5 @@ MACHINE_START(MX28EVK, "Freescale MX28 EVK")
 	.init_irq	= mx28_init_irq,
 	.timer		= &mx28evk_timer,
 	.init_machine	= mx28evk_init,
+	.restart	= mxs_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c
index 177e531..857e857 100644
--- a/arch/arm/mach-mxs/mach-stmp378x_devb.c
+++ b/arch/arm/mach-mxs/mach-stmp378x_devb.c
@@ -117,4 +117,5 @@ MACHINE_START(STMP378X, "STMP378X")
 	.init_irq	= mx23_init_irq,
 	.init_machine	= stmp378x_dvb_init,
 	.timer		= &stmp378x_dvb_timer,
+	.restart	= mxs_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c
index 9a1f0e7..2c0862e 100644
--- a/arch/arm/mach-mxs/mach-tx28.c
+++ b/arch/arm/mach-mxs/mach-tx28.c
@@ -178,4 +178,5 @@ MACHINE_START(TX28, "Ka-Ro electronics TX28 module")
 	.init_irq = mx28_init_irq,
 	.timer = &tx28_timer,
 	.init_machine = tx28_stk5v3_init,
+	.restart	= mxs_restart,
 MACHINE_END
diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
index cab8836..b936633 100644
--- a/arch/arm/mach-mxs/system.c
+++ b/arch/arm/mach-mxs/system.c
@@ -42,7 +42,7 @@ static void __iomem *mxs_clkctrl_reset_addr;
 /*
  * Reset the system. It is called by machine_restart().
  */
-void arch_reset(char mode, const char *cmd)
+void mxs_restart(char mode, const char *cmd)
 {
 	/* reset the chip */
 	__mxs_setl(MXS_CLKCTRL_RESET_CHIP, mxs_clkctrl_reset_addr);
-- 
1.7.4.4

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

* [PATCH 25/41] ARM: restart: orion5x: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (31 preceding siblings ...)
  2011-11-06 17:48 ` [PATCH 24/41] ARM: restart: mxs: " Russell King - ARM Linux
@ 2011-11-06 17:48 ` Russell King - ARM Linux
  2011-11-24 22:05   ` Nicolas Pitre
  2011-11-06 17:48 ` [PATCH 26/41] ARM: restart: pnx4008: " Russell King - ARM Linux
                   ` (20 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

In addition, convert calls to arm_machine_restart() to orion5x_restart()
to ensure that they continue to work as intended.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-orion5x/common.c                 |   12 ++++++++++++
 arch/arm/mach-orion5x/common.h                 |    1 +
 arch/arm/mach-orion5x/d2net-setup.c            |    2 ++
 arch/arm/mach-orion5x/db88f5281-setup.c        |    1 +
 arch/arm/mach-orion5x/dns323-setup.c           |    1 +
 arch/arm/mach-orion5x/edmini_v2-setup.c        |    1 +
 arch/arm/mach-orion5x/include/mach/system.h    |   10 ----------
 arch/arm/mach-orion5x/kurobox_pro-setup.c      |    2 ++
 arch/arm/mach-orion5x/ls-chl-setup.c           |    3 ++-
 arch/arm/mach-orion5x/ls_hgl-setup.c           |    3 ++-
 arch/arm/mach-orion5x/lsmini-setup.c           |    3 ++-
 arch/arm/mach-orion5x/mss2-setup.c             |    3 ++-
 arch/arm/mach-orion5x/mv2120-setup.c           |    3 ++-
 arch/arm/mach-orion5x/net2big-setup.c          |    1 +
 arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c   |    1 +
 arch/arm/mach-orion5x/rd88f5181l-ge-setup.c    |    1 +
 arch/arm/mach-orion5x/rd88f5182-setup.c        |    1 +
 arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c   |    1 +
 arch/arm/mach-orion5x/terastation_pro2-setup.c |    1 +
 arch/arm/mach-orion5x/ts209-setup.c            |    1 +
 arch/arm/mach-orion5x/ts409-setup.c            |    1 +
 arch/arm/mach-orion5x/ts78xx-setup.c           |    1 +
 arch/arm/mach-orion5x/wnr854t-setup.c          |    1 +
 arch/arm/mach-orion5x/wrt350n-v2-setup.c       |    1 +
 24 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 22ace0b..41127e8 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -18,6 +18,7 @@
 #include <linux/mbus.h>
 #include <linux/mv643xx_i2c.h>
 #include <linux/ata_platform.h>
+#include <linux/delay.h>
 #include <net/dsa.h>
 #include <asm/page.h>
 #include <asm/setup.h>
@@ -304,6 +305,17 @@ void __init orion5x_init(void)
 	orion5x_wdt_init();
 }
 
+void orion5x_restart(char mode, const char *cmd)
+{
+	/*
+	 * Enable and issue soft reset
+	 */
+	orion5x_setbits(RSTOUTn_MASK, (1 << 2));
+	orion5x_setbits(CPU_SOFT_RESET, 1);
+	mdelay(200);
+	orion5x_clrbits(CPU_SOFT_RESET, 1);
+}
+
 /*
  * Many orion-based systems have buggy bootloader implementations.
  * This is a common fixup for bogus memory tags.
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index 909489f..37ef18d 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -39,6 +39,7 @@ void orion5x_spi_init(void);
 void orion5x_uart0_init(void);
 void orion5x_uart1_init(void);
 void orion5x_xor_init(void);
+void orion5x_restart(char, const char *);
 
 /*
  * PCIe/PCI functions.
diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c
index 8c83009..d75dcfa 100644
--- a/arch/arm/mach-orion5x/d2net-setup.c
+++ b/arch/arm/mach-orion5x/d2net-setup.c
@@ -343,6 +343,7 @@ MACHINE_START(D2NET, "LaCie d2 Network")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
 #endif
 
@@ -355,6 +356,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
 #endif
 
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index 4b79a80..a104d5a 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -364,4 +364,5 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
 	.init_early	= orion5x_init_early,
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index 343f60e..91b0f47 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -736,4 +736,5 @@ MACHINE_START(DNS323, "D-Link DNS-323")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c
index 70a4e92..355e962 100644
--- a/arch/arm/mach-orion5x/edmini_v2-setup.c
+++ b/arch/arm/mach-orion5x/edmini_v2-setup.c
@@ -258,4 +258,5 @@ MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h
index a1d6e46..6677677 100644
--- a/arch/arm/mach-orion5x/include/mach/system.h
+++ b/arch/arm/mach-orion5x/include/mach/system.h
@@ -11,8 +11,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <mach/bridge-regs.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -20,14 +18,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * Enable and issue soft reset
-	 */
-	orion5x_setbits(RSTOUTn_MASK, (1 << 2));
-	orion5x_setbits(CPU_SOFT_RESET, 1);
-	mdelay(200);
-	orion5x_clrbits(CPU_SOFT_RESET, 1);
 }
 
-
 #endif
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
index d3cd3f6..47587b8 100644
--- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
+++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
@@ -386,6 +386,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
 #endif
 
@@ -399,5 +400,6 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c
index 9503fff..5272131 100644
--- a/arch/arm/mach-orion5x/ls-chl-setup.c
+++ b/arch/arm/mach-orion5x/ls-chl-setup.c
@@ -140,7 +140,7 @@ static struct mv_sata_platform_data lschl_sata_data = {
 
 static void lschl_power_off(void)
 {
-	arm_machine_restart('h', NULL);
+	orion5x_restart('h', NULL);
 }
 
 /*****************************************************************************
@@ -325,4 +325,5 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c
index ed6d772..9a8697b 100644
--- a/arch/arm/mach-orion5x/ls_hgl-setup.c
+++ b/arch/arm/mach-orion5x/ls_hgl-setup.c
@@ -186,7 +186,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {
 
 static void ls_hgl_power_off(void)
 {
-	arm_machine_restart('h', NULL);
+	orion5x_restart('h', NULL);
 }
 
 
@@ -272,4 +272,5 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c
index 743f7f1..09c7365 100644
--- a/arch/arm/mach-orion5x/lsmini-setup.c
+++ b/arch/arm/mach-orion5x/lsmini-setup.c
@@ -186,7 +186,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {
 
 static void lsmini_power_off(void)
 {
-	arm_machine_restart('h', NULL);
+	orion5x_restart('h', NULL);
 }
 
 
@@ -274,5 +274,6 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c
index 6020e26..65faaa3 100644
--- a/arch/arm/mach-orion5x/mss2-setup.c
+++ b/arch/arm/mach-orion5x/mss2-setup.c
@@ -267,5 +267,6 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II")
 	.init_early	= orion5x_init_early,
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
-	.fixup		= tag_fixup_mem32
+	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c
index 201ae36..c87fde4 100644
--- a/arch/arm/mach-orion5x/mv2120-setup.c
+++ b/arch/arm/mach-orion5x/mv2120-setup.c
@@ -234,5 +234,6 @@ MACHINE_START(MV2120, "HP Media Vault mv2120")
 	.init_early	= orion5x_init_early,
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
-	.fixup		= tag_fixup_mem32
+	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c
index 6197c79..0180c39 100644
--- a/arch/arm/mach-orion5x/net2big-setup.c
+++ b/arch/arm/mach-orion5x/net2big-setup.c
@@ -426,5 +426,6 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
index ebd6767..292038f 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
@@ -175,4 +175,5 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
index 05db2d3..c44eaba 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
@@ -187,4 +187,5 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index e47fa05..96438b6 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -311,4 +311,5 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
 	.init_early	= orion5x_init_early,
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 6431725..2c5fab0 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -128,4 +128,5 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c
index 29f1526..632a861 100644
--- a/arch/arm/mach-orion5x/terastation_pro2-setup.c
+++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c
@@ -364,4 +364,5 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
index 31e51f9..62c156b 100644
--- a/arch/arm/mach-orion5x/ts209-setup.c
+++ b/arch/arm/mach-orion5x/ts209-setup.c
@@ -329,4 +329,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c
index 0fbcc14..4e6ff75 100644
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion5x/ts409-setup.c
@@ -318,4 +318,5 @@ MACHINE_START(TS409, "QNAP TS-409")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index 6c75cd3..0a236dd 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -627,4 +627,5 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
 	.init_early	= orion5x_init_early,
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c
index b8be7d8..078c03f 100644
--- a/arch/arm/mach-orion5x/wnr854t-setup.c
+++ b/arch/arm/mach-orion5x/wnr854t-setup.c
@@ -179,4 +179,5 @@ MACHINE_START(WNR854T, "Netgear WNR854T")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index faf81a0..46a9778 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -267,4 +267,5 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
 	.init_irq	= orion5x_init_irq,
 	.timer		= &orion5x_timer,
 	.fixup		= tag_fixup_mem32,
+	.restart	= orion5x_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 26/41] ARM: restart: pnx4008: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (32 preceding siblings ...)
  2011-11-06 17:48 ` [PATCH 25/41] ARM: restart: orion5x: " Russell King - ARM Linux
@ 2011-11-06 17:48 ` Russell King - ARM Linux
  2011-11-06 17:49 ` [PATCH 27/41] ARM: restart: prima2: " Russell King - ARM Linux
                   ` (19 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-pnx4008/core.c                |    6 ++++++
 arch/arm/mach-pnx4008/include/mach/system.h |    5 -----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-pnx4008/core.c b/arch/arm/mach-pnx4008/core.c
index cdb95e7..4cfb40b 100644
--- a/arch/arm/mach-pnx4008/core.c
+++ b/arch/arm/mach-pnx4008/core.c
@@ -260,6 +260,11 @@ void __init pnx4008_map_io(void)
 	iotable_init(pnx4008_io_desc, ARRAY_SIZE(pnx4008_io_desc));
 }
 
+static void pnx4008_restart(char mode, const char *cmd)
+{
+	soft_restart(0);
+}
+
 extern struct sys_timer pnx4008_timer;
 
 MACHINE_START(PNX4008, "Philips PNX4008")
@@ -269,4 +274,5 @@ MACHINE_START(PNX4008, "Philips PNX4008")
 	.init_irq 		= pnx4008_init_irq,
 	.init_machine 		= pnx4008_init,
 	.timer 			= &pnx4008_timer,
+	.restart		= pnx4008_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
index 5d6384a..6710ed3 100644
--- a/arch/arm/mach-pnx4008/include/mach/system.h
+++ b/arch/arm/mach-pnx4008/include/mach/system.h
@@ -21,10 +21,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <linux/io.h>
-#include <mach/hardware.h>
-#include <mach/platform.h>
-
 static void arch_idle(void)
 {
 	cpu_do_idle();
@@ -32,7 +28,6 @@ static void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	soft_restart(0);
 }
 
 #endif
-- 
1.7.4.4

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

* [PATCH 27/41] ARM: restart: prima2: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (33 preceding siblings ...)
  2011-11-06 17:48 ` [PATCH 26/41] ARM: restart: pnx4008: " Russell King - ARM Linux
@ 2011-11-06 17:49 ` Russell King - ARM Linux
  2011-11-07  8:15   ` Barry Song
  2011-11-06 17:49 ` [PATCH 28/41] ARM: restart: pxa: " Russell King - ARM Linux
                   ` (18 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:49 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-prima2/common.h              |    1 +
 arch/arm/mach-prima2/include/mach/system.h |    8 --------
 arch/arm/mach-prima2/prima2.c              |    1 +
 arch/arm/mach-prima2/rstc.c                |    7 +++++++
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
index 83e5d21..b28a930 100644
--- a/arch/arm/mach-prima2/common.h
+++ b/arch/arm/mach-prima2/common.h
@@ -16,6 +16,7 @@ extern struct sys_timer sirfsoc_timer;
 
 extern void __init sirfsoc_of_irq_init(void);
 extern void __init sirfsoc_of_clk_init(void);
+extern void sirfsoc_restart(char, const char *);
 
 #ifndef CONFIG_DEBUG_LL
 static inline void sirfsoc_map_lluart(void)  {}
diff --git a/arch/arm/mach-prima2/include/mach/system.h b/arch/arm/mach-prima2/include/mach/system.h
index 0dbd257..eb16b4b 100644
--- a/arch/arm/mach-prima2/include/mach/system.h
+++ b/arch/arm/mach-prima2/include/mach/system.h
@@ -9,13 +9,6 @@
 #ifndef __MACH_SYSTEM_H__
 #define __MACH_SYSTEM_H__
 
-#include <linux/bitops.h>
-#include <mach/hardware.h>
-
-#define SIRFSOC_SYS_RST_BIT  BIT(31)
-
-extern void __iomem *sirfsoc_rstc_base;
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -23,7 +16,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
 }
 
 #endif
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/prima2.c
index ef555c0..8609aad 100644
--- a/arch/arm/mach-prima2/prima2.c
+++ b/arch/arm/mach-prima2/prima2.c
@@ -39,4 +39,5 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
 	.dma_zone_size	= SZ_256M,
 	.init_machine	= sirfsoc_mach_init,
 	.dt_compat      = prima2cb_dt_match,
+	.restart	= sirfsoc_restart,
 MACHINE_END
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index 492cfa8..762adb7 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -68,3 +68,10 @@ int sirfsoc_reset_device(struct device *dev)
 
 	return 0;
 }
+
+#define SIRFSOC_SYS_RST_BIT  BIT(31)
+
+void sirfsoc_restart(char mode, const char *cmd)
+{
+	writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
+}
-- 
1.7.4.4

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

* [PATCH 28/41] ARM: restart: pxa: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (34 preceding siblings ...)
  2011-11-06 17:49 ` [PATCH 27/41] ARM: restart: prima2: " Russell King - ARM Linux
@ 2011-11-06 17:49 ` Russell King - ARM Linux
  2011-11-17 17:27   ` Russell King - ARM Linux
  2011-11-06 17:49 ` [PATCH 29/41] ARM: restart: realview: " Russell King - ARM Linux
                   ` (17 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:49 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-pxa/balloon3.c            |    1 +
 arch/arm/mach-pxa/capc7117.c            |    3 ++-
 arch/arm/mach-pxa/cm-x2xx.c             |    1 +
 arch/arm/mach-pxa/cm-x300.c             |    1 +
 arch/arm/mach-pxa/colibri-pxa270.c      |    2 ++
 arch/arm/mach-pxa/colibri-pxa300.c      |    1 +
 arch/arm/mach-pxa/colibri-pxa320.c      |    1 +
 arch/arm/mach-pxa/corgi.c               |    8 +++++---
 arch/arm/mach-pxa/csb726.c              |    1 +
 arch/arm/mach-pxa/em-x270.c             |    2 ++
 arch/arm/mach-pxa/eseries.c             |    6 ++++++
 arch/arm/mach-pxa/ezx.c                 |    6 ++++++
 arch/arm/mach-pxa/generic.h             |    2 ++
 arch/arm/mach-pxa/gumstix.c             |    1 +
 arch/arm/mach-pxa/h5000.c               |    1 +
 arch/arm/mach-pxa/himalaya.c            |    1 +
 arch/arm/mach-pxa/hx4700.c              |    1 +
 arch/arm/mach-pxa/icontrol.c            |    3 ++-
 arch/arm/mach-pxa/idp.c                 |    1 +
 arch/arm/mach-pxa/include/mach/system.h |   10 +++-------
 arch/arm/mach-pxa/littleton.c           |    1 +
 arch/arm/mach-pxa/lpd270.c              |    1 +
 arch/arm/mach-pxa/lubbock.c             |    1 +
 arch/arm/mach-pxa/magician.c            |    1 +
 arch/arm/mach-pxa/mainstone.c           |    1 +
 arch/arm/mach-pxa/mioa701.c             |    6 +++---
 arch/arm/mach-pxa/mp900.c               |    1 +
 arch/arm/mach-pxa/palmld.c              |    3 ++-
 arch/arm/mach-pxa/palmt5.c              |    3 ++-
 arch/arm/mach-pxa/palmtc.c              |    3 ++-
 arch/arm/mach-pxa/palmte2.c             |    3 ++-
 arch/arm/mach-pxa/palmtreo.c            |    2 ++
 arch/arm/mach-pxa/palmtx.c              |    3 ++-
 arch/arm/mach-pxa/palmz72.c             |    3 ++-
 arch/arm/mach-pxa/pcm027.c              |    1 +
 arch/arm/mach-pxa/poodle.c              |    3 ++-
 arch/arm/mach-pxa/raumfeld.c            |    3 +++
 arch/arm/mach-pxa/reset.c               |    5 ++++-
 arch/arm/mach-pxa/saar.c                |    1 +
 arch/arm/mach-pxa/saarb.c               |    1 +
 arch/arm/mach-pxa/spitz.c               |    6 ++++--
 arch/arm/mach-pxa/stargate2.c           |    2 ++
 arch/arm/mach-pxa/tavorevb.c            |    1 +
 arch/arm/mach-pxa/tavorevb3.c           |    1 +
 arch/arm/mach-pxa/tosa.c                |    4 ++--
 arch/arm/mach-pxa/trizeps4.c            |    2 ++
 arch/arm/mach-pxa/viper.c               |    1 +
 arch/arm/mach-pxa/vpac270.c             |    3 ++-
 arch/arm/mach-pxa/xcep.c                |    1 +
 arch/arm/mach-pxa/z2.c                  |    1 +
 arch/arm/mach-pxa/zeus.c                |    1 +
 arch/arm/mach-pxa/zylonite.c            |    1 +
 52 files changed, 95 insertions(+), 28 deletions(-)

diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index fc0b854..5e25e17 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -829,4 +829,5 @@ MACHINE_START(BALLOON3, "Balloon3")
 	.timer		= &pxa_timer,
 	.init_machine	= balloon3_init,
 	.atag_offset	= 0x100,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/capc7117.c b/arch/arm/mach-pxa/capc7117.c
index 4efc16d..c2f0be0 100644
--- a/arch/arm/mach-pxa/capc7117.c
+++ b/arch/arm/mach-pxa/capc7117.c
@@ -153,5 +153,6 @@ MACHINE_START(CAPC7117,
 	.init_irq = pxa3xx_init_irq,
 	.handle_irq = pxa3xx_handle_irq,
 	.timer = &pxa_timer,
-	.init_machine = capc7117_init
+	.init_machine = capc7117_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c
index f2e4190..ec170a5 100644
--- a/arch/arm/mach-pxa/cm-x2xx.c
+++ b/arch/arm/mach-pxa/cm-x2xx.c
@@ -524,4 +524,5 @@ MACHINE_START(ARMCORE, "Compulab CM-X2XX")
 #ifdef CONFIG_PCI
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 3a7387f..dfd51d7 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -857,4 +857,5 @@ MACHINE_START(CM_X300, "CM-X300 module")
 	.timer		= &pxa_timer,
 	.init_machine	= cm_x300_init,
 	.fixup		= cm_x300_fixup,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 7db6646..17a29be 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -312,6 +312,7 @@ MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 
 MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC")
@@ -321,5 +322,6 @@ MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index c825e8b..c01059a 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -189,5 +189,6 @@ MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
 	.init_irq	= pxa3xx_init_irq,
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index 692e1ff..6cc3caa 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -259,5 +259,6 @@ MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
 	.init_irq	= pxa3xx_init_irq,
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 3e9483b..66faaaf 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -654,7 +654,7 @@ static void corgi_poweroff(void)
 		/* Green LED off tells the bootloader to halt */
 		gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
 
-	arm_machine_restart('h', NULL);
+	pxa_restart('h', NULL);
 }
 
 static void corgi_restart(char mode, const char *cmd)
@@ -663,13 +663,12 @@ static void corgi_restart(char mode, const char *cmd)
 		/* Green LED on tells the bootloader to reboot */
 		gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
 
-	arm_machine_restart('h', cmd);
+	pxa_restart('h', cmd);
 }
 
 static void __init corgi_init(void)
 {
 	pm_power_off = corgi_poweroff;
-	arm_pm_restart = corgi_restart;
 
 	/* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
 	PCFR |= PCFR_OPDE;
@@ -725,6 +724,7 @@ MACHINE_START(CORGI, "SHARP Corgi")
 	.handle_irq	= pxa25x_handle_irq,
 	.init_machine	= corgi_init,
 	.timer		= &pxa_timer,
+	.restart	= corgi_restart,
 MACHINE_END
 #endif
 
@@ -736,6 +736,7 @@ MACHINE_START(SHEPHERD, "SHARP Shepherd")
 	.handle_irq	= pxa25x_handle_irq,
 	.init_machine	= corgi_init,
 	.timer		= &pxa_timer,
+	.restart	= corgi_restart,
 MACHINE_END
 #endif
 
@@ -747,6 +748,7 @@ MACHINE_START(HUSKY, "SHARP Husky")
 	.handle_irq	= pxa25x_handle_irq,
 	.init_machine	= corgi_init,
 	.timer		= &pxa_timer,
+	.restart	= corgi_restart,
 MACHINE_END
 #endif
 
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c
index 5e2cf39..fb5a51d 100644
--- a/arch/arm/mach-pxa/csb726.c
+++ b/arch/arm/mach-pxa/csb726.c
@@ -278,4 +278,5 @@ MACHINE_START(CSB726, "Cogent CSB726")
 	.handle_irq       = pxa27x_handle_irq,
 	.init_machine   = csb726_init,
 	.timer          = &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 94acc0b..bd396ba 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -1305,6 +1305,7 @@ MACHINE_START(EM_X270, "Compulab EM-X270")
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= em_x270_init,
+	.restart	= pxa_restart,
 MACHINE_END
 
 MACHINE_START(EXEDA, "Compulab eXeda")
@@ -1314,4 +1315,5 @@ MACHINE_START(EXEDA, "Compulab eXeda")
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= em_x270_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index 8e697dd..8cafafa 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -196,6 +196,7 @@ MACHINE_START(E330, "Toshiba e330")
 	.fixup		= eseries_fixup,
 	.init_machine	= e330_init,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -246,6 +247,7 @@ MACHINE_START(E350, "Toshiba e350")
 	.fixup		= eseries_fixup,
 	.init_machine	= e350_init,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -369,6 +371,7 @@ MACHINE_START(E400, "Toshiba e400")
 	.fixup		= eseries_fixup,
 	.init_machine	= e400_init,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -558,6 +561,7 @@ MACHINE_START(E740, "Toshiba e740")
 	.fixup		= eseries_fixup,
 	.init_machine	= e740_init,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -750,6 +754,7 @@ MACHINE_START(E750, "Toshiba e750")
 	.fixup		= eseries_fixup,
 	.init_machine	= e750_init,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -955,5 +960,6 @@ MACHINE_START(E800, "Toshiba e800")
 	.fixup		= eseries_fixup,
 	.init_machine	= e800_init,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
index 8308eee..15ab253 100644
--- a/arch/arm/mach-pxa/ezx.c
+++ b/arch/arm/mach-pxa/ezx.c
@@ -804,6 +804,7 @@ MACHINE_START(EZX_A780, "Motorola EZX A780")
 	.handle_irq       = pxa27x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = a780_init,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -870,6 +871,7 @@ MACHINE_START(EZX_E680, "Motorola EZX E680")
 	.handle_irq       = pxa27x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = e680_init,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -936,6 +938,7 @@ MACHINE_START(EZX_A1200, "Motorola EZX A1200")
 	.handle_irq       = pxa27x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = a1200_init,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -1127,6 +1130,7 @@ MACHINE_START(EZX_A910, "Motorola EZX A910")
 	.handle_irq       = pxa27x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = a910_init,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -1193,6 +1197,7 @@ MACHINE_START(EZX_E6, "Motorola EZX E6")
 	.handle_irq       = pxa27x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = e6_init,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -1233,5 +1238,6 @@ MACHINE_START(EZX_E2, "Motorola EZX E2")
 	.handle_irq       = pxa27x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = e2_init,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index 92a2e85..0d729e6 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -57,3 +57,5 @@ void __init pxa_set_ffuart_info(void *info);
 void __init pxa_set_btuart_info(void *info);
 void __init pxa_set_stuart_info(void *info);
 void __init pxa_set_hwuart_info(void *info);
+
+void pxa_restart(char, const char *);
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
index 9c8208c..03e5e0b 100644
--- a/arch/arm/mach-pxa/gumstix.c
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -239,4 +239,5 @@ MACHINE_START(GUMSTIX, "Gumstix")
 	.handle_irq	= pxa25x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= gumstix_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c
index 4b5e110..fde6b4c 100644
--- a/arch/arm/mach-pxa/h5000.c
+++ b/arch/arm/mach-pxa/h5000.c
@@ -209,4 +209,5 @@ MACHINE_START(H5400, "HP iPAQ H5000")
 	.handle_irq = pxa25x_handle_irq,
 	.timer = &pxa_timer,
 	.init_machine = h5000_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/himalaya.c b/arch/arm/mach-pxa/himalaya.c
index f2c3245..26d069a 100644
--- a/arch/arm/mach-pxa/himalaya.c
+++ b/arch/arm/mach-pxa/himalaya.c
@@ -164,4 +164,5 @@ MACHINE_START(HIMALAYA, "HTC Himalaya")
 	.handle_irq = pxa25x_handle_irq,
 	.init_machine = himalaya_init,
 	.timer = &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index 6f6368e..ce16bda 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -845,4 +845,5 @@ MACHINE_START(H4700, "HP iPAQ HX4700")
 	.handle_irq     = pxa27x_handle_irq,
 	.init_machine = hx4700_init,
 	.timer        = &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/icontrol.c b/arch/arm/mach-pxa/icontrol.c
index f78d5db..e239b82 100644
--- a/arch/arm/mach-pxa/icontrol.c
+++ b/arch/arm/mach-pxa/icontrol.c
@@ -196,5 +196,6 @@ MACHINE_START(ICONTROL, "iControl/SafeTcam boards using Embedian MXM-8x10 CoM")
 	.init_irq	= pxa3xx_init_irq,
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer		= &pxa_timer,
-	.init_machine	= icontrol_init
+	.init_machine	= icontrol_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index ddf20e5..fbabd84 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -199,4 +199,5 @@ MACHINE_START(PXA_IDP, "Vibren PXA255 IDP")
 	.handle_irq	= pxa25x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= idp_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
index d1fce8b..85494ff 100644
--- a/arch/arm/mach-pxa/include/mach/system.h
+++ b/arch/arm/mach-pxa/include/mach/system.h
@@ -9,15 +9,11 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-
-#include <asm/proc-fns.h>
-#include "hardware.h"
-#include "pxa2xx-regs.h"
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
 
-
-void arch_reset(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 0037e57..1799a8e 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -444,4 +444,5 @@ MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleto
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= littleton_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index 1dd5302..6119c01 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -505,4 +505,5 @@ MACHINE_START(LOGICPD_PXA270, "LogicPD PXA270 Card Engine")
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= lpd270_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index c48ce6d..4b7a528 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -556,4 +556,5 @@ MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)")
 	.handle_irq	= pxa25x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= lubbock_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 4b796c3..4e6774f 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -760,4 +760,5 @@ MACHINE_START(MAGICIAN, "HTC Magician")
 	.handle_irq = pxa27x_handle_irq,
 	.init_machine = magician_init,
 	.timer = &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 0567d39..ca14555 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -622,4 +622,5 @@ MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= mainstone_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 4f47a76..924a3b5 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -696,13 +696,13 @@ static void mioa701_machine_exit(void);
 static void mioa701_poweroff(void)
 {
 	mioa701_machine_exit();
-	arm_machine_restart('s', NULL);
+	pxa_restart('s', NULL);
 }
 
 static void mioa701_restart(char c, const char *cmd)
 {
 	mioa701_machine_exit();
-	arm_machine_restart('s', cmd);
+	pxa_restart('s', cmd);
 }
 
 static struct gpio global_gpios[] = {
@@ -734,7 +734,6 @@ static void __init mioa701_machine_init(void)
 	pxa_set_udc_info(&mioa701_udc_info);
 	pxa_set_ac97_info(&mioa701_ac97_info);
 	pm_power_off = mioa701_poweroff;
-	arm_pm_restart = mioa701_restart;
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 	gsm_init();
 
@@ -758,4 +757,5 @@ MACHINE_START(MIOA701, "MIO A701")
 	.handle_irq	= &pxa27x_handle_irq,
 	.init_machine	= mioa701_machine_init,
 	.timer		= &pxa_timer,
+	.restart	= mioa701_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/mp900.c b/arch/arm/mach-pxa/mp900.c
index 4af5d51..169bf8f 100644
--- a/arch/arm/mach-pxa/mp900.c
+++ b/arch/arm/mach-pxa/mp900.c
@@ -98,5 +98,6 @@ MACHINE_START(NEC_MP900, "MobilePro900/C")
 	.init_irq	= pxa25x_init_irq,
 	.handle_irq	= pxa25x_handle_irq,
 	.init_machine	= mp900c_init,
+	.restart	= pxa_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 3d4a281..1fa80f4f 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -347,5 +347,6 @@ MACHINE_START(PALMLD, "Palm LifeDrive")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
-	.init_machine	= palmld_init
+	.init_machine	= palmld_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 99d6bcf..5ba1431 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -208,5 +208,6 @@ MACHINE_START(PALMT5, "Palm Tungsten|T5")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
-	.init_machine	= palmt5_init
+	.init_machine	= palmt5_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 6ec7cae..e4dd719 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -542,5 +542,6 @@ MACHINE_START(PALMTC, "Palm Tungsten|C")
 	.init_irq	= pxa25x_init_irq,
 	.handle_irq	= pxa25x_handle_irq,
 	.timer		= &pxa_timer,
-	.init_machine	= palmtc_init
+	.init_machine	= palmtc_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
index 9376da0..5ebf49acb 100644
--- a/arch/arm/mach-pxa/palmte2.c
+++ b/arch/arm/mach-pxa/palmte2.c
@@ -361,5 +361,6 @@ MACHINE_START(PALMTE2, "Palm Tungsten|E2")
 	.init_irq	= pxa25x_init_irq,
 	.handle_irq	= pxa25x_handle_irq,
 	.timer		= &pxa_timer,
-	.init_machine	= palmte2_init
+	.init_machine	= palmte2_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index 94e9708..ec82491 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -452,6 +452,7 @@ MACHINE_START(TREO680, "Palm Treo 680")
 	.handle_irq       = pxa27x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = treo680_init,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -464,5 +465,6 @@ MACHINE_START(CENTRO, "Palm Centro 685")
 	.handle_irq       = pxa27x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine	= centro_init,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 4e3e459..6170d76 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -369,5 +369,6 @@ MACHINE_START(PALMTX, "Palm T|X")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
-	.init_machine	= palmtx_init
+	.init_machine	= palmtx_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index 68e18ba..b2dff9d 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -404,5 +404,6 @@ MACHINE_START(PALMZ72, "Palm Zire72")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
-	.init_machine	= palmz72_init
+	.init_machine	= palmz72_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
index 0b825a3..fe90544 100644
--- a/arch/arm/mach-pxa/pcm027.c
+++ b/arch/arm/mach-pxa/pcm027.c
@@ -265,4 +265,5 @@ MACHINE_START(PCM027, "Phytec Messtechnik GmbH phyCORE-PXA270")
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= pcm027_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 1c597ad..7e054d4 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -416,7 +416,7 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = {
 
 static void poodle_poweroff(void)
 {
-	arm_machine_restart('h', NULL);
+	pxa_restart('h', NULL);
 }
 
 static void __init poodle_init(void)
@@ -465,4 +465,5 @@ MACHINE_START(POODLE, "SHARP Poodle")
 	.handle_irq	= pxa25x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= poodle_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 6810cdd..697cbcd 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -1092,6 +1092,7 @@ MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
 	.init_irq	= pxa3xx_init_irq,
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -1103,6 +1104,7 @@ MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
 	.init_irq	= pxa3xx_init_irq,
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -1114,5 +1116,6 @@ MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
 	.init_irq	= pxa3xx_init_irq,
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
index b8bcda1..c8497b0 100644
--- a/arch/arm/mach-pxa/reset.c
+++ b/arch/arm/mach-pxa/reset.c
@@ -81,8 +81,11 @@ static void do_hw_reset(void)
 	OSMR3 = OSCR + 368640;	/* ... in 100 ms */
 }
 
-void arch_reset(char mode, const char *cmd)
+void pxa_restart(char mode, const char *cmd)
 {
+	local_irq_disable();
+	local_fiq_disable();
+
 	clear_reset_status(RESET_STATUS_ALL);
 
 	switch (mode) {
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c
index fc2c1e0..8787070 100644
--- a/arch/arm/mach-pxa/saar.c
+++ b/arch/arm/mach-pxa/saar.c
@@ -602,4 +602,5 @@ MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")
 	.handle_irq       = pxa3xx_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = saar_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c
index 3e999e3..b6dbaca 100644
--- a/arch/arm/mach-pxa/saarb.c
+++ b/arch/arm/mach-pxa/saarb.c
@@ -111,5 +111,6 @@ MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)")
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = saarb_init,
+	.restart	= pxa_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index f5bafcc..d8d089e 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -925,7 +925,7 @@ static inline void spitz_i2c_init(void) {}
  ******************************************************************************/
 static void spitz_poweroff(void)
 {
-	arm_machine_restart('g', NULL);
+	pxa_restart('g', NULL);
 }
 
 static void spitz_restart(char mode, const char *cmd)
@@ -942,7 +942,6 @@ static void __init spitz_init(void)
 {
 	init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
 	pm_power_off = spitz_poweroff;
-	arm_pm_restart = spitz_restart;
 
 	PMCR = 0x00;
 
@@ -988,6 +987,7 @@ MACHINE_START(SPITZ, "SHARP Spitz")
 	.handle_irq	= pxa27x_handle_irq,
 	.init_machine	= spitz_init,
 	.timer		= &pxa_timer,
+	.restart	= spitz_restart,
 MACHINE_END
 #endif
 
@@ -1000,6 +1000,7 @@ MACHINE_START(BORZOI, "SHARP Borzoi")
 	.handle_irq	= pxa27x_handle_irq,
 	.init_machine	= spitz_init,
 	.timer		= &pxa_timer,
+	.restart	= spitz_restart,
 MACHINE_END
 #endif
 
@@ -1012,5 +1013,6 @@ MACHINE_START(AKITA, "SHARP Akita")
 	.handle_irq	= pxa27x_handle_irq,
 	.init_machine	= spitz_init,
 	.timer		= &pxa_timer,
+	.restart	= spitz_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index 4c9a48b..80d7f23 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -1005,6 +1005,7 @@ MACHINE_START(INTELMOTE2, "IMOTE 2")
 	.timer		= &pxa_timer,
 	.init_machine	= imote2_init,
 	.atag_offset	= 0x100,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
 
@@ -1017,5 +1018,6 @@ MACHINE_START(STARGATE2, "Stargate 2")
 	.timer = &pxa_timer,
 	.init_machine = stargate2_init,
 	.atag_offset = 0x100,
+	.restart	= pxa_restart,
 MACHINE_END
 #endif
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
index ad47bb9..4fa36a3 100644
--- a/arch/arm/mach-pxa/tavorevb.c
+++ b/arch/arm/mach-pxa/tavorevb.c
@@ -495,4 +495,5 @@ MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)")
 	.handle_irq       = pxa3xx_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = tavorevb_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/tavorevb3.c b/arch/arm/mach-pxa/tavorevb3.c
index fd56916..8a22879 100644
--- a/arch/arm/mach-pxa/tavorevb3.c
+++ b/arch/arm/mach-pxa/tavorevb3.c
@@ -132,4 +132,5 @@ MACHINE_START(TAVOREVB3, "PXA950 Evaluation Board (aka TavorEVB3)")
 	.handle_irq       = pxa3xx_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine   = evb3_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index ef64530..dfe40f8 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -905,7 +905,7 @@ static struct platform_device *devices[] __initdata = {
 
 static void tosa_poweroff(void)
 {
-	arm_machine_restart('g', NULL);
+	pxa_restart('g', NULL);
 }
 
 static void tosa_restart(char mode, const char *cmd)
@@ -935,7 +935,6 @@ static void __init tosa_init(void)
 	init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);
 
 	pm_power_off = tosa_poweroff;
-	arm_pm_restart = tosa_restart;
 
 	PCFR |= PCFR_OPDE;
 
@@ -978,4 +977,5 @@ MACHINE_START(TOSA, "SHARP Tosa")
 	.handle_irq       = pxa25x_handle_irq,
 	.init_machine   = tosa_init,
 	.timer          = &pxa_timer,
+	.restart	= tosa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 35bbf13..55ee85a 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -560,6 +560,7 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 
 MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
@@ -570,4 +571,5 @@ MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index 242ddae..afe2b74 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -998,4 +998,5 @@ MACHINE_START(VIPER, "Arcom/Eurotech VIPER SBC")
 	.handle_irq	= pxa25x_handle_irq,
 	.timer          = &pxa_timer,
 	.init_machine	= viper_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index a7539a6..d2bd677 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -721,5 +721,6 @@ MACHINE_START(VPAC270, "Voipac PXA270")
 	.init_irq	= pxa27x_init_irq,
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
-	.init_machine	= vpac270_init
+	.init_machine	= vpac270_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
index 70e1730..4bbe9a3 100644
--- a/arch/arm/mach-pxa/xcep.c
+++ b/arch/arm/mach-pxa/xcep.c
@@ -185,5 +185,6 @@ MACHINE_START(XCEP, "Iskratel XCEP")
 	.init_irq	= pxa25x_init_irq,
 	.handle_irq	= pxa25x_handle_irq,
 	.timer		= &pxa_timer,
+	.restart	= pxa_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
index ead32c9..d75f66a 100644
--- a/arch/arm/mach-pxa/z2.c
+++ b/arch/arm/mach-pxa/z2.c
@@ -725,4 +725,5 @@ MACHINE_START(ZIPIT2, "Zipit Z2")
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= z2_init,
+	.restart	= pxa_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index 498b83b..9db35a7 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -911,5 +911,6 @@ MACHINE_START(ARCOM_ZEUS, "Arcom/Eurotech ZEUS")
 	.handle_irq	= pxa27x_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= zeus_init,
+	.restart	= pxa_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 31d4968..4e53c2d 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -429,4 +429,5 @@ MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
 	.handle_irq	= pxa3xx_handle_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= zylonite_init,
+	.restart	= pxa_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 29/41] ARM: restart: realview: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (35 preceding siblings ...)
  2011-11-06 17:49 ` [PATCH 28/41] ARM: restart: pxa: " Russell King - ARM Linux
@ 2011-11-06 17:49 ` Russell King - ARM Linux
  2011-11-06 17:50 ` [PATCH 30/41] ARM: restart: riscpc: " Russell King - ARM Linux
                   ` (16 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:49 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-realview/core.h                |    1 -
 arch/arm/mach-realview/include/mach/system.h |   13 -------------
 arch/arm/mach-realview/realview_eb.c         |    5 +++--
 arch/arm/mach-realview/realview_pb1176.c     |    5 +++--
 arch/arm/mach-realview/realview_pb11mp.c     |    5 +++--
 arch/arm/mach-realview/realview_pba8.c       |    5 +++--
 arch/arm/mach-realview/realview_pbx.c        |    5 +++--
 7 files changed, 15 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 47259c8..735b57a 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -65,6 +65,5 @@ extern int realview_usb_register(struct resource *res);
 extern void realview_init_early(void);
 extern void realview_fixup(struct tag *tags, char **from,
 			   struct meminfo *meminfo);
-extern void (*realview_reset)(char);
 
 #endif
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
index 6657ff23..1630766 100644
--- a/arch/arm/mach-realview/include/mach/system.h
+++ b/arch/arm/mach-realview/include/mach/system.h
@@ -21,12 +21,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <linux/io.h>
-#include <mach/hardware.h>
-#include <mach/platform.h>
-
-void (*realview_reset)(char mode);
-
 static inline void arch_idle(void)
 {
 	/*
@@ -38,13 +32,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/*
-	 * To reset, we hit the on-board reset register
-	 * in the system FPGA
-	 */
-	if (realview_reset)
-		realview_reset(mode);
-	dsb();
 }
 
 #endif
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 026c66a..4b79624 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -415,7 +415,7 @@ static struct sys_timer realview_eb_timer = {
 	.init		= realview_eb_timer_init,
 };
 
-static void realview_eb_reset(char mode)
+static void realview_eb_restart(char mode, const char *cmd)
 {
 	void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
 	void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -427,6 +427,7 @@ static void realview_eb_reset(char mode)
 	__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
 	if (core_tile_eb11mp())
 		__raw_writel(0x0008, reset_ctrl);
+	dsb();
 }
 
 static void __init realview_eb_init(void)
@@ -458,7 +459,6 @@ static void __init realview_eb_init(void)
 #ifdef CONFIG_LEDS
 	leds_event = realview_leds_event;
 #endif
-	realview_reset = realview_eb_reset;
 }
 
 MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
@@ -473,4 +473,5 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
 #ifdef CONFIG_ZONE_DMA
 	.dma_zone_size	= SZ_256M,
 #endif
+	.restart	= realview_eb_restart,
 MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index c057540..09e630b 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -336,12 +336,13 @@ static struct sys_timer realview_pb1176_timer = {
 	.init		= realview_pb1176_timer_init,
 };
 
-static void realview_pb1176_reset(char mode)
+static void realview_pb1176_restart(char mode, const char *cmd)
 {
 	void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
 	void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
 	__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
 	__raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl);
+	dsb();
 }
 
 static void realview_pb1176_fixup(struct tag *tags, char **from,
@@ -381,7 +382,6 @@ static void __init realview_pb1176_init(void)
 #ifdef CONFIG_LEDS
 	leds_event = realview_leds_event;
 #endif
-	realview_reset = realview_pb1176_reset;
 }
 
 MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
@@ -396,4 +396,5 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
 #ifdef CONFIG_ZONE_DMA
 	.dma_zone_size	= SZ_256M,
 #endif
+	.restart	= realview_pb1176_restart,
 MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 671ad6d..e38e85b 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -315,7 +315,7 @@ static struct sys_timer realview_pb11mp_timer = {
 	.init		= realview_pb11mp_timer_init,
 };
 
-static void realview_pb11mp_reset(char mode)
+static void realview_pb11mp_restart(char mode, const char *cmd)
 {
 	void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
 	void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -327,6 +327,7 @@ static void realview_pb11mp_reset(char mode)
 	__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
 	__raw_writel(0x0000, reset_ctrl);
 	__raw_writel(0x0004, reset_ctrl);
+	dsb();
 }
 
 static void __init realview_pb11mp_init(void)
@@ -355,7 +356,6 @@ static void __init realview_pb11mp_init(void)
 #ifdef CONFIG_LEDS
 	leds_event = realview_leds_event;
 #endif
-	realview_reset = realview_pb11mp_reset;
 }
 
 MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
@@ -370,4 +370,5 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
 #ifdef CONFIG_ZONE_DMA
 	.dma_zone_size	= SZ_256M,
 #endif
+	.restart	= realview_pb11mp_restart,
 MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index cbf22df..04d1e49 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -271,7 +271,7 @@ static struct sys_timer realview_pba8_timer = {
 	.init		= realview_pba8_timer_init,
 };
 
-static void realview_pba8_reset(char mode)
+static void realview_pba8_restart(char mode, const char *cmd)
 {
 	void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
 	void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -283,6 +283,7 @@ static void realview_pba8_reset(char mode)
 	__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
 	__raw_writel(0x0000, reset_ctrl);
 	__raw_writel(0x0004, reset_ctrl);
+	dsb();
 }
 
 static void __init realview_pba8_init(void)
@@ -305,7 +306,6 @@ static void __init realview_pba8_init(void)
 #ifdef CONFIG_LEDS
 	leds_event = realview_leds_event;
 #endif
-	realview_reset = realview_pba8_reset;
 }
 
 MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
@@ -320,4 +320,5 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
 #ifdef CONFIG_ZONE_DMA
 	.dma_zone_size	= SZ_256M,
 #endif
+	.restart	= realview_pba8_restart,
 MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 63c4114..d515452 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -339,7 +339,7 @@ static void realview_pbx_fixup(struct tag *tags, char **from,
 #endif
 }
 
-static void realview_pbx_reset(char mode)
+static void realview_pbx_restart(char mode, const char *cmd)
 {
 	void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
 	void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -351,6 +351,7 @@ static void realview_pbx_reset(char mode)
 	__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
 	__raw_writel(0x00F0, reset_ctrl);
 	__raw_writel(0x00F4, reset_ctrl);
+	dsb();
 }
 
 static void __init realview_pbx_init(void)
@@ -388,7 +389,6 @@ static void __init realview_pbx_init(void)
 #ifdef CONFIG_LEDS
 	leds_event = realview_leds_event;
 #endif
-	realview_reset = realview_pbx_reset;
 }
 
 MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
@@ -403,4 +403,5 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
 #ifdef CONFIG_ZONE_DMA
 	.dma_zone_size	= SZ_256M,
 #endif
+	.restart	= realview_pbx_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 30/41] ARM: restart: riscpc: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (36 preceding siblings ...)
  2011-11-06 17:49 ` [PATCH 29/41] ARM: restart: realview: " Russell King - ARM Linux
@ 2011-11-06 17:50 ` Russell King - ARM Linux
  2011-11-06 17:50 ` [PATCH 31/41] ARM: restart: sa1100: " Russell King - ARM Linux
                   ` (15 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hook the RiscPC restart code into the new restart hook.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-rpc/include/mach/system.h |   10 ----------
 arch/arm/mach-rpc/riscpc.c              |   12 ++++++++++++
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
index a354f4d..e9fb593 100644
--- a/arch/arm/mach-rpc/include/mach/system.h
+++ b/arch/arm/mach-rpc/include/mach/system.h
@@ -7,10 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/io.h>
-#include <mach/hardware.h>
-#include <asm/hardware/iomd.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -18,10 +14,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	iomd_writeb(0, IOMD_ROMCR0);
-
-	/*
-	 * Jump into the ROM
-	 */
-	soft_restart(0);
 }
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index 8559598..3d44a59 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -24,6 +24,7 @@
 #include <asm/elf.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
+#include <asm/hardware/iomd.h>
 #include <asm/page.h>
 #include <asm/domain.h>
 #include <asm/setup.h>
@@ -214,6 +215,16 @@ static int __init rpc_init(void)
 
 arch_initcall(rpc_init);
 
+static void rpc_restart(char mode, const char *cmd)
+{
+	iomd_writeb(0, IOMD_ROMCR0);
+
+	/*
+	 * Jump into the ROM
+	 */
+	soft_restart(0);
+}
+
 extern struct sys_timer ioc_timer;
 
 MACHINE_START(RISCPC, "Acorn-RiscPC")
@@ -224,4 +235,5 @@ MACHINE_START(RISCPC, "Acorn-RiscPC")
 	.map_io		= rpc_map_io,
 	.init_irq	= rpc_init_irq,
 	.timer		= &ioc_timer,
+	.restart	= rpc_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 31/41] ARM: restart: sa1100: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (37 preceding siblings ...)
  2011-11-06 17:50 ` [PATCH 30/41] ARM: restart: riscpc: " Russell King - ARM Linux
@ 2011-11-06 17:50 ` Russell King - ARM Linux
  2011-11-06 17:50 ` [PATCH 32/41] ARM: restart: shark: " Russell King - ARM Linux
                   ` (14 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-sa1100/assabet.c             |    1 +
 arch/arm/mach-sa1100/badge4.c              |    1 +
 arch/arm/mach-sa1100/cerf.c                |    1 +
 arch/arm/mach-sa1100/collie.c              |    1 +
 arch/arm/mach-sa1100/generic.c             |   11 +++++++++++
 arch/arm/mach-sa1100/generic.h             |    1 +
 arch/arm/mach-sa1100/h3100.c               |    1 +
 arch/arm/mach-sa1100/h3600.c               |    1 +
 arch/arm/mach-sa1100/hackkit.c             |    1 +
 arch/arm/mach-sa1100/include/mach/system.h |    9 ---------
 arch/arm/mach-sa1100/jornada720.c          |    1 +
 arch/arm/mach-sa1100/lart.c                |    1 +
 arch/arm/mach-sa1100/nanoengine.c          |    1 +
 arch/arm/mach-sa1100/pleb.c                |    1 +
 arch/arm/mach-sa1100/shannon.c             |    1 +
 arch/arm/mach-sa1100/simpad.c              |    1 +
 16 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index 3dd133f..6b93e20 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -455,4 +455,5 @@ MACHINE_START(ASSABET, "Intel-Assabet")
 #ifdef CONFIG_SA1111
 	.dma_zone_size	= SZ_1M,
 #endif
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index bda83e1..b07a2c0 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -309,4 +309,5 @@ MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4")
 #ifdef CONFIG_SA1111
 	.dma_zone_size	= SZ_1M,
 #endif
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index 7f3da4b..11bb6d0 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -139,4 +139,5 @@ MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube")
 	.init_irq	= cerf_init_irq,
 	.timer		= &sa1100_timer,
 	.init_machine	= cerf_init,
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index bd3e1bf..2428fc9 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -386,4 +386,5 @@ MACHINE_START(COLLIE, "Sharp-Collie")
 	.init_irq	= sa1100_init_irq,
 	.timer		= &sa1100_timer,
 	.init_machine	= collie_init,
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 5fa5ae1..bb10ee2 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -126,6 +126,17 @@ static void sa1100_power_off(void)
 	PMCR = PMCR_SF;
 }
 
+void sa11x0_restart(char mode, const char *cmd)
+{
+	if (mode == 's') {
+		/* Jump into ROM at address 0 */
+		soft_restart(0);
+	} else {
+		/* Use on-chip reset capability */
+		RSRR = RSRR_SWR;
+	}
+}
+
 static void sa11x0_register_device(struct platform_device *dev, void *data)
 {
 	int err;
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index b7a9a60..33268cf 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -10,6 +10,7 @@ extern struct sys_timer sa1100_timer;
 extern void __init sa1100_map_io(void);
 extern void __init sa1100_init_irq(void);
 extern void __init sa1100_init_gpio(void);
+extern void sa11x0_restart(char, const char *);
 
 #define SET_BANK(__nr,__start,__size) \
 	mi->bank[__nr].start = (__start), \
diff --git a/arch/arm/mach-sa1100/h3100.c b/arch/arm/mach-sa1100/h3100.c
index b30733a..1e6b3c1 100644
--- a/arch/arm/mach-sa1100/h3100.c
+++ b/arch/arm/mach-sa1100/h3100.c
@@ -89,5 +89,6 @@ MACHINE_START(H3100, "Compaq iPAQ H3100")
 	.init_irq	= sa1100_init_irq,
 	.timer		= &sa1100_timer,
 	.init_machine	= h3100_mach_init,
+	.restart	= sa11x0_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 6fd324d..6b58e74 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -130,5 +130,6 @@ MACHINE_START(H3600, "Compaq iPAQ H3600")
 	.init_irq	= sa1100_init_irq,
 	.timer		= &sa1100_timer,
 	.init_machine	= h3600_mach_init,
+	.restart	= sa11x0_restart,
 MACHINE_END
 
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c
index 30f4a55..c01bb36 100644
--- a/arch/arm/mach-sa1100/hackkit.c
+++ b/arch/arm/mach-sa1100/hackkit.c
@@ -200,4 +200,5 @@ MACHINE_START(HACKKIT, "HackKit Cpu Board")
 	.init_irq	= sa1100_init_irq,
 	.timer		= &sa1100_timer,
 	.init_machine	= hackkit_init,
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
index 345d35b..3c3e842 100644
--- a/arch/arm/mach-sa1100/include/mach/system.h
+++ b/arch/arm/mach-sa1100/include/mach/system.h
@@ -3,8 +3,6 @@
  *
  * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
  */
-#include <mach/hardware.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -12,11 +10,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	if (mode == 's') {
-		/* Jump into ROM at address 0 */
-		soft_restart(0);
-	} else {
-		/* Use on-chip reset capability */
-		RSRR = RSRR_SWR;
-	}
 }
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index 0bb520d..065aada 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -372,4 +372,5 @@ MACHINE_START(JORNADA720, "HP Jornada 720")
 #ifdef CONFIG_SA1111
 	.dma_zone_size	= SZ_1M,
 #endif
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c
index 5bc59d0..af4e276 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -66,4 +66,5 @@ MACHINE_START(LART, "LART")
 	.init_irq	= sa1100_init_irq,
 	.init_machine	= lart_init,
 	.timer		= &sa1100_timer,
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/nanoengine.c b/arch/arm/mach-sa1100/nanoengine.c
index 032f388..ed77f85 100644
--- a/arch/arm/mach-sa1100/nanoengine.c
+++ b/arch/arm/mach-sa1100/nanoengine.c
@@ -116,4 +116,5 @@ MACHINE_START(NANOENGINE, "BSE nanoEngine")
 	.init_irq	= sa1100_init_irq,
 	.timer		= &sa1100_timer,
 	.init_machine	= nanoengine_init,
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 65161f2..9307df0 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -150,4 +150,5 @@ MACHINE_START(PLEB, "PLEB")
 	.init_irq	= sa1100_init_irq,
 	.timer		= &sa1100_timer,
 	.init_machine   = pleb_init,
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index 1cccbf5..318b2b7 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -87,4 +87,5 @@ MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)")
 	.init_irq	= sa1100_init_irq,
 	.timer		= &sa1100_timer,
 	.init_machine	= shannon_init,
+	.restart	= sa11x0_restart,
 MACHINE_END
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index 4790f3f..e17c04d 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -396,4 +396,5 @@ MACHINE_START(SIMPAD, "Simpad")
 	.map_io		= simpad_map_io,
 	.init_irq	= sa1100_init_irq,
 	.timer		= &sa1100_timer,
+	.restart	= sa11x0_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 32/41] ARM: restart: shark: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (38 preceding siblings ...)
  2011-11-06 17:50 ` [PATCH 31/41] ARM: restart: sa1100: " Russell King - ARM Linux
@ 2011-11-06 17:50 ` Russell King - ARM Linux
  2011-11-06 17:51 ` [PATCH 33/41] ARM: restart: spear: " Russell King - ARM Linux
                   ` (13 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hook the Shark restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-shark/core.c                |    3 ++-
 arch/arm/mach-shark/include/mach/system.h |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index f4b25d8..a851c25 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -26,7 +26,7 @@
 #define ROMCARD_SIZE            0x08000000
 #define ROMCARD_START           0x10000000
 
-void arch_reset(char mode, const char *cmd)
+static void shark_restart(char mode, const char *cmd)
 {
         short temp;
         /* Reset the Machine via pc[3] of the sequoia chipset */
@@ -156,4 +156,5 @@ MACHINE_START(SHARK, "Shark")
 	.init_irq	= shark_init_irq,
 	.timer		= &shark_timer,
 	.dma_zone_size	= SZ_4M,
+	.restart	= shark_restart,
 MACHINE_END
diff --git a/arch/arm/mach-shark/include/mach/system.h b/arch/arm/mach-shark/include/mach/system.h
index 21c373b..2cc363a 100644
--- a/arch/arm/mach-shark/include/mach/system.h
+++ b/arch/arm/mach-shark/include/mach/system.h
@@ -6,8 +6,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-/* Found in arch/mach-shark/core.c */
-extern void arch_reset(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 static inline void arch_idle(void)
 {
-- 
1.7.4.4

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

* [PATCH 33/41] ARM: restart: spear: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (39 preceding siblings ...)
  2011-11-06 17:50 ` [PATCH 32/41] ARM: restart: shark: " Russell King - ARM Linux
@ 2011-11-06 17:51 ` Russell King - ARM Linux
  2011-11-24 20:32   ` Russell King - ARM Linux
  2011-11-06 17:51 ` [PATCH 34/41] ARM: restart: tegra: " Russell King - ARM Linux
                   ` (12 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-spear3xx/include/mach/generic.h |    2 +
 arch/arm/mach-spear3xx/spear300_evb.c         |    1 +
 arch/arm/mach-spear3xx/spear310_evb.c         |    1 +
 arch/arm/mach-spear3xx/spear320_evb.c         |    1 +
 arch/arm/mach-spear6xx/include/mach/generic.h |    2 +
 arch/arm/mach-spear6xx/spear600_evb.c         |    1 +
 arch/arm/plat-spear/Makefile                  |    2 +-
 arch/arm/plat-spear/include/plat/system.h     |   11 ----------
 arch/arm/plat-spear/restart.c                 |   27 +++++++++++++++++++++++++
 9 files changed, 36 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/plat-spear/restart.c

diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
index b8f31c3..14276e5 100644
--- a/arch/arm/mach-spear3xx/include/mach/generic.h
+++ b/arch/arm/mach-spear3xx/include/mach/generic.h
@@ -42,6 +42,8 @@ void __init spear3xx_map_io(void);
 void __init spear3xx_init_irq(void);
 void __init spear3xx_init(void);
 
+void spear_restart(char, const char *);
+
 /* pad mux declarations */
 #define PMX_FIRDA_MASK		(1 << 14)
 #define PMX_I2C_MASK		(1 << 13)
diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c
index a5ff98e..8b429f0 100644
--- a/arch/arm/mach-spear3xx/spear300_evb.c
+++ b/arch/arm/mach-spear3xx/spear300_evb.c
@@ -69,4 +69,5 @@ MACHINE_START(SPEAR300, "ST-SPEAR300-EVB")
 	.init_irq	=	spear3xx_init_irq,
 	.timer		=	&spear3xx_timer,
 	.init_machine	=	spear300_evb_init,
+	.restart	=	spear_restart,
 MACHINE_END
diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c
index 45d180d..a11d6ea 100644
--- a/arch/arm/mach-spear3xx/spear310_evb.c
+++ b/arch/arm/mach-spear3xx/spear310_evb.c
@@ -75,4 +75,5 @@ MACHINE_START(SPEAR310, "ST-SPEAR310-EVB")
 	.init_irq	=	spear3xx_init_irq,
 	.timer		=	&spear3xx_timer,
 	.init_machine	=	spear310_evb_init,
+	.restart	=	spear_restart,
 MACHINE_END
diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c
index 2287984..4239a70 100644
--- a/arch/arm/mach-spear3xx/spear320_evb.c
+++ b/arch/arm/mach-spear3xx/spear320_evb.c
@@ -73,4 +73,5 @@ MACHINE_START(SPEAR320, "ST-SPEAR320-EVB")
 	.init_irq	=	spear3xx_init_irq,
 	.timer		=	&spear3xx_timer,
 	.init_machine	=	spear320_evb_init,
+	.restart	=	spear_restart,
 MACHINE_END
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h
index 183f023..116b993 100644
--- a/arch/arm/mach-spear6xx/include/mach/generic.h
+++ b/arch/arm/mach-spear6xx/include/mach/generic.h
@@ -41,6 +41,8 @@ void __init spear6xx_init(void);
 void __init spear600_init(void);
 void __init spear6xx_clk_init(void);
 
+void spear_restart(char, const char *);
+
 /* Add spear600 machine device structure declarations here */
 
 #endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c
index 8238fe3..0a16559 100644
--- a/arch/arm/mach-spear6xx/spear600_evb.c
+++ b/arch/arm/mach-spear6xx/spear600_evb.c
@@ -48,4 +48,5 @@ MACHINE_START(SPEAR600, "ST-SPEAR600-EVB")
 	.init_irq	=	spear6xx_init_irq,
 	.timer		=	&spear6xx_timer,
 	.init_machine	=	spear600_evb_init,
+	.restart	=	spear_restart,
 MACHINE_END
diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile
index b4f340b..e0f2e5b 100644
--- a/arch/arm/plat-spear/Makefile
+++ b/arch/arm/plat-spear/Makefile
@@ -3,6 +3,6 @@
 #
 
 # Common support
-obj-y	:= clock.o time.o
+obj-y	:= clock.o restart.o time.o
 
 obj-$(CONFIG_ARCH_SPEAR3XX)	+= shirq.o padmux.o
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
index 1171f22..4a0d125 100644
--- a/arch/arm/plat-spear/include/plat/system.h
+++ b/arch/arm/plat-spear/include/plat/system.h
@@ -14,10 +14,6 @@
 #ifndef __PLAT_SYSTEM_H
 #define __PLAT_SYSTEM_H
 
-#include <linux/io.h>
-#include <asm/hardware/sp810.h>
-#include <mach/hardware.h>
-
 static inline void arch_idle(void)
 {
 	/*
@@ -29,13 +25,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	if (mode == 's') {
-		/* software reset, Jump into ROM at address 0 */
-		soft_restart(0);
-	} else {
-		/* hardware reset, Use on-chip reset capability */
-		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
-	}
 }
 
 #endif /* __PLAT_SYSTEM_H */
diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c
new file mode 100644
index 0000000..2b4e3d8
--- /dev/null
+++ b/arch/arm/plat-spear/restart.c
@@ -0,0 +1,27 @@
+/*
+ * arch/arm/plat-spear/restart.c
+ *
+ * SPEAr platform specific restart functions
+ *
+ * Copyright (C) 2009 ST Microelectronics
+ * Viresh Kumar<viresh.kumar@st.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#include <linux/io.h>
+#include <asm/hardware/sp810.h>
+#include <mach/hardware.h>
+#include <mach/generic.h>
+
+void spear_restart(char mode, const char *cmd)
+{
+	if (mode == 's') {
+		/* software reset, Jump into ROM at address 0 */
+		soft_restart(0);
+	} else {
+		/* hardware reset, Use on-chip reset capability */
+		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
+	}
+}
-- 
1.7.4.4

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

* [PATCH 34/41] ARM: restart: tegra: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (40 preceding siblings ...)
  2011-11-06 17:51 ` [PATCH 33/41] ARM: restart: spear: " Russell King - ARM Linux
@ 2011-11-06 17:51 ` Russell King - ARM Linux
  2011-11-06 17:51 ` [PATCH 35/41] ARM: restart: u300: " Russell King - ARM Linux
                   ` (11 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the arm_pm_restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-tegra/common.c              |    5 ++---
 arch/arm/mach-tegra/include/mach/system.h |    6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 690b888..1374d10 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -31,9 +31,7 @@
 #include "clock.h"
 #include "fuse.h"
 
-void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset;
-
-void tegra_assert_system_reset(char mode, const char *cmd)
+static void tegra_assert_system_reset(char mode, const char *cmd)
 {
 	void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
 	u32 reg;
@@ -76,6 +74,7 @@ static void __init tegra_init_cache(void)
 
 void __init tegra_init_early(void)
 {
+	arm_pm_restart = tegra_assert_system_reset;
 	tegra_init_fuse();
 	tegra_init_clock();
 	tegra_clk_init_from_table(common_clk_init_table);
diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h
index 027c421..b87b8a4 100644
--- a/arch/arm/mach-tegra/include/mach/system.h
+++ b/arch/arm/mach-tegra/include/mach/system.h
@@ -21,9 +21,9 @@
 #ifndef __MACH_TEGRA_SYSTEM_H
 #define __MACH_TEGRA_SYSTEM_H
 
-#include <mach/iomap.h>
-
-extern void (*arch_reset)(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 static inline void arch_idle(void)
 {
-- 
1.7.4.4

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

* [PATCH 35/41] ARM: restart: u300: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (41 preceding siblings ...)
  2011-11-06 17:51 ` [PATCH 34/41] ARM: restart: tegra: " Russell King - ARM Linux
@ 2011-11-06 17:51 ` Russell King - ARM Linux
  2011-11-07  8:10   ` Linus Walleij
  2011-11-06 17:52 ` [PATCH 36/41] ARM: restart: versatile: " Russell King - ARM Linux
                   ` (10 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-u300/core.c                  |   21 +++++++++++++++++++++
 arch/arm/mach-u300/include/mach/platform.h |    1 +
 arch/arm/mach-u300/include/mach/system.h   |   24 +-----------------------
 arch/arm/mach-u300/u300.c                  |    1 +
 4 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index ac0791e..27be5a7 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -1888,3 +1888,24 @@ static int core_module_init(void)
 	return mmc_init(&mmcsd_device);
 }
 module_init(core_module_init);
+
+/* Forward declare this function from the watchdog */
+void coh901327_watchdog_reset(void);
+
+void u300_restart(char mode, const char *cmd)
+{
+	switch (mode) {
+	case 's':
+	case 'h':
+		printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
+#ifdef CONFIG_COH901327_WATCHDOG
+		coh901327_watchdog_reset();
+#endif
+		break;
+	default:
+		/* Do nothing */
+		break;
+	}
+	/* Wait for system do die/reset. */
+	while (1);
+}
diff --git a/arch/arm/mach-u300/include/mach/platform.h b/arch/arm/mach-u300/include/mach/platform.h
index 77d9210..096333f 100644
--- a/arch/arm/mach-u300/include/mach/platform.h
+++ b/arch/arm/mach-u300/include/mach/platform.h
@@ -14,6 +14,7 @@
 void u300_map_io(void);
 void u300_init_irq(void);
 void u300_init_devices(void);
+void u300_restart(char, const char *);
 extern struct sys_timer u300_timer;
 
 #endif
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
index 6b6fef7..0ddf3cd 100644
--- a/arch/arm/mach-u300/include/mach/system.h
+++ b/arch/arm/mach-u300/include/mach/system.h
@@ -8,33 +8,11 @@
  * System shutdown and reset functions.
  * Author: Linus Walleij <linus.walleij@stericsson.com>
  */
-#include <mach/hardware.h>
-#include <asm/io.h>
-#include <asm/hardware/vic.h>
-#include <asm/irq.h>
-
-/* Forward declare this function from the watchdog */
-void coh901327_watchdog_reset(void);
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
 
-static void arch_reset(char mode, const char *cmd)
+static inline void arch_reset(char mode, const char *cmd)
 {
-	switch (mode) {
-	case 's':
-	case 'h':
-		printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
-#ifdef CONFIG_COH901327_WATCHDOG
-		coh901327_watchdog_reset();
-#endif
-		break;
-	default:
-		/* Do nothing */
-		break;
-	}
-	/* Wait for system do die/reset. */
-	while (1);
 }
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
index 89422ee..a75c9b8 100644
--- a/arch/arm/mach-u300/u300.c
+++ b/arch/arm/mach-u300/u300.c
@@ -51,4 +51,5 @@ MACHINE_START(U300, MACH_U300_STRING)
 	.init_irq	= u300_init_irq,
 	.timer		= &u300_timer,
 	.init_machine	= u300_init_machine,
+	.restart	= u300_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 36/41] ARM: restart: versatile: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (42 preceding siblings ...)
  2011-11-06 17:51 ` [PATCH 35/41] ARM: restart: u300: " Russell King - ARM Linux
@ 2011-11-06 17:52 ` Russell King - ARM Linux
  2011-11-06 17:52 ` [PATCH 37/41] ARM: restart: Versatile Express: " Russell King - ARM Linux
                   ` (9 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-versatile/core.c                |   13 +++++++++++++
 arch/arm/mach-versatile/core.h                |    1 +
 arch/arm/mach-versatile/include/mach/system.h |   12 ------------
 arch/arm/mach-versatile/versatile_ab.c        |    1 +
 arch/arm/mach-versatile/versatile_dt.c        |    1 +
 arch/arm/mach-versatile/versatile_pb.c        |    1 +
 6 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index e340a54..b7a6a4b 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -745,6 +745,19 @@ static void versatile_leds_event(led_event_t ledevt)
 }
 #endif	/* CONFIG_LEDS */
 
+void versatile_restart(char mode, const char *cmd)
+{
+	void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
+	u32 val;
+
+	val = __raw_readl(sys + VERSATILE_SYS_RESETCTL_OFFSET);
+	val |= 0x105;
+
+	__raw_writel(0xa05f, sys + VERSATILE_SYS_LOCK_OFFSET);
+	__raw_writel(val, sys + VERSATILE_SYS_RESETCTL_OFFSET);
+	__raw_writel(0, sys + VERSATILE_SYS_LOCK_OFFSET);
+}
+
 /* Early initializations */
 void __init versatile_init_early(void)
 {
diff --git a/arch/arm/mach-versatile/core.h b/arch/arm/mach-versatile/core.h
index e014227..2ef2f55 100644
--- a/arch/arm/mach-versatile/core.h
+++ b/arch/arm/mach-versatile/core.h
@@ -30,6 +30,7 @@ extern void __init versatile_init_early(void);
 extern void __init versatile_init_irq(void);
 extern void __init versatile_map_io(void);
 extern struct sys_timer versatile_timer;
+extern void versatile_restart(char, const char *);
 extern unsigned int mmc_status(struct device *dev);
 #ifdef CONFIG_OF
 extern struct of_dev_auxdata versatile_auxdata_lookup[];
diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
index 8ffc12a..335946a 100644
--- a/arch/arm/mach-versatile/include/mach/system.h
+++ b/arch/arm/mach-versatile/include/mach/system.h
@@ -21,10 +21,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <linux/io.h>
-#include <mach/hardware.h>
-#include <mach/platform.h>
-
 static inline void arch_idle(void)
 {
 	/*
@@ -36,14 +32,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	u32 val;
-
-	val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7;
-	val |= 0x105;
-
-	__raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK));
-	__raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL));
-	__raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK));
 }
 
 #endif
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c
index fda4866..f1277ac 100644
--- a/arch/arm/mach-versatile/versatile_ab.c
+++ b/arch/arm/mach-versatile/versatile_ab.c
@@ -41,4 +41,5 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
 	.init_irq	= versatile_init_irq,
 	.timer		= &versatile_timer,
 	.init_machine	= versatile_init,
+	.restart	= versatile_restart,
 MACHINE_END
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index 54e037c..f48f2e4 100644
--- a/arch/arm/mach-versatile/versatile_dt.c
+++ b/arch/arm/mach-versatile/versatile_dt.c
@@ -48,4 +48,5 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)")
 	.timer		= &versatile_timer,
 	.init_machine	= versatile_dt_init,
 	.dt_compat	= versatile_dt_match,
+	.restart	= versatile_restart,
 MACHINE_END
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index feaf9cb..839bea6 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -109,4 +109,5 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
 	.init_irq	= versatile_init_irq,
 	.timer		= &versatile_timer,
 	.init_machine	= versatile_pb_init,
+	.restart	= versatile_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 37/41] ARM: restart: Versatile Express: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (43 preceding siblings ...)
  2011-11-06 17:52 ` [PATCH 36/41] ARM: restart: versatile: " Russell King - ARM Linux
@ 2011-11-06 17:52 ` Russell King - ARM Linux
  2011-11-06 17:52 ` [PATCH 38/41] ARM: restart: w90x900: " Russell King - ARM Linux
                   ` (8 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hook the Versatile Express platform restart code into the new restart
hook.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-vexpress/v2m.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 1fafc32..b9a465b 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -437,7 +437,6 @@ static void __init v2m_init(void)
 		amba_device_register(v2m_amba_devs[i], &iomem_resource);
 
 	pm_power_off = v2m_power_off;
-	arm_pm_restart = v2m_restart;
 
 	ct_desc->init_tile();
 }
@@ -449,4 +448,5 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express")
 	.init_irq	= v2m_init_irq,
 	.timer		= &v2m_timer,
 	.init_machine	= v2m_init,
+	.restart	= v2m_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 38/41] ARM: restart: w90x900: use new restart hook
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (44 preceding siblings ...)
  2011-11-06 17:52 ` [PATCH 37/41] ARM: restart: Versatile Express: " Russell King - ARM Linux
@ 2011-11-06 17:52 ` Russell King - ARM Linux
  2011-11-07 17:16   ` Russell King - ARM Linux
  2011-11-06 17:53 ` [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk Russell King - ARM Linux
                   ` (7 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-w90x900/cpu.c                 |   15 +++++++++++++++
 arch/arm/mach-w90x900/cpu.h                 |    1 +
 arch/arm/mach-w90x900/include/mach/system.h |   17 -----------------
 arch/arm/mach-w90x900/mach-nuc910evb.c      |    1 +
 arch/arm/mach-w90x900/mach-nuc950evb.c      |    1 +
 arch/arm/mach-w90x900/mach-nuc960evb.c      |    1 +
 6 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c
index 0a235e5..07eddd7 100644
--- a/arch/arm/mach-w90x900/cpu.c
+++ b/arch/arm/mach-w90x900/cpu.c
@@ -33,6 +33,7 @@
 #include <mach/regs-serial.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-ebi.h>
+#include <mach/regs-timer.h>
 
 #include "cpu.h"
 #include "clock.h"
@@ -222,3 +223,17 @@ void __init nuc900_init_clocks(void)
 	clkdev_add_table(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs));
 }
 
+#define	WTCR	(TMR_BA + 0x1C)
+#define	WTCLK	(1 << 10)
+#define	WTE	(1 << 7)
+#define	WTRE	(1 << 1)
+
+void nuc900_restart(char mode, const char *cmd)
+{
+	if (mode == 's') {
+		/* Jump into ROM@address 0 */
+		soft_restart(0);
+	} else {
+		__raw_writel(WTE | WTRE | WTCLK, WTCR);
+	}
+}
diff --git a/arch/arm/mach-w90x900/cpu.h b/arch/arm/mach-w90x900/cpu.h
index f8730b6..b56799d 100644
--- a/arch/arm/mach-w90x900/cpu.h
+++ b/arch/arm/mach-w90x900/cpu.h
@@ -49,6 +49,7 @@ extern void nuc900_clock_source(struct device *dev, unsigned char *src);
 extern void nuc900_init_clocks(void);
 extern void nuc900_map_io(struct map_desc *mach_desc, int mach_size);
 extern void nuc900_board_init(struct platform_device **device, int size);
+extern void nuc900_restart(char, const char *);
 
 /* for either public between 910 and 920, or between 920 and 950 */
 
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
index 68875a1..001a2f9 100644
--- a/arch/arm/mach-w90x900/include/mach/system.h
+++ b/arch/arm/mach-w90x900/include/mach/system.h
@@ -14,28 +14,11 @@
  * (at your option) any later version.
  *
  */
-
-#include <linux/io.h>
-#include <asm/proc-fns.h>
-#include <mach/map.h>
-#include <mach/regs-timer.h>
-
-#define	WTCR	(TMR_BA + 0x1C)
-#define	WTCLK	(1 << 10)
-#define	WTE	(1 << 7)
-#define	WTRE	(1 << 1)
-
 static void arch_idle(void)
 {
 }
 
 static void arch_reset(char mode, const char *cmd)
 {
-	if (mode == 's') {
-		/* Jump into ROM@address 0 */
-		soft_restart(0);
-	} else {
-		__raw_writel(WTE | WTRE | WTCLK, WTCR);
-	}
 }
 
diff --git a/arch/arm/mach-w90x900/mach-nuc910evb.c b/arch/arm/mach-w90x900/mach-nuc910evb.c
index 31c1090..10852dc 100644
--- a/arch/arm/mach-w90x900/mach-nuc910evb.c
+++ b/arch/arm/mach-w90x900/mach-nuc910evb.c
@@ -38,4 +38,5 @@ MACHINE_START(W90P910EVB, "W90P910EVB")
 	.init_irq	= nuc900_init_irq,
 	.init_machine	= nuc910evb_init,
 	.timer		= &nuc900_timer,
+	.restart	= nuc900_restart,
 MACHINE_END
diff --git a/arch/arm/mach-w90x900/mach-nuc950evb.c b/arch/arm/mach-w90x900/mach-nuc950evb.c
index 4062e55..b549967 100644
--- a/arch/arm/mach-w90x900/mach-nuc950evb.c
+++ b/arch/arm/mach-w90x900/mach-nuc950evb.c
@@ -41,4 +41,5 @@ MACHINE_START(W90P950EVB, "W90P950EVB")
 	.init_irq	= nuc900_init_irq,
 	.init_machine	= nuc950evb_init,
 	.timer		= &nuc900_timer,
+	.restart	= nuc900_restart,
 MACHINE_END
diff --git a/arch/arm/mach-w90x900/mach-nuc960evb.c b/arch/arm/mach-w90x900/mach-nuc960evb.c
index 0ab9995..1ea5acf 100644
--- a/arch/arm/mach-w90x900/mach-nuc960evb.c
+++ b/arch/arm/mach-w90x900/mach-nuc960evb.c
@@ -38,4 +38,5 @@ MACHINE_START(W90N960EVB, "W90N960EVB")
 	.init_irq	= nuc900_init_irq,
 	.init_machine	= nuc960evb_init,
 	.timer		= &nuc900_timer,
+	.restart	= nuc900_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (45 preceding siblings ...)
  2011-11-06 17:52 ` [PATCH 38/41] ARM: restart: w90x900: " Russell King - ARM Linux
@ 2011-11-06 17:53 ` Russell King - ARM Linux
  2011-11-11 18:46   ` Linus Walleij
  2011-11-06 17:53 ` [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset() Russell King - ARM Linux
                   ` (6 subsequent siblings)
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the:
	KERN_CRIT "RESET: Rebooting system\n" (lpc32xx)
	KERN_CRIT "RESET: shutting down/rebooting system\n" (u300)

printk from the restart handler; we already print such a message from
kernel_restart() in kernel/sys.c:

	KERN_EMERG "Restarting system.\n"

so this is unnecessary.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-lpc32xx/common.c |    2 --
 arch/arm/mach-u300/core.c      |    1 -
 2 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c
index b049fd1..369b152 100644
--- a/arch/arm/mach-lpc32xx/common.c
+++ b/arch/arm/mach-lpc32xx/common.c
@@ -317,8 +317,6 @@ void lpc23xx_restart(char mode, const char *cmd)
 	switch (mode) {
 	case 's':
 	case 'h':
-		printk(KERN_CRIT "RESET: Rebooting system\n");
-
 		lpc32xx_watchdog_reset();
 		break;
 
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 27be5a7..6979307 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -1897,7 +1897,6 @@ void u300_restart(char mode, const char *cmd)
 	switch (mode) {
 	case 's':
 	case 'h':
-		printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
 #ifdef CONFIG_COH901327_WATCHDOG
 		coh901327_watchdog_reset();
 #endif
-- 
1.7.4.4

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

* [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset()
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (46 preceding siblings ...)
  2011-11-06 17:53 ` [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk Russell King - ARM Linux
@ 2011-11-06 17:53 ` Russell King - ARM Linux
  2011-11-07  2:59   ` Nicolas Pitre
                     ` (2 more replies)
  2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
                   ` (5 subsequent siblings)
  53 siblings, 3 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

arch_reset() is deprecated; systems should hook into system restart via
the 'restart' method in the platforms machine description record.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-msm/include/mach/system.h       |    4 ----
 arch/arm/mach-picoxcell/include/mach/system.h |    1 -
 arch/arm/mach-ux500/include/mach/system.h     |    1 -
 arch/arm/mach-zynq/include/mach/system.h      |    1 -
 4 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-msm/include/mach/system.h b/arch/arm/mach-msm/include/mach/system.h
index d2e83f4..e180e8b 100644
--- a/arch/arm/mach-msm/include/mach/system.h
+++ b/arch/arm/mach-msm/include/mach/system.h
@@ -12,14 +12,10 @@
  * GNU General Public License for more details.
  *
  */
-
-#include <mach/hardware.h>
-
 void arch_idle(void);
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	for (;;) ;  /* depends on IPC w/ other core */
 }
 
 /* low level hardware reset hook -- for example, hitting the
diff --git a/arch/arm/mach-picoxcell/include/mach/system.h b/arch/arm/mach-picoxcell/include/mach/system.h
index 67c589b..a12da63 100644
--- a/arch/arm/mach-picoxcell/include/mach/system.h
+++ b/arch/arm/mach-picoxcell/include/mach/system.h
@@ -25,7 +25,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(int mode, const char *cmd)
 {
-	/* Watchdog reset to go here. */
 }
 
 #endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-ux500/include/mach/system.h b/arch/arm/mach-ux500/include/mach/system.h
index c0cd800..ae1dff1 100644
--- a/arch/arm/mach-ux500/include/mach/system.h
+++ b/arch/arm/mach-ux500/include/mach/system.h
@@ -19,7 +19,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/* yet to be implemented - TODO */
 }
 
 #endif
diff --git a/arch/arm/mach-zynq/include/mach/system.h b/arch/arm/mach-zynq/include/mach/system.h
index 1b84d70..34be7ed 100644
--- a/arch/arm/mach-zynq/include/mach/system.h
+++ b/arch/arm/mach-zynq/include/mach/system.h
@@ -22,7 +22,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	/* Add architecture specific reset processing here */
 }
 
 #endif
-- 
1.7.4.4

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

* [PATCH 41/41] ARM: restart: remove the now empty arch_reset()
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (47 preceding siblings ...)
  2011-11-06 17:53 ` [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset() Russell King - ARM Linux
@ 2011-11-06 17:53 ` Russell King - ARM Linux
  2011-11-07  3:02   ` Nicolas Pitre
                     ` (4 more replies)
  2011-11-07  2:48 ` [01: PATCH 0/7] Preparation for arch_reset changes Nicolas Pitre
                   ` (4 subsequent siblings)
  53 siblings, 5 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the now empty arch_reset() from all the mach/system.h includes,
and remove its callsite.  Remove arm_machine_restart() as this function
no longer does anything useful.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/include/asm/system.h                  |    1 -
 arch/arm/kernel/process.c                      |   10 ++--------
 arch/arm/mach-at91/include/mach/system.h       |    4 ----
 arch/arm/mach-clps711x/include/mach/system.h   |    4 ----
 arch/arm/mach-cns3xxx/include/mach/system.h    |    4 ----
 arch/arm/mach-dove/include/mach/system.h       |    5 -----
 arch/arm/mach-ebsa110/include/mach/system.h    |    4 ----
 arch/arm/mach-ep93xx/include/mach/system.h     |    4 ----
 arch/arm/mach-footbridge/include/mach/system.h |    4 ----
 arch/arm/mach-h720x/include/mach/system.h      |    4 ----
 arch/arm/mach-highbank/include/mach/system.h   |    4 ----
 arch/arm/mach-integrator/include/mach/system.h |    4 ----
 arch/arm/mach-iop13xx/include/mach/system.h    |    4 ----
 arch/arm/mach-iop32x/include/mach/system.h     |    4 ----
 arch/arm/mach-iop33x/include/mach/system.h     |    4 ----
 arch/arm/mach-ixp2000/include/mach/system.h    |    4 ----
 arch/arm/mach-ixp23xx/include/mach/system.h    |    4 ----
 arch/arm/mach-ixp4xx/include/mach/system.h     |    4 ----
 arch/arm/mach-kirkwood/include/mach/system.h   |    4 ----
 arch/arm/mach-lpc32xx/include/mach/system.h    |    4 ----
 arch/arm/mach-mmp/include/mach/system.h        |    4 ----
 arch/arm/mach-msm/include/mach/system.h        |    4 ----
 arch/arm/mach-mv78xx0/include/mach/system.h    |    5 -----
 arch/arm/mach-mxs/include/mach/system.h        |    4 ----
 arch/arm/mach-orion5x/include/mach/system.h    |    4 ----
 arch/arm/mach-picoxcell/include/mach/system.h  |    4 ----
 arch/arm/mach-pnx4008/include/mach/system.h    |    4 ----
 arch/arm/mach-prima2/include/mach/system.h     |    4 ----
 arch/arm/mach-pxa/include/mach/system.h        |    4 ----
 arch/arm/mach-realview/include/mach/system.h   |    4 ----
 arch/arm/mach-rpc/include/mach/system.h        |    4 ----
 arch/arm/mach-sa1100/include/mach/system.h     |    4 ----
 arch/arm/mach-shark/include/mach/system.h      |    4 ----
 arch/arm/mach-tegra/include/mach/system.h      |    4 ----
 arch/arm/mach-u300/include/mach/system.h       |    4 ----
 arch/arm/mach-ux500/include/mach/system.h      |    4 ----
 arch/arm/mach-versatile/include/mach/system.h  |    4 ----
 arch/arm/mach-vexpress/include/mach/system.h   |    4 ----
 arch/arm/mach-w90x900/include/mach/system.h    |    5 -----
 arch/arm/mach-zynq/include/mach/system.h       |    4 ----
 arch/arm/plat-mxc/include/mach/system.h        |    4 ----
 arch/arm/plat-spear/include/plat/system.h      |    4 ----
 42 files changed, 2 insertions(+), 172 deletions(-)

diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index fe7de75..03775b1 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -100,7 +100,6 @@ extern void __show_regs(struct pt_regs *);
 extern int __pure cpu_architecture(void);
 extern void cpu_init(void);
 
-void arm_machine_restart(char mode, const char *cmd);
 void soft_restart(unsigned long);
 extern void (*arm_pm_restart)(char str, const char *cmd);
 
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 52b4306..72e119f 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -117,14 +117,8 @@ void soft_restart(unsigned long addr)
 	cpu_reset(addr);
 }
 
-void arm_machine_restart(char mode, const char *cmd)
+static void null_restart(char mode, const char *cmd)
 {
-	/* Disable interrupts first */
-	local_irq_disable();
-	local_fiq_disable();
-
-	/* Call the architecture specific reboot code. */
-	arch_reset(mode, cmd);
 }
 
 /*
@@ -133,7 +127,7 @@ void arm_machine_restart(char mode, const char *cmd)
 void (*pm_power_off)(void);
 EXPORT_SYMBOL(pm_power_off);
 
-void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
+void (*arm_pm_restart)(char str, const char *cmd) = null_restart;
 EXPORT_SYMBOL_GPL(arm_pm_restart);
 
 static void do_nothing(void *unused)
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
index 079eb12..cbd64f3 100644
--- a/arch/arm/mach-at91/include/mach/system.h
+++ b/arch/arm/mach-at91/include/mach/system.h
@@ -47,8 +47,4 @@ static inline void arch_idle(void)
 #endif
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
index 9982deb..23d6ef8 100644
--- a/arch/arm/mach-clps711x/include/mach/system.h
+++ b/arch/arm/mach-clps711x/include/mach/system.h
@@ -32,8 +32,4 @@ static inline void arch_idle(void)
 	mov	r0, r0");
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h
index f92540d..9e56b7d 100644
--- a/arch/arm/mach-cns3xxx/include/mach/system.h
+++ b/arch/arm/mach-cns3xxx/include/mach/system.h
@@ -22,8 +22,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-dove/include/mach/system.h b/arch/arm/mach-dove/include/mach/system.h
index 25a3a65..3027954 100644
--- a/arch/arm/mach-dove/include/mach/system.h
+++ b/arch/arm/mach-dove/include/mach/system.h
@@ -14,9 +14,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
-
 #endif
diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
index 574e633..2e4af65 100644
--- a/arch/arm/mach-ebsa110/include/mach/system.h
+++ b/arch/arm/mach-ebsa110/include/mach/system.h
@@ -34,8 +34,4 @@ static inline void arch_idle(void)
 	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
index b27a654..b5bec7c 100644
--- a/arch/arm/mach-ep93xx/include/mach/system.h
+++ b/arch/arm/mach-ep93xx/include/mach/system.h
@@ -5,7 +5,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
index 794a02c..a174a58 100644
--- a/arch/arm/mach-footbridge/include/mach/system.h
+++ b/arch/arm/mach-footbridge/include/mach/system.h
@@ -11,7 +11,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-h720x/include/mach/system.h b/arch/arm/mach-h720x/include/mach/system.h
index b04f08d..16ac46e 100644
--- a/arch/arm/mach-h720x/include/mach/system.h
+++ b/arch/arm/mach-h720x/include/mach/system.h
@@ -24,8 +24,4 @@ static void arch_idle(void)
 	nop();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-highbank/include/mach/system.h b/arch/arm/mach-highbank/include/mach/system.h
index 0754c79..b1d8b5f 100644
--- a/arch/arm/mach-highbank/include/mach/system.h
+++ b/arch/arm/mach-highbank/include/mach/system.h
@@ -21,8 +21,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-integrator/include/mach/system.h b/arch/arm/mach-integrator/include/mach/system.h
index 12fc8c3..901514e 100644
--- a/arch/arm/mach-integrator/include/mach/system.h
+++ b/arch/arm/mach-integrator/include/mach/system.h
@@ -30,8 +30,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-iop13xx/include/mach/system.h b/arch/arm/mach-iop13xx/include/mach/system.h
index 7f798dc..1f31ed3 100644
--- a/arch/arm/mach-iop13xx/include/mach/system.h
+++ b/arch/arm/mach-iop13xx/include/mach/system.h
@@ -11,7 +11,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
index 44e46f2..4a88727 100644
--- a/arch/arm/mach-iop32x/include/mach/system.h
+++ b/arch/arm/mach-iop32x/include/mach/system.h
@@ -11,7 +11,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
index 696d88c..4f98e76 100644
--- a/arch/arm/mach-iop33x/include/mach/system.h
+++ b/arch/arm/mach-iop33x/include/mach/system.h
@@ -11,7 +11,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
index e981fd2..a7fb08b 100644
--- a/arch/arm/mach-ixp2000/include/mach/system.h
+++ b/arch/arm/mach-ixp2000/include/mach/system.h
@@ -12,7 +12,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-ixp23xx/include/mach/system.h b/arch/arm/mach-ixp23xx/include/mach/system.h
index 7a1b96a..277dda7 100644
--- a/arch/arm/mach-ixp23xx/include/mach/system.h
+++ b/arch/arm/mach-ixp23xx/include/mach/system.h
@@ -14,7 +14,3 @@ static inline void arch_idle(void)
 		cpu_do_idle();
 #endif
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
index 72db2bb..140a9be 100644
--- a/arch/arm/mach-ixp4xx/include/mach/system.h
+++ b/arch/arm/mach-ixp4xx/include/mach/system.h
@@ -17,7 +17,3 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 #endif
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h
index 8a94d97..5fddde0 100644
--- a/arch/arm/mach-kirkwood/include/mach/system.h
+++ b/arch/arm/mach-kirkwood/include/mach/system.h
@@ -14,8 +14,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
index 9c6cc0c..bf176c9 100644
--- a/arch/arm/mach-lpc32xx/include/mach/system.h
+++ b/arch/arm/mach-lpc32xx/include/mach/system.h
@@ -24,8 +24,4 @@ static void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
index c434f3a..1d001ea 100644
--- a/arch/arm/mach-mmp/include/mach/system.h
+++ b/arch/arm/mach-mmp/include/mach/system.h
@@ -13,8 +13,4 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
 #endif /* __ASM_MACH_SYSTEM_H */
diff --git a/arch/arm/mach-msm/include/mach/system.h b/arch/arm/mach-msm/include/mach/system.h
index e180e8b..311db2b 100644
--- a/arch/arm/mach-msm/include/mach/system.h
+++ b/arch/arm/mach-msm/include/mach/system.h
@@ -14,10 +14,6 @@
  */
 void arch_idle(void);
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 /* low level hardware reset hook -- for example, hitting the
  * PSHOLD line on the PMIC to hard reset the system
  */
diff --git a/arch/arm/mach-mv78xx0/include/mach/system.h b/arch/arm/mach-mv78xx0/include/mach/system.h
index 1ae3585..8c3a538 100644
--- a/arch/arm/mach-mv78xx0/include/mach/system.h
+++ b/arch/arm/mach-mv78xx0/include/mach/system.h
@@ -14,9 +14,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
-
 #endif
diff --git a/arch/arm/mach-mxs/include/mach/system.h b/arch/arm/mach-mxs/include/mach/system.h
index bcd8989..e7ad1bb 100644
--- a/arch/arm/mach-mxs/include/mach/system.h
+++ b/arch/arm/mach-mxs/include/mach/system.h
@@ -22,8 +22,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif /* __MACH_MXS_SYSTEM_H__ */
diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h
index 6677677..825a265 100644
--- a/arch/arm/mach-orion5x/include/mach/system.h
+++ b/arch/arm/mach-orion5x/include/mach/system.h
@@ -16,8 +16,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-picoxcell/include/mach/system.h b/arch/arm/mach-picoxcell/include/mach/system.h
index a12da63..1a5d8cb 100644
--- a/arch/arm/mach-picoxcell/include/mach/system.h
+++ b/arch/arm/mach-picoxcell/include/mach/system.h
@@ -23,8 +23,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(int mode, const char *cmd)
-{
-}
-
 #endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
index 6710ed3..60cfe71 100644
--- a/arch/arm/mach-pnx4008/include/mach/system.h
+++ b/arch/arm/mach-pnx4008/include/mach/system.h
@@ -26,8 +26,4 @@ static void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-prima2/include/mach/system.h b/arch/arm/mach-prima2/include/mach/system.h
index eb16b4b..2c7d2a9 100644
--- a/arch/arm/mach-prima2/include/mach/system.h
+++ b/arch/arm/mach-prima2/include/mach/system.h
@@ -14,8 +14,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
index 85494ff..c5afacd 100644
--- a/arch/arm/mach-pxa/include/mach/system.h
+++ b/arch/arm/mach-pxa/include/mach/system.h
@@ -13,7 +13,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
index 1630766..471b671 100644
--- a/arch/arm/mach-realview/include/mach/system.h
+++ b/arch/arm/mach-realview/include/mach/system.h
@@ -30,8 +30,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
index e9fb593..359bab9 100644
--- a/arch/arm/mach-rpc/include/mach/system.h
+++ b/arch/arm/mach-rpc/include/mach/system.h
@@ -11,7 +11,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
index 3c3e842..e17b208 100644
--- a/arch/arm/mach-sa1100/include/mach/system.h
+++ b/arch/arm/mach-sa1100/include/mach/system.h
@@ -7,7 +7,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-shark/include/mach/system.h b/arch/arm/mach-shark/include/mach/system.h
index 2cc363a..1b2f2c5 100644
--- a/arch/arm/mach-shark/include/mach/system.h
+++ b/arch/arm/mach-shark/include/mach/system.h
@@ -6,10 +6,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 static inline void arch_idle(void)
 {
 }
diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h
index b87b8a4..a312988 100644
--- a/arch/arm/mach-tegra/include/mach/system.h
+++ b/arch/arm/mach-tegra/include/mach/system.h
@@ -21,10 +21,6 @@
 #ifndef __MACH_TEGRA_SYSTEM_H
 #define __MACH_TEGRA_SYSTEM_H
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 static inline void arch_idle(void)
 {
 }
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
index 0ddf3cd..574d46e 100644
--- a/arch/arm/mach-u300/include/mach/system.h
+++ b/arch/arm/mach-u300/include/mach/system.h
@@ -12,7 +12,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-ux500/include/mach/system.h b/arch/arm/mach-ux500/include/mach/system.h
index ae1dff1..258e5c9 100644
--- a/arch/arm/mach-ux500/include/mach/system.h
+++ b/arch/arm/mach-ux500/include/mach/system.h
@@ -17,8 +17,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
index 335946a..f3fa347 100644
--- a/arch/arm/mach-versatile/include/mach/system.h
+++ b/arch/arm/mach-versatile/include/mach/system.h
@@ -30,8 +30,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-vexpress/include/mach/system.h b/arch/arm/mach-vexpress/include/mach/system.h
index 899a4e6..f653a8e 100644
--- a/arch/arm/mach-vexpress/include/mach/system.h
+++ b/arch/arm/mach-vexpress/include/mach/system.h
@@ -30,8 +30,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
index 001a2f9..2aaeb93 100644
--- a/arch/arm/mach-w90x900/include/mach/system.h
+++ b/arch/arm/mach-w90x900/include/mach/system.h
@@ -17,8 +17,3 @@
 static void arch_idle(void)
 {
 }
-
-static void arch_reset(char mode, const char *cmd)
-{
-}
-
diff --git a/arch/arm/mach-zynq/include/mach/system.h b/arch/arm/mach-zynq/include/mach/system.h
index 34be7ed..8e88e0b 100644
--- a/arch/arm/mach-zynq/include/mach/system.h
+++ b/arch/arm/mach-zynq/include/mach/system.h
@@ -20,8 +20,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
index 22b8911..b9c71b4 100644
--- a/arch/arm/plat-mxc/include/mach/system.h
+++ b/arch/arm/plat-mxc/include/mach/system.h
@@ -27,8 +27,4 @@ static inline void arch_idle(void)
 		cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
index 4a0d125..86c6f83 100644
--- a/arch/arm/plat-spear/include/plat/system.h
+++ b/arch/arm/plat-spear/include/plat/system.h
@@ -23,8 +23,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
 #endif /* __PLAT_SYSTEM_H */
-- 
1.7.4.4

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-06 17:39 ` [02: PATCH 0/41] Platform arch_reset changes Russell King - ARM Linux
@ 2011-11-06 17:54   ` Russell King - ARM Linux
  2011-11-06 17:55     ` [PATCH 1/5] XXX: tcc8k Russell King - ARM Linux
                       ` (6 more replies)
  2011-11-07 13:38   ` [02: PATCH 0/41] Platform arch_reset changes Will Deacon
  1 sibling, 7 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

Part 3 - the remaining stuff

These are patches which I've managed to get half way through before
getting - to be honest - totally hacked off with the code found in
various platforms (as mentioned in previous mails).

These platforms are broken as a result of the final patch in part 2,
and these patches move these platforms _towards_ a solution.  They
are not a complete solution though, but the start of the solution.

For instance, the Exynos4 and S5PV210 patches both consist of almost
a full solution -but- with the new function prototype missing because
there is _no_ local header file to put it in, and I'm damned well not
putting it in the remote plat-samsung/include/plat headers.

The final set of platforms - touched neither by part 3 nor 4, are
broken by the final patch in part 2, and at present I have no plans
to fix them.  I would welcome patches to fix these which address the
issues raised in the "pet peaves" email (which is why I have no plans
to fix them.)

 arch/arm/mach-exynos4/cpu.c                       |    6 +-----
 arch/arm/mach-exynos4/mach-armlex4210.c           |    1 +
 arch/arm/mach-exynos4/mach-nuri.c                 |    1 +
 arch/arm/mach-exynos4/mach-origen.c               |    1 +
 arch/arm/mach-exynos4/mach-smdk4x12.c             |    2 ++
 arch/arm/mach-exynos4/mach-smdkv310.c             |    2 ++
 arch/arm/mach-exynos4/mach-universal_c210.c       |    1 +
 arch/arm/mach-omap1/board-voiceblue.c             |    5 ++---
 arch/arm/mach-omap1/include/mach/system.h         |    6 ++++++
 arch/arm/mach-omap1/reset.c                       |    4 +---
 arch/arm/mach-omap2/include/mach/system.h         |    6 ++++++
 arch/arm/mach-omap2/prcm.c                        |    4 +---
 arch/arm/mach-s5pv210/cpu.c                       |    6 +-----
 arch/arm/mach-s5pv210/mach-aquila.c               |    1 +
 arch/arm/mach-s5pv210/mach-goni.c                 |    1 +
 arch/arm/mach-s5pv210/mach-smdkc110.c             |    1 +
 arch/arm/mach-s5pv210/mach-smdkv210.c             |    1 +
 arch/arm/mach-s5pv210/mach-torbreck.c             |    1 +
 arch/arm/plat-omap/include/plat/system.h          |    2 --
 arch/arm/plat-samsung/include/plat/reset.h        |   16 ----------------
 arch/arm/plat-samsung/include/plat/system-reset.h |   11 -----------
 arch/arm/plat-tcc/include/mach/system.h           |    4 ++--
 arch/arm/plat-tcc/system.c                        |    2 +-
 23 files changed, 34 insertions(+), 51 deletions(-)
 delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h

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

* [PATCH 1/5] XXX: tcc8k
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
@ 2011-11-06 17:55     ` Russell King - ARM Linux
  2011-11-06 17:55     ` [PATCH 2/5] ARM: restart: omap: use new restart hook XXX WIP XXX Russell King - ARM Linux
                       ` (5 subsequent siblings)
  6 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:55 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/plat-tcc/include/mach/system.h |    4 ++--
 arch/arm/plat-tcc/system.c              |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-tcc/include/mach/system.h b/arch/arm/plat-tcc/include/mach/system.h
index 909e603..9adf36f 100644
--- a/arch/arm/plat-tcc/include/mach/system.h
+++ b/arch/arm/plat-tcc/include/mach/system.h
@@ -16,7 +16,7 @@
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 
-extern void plat_tcc_reboot(void);
+extern void plat_tcc_restart(char mode, const char *cmd);
 
 static inline void arch_idle(void)
 {
@@ -25,7 +25,7 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	plat_tcc_reboot();
+	plat_tcc_restart(mode, cmd);
 }
 
 #endif
diff --git a/arch/arm/plat-tcc/system.c b/arch/arm/plat-tcc/system.c
index cc208fa..88c041d 100644
--- a/arch/arm/plat-tcc/system.c
+++ b/arch/arm/plat-tcc/system.c
@@ -12,7 +12,7 @@
 #include <mach/tcc8k-regs.h>
 
 /* System reboot */
-void plat_tcc_reboot(void)
+void plat_tcc_restart(char mode, const char *cmd)
 {
 	/* Make sure clocks are on */
 	__raw_writel(0xffffffff, CKC_BASE + BCLKCTR0_OFFS);
-- 
1.7.4.4

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

* [PATCH 2/5] ARM: restart: omap: use new restart hook XXX WIP XXX
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
  2011-11-06 17:55     ` [PATCH 1/5] XXX: tcc8k Russell King - ARM Linux
@ 2011-11-06 17:55     ` Russell King - ARM Linux
  2011-11-09 22:27       ` Tony Lindgren
  2011-11-06 17:56     ` [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX Russell King - ARM Linux
                       ` (4 subsequent siblings)
  6 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-omap1/board-voiceblue.c     |    5 ++---
 arch/arm/mach-omap1/include/mach/system.h |    6 ++++++
 arch/arm/mach-omap1/reset.c               |    4 +---
 arch/arm/mach-omap2/include/mach/system.h |    6 ++++++
 arch/arm/mach-omap2/prcm.c                |    4 +---
 arch/arm/plat-omap/include/plat/system.h  |    2 --
 6 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 2a6545b..b0111b6 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -220,7 +220,7 @@ void voiceblue_wdt_ping(void)
 	gpio_set_value(0, wdt_gpio_state);
 }
 
-static void voiceblue_reset(char mode, const char *cmd)
+static void voiceblue_restart(char mode, const char *cmd)
 {
 	/*
 	 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
@@ -284,8 +284,6 @@ static void __init voiceblue_init(void)
 	 * (it is connected through invertor) */
 	omap_writeb(0x00, OMAP_LPG1_LCR);
 	omap_writeb(0x00, OMAP_LPG1_PMR);	/* Disable clock */
-
-	arch_reset = voiceblue_reset;
 }
 
 MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
@@ -297,4 +295,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
 	.init_irq	= omap1_init_irq,
 	.init_machine	= voiceblue_init,
 	.timer		= &omap1_timer,
+	.restart	= voiceblue_restart,
 MACHINE_END
diff --git a/arch/arm/mach-omap1/include/mach/system.h b/arch/arm/mach-omap1/include/mach/system.h
index a6c1b3a..4faeef6 100644
--- a/arch/arm/mach-omap1/include/mach/system.h
+++ b/arch/arm/mach-omap1/include/mach/system.h
@@ -1,5 +1,11 @@
 /*
  * arch/arm/mach-omap1/include/mach/system.h
  */
+void omap1_restart(char mode, const char *cmd);
+
+static inline void arch_reset(char mode, const char *cmd)
+{
+	omap1_restart(mode, cmd);
+}
 
 #include <plat/system.h>
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
index ad951ee..8b1cc6e 100644
--- a/arch/arm/mach-omap1/reset.c
+++ b/arch/arm/mach-omap1/reset.c
@@ -8,7 +8,7 @@
 #include <mach/system.h>
 #include <plat/prcm.h>
 
-void omap1_arch_reset(char mode, const char *cmd)
+void omap1_restart(char mode, const char *cmd)
 {
 	/*
 	 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
@@ -21,5 +21,3 @@ void omap1_arch_reset(char mode, const char *cmd)
 
 	omap_writew(1, ARM_RSTCT1);
 }
-
-void (*arch_reset)(char, const char *) = omap1_arch_reset;
diff --git a/arch/arm/mach-omap2/include/mach/system.h b/arch/arm/mach-omap2/include/mach/system.h
index d488721..3062142 100644
--- a/arch/arm/mach-omap2/include/mach/system.h
+++ b/arch/arm/mach-omap2/include/mach/system.h
@@ -1,5 +1,11 @@
 /*
  * arch/arm/mach-omap2/include/mach/system.h
  */
+void omap_prcm_restart(char mode, const char *cmd);
+
+static inline void arch_reset(char mode, const char *cmd)
+{
+	omap_prcm_restart(mode, cmd);
+}
 
 #include <plat/system.h>
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 8db5f03..e64ffed 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -58,7 +58,7 @@ u32 omap_prcm_get_reset_sources(void)
 EXPORT_SYMBOL(omap_prcm_get_reset_sources);
 
 /* Resets clock rates and reboots the system. Only called from system.h */
-static void omap_prcm_arch_reset(char mode, const char *cmd)
+void omap_prcm_restart(char mode, const char *cmd)
 {
 	s16 prcm_offs = 0;
 
@@ -109,8 +109,6 @@ static void omap_prcm_arch_reset(char mode, const char *cmd)
 	omap2_prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */
 }
 
-void (*arch_reset)(char, const char *) = omap_prcm_arch_reset;
-
 /**
  * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness
  * @reg: physical address of module IDLEST register
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
index c5fa9e9..8e5ebd7 100644
--- a/arch/arm/plat-omap/include/plat/system.h
+++ b/arch/arm/plat-omap/include/plat/system.h
@@ -12,6 +12,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-extern void (*arch_reset)(char, const char *);
-
 #endif
-- 
1.7.4.4

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

* [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
  2011-11-06 17:55     ` [PATCH 1/5] XXX: tcc8k Russell King - ARM Linux
  2011-11-06 17:55     ` [PATCH 2/5] ARM: restart: omap: use new restart hook XXX WIP XXX Russell King - ARM Linux
@ 2011-11-06 17:56     ` Russell King - ARM Linux
  2011-11-07 10:30       ` Russell King - ARM Linux
  2011-11-06 17:56     ` [PATCH 4/5] ARM: restart: s5pv210: " Russell King - ARM Linux
                       ` (3 subsequent siblings)
  6 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-exynos4/cpu.c                 |    6 +-----
 arch/arm/mach-exynos4/mach-armlex4210.c     |    1 +
 arch/arm/mach-exynos4/mach-nuri.c           |    1 +
 arch/arm/mach-exynos4/mach-origen.c         |    1 +
 arch/arm/mach-exynos4/mach-smdk4x12.c       |    2 ++
 arch/arm/mach-exynos4/mach-smdkv310.c       |    2 ++
 arch/arm/mach-exynos4/mach-universal_c210.c |    1 +
 7 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
index 5b1765b..5b1ee56 100644
--- a/arch/arm/mach-exynos4/cpu.c
+++ b/arch/arm/mach-exynos4/cpu.c
@@ -27,7 +27,6 @@
 #include <plat/fb-core.h>
 #include <plat/fimc-core.h>
 #include <plat/iic-core.h>
-#include <plat/reset.h>
 #include <plat/tv-core.h>
 
 #include <mach/regs-irq.h>
@@ -145,7 +144,7 @@ static void exynos4_idle(void)
 	local_irq_enable();
 }
 
-static void exynos4_sw_reset(void)
+void exynos4_restart(char mode, const char *cmd)
 {
 	__raw_writel(0x1, S5P_SWRESET);
 }
@@ -286,8 +285,5 @@ int __init exynos4_init(void)
 	/* set idle function */
 	pm_idle = exynos4_idle;
 
-	/* set sw_reset function */
-	s5p_reset_hook = exynos4_sw_reset;
-
 	return sysdev_register(&exynos4_sysdev);
 }
diff --git a/arch/arm/mach-exynos4/mach-armlex4210.c b/arch/arm/mach-exynos4/mach-armlex4210.c
index f0ca6c1..9bb7e6c 100644
--- a/arch/arm/mach-exynos4/mach-armlex4210.c
+++ b/arch/arm/mach-exynos4/mach-armlex4210.c
@@ -212,4 +212,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210")
 	.map_io		= armlex4210_map_io,
 	.init_machine	= armlex4210_machine_init,
 	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
 MACHINE_END
diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c
index 236bbe1..3504f56 100644
--- a/arch/arm/mach-exynos4/mach-nuri.c
+++ b/arch/arm/mach-exynos4/mach-nuri.c
@@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI")
 	.init_machine	= nuri_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve        = &nuri_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c
index f80b563..161e5ee 100644
--- a/arch/arm/mach-exynos4/mach-origen.c
+++ b/arch/arm/mach-exynos4/mach-origen.c
@@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN")
 	.init_machine	= origen_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve	= &origen_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
diff --git a/arch/arm/mach-exynos4/mach-smdk4x12.c b/arch/arm/mach-exynos4/mach-smdk4x12.c
index fcf2e0e..020284c 100644
--- a/arch/arm/mach-exynos4/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos4/mach-smdk4x12.c
@@ -289,6 +289,7 @@ MACHINE_START(SMDK4212, "SMDK4212")
 	.map_io		= smdk4x12_map_io,
 	.init_machine	= smdk4x12_machine_init,
 	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
 MACHINE_END
 
 MACHINE_START(SMDK4412, "SMDK4412")
@@ -299,4 +300,5 @@ MACHINE_START(SMDK4412, "SMDK4412")
 	.map_io		= smdk4x12_map_io,
 	.init_machine	= smdk4x12_machine_init,
 	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
 MACHINE_END
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
index cec2afa..fdf5535 100644
--- a/arch/arm/mach-exynos4/mach-smdkv310.c
+++ b/arch/arm/mach-exynos4/mach-smdkv310.c
@@ -378,6 +378,7 @@ MACHINE_START(SMDKV310, "SMDKV310")
 	.init_machine	= smdkv310_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve	= &smdkv310_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
 
 MACHINE_START(SMDKC210, "SMDKC210")
@@ -387,4 +388,5 @@ MACHINE_START(SMDKC210, "SMDKC210")
 	.map_io		= smdkv310_map_io,
 	.init_machine	= smdkv310_machine_init,
 	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
 MACHINE_END
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c
index a2a177f..4bdd30c 100644
--- a/arch/arm/mach-exynos4/mach-universal_c210.c
+++ b/arch/arm/mach-exynos4/mach-universal_c210.c
@@ -1061,4 +1061,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
 	.init_machine	= universal_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve        = &universal_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 4/5] ARM: restart: s5pv210: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
                       ` (2 preceding siblings ...)
  2011-11-06 17:56     ` [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX Russell King - ARM Linux
@ 2011-11-06 17:56     ` Russell King - ARM Linux
  2011-11-08  5:23       ` Kukjin Kim
  2011-11-06 17:56     ` [PATCH 5/5] ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook Russell King - ARM Linux
                       ` (2 subsequent siblings)
  6 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-s5pv210/cpu.c           |    6 +-----
 arch/arm/mach-s5pv210/mach-aquila.c   |    1 +
 arch/arm/mach-s5pv210/mach-goni.c     |    1 +
 arch/arm/mach-s5pv210/mach-smdkc110.c |    1 +
 arch/arm/mach-s5pv210/mach-smdkv210.c |    1 +
 arch/arm/mach-s5pv210/mach-torbreck.c |    1 +
 6 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
index 84ec746..4c7b071 100644
--- a/arch/arm/mach-s5pv210/cpu.c
+++ b/arch/arm/mach-s5pv210/cpu.c
@@ -41,7 +41,6 @@
 #include <plat/iic-core.h>
 #include <plat/keypad-core.h>
 #include <plat/sdhci.h>
-#include <plat/reset.h>
 #include <plat/tv-core.h>
 
 /* Initial IO mappings */
@@ -108,7 +107,7 @@ static void s5pv210_idle(void)
 	local_irq_enable();
 }
 
-static void s5pv210_sw_reset(void)
+void s5pv210_restart(char mode, const char *cmd)
 {
 	__raw_writel(0x1, S5P_SWRESET);
 }
@@ -196,8 +195,5 @@ int __init s5pv210_init(void)
 	/* set idle function */
 	pm_idle = s5pv210_idle;
 
-	/* set sw_reset function */
-	s5p_reset_hook = s5pv210_sw_reset;
-
 	return sysdev_register(&s5pv210_sysdev);
 }
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index 5811a96..68fd31d 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -683,4 +683,5 @@ MACHINE_START(AQUILA, "Aquila")
 	.map_io		= aquila_map_io,
 	.init_machine	= aquila_machine_init,
 	.timer		= &s5p_timer,
+	.restart	= s5pv210_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 15edcae..1156a5b 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -960,4 +960,5 @@ MACHINE_START(GONI, "GONI")
 	.init_machine	= goni_machine_init,
 	.timer		= &s5p_timer,
 	.reserve	= &goni_reserve,
+	.restart	= s5pv210_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c
index f7266bb..a70fa53 100644
--- a/arch/arm/mach-s5pv210/mach-smdkc110.c
+++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
@@ -141,4 +141,5 @@ MACHINE_START(SMDKC110, "SMDKC110")
 	.map_io		= smdkc110_map_io,
 	.init_machine	= smdkc110_machine_init,
 	.timer		= &s5p_timer,
+	.restart	= s5pv210_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index a9106c3..5e8a775 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -318,4 +318,5 @@ MACHINE_START(SMDKV210, "SMDKV210")
 	.map_io		= smdkv210_map_io,
 	.init_machine	= smdkv210_machine_init,
 	.timer		= &s5p_timer,
+	.restart	= s5pv210_restart,
 MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c
index 97cc066..49e9c6d 100644
--- a/arch/arm/mach-s5pv210/mach-torbreck.c
+++ b/arch/arm/mach-s5pv210/mach-torbreck.c
@@ -130,4 +130,5 @@ MACHINE_START(TORBRECK, "TORBRECK")
 	.map_io		= torbreck_map_io,
 	.init_machine	= torbreck_machine_init,
 	.timer		= &s5p_timer,
+	.restart	= s5pv210_restart,
 MACHINE_END
-- 
1.7.4.4

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

* [PATCH 5/5] ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
                       ` (3 preceding siblings ...)
  2011-11-06 17:56     ` [PATCH 4/5] ARM: restart: s5pv210: " Russell King - ARM Linux
@ 2011-11-06 17:56     ` Russell King - ARM Linux
  2011-11-08  5:22       ` Kukjin Kim
  2011-11-08  7:00     ` [03: PATCH 0/5] The remaining stuff Kukjin Kim
  2011-11-11 17:16     ` Russell King - ARM Linux
  6 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-06 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

Now that s5p_reset_hook is unused, we can get rid of plat/reset.h and
the s5p_reset_hook code in plat/system-reset.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/plat-samsung/include/plat/reset.h        |   16 ----------------
 arch/arm/plat-samsung/include/plat/system-reset.h |   11 -----------
 2 files changed, 0 insertions(+), 27 deletions(-)
 delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h

diff --git a/arch/arm/plat-samsung/include/plat/reset.h b/arch/arm/plat-samsung/include/plat/reset.h
deleted file mode 100644
index 32ca517..0000000
--- a/arch/arm/plat-samsung/include/plat/reset.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* linux/arch/arm/plat-samsung/include/plat/reset.h
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com/
- *
- * 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.
-*/
-
-#ifndef __PLAT_SAMSUNG_RESET_H
-#define __PLAT_SAMSUNG_RESET_H __FILE__
-
-extern void (*s5p_reset_hook)(void);
-
-#endif /* __PLAT_SAMSUNG_RESET_H */
diff --git a/arch/arm/plat-samsung/include/plat/system-reset.h b/arch/arm/plat-samsung/include/plat/system-reset.h
index a448e99..73d7808 100644
--- a/arch/arm/plat-samsung/include/plat/system-reset.h
+++ b/arch/arm/plat-samsung/include/plat/system-reset.h
@@ -14,18 +14,7 @@
 
 #include <plat/watchdog-reset.h>
 
-void (*s5p_reset_hook)(void);
-
 static void arch_reset(char mode, const char *cmd)
 {
-	/* SWRESET support in s5p_reset_hook() */
-
-	if (s5p_reset_hook)
-		s5p_reset_hook();
-
-	/* Perform reset using Watchdog reset
-	 * if there is no s5p_reset_hook()
-	 */
-
 	arch_wdt_reset();
 }
-- 
1.7.4.4

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (48 preceding siblings ...)
  2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
@ 2011-11-07  2:48 ` Nicolas Pitre
  2011-11-07 13:31 ` Will Deacon
                   ` (3 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Nicolas Pitre @ 2011-11-07  2:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 6 Nov 2011, Russell King - ARM Linux wrote:

> This series lays down the ground work for changing the way we handle the
> reset (now called restart) handling on ARM.
> 
> As a result of these patches, we provide a new hook in the machine_desc
> record called 'restart' which is pointed at a function to perform the
> appropriate restart actions for the platform.  This is called directly
> from machine_restart() with IRQs and caches on.
> 
> The 'soft_reboot' flag is changed to a more generic 'restart_mode'
> character - which is used to initialize the default reboot mode (which
> can be changed via the 'reboot=' command line parameter.)
> 
> 'soft_restart(addr)' is added which performs a soft restart (iow,
> orderly shutdown of caches and MMU and a jump to the passed address),
> rather than the old way which separated the tear-down of the caches
> and MMU from the code doing the jump.  This will be necessary to
> resolve the ARMv6 and ARMv7 CPU restarting problems.
> 
> Finally, appropriate 'restart_mode' values are added to several
> platforms which were hard-coding the restart mode by intercepting
> the restarting via arm_pm_restart.

This series (the 7 patches) looks good to me.

Acked-by: Nicolas Pitre <nico@linaro.org>


Nicolas

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

* [PATCH 19/41] ARM: restart: kirkwood: use new restart hook
  2011-11-06 17:46 ` [PATCH 19/41] ARM: restart: kirkwood: " Russell King - ARM Linux
@ 2011-11-07  2:58   ` Nicolas Pitre
  0 siblings, 0 replies; 162+ messages in thread
From: Nicolas Pitre @ 2011-11-07  2:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 6 Nov 2011, Russell King - ARM Linux wrote:

> Hook these platforms restart code into the new restart hook rather than
> using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nico@linaro.org>


> ---
>  arch/arm/mach-kirkwood/common.c                |   16 ++++++++++++++++
>  arch/arm/mach-kirkwood/common.h                |    1 +
>  arch/arm/mach-kirkwood/d2net_v2-setup.c        |    1 +
>  arch/arm/mach-kirkwood/db88f6281-bp-setup.c    |    1 +
>  arch/arm/mach-kirkwood/dockstar-setup.c        |    1 +
>  arch/arm/mach-kirkwood/guruplug-setup.c        |    1 +
>  arch/arm/mach-kirkwood/include/mach/system.h   |   15 ---------------
>  arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |    1 +
>  arch/arm/mach-kirkwood/netspace_v2-setup.c     |    3 +++
>  arch/arm/mach-kirkwood/netxbig_v2-setup.c      |    2 ++
>  arch/arm/mach-kirkwood/openrd-setup.c          |    3 +++
>  arch/arm/mach-kirkwood/rd88f6192-nas-setup.c   |    1 +
>  arch/arm/mach-kirkwood/rd88f6281-setup.c       |    1 +
>  arch/arm/mach-kirkwood/sheevaplug-setup.c      |    2 ++
>  arch/arm/mach-kirkwood/t5325-setup.c           |    1 +
>  arch/arm/mach-kirkwood/ts219-setup.c           |    1 +
>  arch/arm/mach-kirkwood/ts41x-setup.c           |    1 +
>  17 files changed, 37 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
> index f3248cf..0bff4a9 100644
> --- a/arch/arm/mach-kirkwood/common.c
> +++ b/arch/arm/mach-kirkwood/common.c
> @@ -534,3 +534,19 @@ static int __init kirkwood_clock_gate(void)
>  	return 0;
>  }
>  late_initcall(kirkwood_clock_gate);
> +
> +void kirkwood_restart(char mode, const char *cmd)
> +{
> +	/*
> +	 * Enable soft reset to assert RSTOUTn.
> +	 */
> +	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
> +
> +	/*
> +	 * Assert soft reset.
> +	 */
> +	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
> +
> +	while (1)
> +		;
> +}
> diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
> index b9b0f09..1529280 100644
> --- a/arch/arm/mach-kirkwood/common.h
> +++ b/arch/arm/mach-kirkwood/common.h
> @@ -50,6 +50,7 @@ void kirkwood_uart1_init(void);
>  void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
>  void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
>  void kirkwood_audio_init(void);
> +void kirkwood_restart(char, const char *);
>  
>  extern int kirkwood_tclk;
>  extern struct sys_timer kirkwood_timer;
> diff --git a/arch/arm/mach-kirkwood/d2net_v2-setup.c b/arch/arm/mach-kirkwood/d2net_v2-setup.c
> index f457e07..6e1bac9 100644
> --- a/arch/arm/mach-kirkwood/d2net_v2-setup.c
> +++ b/arch/arm/mach-kirkwood/d2net_v2-setup.c
> @@ -227,4 +227,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
> index ff4c21c..d933593 100644
> --- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
> +++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
> @@ -103,4 +103,5 @@ MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c
> index e4d199b..61d9a55 100644
> --- a/arch/arm/mach-kirkwood/dockstar-setup.c
> +++ b/arch/arm/mach-kirkwood/dockstar-setup.c
> @@ -108,4 +108,5 @@ MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c
> index 6c40f78..bdaed38 100644
> --- a/arch/arm/mach-kirkwood/guruplug-setup.c
> +++ b/arch/arm/mach-kirkwood/guruplug-setup.c
> @@ -127,4 +127,5 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h
> index 7568e95..8a94d97 100644
> --- a/arch/arm/mach-kirkwood/include/mach/system.h
> +++ b/arch/arm/mach-kirkwood/include/mach/system.h
> @@ -9,8 +9,6 @@
>  #ifndef __ASM_ARCH_SYSTEM_H
>  #define __ASM_ARCH_SYSTEM_H
>  
> -#include <mach/bridge-regs.h>
> -
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
> @@ -18,19 +16,6 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/*
> -	 * Enable soft reset to assert RSTOUTn.
> -	 */
> -	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
> -
> -	/*
> -	 * Assert soft reset.
> -	 */
> -	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
> -
> -	while (1)
> -		;
>  }
>  
> -
>  #endif
> diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
> index 9a1e917..85f6169 100644
> --- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
> +++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
> @@ -169,4 +169,5 @@ MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c
> index 8849bcc..e6bba01 100644
> --- a/arch/arm/mach-kirkwood/netspace_v2-setup.c
> +++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c
> @@ -264,6 +264,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
>  
> @@ -275,6 +276,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
>  
> @@ -286,5 +288,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
> index 1ba12c4..31ae8de 100644
> --- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c
> +++ b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
> @@ -405,6 +405,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
>  
> @@ -416,5 +417,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
> index 5660ca6..01f8c89 100644
> --- a/arch/arm/mach-kirkwood/openrd-setup.c
> +++ b/arch/arm/mach-kirkwood/openrd-setup.c
> @@ -220,6 +220,7 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
>  
> @@ -232,6 +233,7 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
>  
> @@ -244,5 +246,6 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
> index 6663869..fd2c9c8 100644
> --- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
> +++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
> @@ -85,4 +85,5 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c
> index 66b3c05..ef92207 100644
> --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c
> +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
> @@ -121,4 +121,5 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c
> index 8b102d6..85bff6b 100644
> --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
> +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
> @@ -144,6 +144,7 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
>  
> @@ -155,5 +156,6 @@ MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c
> index ea104fb..966b2b3 100644
> --- a/arch/arm/mach-kirkwood/t5325-setup.c
> +++ b/arch/arm/mach-kirkwood/t5325-setup.c
> @@ -207,4 +207,5 @@ MACHINE_START(T5325, "HP t5325 Thin Client")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c
> index 262c034..73e2b6c 100644
> --- a/arch/arm/mach-kirkwood/ts219-setup.c
> +++ b/arch/arm/mach-kirkwood/ts219-setup.c
> @@ -138,4 +138,5 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c
> index b68f5b4..5bbca26 100644
> --- a/arch/arm/mach-kirkwood/ts41x-setup.c
> +++ b/arch/arm/mach-kirkwood/ts41x-setup.c
> @@ -182,4 +182,5 @@ MACHINE_START(TS41X, "QNAP TS-41x")
>  	.init_early	= kirkwood_init_early,
>  	.init_irq	= kirkwood_init_irq,
>  	.timer		= &kirkwood_timer,
> +	.restart	= kirkwood_restart,
>  MACHINE_END
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset()
  2011-11-06 17:53 ` [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset() Russell King - ARM Linux
@ 2011-11-07  2:59   ` Nicolas Pitre
  2011-11-08 15:47   ` Jamie Iles
  2011-11-10 23:35   ` Tony Lindgren
  2 siblings, 0 replies; 162+ messages in thread
From: Nicolas Pitre @ 2011-11-07  2:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 6 Nov 2011, Russell King - ARM Linux wrote:

> arch_reset() is deprecated; systems should hook into system restart via
> the 'restart' method in the platforms machine description record.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nico@linaro.org>

> ---
>  arch/arm/mach-msm/include/mach/system.h       |    4 ----
>  arch/arm/mach-picoxcell/include/mach/system.h |    1 -
>  arch/arm/mach-ux500/include/mach/system.h     |    1 -
>  arch/arm/mach-zynq/include/mach/system.h      |    1 -
>  4 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-msm/include/mach/system.h b/arch/arm/mach-msm/include/mach/system.h
> index d2e83f4..e180e8b 100644
> --- a/arch/arm/mach-msm/include/mach/system.h
> +++ b/arch/arm/mach-msm/include/mach/system.h
> @@ -12,14 +12,10 @@
>   * GNU General Public License for more details.
>   *
>   */
> -
> -#include <mach/hardware.h>
> -
>  void arch_idle(void);
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	for (;;) ;  /* depends on IPC w/ other core */
>  }
>  
>  /* low level hardware reset hook -- for example, hitting the
> diff --git a/arch/arm/mach-picoxcell/include/mach/system.h b/arch/arm/mach-picoxcell/include/mach/system.h
> index 67c589b..a12da63 100644
> --- a/arch/arm/mach-picoxcell/include/mach/system.h
> +++ b/arch/arm/mach-picoxcell/include/mach/system.h
> @@ -25,7 +25,6 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(int mode, const char *cmd)
>  {
> -	/* Watchdog reset to go here. */
>  }
>  
>  #endif /* __ASM_ARCH_SYSTEM_H */
> diff --git a/arch/arm/mach-ux500/include/mach/system.h b/arch/arm/mach-ux500/include/mach/system.h
> index c0cd800..ae1dff1 100644
> --- a/arch/arm/mach-ux500/include/mach/system.h
> +++ b/arch/arm/mach-ux500/include/mach/system.h
> @@ -19,7 +19,6 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/* yet to be implemented - TODO */
>  }
>  
>  #endif
> diff --git a/arch/arm/mach-zynq/include/mach/system.h b/arch/arm/mach-zynq/include/mach/system.h
> index 1b84d70..34be7ed 100644
> --- a/arch/arm/mach-zynq/include/mach/system.h
> +++ b/arch/arm/mach-zynq/include/mach/system.h
> @@ -22,7 +22,6 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/* Add architecture specific reset processing here */
>  }
>  
>  #endif
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH 41/41] ARM: restart: remove the now empty arch_reset()
  2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
@ 2011-11-07  3:02   ` Nicolas Pitre
  2011-11-07 17:15   ` H Hartley Sweeten
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 162+ messages in thread
From: Nicolas Pitre @ 2011-11-07  3:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 6 Nov 2011, Russell King - ARM Linux wrote:

> Remove the now empty arch_reset() from all the mach/system.h includes,
> and remove its callsite.  Remove arm_machine_restart() as this function
> no longer does anything useful.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nico@linaro.org>


> ---
>  arch/arm/include/asm/system.h                  |    1 -
>  arch/arm/kernel/process.c                      |   10 ++--------
>  arch/arm/mach-at91/include/mach/system.h       |    4 ----
>  arch/arm/mach-clps711x/include/mach/system.h   |    4 ----
>  arch/arm/mach-cns3xxx/include/mach/system.h    |    4 ----
>  arch/arm/mach-dove/include/mach/system.h       |    5 -----
>  arch/arm/mach-ebsa110/include/mach/system.h    |    4 ----
>  arch/arm/mach-ep93xx/include/mach/system.h     |    4 ----
>  arch/arm/mach-footbridge/include/mach/system.h |    4 ----
>  arch/arm/mach-h720x/include/mach/system.h      |    4 ----
>  arch/arm/mach-highbank/include/mach/system.h   |    4 ----
>  arch/arm/mach-integrator/include/mach/system.h |    4 ----
>  arch/arm/mach-iop13xx/include/mach/system.h    |    4 ----
>  arch/arm/mach-iop32x/include/mach/system.h     |    4 ----
>  arch/arm/mach-iop33x/include/mach/system.h     |    4 ----
>  arch/arm/mach-ixp2000/include/mach/system.h    |    4 ----
>  arch/arm/mach-ixp23xx/include/mach/system.h    |    4 ----
>  arch/arm/mach-ixp4xx/include/mach/system.h     |    4 ----
>  arch/arm/mach-kirkwood/include/mach/system.h   |    4 ----
>  arch/arm/mach-lpc32xx/include/mach/system.h    |    4 ----
>  arch/arm/mach-mmp/include/mach/system.h        |    4 ----
>  arch/arm/mach-msm/include/mach/system.h        |    4 ----
>  arch/arm/mach-mv78xx0/include/mach/system.h    |    5 -----
>  arch/arm/mach-mxs/include/mach/system.h        |    4 ----
>  arch/arm/mach-orion5x/include/mach/system.h    |    4 ----
>  arch/arm/mach-picoxcell/include/mach/system.h  |    4 ----
>  arch/arm/mach-pnx4008/include/mach/system.h    |    4 ----
>  arch/arm/mach-prima2/include/mach/system.h     |    4 ----
>  arch/arm/mach-pxa/include/mach/system.h        |    4 ----
>  arch/arm/mach-realview/include/mach/system.h   |    4 ----
>  arch/arm/mach-rpc/include/mach/system.h        |    4 ----
>  arch/arm/mach-sa1100/include/mach/system.h     |    4 ----
>  arch/arm/mach-shark/include/mach/system.h      |    4 ----
>  arch/arm/mach-tegra/include/mach/system.h      |    4 ----
>  arch/arm/mach-u300/include/mach/system.h       |    4 ----
>  arch/arm/mach-ux500/include/mach/system.h      |    4 ----
>  arch/arm/mach-versatile/include/mach/system.h  |    4 ----
>  arch/arm/mach-vexpress/include/mach/system.h   |    4 ----
>  arch/arm/mach-w90x900/include/mach/system.h    |    5 -----
>  arch/arm/mach-zynq/include/mach/system.h       |    4 ----
>  arch/arm/plat-mxc/include/mach/system.h        |    4 ----
>  arch/arm/plat-spear/include/plat/system.h      |    4 ----
>  42 files changed, 2 insertions(+), 172 deletions(-)
> 
> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> index fe7de75..03775b1 100644
> --- a/arch/arm/include/asm/system.h
> +++ b/arch/arm/include/asm/system.h
> @@ -100,7 +100,6 @@ extern void __show_regs(struct pt_regs *);
>  extern int __pure cpu_architecture(void);
>  extern void cpu_init(void);
>  
> -void arm_machine_restart(char mode, const char *cmd);
>  void soft_restart(unsigned long);
>  extern void (*arm_pm_restart)(char str, const char *cmd);
>  
> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> index 52b4306..72e119f 100644
> --- a/arch/arm/kernel/process.c
> +++ b/arch/arm/kernel/process.c
> @@ -117,14 +117,8 @@ void soft_restart(unsigned long addr)
>  	cpu_reset(addr);
>  }
>  
> -void arm_machine_restart(char mode, const char *cmd)
> +static void null_restart(char mode, const char *cmd)
>  {
> -	/* Disable interrupts first */
> -	local_irq_disable();
> -	local_fiq_disable();
> -
> -	/* Call the architecture specific reboot code. */
> -	arch_reset(mode, cmd);
>  }
>  
>  /*
> @@ -133,7 +127,7 @@ void arm_machine_restart(char mode, const char *cmd)
>  void (*pm_power_off)(void);
>  EXPORT_SYMBOL(pm_power_off);
>  
> -void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
> +void (*arm_pm_restart)(char str, const char *cmd) = null_restart;
>  EXPORT_SYMBOL_GPL(arm_pm_restart);
>  
>  static void do_nothing(void *unused)
> diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
> index 079eb12..cbd64f3 100644
> --- a/arch/arm/mach-at91/include/mach/system.h
> +++ b/arch/arm/mach-at91/include/mach/system.h
> @@ -47,8 +47,4 @@ static inline void arch_idle(void)
>  #endif
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
> index 9982deb..23d6ef8 100644
> --- a/arch/arm/mach-clps711x/include/mach/system.h
> +++ b/arch/arm/mach-clps711x/include/mach/system.h
> @@ -32,8 +32,4 @@ static inline void arch_idle(void)
>  	mov	r0, r0");
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h
> index f92540d..9e56b7d 100644
> --- a/arch/arm/mach-cns3xxx/include/mach/system.h
> +++ b/arch/arm/mach-cns3xxx/include/mach/system.h
> @@ -22,8 +22,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-dove/include/mach/system.h b/arch/arm/mach-dove/include/mach/system.h
> index 25a3a65..3027954 100644
> --- a/arch/arm/mach-dove/include/mach/system.h
> +++ b/arch/arm/mach-dove/include/mach/system.h
> @@ -14,9 +14,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
> -
>  #endif
> diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
> index 574e633..2e4af65 100644
> --- a/arch/arm/mach-ebsa110/include/mach/system.h
> +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> @@ -34,8 +34,4 @@ static inline void arch_idle(void)
>  	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
> index b27a654..b5bec7c 100644
> --- a/arch/arm/mach-ep93xx/include/mach/system.h
> +++ b/arch/arm/mach-ep93xx/include/mach/system.h
> @@ -5,7 +5,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
> index 794a02c..a174a58 100644
> --- a/arch/arm/mach-footbridge/include/mach/system.h
> +++ b/arch/arm/mach-footbridge/include/mach/system.h
> @@ -11,7 +11,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-h720x/include/mach/system.h b/arch/arm/mach-h720x/include/mach/system.h
> index b04f08d..16ac46e 100644
> --- a/arch/arm/mach-h720x/include/mach/system.h
> +++ b/arch/arm/mach-h720x/include/mach/system.h
> @@ -24,8 +24,4 @@ static void arch_idle(void)
>  	nop();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-highbank/include/mach/system.h b/arch/arm/mach-highbank/include/mach/system.h
> index 0754c79..b1d8b5f 100644
> --- a/arch/arm/mach-highbank/include/mach/system.h
> +++ b/arch/arm/mach-highbank/include/mach/system.h
> @@ -21,8 +21,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-integrator/include/mach/system.h b/arch/arm/mach-integrator/include/mach/system.h
> index 12fc8c3..901514e 100644
> --- a/arch/arm/mach-integrator/include/mach/system.h
> +++ b/arch/arm/mach-integrator/include/mach/system.h
> @@ -30,8 +30,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-iop13xx/include/mach/system.h b/arch/arm/mach-iop13xx/include/mach/system.h
> index 7f798dc..1f31ed3 100644
> --- a/arch/arm/mach-iop13xx/include/mach/system.h
> +++ b/arch/arm/mach-iop13xx/include/mach/system.h
> @@ -11,7 +11,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
> index 44e46f2..4a88727 100644
> --- a/arch/arm/mach-iop32x/include/mach/system.h
> +++ b/arch/arm/mach-iop32x/include/mach/system.h
> @@ -11,7 +11,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
> index 696d88c..4f98e76 100644
> --- a/arch/arm/mach-iop33x/include/mach/system.h
> +++ b/arch/arm/mach-iop33x/include/mach/system.h
> @@ -11,7 +11,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
> index e981fd2..a7fb08b 100644
> --- a/arch/arm/mach-ixp2000/include/mach/system.h
> +++ b/arch/arm/mach-ixp2000/include/mach/system.h
> @@ -12,7 +12,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-ixp23xx/include/mach/system.h b/arch/arm/mach-ixp23xx/include/mach/system.h
> index 7a1b96a..277dda7 100644
> --- a/arch/arm/mach-ixp23xx/include/mach/system.h
> +++ b/arch/arm/mach-ixp23xx/include/mach/system.h
> @@ -14,7 +14,3 @@ static inline void arch_idle(void)
>  		cpu_do_idle();
>  #endif
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
> index 72db2bb..140a9be 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> @@ -17,7 +17,3 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  #endif
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h
> index 8a94d97..5fddde0 100644
> --- a/arch/arm/mach-kirkwood/include/mach/system.h
> +++ b/arch/arm/mach-kirkwood/include/mach/system.h
> @@ -14,8 +14,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
> index 9c6cc0c..bf176c9 100644
> --- a/arch/arm/mach-lpc32xx/include/mach/system.h
> +++ b/arch/arm/mach-lpc32xx/include/mach/system.h
> @@ -24,8 +24,4 @@ static void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
> index c434f3a..1d001ea 100644
> --- a/arch/arm/mach-mmp/include/mach/system.h
> +++ b/arch/arm/mach-mmp/include/mach/system.h
> @@ -13,8 +13,4 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
>  #endif /* __ASM_MACH_SYSTEM_H */
> diff --git a/arch/arm/mach-msm/include/mach/system.h b/arch/arm/mach-msm/include/mach/system.h
> index e180e8b..311db2b 100644
> --- a/arch/arm/mach-msm/include/mach/system.h
> +++ b/arch/arm/mach-msm/include/mach/system.h
> @@ -14,10 +14,6 @@
>   */
>  void arch_idle(void);
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  /* low level hardware reset hook -- for example, hitting the
>   * PSHOLD line on the PMIC to hard reset the system
>   */
> diff --git a/arch/arm/mach-mv78xx0/include/mach/system.h b/arch/arm/mach-mv78xx0/include/mach/system.h
> index 1ae3585..8c3a538 100644
> --- a/arch/arm/mach-mv78xx0/include/mach/system.h
> +++ b/arch/arm/mach-mv78xx0/include/mach/system.h
> @@ -14,9 +14,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
> -
>  #endif
> diff --git a/arch/arm/mach-mxs/include/mach/system.h b/arch/arm/mach-mxs/include/mach/system.h
> index bcd8989..e7ad1bb 100644
> --- a/arch/arm/mach-mxs/include/mach/system.h
> +++ b/arch/arm/mach-mxs/include/mach/system.h
> @@ -22,8 +22,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif /* __MACH_MXS_SYSTEM_H__ */
> diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h
> index 6677677..825a265 100644
> --- a/arch/arm/mach-orion5x/include/mach/system.h
> +++ b/arch/arm/mach-orion5x/include/mach/system.h
> @@ -16,8 +16,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-picoxcell/include/mach/system.h b/arch/arm/mach-picoxcell/include/mach/system.h
> index a12da63..1a5d8cb 100644
> --- a/arch/arm/mach-picoxcell/include/mach/system.h
> +++ b/arch/arm/mach-picoxcell/include/mach/system.h
> @@ -23,8 +23,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(int mode, const char *cmd)
> -{
> -}
> -
>  #endif /* __ASM_ARCH_SYSTEM_H */
> diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
> index 6710ed3..60cfe71 100644
> --- a/arch/arm/mach-pnx4008/include/mach/system.h
> +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> @@ -26,8 +26,4 @@ static void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-prima2/include/mach/system.h b/arch/arm/mach-prima2/include/mach/system.h
> index eb16b4b..2c7d2a9 100644
> --- a/arch/arm/mach-prima2/include/mach/system.h
> +++ b/arch/arm/mach-prima2/include/mach/system.h
> @@ -14,8 +14,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
> index 85494ff..c5afacd 100644
> --- a/arch/arm/mach-pxa/include/mach/system.h
> +++ b/arch/arm/mach-pxa/include/mach/system.h
> @@ -13,7 +13,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
> index 1630766..471b671 100644
> --- a/arch/arm/mach-realview/include/mach/system.h
> +++ b/arch/arm/mach-realview/include/mach/system.h
> @@ -30,8 +30,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
> index e9fb593..359bab9 100644
> --- a/arch/arm/mach-rpc/include/mach/system.h
> +++ b/arch/arm/mach-rpc/include/mach/system.h
> @@ -11,7 +11,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
> index 3c3e842..e17b208 100644
> --- a/arch/arm/mach-sa1100/include/mach/system.h
> +++ b/arch/arm/mach-sa1100/include/mach/system.h
> @@ -7,7 +7,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-shark/include/mach/system.h b/arch/arm/mach-shark/include/mach/system.h
> index 2cc363a..1b2f2c5 100644
> --- a/arch/arm/mach-shark/include/mach/system.h
> +++ b/arch/arm/mach-shark/include/mach/system.h
> @@ -6,10 +6,6 @@
>  #ifndef __ASM_ARCH_SYSTEM_H
>  #define __ASM_ARCH_SYSTEM_H
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  static inline void arch_idle(void)
>  {
>  }
> diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h
> index b87b8a4..a312988 100644
> --- a/arch/arm/mach-tegra/include/mach/system.h
> +++ b/arch/arm/mach-tegra/include/mach/system.h
> @@ -21,10 +21,6 @@
>  #ifndef __MACH_TEGRA_SYSTEM_H
>  #define __MACH_TEGRA_SYSTEM_H
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  static inline void arch_idle(void)
>  {
>  }
> diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
> index 0ddf3cd..574d46e 100644
> --- a/arch/arm/mach-u300/include/mach/system.h
> +++ b/arch/arm/mach-u300/include/mach/system.h
> @@ -12,7 +12,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> diff --git a/arch/arm/mach-ux500/include/mach/system.h b/arch/arm/mach-ux500/include/mach/system.h
> index ae1dff1..258e5c9 100644
> --- a/arch/arm/mach-ux500/include/mach/system.h
> +++ b/arch/arm/mach-ux500/include/mach/system.h
> @@ -17,8 +17,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
> index 335946a..f3fa347 100644
> --- a/arch/arm/mach-versatile/include/mach/system.h
> +++ b/arch/arm/mach-versatile/include/mach/system.h
> @@ -30,8 +30,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-vexpress/include/mach/system.h b/arch/arm/mach-vexpress/include/mach/system.h
> index 899a4e6..f653a8e 100644
> --- a/arch/arm/mach-vexpress/include/mach/system.h
> +++ b/arch/arm/mach-vexpress/include/mach/system.h
> @@ -30,8 +30,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
> index 001a2f9..2aaeb93 100644
> --- a/arch/arm/mach-w90x900/include/mach/system.h
> +++ b/arch/arm/mach-w90x900/include/mach/system.h
> @@ -17,8 +17,3 @@
>  static void arch_idle(void)
>  {
>  }
> -
> -static void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
> diff --git a/arch/arm/mach-zynq/include/mach/system.h b/arch/arm/mach-zynq/include/mach/system.h
> index 34be7ed..8e88e0b 100644
> --- a/arch/arm/mach-zynq/include/mach/system.h
> +++ b/arch/arm/mach-zynq/include/mach/system.h
> @@ -20,8 +20,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif
> diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
> index 22b8911..b9c71b4 100644
> --- a/arch/arm/plat-mxc/include/mach/system.h
> +++ b/arch/arm/plat-mxc/include/mach/system.h
> @@ -27,8 +27,4 @@ static inline void arch_idle(void)
>  		cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
> index 4a0d125..86c6f83 100644
> --- a/arch/arm/plat-spear/include/plat/system.h
> +++ b/arch/arm/plat-spear/include/plat/system.h
> @@ -23,8 +23,4 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}
> -
>  #endif /* __PLAT_SYSTEM_H */
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH 35/41] ARM: restart: u300: use new restart hook
  2011-11-06 17:51 ` [PATCH 35/41] ARM: restart: u300: " Russell King - ARM Linux
@ 2011-11-07  8:10   ` Linus Walleij
  0 siblings, 0 replies; 162+ messages in thread
From: Linus Walleij @ 2011-11-07  8:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 6, 2011 at 6:51 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks for cleaning up this Russell!
Linus Walleij

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

* [PATCH 27/41] ARM: restart: prima2: use new restart hook
  2011-11-06 17:49 ` [PATCH 27/41] ARM: restart: prima2: " Russell King - ARM Linux
@ 2011-11-07  8:15   ` Barry Song
  0 siblings, 0 replies; 162+ messages in thread
From: Barry Song @ 2011-11-07  8:15 UTC (permalink / raw)
  To: linux-arm-kernel

2011/11/7 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Reviewed-by: Barry Song <Baohua.Song@csr.com>

> ---
> ?arch/arm/mach-prima2/common.h ? ? ? ? ? ? ?| ? ?1 +
> ?arch/arm/mach-prima2/include/mach/system.h | ? ?8 --------
> ?arch/arm/mach-prima2/prima2.c ? ? ? ? ? ? ?| ? ?1 +
> ?arch/arm/mach-prima2/rstc.c ? ? ? ? ? ? ? ?| ? ?7 +++++++
> ?4 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
> index 83e5d21..b28a930 100644
> --- a/arch/arm/mach-prima2/common.h
> +++ b/arch/arm/mach-prima2/common.h
> @@ -16,6 +16,7 @@ extern struct sys_timer sirfsoc_timer;
>
> ?extern void __init sirfsoc_of_irq_init(void);
> ?extern void __init sirfsoc_of_clk_init(void);
> +extern void sirfsoc_restart(char, const char *);
>
> ?#ifndef CONFIG_DEBUG_LL
> ?static inline void sirfsoc_map_lluart(void) ?{}
> diff --git a/arch/arm/mach-prima2/include/mach/system.h b/arch/arm/mach-prima2/include/mach/system.h
> index 0dbd257..eb16b4b 100644
> --- a/arch/arm/mach-prima2/include/mach/system.h
> +++ b/arch/arm/mach-prima2/include/mach/system.h
> @@ -9,13 +9,6 @@
> ?#ifndef __MACH_SYSTEM_H__
> ?#define __MACH_SYSTEM_H__
>
> -#include <linux/bitops.h>
> -#include <mach/hardware.h>
> -
> -#define SIRFSOC_SYS_RST_BIT ?BIT(31)
> -
> -extern void __iomem *sirfsoc_rstc_base;
> -
> ?static inline void arch_idle(void)
> ?{
> ? ? ? ?cpu_do_idle();
> @@ -23,7 +16,6 @@ static inline void arch_idle(void)
>
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> - ? ? ? writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
> ?}
>
> ?#endif
> diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/prima2.c
> index ef555c0..8609aad 100644
> --- a/arch/arm/mach-prima2/prima2.c
> +++ b/arch/arm/mach-prima2/prima2.c
> @@ -39,4 +39,5 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
> ? ? ? ?.dma_zone_size ?= SZ_256M,
> ? ? ? ?.init_machine ? = sirfsoc_mach_init,
> ? ? ? ?.dt_compat ? ? ?= prima2cb_dt_match,
> + ? ? ? .restart ? ? ? ?= sirfsoc_restart,
> ?MACHINE_END
> diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
> index 492cfa8..762adb7 100644
> --- a/arch/arm/mach-prima2/rstc.c
> +++ b/arch/arm/mach-prima2/rstc.c
> @@ -68,3 +68,10 @@ int sirfsoc_reset_device(struct device *dev)
>
> ? ? ? ?return 0;
> ?}
> +
> +#define SIRFSOC_SYS_RST_BIT ?BIT(31)
> +
> +void sirfsoc_restart(char mode, const char *cmd)
> +{
> + ? ? ? writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
> +}
> --
> 1.7.4.4

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

* [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-06 17:56     ` [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX Russell King - ARM Linux
@ 2011-11-07 10:30       ` Russell King - ARM Linux
  2011-11-07 11:17         ` Kyungmin Park
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-07 10:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-exynos4/cpu.c                 |    6 +-----
>  arch/arm/mach-exynos4/mach-armlex4210.c     |    1 +
>  arch/arm/mach-exynos4/mach-nuri.c           |    1 +
>  arch/arm/mach-exynos4/mach-origen.c         |    1 +
>  arch/arm/mach-exynos4/mach-smdk4x12.c       |    2 ++
>  arch/arm/mach-exynos4/mach-smdkv310.c       |    2 ++
>  arch/arm/mach-exynos4/mach-universal_c210.c |    1 +
>  7 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
> index 5b1765b..5b1ee56 100644
> --- a/arch/arm/mach-exynos4/cpu.c
> +++ b/arch/arm/mach-exynos4/cpu.c
> @@ -27,7 +27,6 @@
>  #include <plat/fb-core.h>
>  #include <plat/fimc-core.h>
>  #include <plat/iic-core.h>
> -#include <plat/reset.h>
>  #include <plat/tv-core.h>
>  
>  #include <mach/regs-irq.h>
> @@ -145,7 +144,7 @@ static void exynos4_idle(void)
>  	local_irq_enable();
>  }
>  
> -static void exynos4_sw_reset(void)
> +void exynos4_restart(char mode, const char *cmd)
>  {
>  	__raw_writel(0x1, S5P_SWRESET);
>  }
> @@ -286,8 +285,5 @@ int __init exynos4_init(void)
>  	/* set idle function */
>  	pm_idle = exynos4_idle;
>  
> -	/* set sw_reset function */
> -	s5p_reset_hook = exynos4_sw_reset;
> -

I notice in last nights merge of the Samsung stuff, this has become
less trivial - it's now:
        /* set sw_reset function */
        if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412())
                s5p_reset_hook = exynos4_sw_reset;

So which of the boards should be converted and which shouldn't ?
In other words, which exynos4210, 4212 or 4412 platforms?

>  	return sysdev_register(&exynos4_sysdev);
>  }
> diff --git a/arch/arm/mach-exynos4/mach-armlex4210.c b/arch/arm/mach-exynos4/mach-armlex4210.c
> index f0ca6c1..9bb7e6c 100644
> --- a/arch/arm/mach-exynos4/mach-armlex4210.c
> +++ b/arch/arm/mach-exynos4/mach-armlex4210.c
> @@ -212,4 +212,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210")
>  	.map_io		= armlex4210_map_io,
>  	.init_machine	= armlex4210_machine_init,
>  	.timer		= &exynos4_timer,
> +	.restart	= exynos4_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c
> index 236bbe1..3504f56 100644
> --- a/arch/arm/mach-exynos4/mach-nuri.c
> +++ b/arch/arm/mach-exynos4/mach-nuri.c
> @@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI")
>  	.init_machine	= nuri_machine_init,
>  	.timer		= &exynos4_timer,
>  	.reserve        = &nuri_reserve,
> +	.restart	= exynos4_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c
> index f80b563..161e5ee 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN")
>  	.init_machine	= origen_machine_init,
>  	.timer		= &exynos4_timer,
>  	.reserve	= &origen_reserve,
> +	.restart	= exynos4_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-exynos4/mach-smdk4x12.c b/arch/arm/mach-exynos4/mach-smdk4x12.c
> index fcf2e0e..020284c 100644
> --- a/arch/arm/mach-exynos4/mach-smdk4x12.c
> +++ b/arch/arm/mach-exynos4/mach-smdk4x12.c
> @@ -289,6 +289,7 @@ MACHINE_START(SMDK4212, "SMDK4212")
>  	.map_io		= smdk4x12_map_io,
>  	.init_machine	= smdk4x12_machine_init,
>  	.timer		= &exynos4_timer,
> +	.restart	= exynos4_restart,
>  MACHINE_END
>  
>  MACHINE_START(SMDK4412, "SMDK4412")
> @@ -299,4 +300,5 @@ MACHINE_START(SMDK4412, "SMDK4412")
>  	.map_io		= smdk4x12_map_io,
>  	.init_machine	= smdk4x12_machine_init,
>  	.timer		= &exynos4_timer,
> +	.restart	= exynos4_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
> index cec2afa..fdf5535 100644
> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
> @@ -378,6 +378,7 @@ MACHINE_START(SMDKV310, "SMDKV310")
>  	.init_machine	= smdkv310_machine_init,
>  	.timer		= &exynos4_timer,
>  	.reserve	= &smdkv310_reserve,
> +	.restart	= exynos4_restart,
>  MACHINE_END
>  
>  MACHINE_START(SMDKC210, "SMDKC210")
> @@ -387,4 +388,5 @@ MACHINE_START(SMDKC210, "SMDKC210")
>  	.map_io		= smdkv310_map_io,
>  	.init_machine	= smdkv310_machine_init,
>  	.timer		= &exynos4_timer,
> +	.restart	= exynos4_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c
> index a2a177f..4bdd30c 100644
> --- a/arch/arm/mach-exynos4/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos4/mach-universal_c210.c
> @@ -1061,4 +1061,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
>  	.init_machine	= universal_machine_init,
>  	.timer		= &exynos4_timer,
>  	.reserve        = &universal_reserve,
> +	.restart	= exynos4_restart,
>  MACHINE_END
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-07 10:30       ` Russell King - ARM Linux
@ 2011-11-07 11:17         ` Kyungmin Park
  2011-11-07 11:52           ` Russell King - ARM Linux
  0 siblings, 1 reply; 162+ messages in thread
From: Kyungmin Park @ 2011-11-07 11:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/7/11, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux wrote:
>> Hook these platforms restart code into the new restart hook rather
>> than using arch_reset().
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> ---
>>  arch/arm/mach-exynos4/cpu.c                 |    6 +-----
>>  arch/arm/mach-exynos4/mach-armlex4210.c     |    1 +
>>  arch/arm/mach-exynos4/mach-nuri.c           |    1 +
>>  arch/arm/mach-exynos4/mach-origen.c         |    1 +
>>  arch/arm/mach-exynos4/mach-smdk4x12.c       |    2 ++
>>  arch/arm/mach-exynos4/mach-smdkv310.c       |    2 ++
>>  arch/arm/mach-exynos4/mach-universal_c210.c |    1 +
>>  7 files changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
>> index 5b1765b..5b1ee56 100644
>> --- a/arch/arm/mach-exynos4/cpu.c
>> +++ b/arch/arm/mach-exynos4/cpu.c
>> @@ -27,7 +27,6 @@
>>  #include <plat/fb-core.h>
>>  #include <plat/fimc-core.h>
>>  #include <plat/iic-core.h>
>> -#include <plat/reset.h>
>>  #include <plat/tv-core.h>
>>
>>  #include <mach/regs-irq.h>
>> @@ -145,7 +144,7 @@ static void exynos4_idle(void)
>>  	local_irq_enable();
>>  }
>>
>> -static void exynos4_sw_reset(void)
>> +void exynos4_restart(char mode, const char *cmd)
>>  {
>>  	__raw_writel(0x1, S5P_SWRESET);
>>  }
>> @@ -286,8 +285,5 @@ int __init exynos4_init(void)
>>  	/* set idle function */
>>  	pm_idle = exynos4_idle;
>>
>> -	/* set sw_reset function */
>> -	s5p_reset_hook = exynos4_sw_reset;
>> -
>
> I notice in last nights merge of the Samsung stuff, this has become
> less trivial - it's now:
>         /* set sw_reset function */
>         if (soc_is_exynos4210() || soc_is_exynos4212() ||
> soc_is_exynos4412())
>                 s5p_reset_hook = exynos4_sw_reset;
>
> So which of the boards should be converted and which shouldn't ?
> In other words, which exynos4210, 4212 or 4412 platforms?

except the arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is used.
currently all exynos4 series has same reset function. it's preparation
for exynos5 series maybe.

you can use the exynos4_sw_reset for all boards.

Thank you,
Kyungmin Park
>
>>  	return sysdev_register(&exynos4_sysdev);
>>  }
>> diff --git a/arch/arm/mach-exynos4/mach-armlex4210.c
>> b/arch/arm/mach-exynos4/mach-armlex4210.c
>> index f0ca6c1..9bb7e6c 100644
>> --- a/arch/arm/mach-exynos4/mach-armlex4210.c
>> +++ b/arch/arm/mach-exynos4/mach-armlex4210.c
>> @@ -212,4 +212,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210")
>>  	.map_io		= armlex4210_map_io,
>>  	.init_machine	= armlex4210_machine_init,
>>  	.timer		= &exynos4_timer,
>> +	.restart	= exynos4_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/mach-exynos4/mach-nuri.c
>> b/arch/arm/mach-exynos4/mach-nuri.c
>> index 236bbe1..3504f56 100644
>> --- a/arch/arm/mach-exynos4/mach-nuri.c
>> +++ b/arch/arm/mach-exynos4/mach-nuri.c
>> @@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI")
>>  	.init_machine	= nuri_machine_init,
>>  	.timer		= &exynos4_timer,
>>  	.reserve        = &nuri_reserve,
>> +	.restart	= exynos4_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/mach-exynos4/mach-origen.c
>> b/arch/arm/mach-exynos4/mach-origen.c
>> index f80b563..161e5ee 100644
>> --- a/arch/arm/mach-exynos4/mach-origen.c
>> +++ b/arch/arm/mach-exynos4/mach-origen.c
>> @@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN")
>>  	.init_machine	= origen_machine_init,
>>  	.timer		= &exynos4_timer,
>>  	.reserve	= &origen_reserve,
>> +	.restart	= exynos4_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/mach-exynos4/mach-smdk4x12.c
>> b/arch/arm/mach-exynos4/mach-smdk4x12.c
>> index fcf2e0e..020284c 100644
>> --- a/arch/arm/mach-exynos4/mach-smdk4x12.c
>> +++ b/arch/arm/mach-exynos4/mach-smdk4x12.c
>> @@ -289,6 +289,7 @@ MACHINE_START(SMDK4212, "SMDK4212")
>>  	.map_io		= smdk4x12_map_io,
>>  	.init_machine	= smdk4x12_machine_init,
>>  	.timer		= &exynos4_timer,
>> +	.restart	= exynos4_restart,
>>  MACHINE_END
>>
>>  MACHINE_START(SMDK4412, "SMDK4412")
>> @@ -299,4 +300,5 @@ MACHINE_START(SMDK4412, "SMDK4412")
>>  	.map_io		= smdk4x12_map_io,
>>  	.init_machine	= smdk4x12_machine_init,
>>  	.timer		= &exynos4_timer,
>> +	.restart	= exynos4_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c
>> b/arch/arm/mach-exynos4/mach-smdkv310.c
>> index cec2afa..fdf5535 100644
>> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
>> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
>> @@ -378,6 +378,7 @@ MACHINE_START(SMDKV310, "SMDKV310")
>>  	.init_machine	= smdkv310_machine_init,
>>  	.timer		= &exynos4_timer,
>>  	.reserve	= &smdkv310_reserve,
>> +	.restart	= exynos4_restart,
>>  MACHINE_END
>>
>>  MACHINE_START(SMDKC210, "SMDKC210")
>> @@ -387,4 +388,5 @@ MACHINE_START(SMDKC210, "SMDKC210")
>>  	.map_io		= smdkv310_map_io,
>>  	.init_machine	= smdkv310_machine_init,
>>  	.timer		= &exynos4_timer,
>> +	.restart	= exynos4_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c
>> b/arch/arm/mach-exynos4/mach-universal_c210.c
>> index a2a177f..4bdd30c 100644
>> --- a/arch/arm/mach-exynos4/mach-universal_c210.c
>> +++ b/arch/arm/mach-exynos4/mach-universal_c210.c
>> @@ -1061,4 +1061,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
>>  	.init_machine	= universal_machine_init,
>>  	.timer		= &exynos4_timer,
>>  	.reserve        = &universal_reserve,
>> +	.restart	= exynos4_restart,
>>  MACHINE_END
>> --
>> 1.7.4.4
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

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

* [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-07 11:17         ` Kyungmin Park
@ 2011-11-07 11:52           ` Russell King - ARM Linux
  2011-11-08  5:21             ` Kukjin Kim
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-07 11:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 07, 2011 at 08:17:58PM +0900, Kyungmin Park wrote:
> On 11/7/11, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux wrote:
> >> Hook these platforms restart code into the new restart hook rather
> >> than using arch_reset().
> >>
> >> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> >> ---
> >>  arch/arm/mach-exynos4/cpu.c                 |    6 +-----
> >>  arch/arm/mach-exynos4/mach-armlex4210.c     |    1 +
> >>  arch/arm/mach-exynos4/mach-nuri.c           |    1 +
> >>  arch/arm/mach-exynos4/mach-origen.c         |    1 +
> >>  arch/arm/mach-exynos4/mach-smdk4x12.c       |    2 ++
> >>  arch/arm/mach-exynos4/mach-smdkv310.c       |    2 ++
> >>  arch/arm/mach-exynos4/mach-universal_c210.c |    1 +
> >>  7 files changed, 9 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
> >> index 5b1765b..5b1ee56 100644
> >> --- a/arch/arm/mach-exynos4/cpu.c
> >> +++ b/arch/arm/mach-exynos4/cpu.c
> >> @@ -27,7 +27,6 @@
> >>  #include <plat/fb-core.h>
> >>  #include <plat/fimc-core.h>
> >>  #include <plat/iic-core.h>
> >> -#include <plat/reset.h>
> >>  #include <plat/tv-core.h>
> >>
> >>  #include <mach/regs-irq.h>
> >> @@ -145,7 +144,7 @@ static void exynos4_idle(void)
> >>  	local_irq_enable();
> >>  }
> >>
> >> -static void exynos4_sw_reset(void)
> >> +void exynos4_restart(char mode, const char *cmd)
> >>  {
> >>  	__raw_writel(0x1, S5P_SWRESET);
> >>  }
> >> @@ -286,8 +285,5 @@ int __init exynos4_init(void)
> >>  	/* set idle function */
> >>  	pm_idle = exynos4_idle;
> >>
> >> -	/* set sw_reset function */
> >> -	s5p_reset_hook = exynos4_sw_reset;
> >> -
> >
> > I notice in last nights merge of the Samsung stuff, this has become
> > less trivial - it's now:
> >         /* set sw_reset function */
> >         if (soc_is_exynos4210() || soc_is_exynos4212() ||
> > soc_is_exynos4412())
> >                 s5p_reset_hook = exynos4_sw_reset;
> >
> > So which of the boards should be converted and which shouldn't ?
> > In other words, which exynos4210, 4212 or 4412 platforms?
> 
> except the arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is used.
> currently all exynos4 series has same reset function. it's preparation
> for exynos5 series maybe.
> 
> you can use the exynos4_sw_reset for all boards.

Thanks, that gets me back to where I was with the patch before the
exynos4 move.

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (49 preceding siblings ...)
  2011-11-07  2:48 ` [01: PATCH 0/7] Preparation for arch_reset changes Nicolas Pitre
@ 2011-11-07 13:31 ` Will Deacon
  2011-11-07 17:24 ` H Hartley Sweeten
                   ` (2 subsequent siblings)
  53 siblings, 0 replies; 162+ messages in thread
From: Will Deacon @ 2011-11-07 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Russell,

On Sun, Nov 06, 2011 at 05:31:13PM +0000, Russell King - ARM Linux wrote:
> This series lays down the ground work for changing the way we handle the
> reset (now called restart) handling on ARM.
> 
> As a result of these patches, we provide a new hook in the machine_desc
> record called 'restart' which is pointed at a function to perform the
> appropriate restart actions for the platform.  This is called directly
> from machine_restart() with IRQs and caches on.
> 
> The 'soft_reboot' flag is changed to a more generic 'restart_mode'
> character - which is used to initialize the default reboot mode (which
> can be changed via the 'reboot=' command line parameter.)
> 
> 'soft_restart(addr)' is added which performs a soft restart (iow,
> orderly shutdown of caches and MMU and a jump to the passed address),
> rather than the old way which separated the tear-down of the caches
> and MMU from the code doing the jump.  This will be necessary to
> resolve the ARMv6 and ARMv7 CPU restarting problems.
> 
> Finally, appropriate 'restart_mode' values are added to several
> platforms which were hard-coding the restart mode by intercepting
> the restarting via arm_pm_restart.

For the seven patches,

Acked-by: Will Deacon <will.deacon@arm.com>

Thanks,

Will

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

* [02: PATCH 0/41] Platform arch_reset changes
  2011-11-06 17:39 ` [02: PATCH 0/41] Platform arch_reset changes Russell King - ARM Linux
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
@ 2011-11-07 13:38   ` Will Deacon
  2011-11-07 13:52     ` Russell King - ARM Linux
  1 sibling, 1 reply; 162+ messages in thread
From: Will Deacon @ 2011-11-07 13:38 UTC (permalink / raw)
  To: linux-arm-kernel

Russell,

On Sun, Nov 06, 2011 at 05:39:39PM +0000, Russell King - ARM Linux wrote:
> Part 2. These are the platform updates, so far.
> 
> The first patch combines the individual files in mach-clps711x which
> contain one or two functions or data structures before changing the
> arch_reset stuff.
> 
> The majority of the remaining patches address each group of platforms
> individually.
> 
> The final patch removes the resulting empty arch_reset() functions,
> its call site and associated code.  XXX NOTE XXX This results in
> anything left with an arch_reset() function having non-functional
> restart capability.

I was dreading the thought of having to go digging around in each platform
again, so thanks for doing this. Apart from the troublesome platforms
(partially addressed in your third series), is there anything else that
needs looking at?

I guess I should also ask whether or not the third series is a blocker for
merging the other two (given that it would leave those platforms broken).

Cheers,

Will

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

* [02: PATCH 0/41] Platform arch_reset changes
  2011-11-07 13:38   ` [02: PATCH 0/41] Platform arch_reset changes Will Deacon
@ 2011-11-07 13:52     ` Russell King - ARM Linux
  2011-11-08  4:24       ` Nicolas Pitre
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-07 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 07, 2011 at 01:38:47PM +0000, Will Deacon wrote:
> Russell,
> 
> On Sun, Nov 06, 2011 at 05:39:39PM +0000, Russell King - ARM Linux wrote:
> > Part 2. These are the platform updates, so far.
> > 
> > The first patch combines the individual files in mach-clps711x which
> > contain one or two functions or data structures before changing the
> > arch_reset stuff.
> > 
> > The majority of the remaining patches address each group of platforms
> > individually.
> > 
> > The final patch removes the resulting empty arch_reset() functions,
> > its call site and associated code.  XXX NOTE XXX This results in
> > anything left with an arch_reset() function having non-functional
> > restart capability.
> 
> I was dreading the thought of having to go digging around in each platform
> again, so thanks for doing this. Apart from the troublesome platforms
> (partially addressed in your third series), is there anything else that
> needs looking at?

In direct connection with this - that said, although I've build-tested a
number of these (which is why I found things like the trailing , on the
previous initializers - and had to rework some of the patches as a result),
I've also boot tested the Versatile Express and OMAP3 but not tried a
'reboot' on them yet.

The final removal of mach/system.h depends on getting rid of the arch_idle
thing.  While going through these headers, I was dismayed to find these:

arch/arm/mach-s3c2410/include/mach/system.h:void (*s3c24xx_idle)(void);
arch/arm/plat-mxc/include/mach/system.h:extern void (*imx_idle)(void);

when we have a perfectly good pm_idle hook already in place - so there's
no excuse for these especially when other platforms are already using
pm_idle to hook their platform specific idle function into.  This is
something that better be gone at the next merge window!

> I guess I should also ask whether or not the third series is a blocker for
> merging the other two (given that it would leave those platforms broken).

That depends on your point of view.

My original plan was to see about merging the ground-work (part 1) in
this merge window to avoid a dependency problem - but I think it grew
too large to contemplate that (I might have a discussion with Linus
in private over this, because not doing this could be quite hairy for
us.)

Part 2 is fine up until the final patch - if we can get part 1 in, then
the individual patches can be carried in the various maintainer trees
independently.  In any case, patch 41 would have to be scheduled for
the end of the merge window.

As for whether patch 41 goes in with or without the remainder fixed up,
that depends what kind of a mood I'm in - over the weekend I was feeling
very pissed off with the state of the remaining platforms that I was
seriously thinking that I'd push it in anyway at the next merge window
and to hell with them.  (Just like the Greece holding the eurozone to
ransom, I don't want a few platforms holding the rest of the ARM tree
to ransom over this change!)

I've moderated a little bit over that - but only to the extent that
there's going to be something like 12 weeks for other platforms to get
their act together and if they don't show willing to address the
concerns, then I'm really not going to care about breaking them at
the next merge window.

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

* [PATCH 12/41] ARM: restart: highbank: use new restart hook
  2011-11-06 17:44 ` [PATCH 12/41] ARM: restart: highbank: " Russell King - ARM Linux
@ 2011-11-07 15:43   ` Rob Herring
  0 siblings, 0 replies; 162+ messages in thread
From: Rob Herring @ 2011-11-07 15:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/06/2011 11:44 AM, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-highbank/core.h                |    1 +
>  arch/arm/mach-highbank/highbank.c            |    1 +
>  arch/arm/mach-highbank/include/mach/system.h |    4 +++-
>  arch/arm/mach-highbank/system.c              |    2 +-
>  4 files changed, 6 insertions(+), 2 deletions(-)
> 

Acked-by: Rob Herring <rob.herring@calxeda.com>

Rob

> diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
> index 7e33fc9..d8e2d0b 100644
> --- a/arch/arm/mach-highbank/core.h
> +++ b/arch/arm/mach-highbank/core.h
> @@ -1,5 +1,6 @@
>  extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
>  extern void highbank_clocks_init(void);
> +extern void highbank_restart(char, const char *);
>  extern void __iomem *scu_base_addr;
>  #ifdef CONFIG_DEBUG_HIGHBANK_UART
>  extern void highbank_lluart_map_io(void);
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index b82dcf0..9d356a1 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -142,4 +142,5 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
>  	.timer		= &highbank_timer,
>  	.init_machine	= highbank_init,
>  	.dt_compat	= highbank_match,
> +	.restart	= highbank_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-highbank/include/mach/system.h b/arch/arm/mach-highbank/include/mach/system.h
> index 7e81922..0754c79 100644
> --- a/arch/arm/mach-highbank/include/mach/system.h
> +++ b/arch/arm/mach-highbank/include/mach/system.h
> @@ -21,6 +21,8 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -extern void arch_reset(char mode, const char *cmd);
> +static inline void arch_reset(char mode, const char *cmd)
> +{
> +}
>  
>  #endif
> diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c
> index 53f0c4c..82c2723 100644
> --- a/arch/arm/mach-highbank/system.c
> +++ b/arch/arm/mach-highbank/system.c
> @@ -20,7 +20,7 @@
>  #include "core.h"
>  #include "sysregs.h"
>  
> -void arch_reset(char mode, const char *cmd)
> +void highbank_restart(char mode, const char *cmd)
>  {
>  	if (mode == 'h')
>  		hignbank_set_pwr_hard_reset();

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

* [PATCH 09/41] ARM: restart: ep93xx: use new restart hook
  2011-11-06 17:43 ` [PATCH 09/41] ARM: restart: ep93xx: " Russell King - ARM Linux
@ 2011-11-07 17:10   ` H Hartley Sweeten
  0 siblings, 0 replies; 162+ messages in thread
From: H Hartley Sweeten @ 2011-11-07 17:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday, November 06, 2011 10:43 AM, Russell King wrote:
>
> Hook these platforms restart code into the new restart hook rather than
> using arch_reset().
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-ep93xx/adssphere.c             |    1 +
>  arch/arm/mach-ep93xx/core.c                  |   12 ++++++++++++
>  arch/arm/mach-ep93xx/edb93xx.c               |    8 ++++++++
>  arch/arm/mach-ep93xx/gesbc9312.c             |    1 +
>  arch/arm/mach-ep93xx/include/mach/platform.h |    2 ++
>  arch/arm/mach-ep93xx/include/mach/system.h   |   11 -----------
>  arch/arm/mach-ep93xx/micro9.c                |    4 ++++
>  arch/arm/mach-ep93xx/simone.c                |    1 +
>  arch/arm/mach-ep93xx/snappercl15.c           |    1 +
>  arch/arm/mach-ep93xx/ts72xx.c                |    1 +
>  arch/arm/mach-ep93xx/vision_ep9307.c         |    1 +
>  11 files changed, 32 insertions(+), 11 deletions(-)

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Thanks!

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

* [PATCH 41/41] ARM: restart: remove the now empty arch_reset()
  2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
  2011-11-07  3:02   ` Nicolas Pitre
@ 2011-11-07 17:15   ` H Hartley Sweeten
  2011-11-08 15:48   ` Jamie Iles
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 162+ messages in thread
From: H Hartley Sweeten @ 2011-11-07 17:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday, November 06, 2011 10:54 AM, Russell King wrote:
>
> Remove the now empty arch_reset() from all the mach/system.h includes,
> and remove its callsite.  Remove arm_machine_restart() as this function
> no longer does anything useful.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/system.h                  |    1 -
>  arch/arm/kernel/process.c                      |   10 ++--------

[...]

>  arch/arm/mach-ep93xx/include/mach/system.h     |    4 ----

[...]

> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> index fe7de75..03775b1 100644
> --- a/arch/arm/include/asm/system.h
> +++ b/arch/arm/include/asm/system.h
> @@ -100,7 +100,6 @@ extern void __show_regs(struct pt_regs *);
>  extern int __pure cpu_architecture(void);
>  extern void cpu_init(void);
>  
> -void arm_machine_restart(char mode, const char *cmd);
>  void soft_restart(unsigned long);
>  extern void (*arm_pm_restart)(char str, const char *cmd);
>  
> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> index 52b4306..72e119f 100644
> --- a/arch/arm/kernel/process.c
> +++ b/arch/arm/kernel/process.c
> @@ -117,14 +117,8 @@ void soft_restart(unsigned long addr)
>  	cpu_reset(addr);
>  }
>  
> -void arm_machine_restart(char mode, const char *cmd)
> +static void null_restart(char mode, const char *cmd)
>  {
> -	/* Disable interrupts first */
> -	local_irq_disable();
> -	local_fiq_disable();
> -
> -	/* Call the architecture specific reboot code. */
> -	arch_reset(mode, cmd);
>  }
>  
>  /*
> @@ -133,7 +127,7 @@ void arm_machine_restart(char mode, const char *cmd)
>  void (*pm_power_off)(void);
>  EXPORT_SYMBOL(pm_power_off);
>  
> -void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
> +void (*arm_pm_restart)(char str, const char *cmd) = null_restart;
>  EXPORT_SYMBOL_GPL(arm_pm_restart);
>  
>  static void do_nothing(void *unused)

[...]

> diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
> index b27a654..b5bec7c 100644
> --- a/arch/arm/mach-ep93xx/include/mach/system.h
> +++ b/arch/arm/mach-ep93xx/include/mach/system.h
> @@ -5,7 +5,3 @@ static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
> -
> -static inline void arch_reset(char mode, const char *cmd)
> -{
> -}

For ep93xx...

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Thanks!

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

* [PATCH 38/41] ARM: restart: w90x900: use new restart hook
  2011-11-06 17:52 ` [PATCH 38/41] ARM: restart: w90x900: " Russell King - ARM Linux
@ 2011-11-07 17:16   ` Russell King - ARM Linux
  0 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-07 17:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 06, 2011 at 05:52:50PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

This one doesn't compile - cpu.h isn't included by the *evb.c files.
What's more... this isn't nice:

arch/arm/mach-w90x900/nuc960.h:extern void nuc900_init_irq(void);
arch/arm/mach-w90x900/nuc910.h:extern void nuc900_init_irq(void);
arch/arm/mach-w90x900/nuc950.h:extern void nuc900_init_irq(void);

arch/arm/mach-w90x900/nuc910.h:extern struct sys_timer nuc900_timer;
arch/arm/mach-w90x900/nuc950.h:extern struct sys_timer nuc900_timer;
arch/arm/mach-w90x900/nuc960.h:extern struct sys_timer nuc900_timer;

It's wanting a common nuc9xx.h header containing the common stuff,
which'll include the nuc900_restart() function prototype.

So, I'm punting this into part 3 of the patchset until it's fixed.

> ---
>  arch/arm/mach-w90x900/cpu.c                 |   15 +++++++++++++++
>  arch/arm/mach-w90x900/cpu.h                 |    1 +
>  arch/arm/mach-w90x900/include/mach/system.h |   17 -----------------
>  arch/arm/mach-w90x900/mach-nuc910evb.c      |    1 +
>  arch/arm/mach-w90x900/mach-nuc950evb.c      |    1 +
>  arch/arm/mach-w90x900/mach-nuc960evb.c      |    1 +
>  6 files changed, 19 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c
> index 0a235e5..07eddd7 100644
> --- a/arch/arm/mach-w90x900/cpu.c
> +++ b/arch/arm/mach-w90x900/cpu.c
> @@ -33,6 +33,7 @@
>  #include <mach/regs-serial.h>
>  #include <mach/regs-clock.h>
>  #include <mach/regs-ebi.h>
> +#include <mach/regs-timer.h>
>  
>  #include "cpu.h"
>  #include "clock.h"
> @@ -222,3 +223,17 @@ void __init nuc900_init_clocks(void)
>  	clkdev_add_table(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs));
>  }
>  
> +#define	WTCR	(TMR_BA + 0x1C)
> +#define	WTCLK	(1 << 10)
> +#define	WTE	(1 << 7)
> +#define	WTRE	(1 << 1)
> +
> +void nuc900_restart(char mode, const char *cmd)
> +{
> +	if (mode == 's') {
> +		/* Jump into ROM at address 0 */
> +		soft_restart(0);
> +	} else {
> +		__raw_writel(WTE | WTRE | WTCLK, WTCR);
> +	}
> +}
> diff --git a/arch/arm/mach-w90x900/cpu.h b/arch/arm/mach-w90x900/cpu.h
> index f8730b6..b56799d 100644
> --- a/arch/arm/mach-w90x900/cpu.h
> +++ b/arch/arm/mach-w90x900/cpu.h
> @@ -49,6 +49,7 @@ extern void nuc900_clock_source(struct device *dev, unsigned char *src);
>  extern void nuc900_init_clocks(void);
>  extern void nuc900_map_io(struct map_desc *mach_desc, int mach_size);
>  extern void nuc900_board_init(struct platform_device **device, int size);
> +extern void nuc900_restart(char, const char *);
>  
>  /* for either public between 910 and 920, or between 920 and 950 */
>  
> diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
> index 68875a1..001a2f9 100644
> --- a/arch/arm/mach-w90x900/include/mach/system.h
> +++ b/arch/arm/mach-w90x900/include/mach/system.h
> @@ -14,28 +14,11 @@
>   * (at your option) any later version.
>   *
>   */
> -
> -#include <linux/io.h>
> -#include <asm/proc-fns.h>
> -#include <mach/map.h>
> -#include <mach/regs-timer.h>
> -
> -#define	WTCR	(TMR_BA + 0x1C)
> -#define	WTCLK	(1 << 10)
> -#define	WTE	(1 << 7)
> -#define	WTRE	(1 << 1)
> -
>  static void arch_idle(void)
>  {
>  }
>  
>  static void arch_reset(char mode, const char *cmd)
>  {
> -	if (mode == 's') {
> -		/* Jump into ROM at address 0 */
> -		soft_restart(0);
> -	} else {
> -		__raw_writel(WTE | WTRE | WTCLK, WTCR);
> -	}
>  }
>  
> diff --git a/arch/arm/mach-w90x900/mach-nuc910evb.c b/arch/arm/mach-w90x900/mach-nuc910evb.c
> index 31c1090..10852dc 100644
> --- a/arch/arm/mach-w90x900/mach-nuc910evb.c
> +++ b/arch/arm/mach-w90x900/mach-nuc910evb.c
> @@ -38,4 +38,5 @@ MACHINE_START(W90P910EVB, "W90P910EVB")
>  	.init_irq	= nuc900_init_irq,
>  	.init_machine	= nuc910evb_init,
>  	.timer		= &nuc900_timer,
> +	.restart	= nuc900_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-w90x900/mach-nuc950evb.c b/arch/arm/mach-w90x900/mach-nuc950evb.c
> index 4062e55..b549967 100644
> --- a/arch/arm/mach-w90x900/mach-nuc950evb.c
> +++ b/arch/arm/mach-w90x900/mach-nuc950evb.c
> @@ -41,4 +41,5 @@ MACHINE_START(W90P950EVB, "W90P950EVB")
>  	.init_irq	= nuc900_init_irq,
>  	.init_machine	= nuc950evb_init,
>  	.timer		= &nuc900_timer,
> +	.restart	= nuc900_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-w90x900/mach-nuc960evb.c b/arch/arm/mach-w90x900/mach-nuc960evb.c
> index 0ab9995..1ea5acf 100644
> --- a/arch/arm/mach-w90x900/mach-nuc960evb.c
> +++ b/arch/arm/mach-w90x900/mach-nuc960evb.c
> @@ -38,4 +38,5 @@ MACHINE_START(W90N960EVB, "W90N960EVB")
>  	.init_irq	= nuc900_init_irq,
>  	.init_machine	= nuc960evb_init,
>  	.timer		= &nuc900_timer,
> +	.restart	= nuc900_restart,
>  MACHINE_END
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (50 preceding siblings ...)
  2011-11-07 13:31 ` Will Deacon
@ 2011-11-07 17:24 ` H Hartley Sweeten
  2011-11-08  5:00 ` Kukjin Kim
  2011-11-21  9:56 ` Russell King - ARM Linux
  53 siblings, 0 replies; 162+ messages in thread
From: H Hartley Sweeten @ 2011-11-07 17:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday, November 06, 2011 10:31 AM, Russell King wrote:
>
> This series lays down the ground work for changing the way we handle the
> reset (now called restart) handling on ARM.
>
> As a result of these patches, we provide a new hook in the machine_desc
> record called 'restart' which is pointed at a function to perform the
> appropriate restart actions for the platform.  This is called directly
> from machine_restart() with IRQs and caches on.
>
> The 'soft_reboot' flag is changed to a more generic 'restart_mode'
> character - which is used to initialize the default reboot mode (which
> can be changed via the 'reboot=' command line parameter.)
>
> 'soft_restart(addr)' is added which performs a soft restart (iow,
> orderly shutdown of caches and MMU and a jump to the passed address),
> rather than the old way which separated the tear-down of the caches
> and MMU from the code doing the jump.  This will be necessary to
> resolve the ARMv6 and ARMv7 CPU restarting problems.
>
> Finally, appropriate 'restart_mode' values are added to several
> platforms which were hard-coding the restart mode by intercepting
> the restarting via arm_pm_restart.

Russell,

You already have my Acked-by for the ep93xx part of patch 7.

But, FWIW, the rest of this series also looks good to me.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

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

* [PATCH 3/7] ARM: restart: add default restart modes for PXA mioa701, spitz and tosa
  2011-11-06 17:32 ` [PATCH 3/7] ARM: restart: add default restart modes for PXA mioa701, spitz and tosa Russell King - ARM Linux
@ 2011-11-07 18:02   ` Robert Jarzmik
  0 siblings, 0 replies; 162+ messages in thread
From: Robert Jarzmik @ 2011-11-07 18:02 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

> Add a default restart mode to reflect the hard-coded restart mode
> found in these files.
For mioa701:

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

--
Robert

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

* [02: PATCH 0/41] Platform arch_reset changes
  2011-11-07 13:52     ` Russell King - ARM Linux
@ 2011-11-08  4:24       ` Nicolas Pitre
  0 siblings, 0 replies; 162+ messages in thread
From: Nicolas Pitre @ 2011-11-08  4:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 7 Nov 2011, Russell King - ARM Linux wrote:

> The final removal of mach/system.h depends on getting rid of the arch_idle
> thing.  While going through these headers, I was dismayed to find these:
> 
> arch/arm/mach-s3c2410/include/mach/system.h:void (*s3c24xx_idle)(void);
> arch/arm/plat-mxc/include/mach/system.h:extern void (*imx_idle)(void);
> 
> when we have a perfectly good pm_idle hook already in place - so there's
> no excuse for these especially when other platforms are already using
> pm_idle to hook their platform specific idle function into.  This is
> something that better be gone at the next merge window!

I saw those too and intended to get rid of those pointers.
I was just waiting for your arch_reset work to settle down before
respinning my arch-idle series.

> > I guess I should also ask whether or not the third series is a blocker for
> > merging the other two (given that it would leave those platforms broken).
> 
> That depends on your point of view.
> 
> My original plan was to see about merging the ground-work (part 1) in
> this merge window to avoid a dependency problem - but I think it grew
> too large to contemplate that (I might have a discussion with Linus
> in private over this, because not doing this could be quite hairy for
> us.)
> 
> Part 2 is fine up until the final patch - if we can get part 1 in, then
> the individual patches can be carried in the various maintainer trees
> independently.  In any case, patch 41 would have to be scheduled for
> the end of the merge window.

I'd recommend publishing all those patches in your tree and pushing them 
all in the next merge window.  The probability for conflicts with 
subarch trees is still relatively low. If conflicts are unavoidable then 
using your branch as a base would be the way to go. Whether platform 
code is then based on 3.2-rc1 or a particular branch in your tree is not 
much different at that point.

> As for whether patch 41 goes in with or without the remainder fixed 
> up, that depends what kind of a mood I'm in - over the weekend I was 
> feeling very pissed off with the state of the remaining platforms that 
> I was seriously thinking that I'd push it in anyway at the next merge 
> window and to hell with them.  (Just like the Greece holding the 
> eurozone to ransom, I don't want a few platforms holding the rest of 
> the ARM tree to ransom over this change!)

I agree with that.  However, if you merge those patches (including patch 
41) in your tree now, that means people have about 5 months before this 
change will show up in a released kernel, which should give plenty of 
time for interested parties to fix their problematic code.  The sooner 
this appears in linux-next the better.

> I've moderated a little bit over that - but only to the extent that
> there's going to be something like 12 weeks for other platforms to get
> their act together and if they don't show willing to address the
> concerns, then I'm really not going to care about breaking them at
> the next merge window.

Exactly.


Nicolas

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (51 preceding siblings ...)
  2011-11-07 17:24 ` H Hartley Sweeten
@ 2011-11-08  5:00 ` Kukjin Kim
  2011-11-08 10:05   ` Russell King - ARM Linux
  2011-11-21  9:56 ` Russell King - ARM Linux
  53 siblings, 1 reply; 162+ messages in thread
From: Kukjin Kim @ 2011-11-08  5:00 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> This series lays down the ground work for changing the way we handle the
> reset (now called restart) handling on ARM.
> 
> As a result of these patches, we provide a new hook in the machine_desc
> record called 'restart' which is pointed at a function to perform the
> appropriate restart actions for the platform.  This is called directly
> from machine_restart() with IRQs and caches on.
> 
> The 'soft_reboot' flag is changed to a more generic 'restart_mode'
> character - which is used to initialize the default reboot mode (which
> can be changed via the 'reboot=' command line parameter.)
> 
> 'soft_restart(addr)' is added which performs a soft restart (iow,
> orderly shutdown of caches and MMU and a jump to the passed address),
> rather than the old way which separated the tear-down of the caches
> and MMU from the code doing the jump.  This will be necessary to
> resolve the ARMv6 and ARMv7 CPU restarting problems.
> 
> Finally, appropriate 'restart_mode' values are added to several
> platforms which were hard-coding the restart mode by intercepting
> the restarting via arm_pm_restart.
> 
>  arch/arm/include/asm/mach/arch.h                  |    9 +++--
>  arch/arm/include/asm/system.h                     |    1 +
>  arch/arm/kernel/machine_kexec.c                   |    4 +-
>  arch/arm/kernel/process.c                         |   35
++++++++++++-----
> ---
>  arch/arm/kernel/setup.c                           |    7 +++-
>  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
>  arch/arm/mach-ebsa110/core.c                      |    2 +-
>  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
>  arch/arm/mach-ep93xx/include/mach/system.h        |    2 -
>  arch/arm/mach-footbridge/cats-hw.c                |    2 +-
>  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
>  arch/arm/mach-iop32x/include/mach/system.h        |    4 +--
>  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
>  arch/arm/mach-ixp2000/include/mach/system.h       |    2 -
>  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
>  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
>  arch/arm/mach-lpc32xx/include/mach/system.h       |    3 --
>  arch/arm/mach-mmp/include/mach/system.h           |    4 +-
>  arch/arm/mach-mxs/system.c                        |    2 +-
>  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
>  arch/arm/mach-pxa/mioa701.c                       |    1 +
>  arch/arm/mach-pxa/reset.c                         |    2 +-
>  arch/arm/mach-pxa/spitz.c                         |    3 ++
>  arch/arm/mach-pxa/tosa.c                          |    1 +
>  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
>  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 +-
>  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
>  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
>  arch/arm/mach-shark/core.c                        |    1 -
>  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
>  arch/arm/mach-u300/include/mach/system.h          |    2 -
>  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
>  arch/arm/mm/idmap.c                               |    2 +-
>  arch/arm/mm/nommu.c                               |    2 +-
>  arch/arm/plat-mxc/system.c                        |    2 +-
>  arch/arm/plat-spear/include/plat/system.h         |    2 +-
>  36 files changed, 64 insertions(+), 59 deletions(-)

For Samsung stuff,

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

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] 162+ messages in thread

* [PATCH 03/41] ARM: restart: remove s3c24xx restart handler
  2011-11-06 17:40 ` [PATCH 03/41] ARM: restart: remove s3c24xx " Russell King - ARM Linux
@ 2011-11-08  5:00   ` Kukjin Kim
  0 siblings, 0 replies; 162+ messages in thread
From: Kukjin Kim @ 2011-11-08  5:00 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> Remove the s3c24xx restart handler, which is trying to work around
> a chip bug by keeping caches on but flushed.  As we now only disable
> caches when performing a soft reboot, there doesn't need to be a
> work-around to do that.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks for removing some workaround :)

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

> ---
>  arch/arm/plat-s3c24xx/cpu.c |   23 -----------------------
>  1 files changed, 0 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
> index 3c63353..1121df1 100644
> --- a/arch/arm/plat-s3c24xx/cpu.c
> +++ b/arch/arm/plat-s3c24xx/cpu.c
> @@ -192,27 +192,6 @@ static unsigned long s3c24xx_read_idcode_v4(void)
>  	return __raw_readl(S3C2410_GSTATUS1);
>  }
> 
> -/* Hook for arm_pm_restart to ensure we execute the reset code
> - * with the caches enabled. It seems at least the S3C2440 has a problem
> - * resetting if there is bus activity interrupted by the reset.
> - */
> -static void s3c24xx_pm_restart(char mode, const char *cmd)
> -{
> -	if (mode != 's') {
> -		unsigned long flags;
> -
> -		local_irq_save(flags);
> -		__cpuc_flush_kern_all();
> -		__cpuc_flush_user_all();
> -
> -		arch_reset(mode, cmd);
> -		local_irq_restore(flags);
> -	}
> -
> -	/* fallback, or unhandled */
> -	arm_machine_restart(mode, cmd);
> -}
> -
>  void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
>  {
>  	/* initialise the io descriptors we need for initialisation */
> @@ -226,7 +205,5 @@ void __init s3c24xx_init_io(struct map_desc
*mach_desc,
> int size)
>  	}
>  	s3c24xx_init_cpu();
> 
> -	arm_pm_restart = s3c24xx_pm_restart;
> -
>  	s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
>  }
> --
> 1.7.4.4

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

* [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-07 11:52           ` Russell King - ARM Linux
@ 2011-11-08  5:21             ` Kukjin Kim
  2011-11-10 23:15               ` Russell King - ARM Linux
  0 siblings, 1 reply; 162+ messages in thread
From: Kukjin Kim @ 2011-11-08  5:21 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> On Mon, Nov 07, 2011 at 08:17:58PM +0900, Kyungmin Park wrote:
> > On 11/7/11, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > > On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux
wrote:
> > >> Hook these platforms restart code into the new restart hook rather
> > >> than using arch_reset().
> > >>
> > >> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > >> ---
> > >>  arch/arm/mach-exynos4/cpu.c                 |    6 +-----
> > >>  arch/arm/mach-exynos4/mach-armlex4210.c     |    1 +
> > >>  arch/arm/mach-exynos4/mach-nuri.c           |    1 +
> > >>  arch/arm/mach-exynos4/mach-origen.c         |    1 +
> > >>  arch/arm/mach-exynos4/mach-smdk4x12.c       |    2 ++
> > >>  arch/arm/mach-exynos4/mach-smdkv310.c       |    2 ++
> > >>  arch/arm/mach-exynos4/mach-universal_c210.c |    1 +
> > >>  7 files changed, 9 insertions(+), 5 deletions(-)
> > >>
> > >> diff --git a/arch/arm/mach-exynos4/cpu.c
b/arch/arm/mach-exynos4/cpu.c
> > >> index 5b1765b..5b1ee56 100644
> > >> --- a/arch/arm/mach-exynos4/cpu.c
> > >> +++ b/arch/arm/mach-exynos4/cpu.c
> > >> @@ -27,7 +27,6 @@
> > >>  #include <plat/fb-core.h>
> > >>  #include <plat/fimc-core.h>
> > >>  #include <plat/iic-core.h>
> > >> -#include <plat/reset.h>
> > >>  #include <plat/tv-core.h>
> > >>
> > >>  #include <mach/regs-irq.h>
> > >> @@ -145,7 +144,7 @@ static void exynos4_idle(void)
> > >>  	local_irq_enable();
> > >>  }
> > >>
> > >> -static void exynos4_sw_reset(void)
> > >> +void exynos4_restart(char mode, const char *cmd)
> > >>  {
> > >>  	__raw_writel(0x1, S5P_SWRESET);
> > >>  }
> > >> @@ -286,8 +285,5 @@ int __init exynos4_init(void)
> > >>  	/* set idle function */
> > >>  	pm_idle = exynos4_idle;
> > >>
> > >> -	/* set sw_reset function */
> > >> -	s5p_reset_hook = exynos4_sw_reset;
> > >> -
> > >
> > > I notice in last nights merge of the Samsung stuff, this has become
> > > less trivial - it's now:
> > >         /* set sw_reset function */
> > >         if (soc_is_exynos4210() || soc_is_exynos4212() ||
> > > soc_is_exynos4412())
> > >                 s5p_reset_hook = exynos4_sw_reset;
> > >
> > > So which of the boards should be converted and which shouldn't ?
> > > In other words, which exynos4210, 4212 or 4412 platforms?
> >
> > except the arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is used.
> > currently all exynos4 series has same reset function. it's preparation
> > for exynos5 series maybe.
> >
> > you can use the exynos4_sw_reset for all boards.
> 
Thanks, Kyungmin.

> Thanks, that gets me back to where I was with the patch before the
> exynos4 move.
> 

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] 162+ messages in thread

* [PATCH 5/5] ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook
  2011-11-06 17:56     ` [PATCH 5/5] ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook Russell King - ARM Linux
@ 2011-11-08  5:22       ` Kukjin Kim
  0 siblings, 0 replies; 162+ messages in thread
From: Kukjin Kim @ 2011-11-08  5:22 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> Now that s5p_reset_hook is unused, we can get rid of plat/reset.h and
> the s5p_reset_hook code in plat/system-reset.h.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

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


> ---
>  arch/arm/plat-samsung/include/plat/reset.h        |   16 ----------------
>  arch/arm/plat-samsung/include/plat/system-reset.h |   11 -----------
>  2 files changed, 0 insertions(+), 27 deletions(-)
>  delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h
> 
> diff --git a/arch/arm/plat-samsung/include/plat/reset.h b/arch/arm/plat-
> samsung/include/plat/reset.h
> deleted file mode 100644
> index 32ca517..0000000
> --- a/arch/arm/plat-samsung/include/plat/reset.h
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -/* linux/arch/arm/plat-samsung/include/plat/reset.h
> - *
> - * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> - *		http://www.samsung.com/
> - *
> - * 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.
> -*/
> -
> -#ifndef __PLAT_SAMSUNG_RESET_H
> -#define __PLAT_SAMSUNG_RESET_H __FILE__
> -
> -extern void (*s5p_reset_hook)(void);
> -
> -#endif /* __PLAT_SAMSUNG_RESET_H */
> diff --git a/arch/arm/plat-samsung/include/plat/system-reset.h
b/arch/arm/plat-
> samsung/include/plat/system-reset.h
> index a448e99..73d7808 100644
> --- a/arch/arm/plat-samsung/include/plat/system-reset.h
> +++ b/arch/arm/plat-samsung/include/plat/system-reset.h
> @@ -14,18 +14,7 @@
> 
>  #include <plat/watchdog-reset.h>
> 
> -void (*s5p_reset_hook)(void);
> -
>  static void arch_reset(char mode, const char *cmd)
>  {
> -	/* SWRESET support in s5p_reset_hook() */
> -
> -	if (s5p_reset_hook)
> -		s5p_reset_hook();
> -
> -	/* Perform reset using Watchdog reset
> -	 * if there is no s5p_reset_hook()
> -	 */
> -
>  	arch_wdt_reset();
>  }
> --
> 1.7.4.4

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

* [PATCH 4/5] ARM: restart: s5pv210: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-06 17:56     ` [PATCH 4/5] ARM: restart: s5pv210: " Russell King - ARM Linux
@ 2011-11-08  5:23       ` Kukjin Kim
  2011-11-08 10:04         ` Russell King - ARM Linux
  0 siblings, 1 reply; 162+ messages in thread
From: Kukjin Kim @ 2011-11-08  5:23 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

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

> ---
>  arch/arm/mach-s5pv210/cpu.c           |    6 +-----
>  arch/arm/mach-s5pv210/mach-aquila.c   |    1 +
>  arch/arm/mach-s5pv210/mach-goni.c     |    1 +
>  arch/arm/mach-s5pv210/mach-smdkc110.c |    1 +
>  arch/arm/mach-s5pv210/mach-smdkv210.c |    1 +
>  arch/arm/mach-s5pv210/mach-torbreck.c |    1 +
>  6 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
> index 84ec746..4c7b071 100644
> --- a/arch/arm/mach-s5pv210/cpu.c
> +++ b/arch/arm/mach-s5pv210/cpu.c
> @@ -41,7 +41,6 @@
>  #include <plat/iic-core.h>
>  #include <plat/keypad-core.h>
>  #include <plat/sdhci.h>
> -#include <plat/reset.h>
>  #include <plat/tv-core.h>
> 
>  /* Initial IO mappings */
> @@ -108,7 +107,7 @@ static void s5pv210_idle(void)
>  	local_irq_enable();
>  }
> 
> -static void s5pv210_sw_reset(void)
> +void s5pv210_restart(char mode, const char *cmd)
>  {
>  	__raw_writel(0x1, S5P_SWRESET);
>  }
> @@ -196,8 +195,5 @@ int __init s5pv210_init(void)
>  	/* set idle function */
>  	pm_idle = s5pv210_idle;
> 
> -	/* set sw_reset function */
> -	s5p_reset_hook = s5pv210_sw_reset;
> -
>  	return sysdev_register(&s5pv210_sysdev);
>  }
> diff --git a/arch/arm/mach-s5pv210/mach-aquila.c
b/arch/arm/mach-s5pv210/mach-
> aquila.c
> index 5811a96..68fd31d 100644
> --- a/arch/arm/mach-s5pv210/mach-aquila.c
> +++ b/arch/arm/mach-s5pv210/mach-aquila.c
> @@ -683,4 +683,5 @@ MACHINE_START(AQUILA, "Aquila")
>  	.map_io		= aquila_map_io,
>  	.init_machine	= aquila_machine_init,
>  	.timer		= &s5p_timer,
> +	.restart	= s5pv210_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-
> goni.c
> index 15edcae..1156a5b 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -960,4 +960,5 @@ MACHINE_START(GONI, "GONI")
>  	.init_machine	= goni_machine_init,
>  	.timer		= &s5p_timer,
>  	.reserve	= &goni_reserve,
> +	.restart	= s5pv210_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-
> s5pv210/mach-smdkc110.c
> index f7266bb..a70fa53 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkc110.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
> @@ -141,4 +141,5 @@ MACHINE_START(SMDKC110, "SMDKC110")
>  	.map_io		= smdkc110_map_io,
>  	.init_machine	= smdkc110_machine_init,
>  	.timer		= &s5p_timer,
> +	.restart	= s5pv210_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-
> s5pv210/mach-smdkv210.c
> index a9106c3..5e8a775 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkv210.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
> @@ -318,4 +318,5 @@ MACHINE_START(SMDKV210, "SMDKV210")
>  	.map_io		= smdkv210_map_io,
>  	.init_machine	= smdkv210_machine_init,
>  	.timer		= &s5p_timer,
> +	.restart	= s5pv210_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-
> s5pv210/mach-torbreck.c
> index 97cc066..49e9c6d 100644
> --- a/arch/arm/mach-s5pv210/mach-torbreck.c
> +++ b/arch/arm/mach-s5pv210/mach-torbreck.c
> @@ -130,4 +130,5 @@ MACHINE_START(TORBRECK, "TORBRECK")
>  	.map_io		= torbreck_map_io,
>  	.init_machine	= torbreck_machine_init,
>  	.timer		= &s5p_timer,
> +	.restart	= s5pv210_restart,
>  MACHINE_END
> --
> 1.7.4.4

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
                       ` (4 preceding siblings ...)
  2011-11-06 17:56     ` [PATCH 5/5] ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook Russell King - ARM Linux
@ 2011-11-08  7:00     ` Kukjin Kim
  2011-11-08  9:00       ` Russell King - ARM Linux
  2011-11-11 17:16     ` Russell King - ARM Linux
  6 siblings, 1 reply; 162+ messages in thread
From: Kukjin Kim @ 2011-11-08  7:00 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> Part 3 - the remaining stuff
> 
> These are patches which I've managed to get half way through before
> getting - to be honest - totally hacked off with the code found in
> various platforms (as mentioned in previous mails).
> 
> These platforms are broken as a result of the final patch in part 2,
> and these patches move these platforms _towards_ a solution.  They
> are not a complete solution though, but the start of the solution.
> 
> For instance, the Exynos4 and S5PV210 patches both consist of almost
> a full solution -but- with the new function prototype missing because
> there is _no_ local header file to put it in, and I'm damned well not
> putting it in the remote plat-samsung/include/plat headers.
> 
Russell,

The new restart prototype for s5pv210 and exynos can be placed in their
respective<mach/system.h>file. And the board files can include it. Would
this place be fine for the new prototype?

Thanks.

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

> The final set of platforms - touched neither by part 3 nor 4, are
> broken by the final patch in part 2, and at present I have no plans
> to fix them.  I would welcome patches to fix these which address the
> issues raised in the "pet peaves" email (which is why I have no plans
> to fix them.)
> 
>  arch/arm/mach-exynos4/cpu.c                       |    6 +-----
>  arch/arm/mach-exynos4/mach-armlex4210.c           |    1 +
>  arch/arm/mach-exynos4/mach-nuri.c                 |    1 +
>  arch/arm/mach-exynos4/mach-origen.c               |    1 +
>  arch/arm/mach-exynos4/mach-smdk4x12.c             |    2 ++
>  arch/arm/mach-exynos4/mach-smdkv310.c             |    2 ++
>  arch/arm/mach-exynos4/mach-universal_c210.c       |    1 +
>  arch/arm/mach-omap1/board-voiceblue.c             |    5 ++---
>  arch/arm/mach-omap1/include/mach/system.h         |    6 ++++++
>  arch/arm/mach-omap1/reset.c                       |    4 +---
>  arch/arm/mach-omap2/include/mach/system.h         |    6 ++++++
>  arch/arm/mach-omap2/prcm.c                        |    4 +---
>  arch/arm/mach-s5pv210/cpu.c                       |    6 +-----
>  arch/arm/mach-s5pv210/mach-aquila.c               |    1 +
>  arch/arm/mach-s5pv210/mach-goni.c                 |    1 +
>  arch/arm/mach-s5pv210/mach-smdkc110.c             |    1 +
>  arch/arm/mach-s5pv210/mach-smdkv210.c             |    1 +
>  arch/arm/mach-s5pv210/mach-torbreck.c             |    1 +
>  arch/arm/plat-omap/include/plat/system.h          |    2 --
>  arch/arm/plat-samsung/include/plat/reset.h        |   16 ----------------
>  arch/arm/plat-samsung/include/plat/system-reset.h |   11 -----------
>  arch/arm/plat-tcc/include/mach/system.h           |    4 ++--
>  arch/arm/plat-tcc/system.c                        |    2 +-
>  23 files changed, 34 insertions(+), 51 deletions(-)
>  delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h
> 

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-08  7:00     ` [03: PATCH 0/5] The remaining stuff Kukjin Kim
@ 2011-11-08  9:00       ` Russell King - ARM Linux
  2011-11-09  5:06         ` Kukjin Kim
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-08  9:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 08, 2011 at 04:00:16PM +0900, Kukjin Kim wrote:
> Russell King - ARM Linux wrote:
> > 
> > Part 3 - the remaining stuff
> > 
> > These are patches which I've managed to get half way through before
> > getting - to be honest - totally hacked off with the code found in
> > various platforms (as mentioned in previous mails).
> > 
> > These platforms are broken as a result of the final patch in part 2,
> > and these patches move these platforms _towards_ a solution.  They
> > are not a complete solution though, but the start of the solution.
> > 
> > For instance, the Exynos4 and S5PV210 patches both consist of almost
> > a full solution -but- with the new function prototype missing because
> > there is _no_ local header file to put it in, and I'm damned well not
> > putting it in the remote plat-samsung/include/plat headers.
> > 
> Russell,
> 
> The new restart prototype for s5pv210 and exynos can be placed in their
> respective<mach/system.h>file.

No - mach/system.h will be removed once arch_idle is gone as well.  In
any case, this should not be in a mach/*.h file.  There should be a
header in the arch/arm/mach-* directory for functions and data structures
local _only_ to the files in that directory.

Please read my 'pet peaves' email, point 4.

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

* [PATCH 4/5] ARM: restart: s5pv210: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-08  5:23       ` Kukjin Kim
@ 2011-11-08 10:04         ` Russell King - ARM Linux
  0 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-08 10:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 08, 2011 at 02:23:36PM +0900, Kukjin Kim wrote:
> Russell King - ARM Linux wrote:
> > 
> > Hook these platforms restart code into the new restart hook rather
> > than using arch_reset().
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>

I'm not going to accept that for a patch which will cause a build error.

The purpose of throwing this set of patches out is not to get acks, but
to get people to think about the code that they already have in the
tree which is making the task of others unnecessarily more difficult
because of the way it is structured.

Let me repeat: anything in the list below _will_ be broken by this
patch series:
arch/arm/mach-bcmring/include/mach/system.h
arch/arm/mach-davinci/include/mach/system.h
arch/arm/mach-gemini/include/mach/system.h
arch/arm/mach-ks8695/include/mach/system.h
arch/arm/mach-netx/include/mach/system.h
arch/arm/mach-nomadik/include/mach/system.h
arch/arm/mach-omap1/include/mach/system.h
arch/arm/mach-omap2/include/mach/system.h
arch/arm/mach-s3c2410/include/mach/system-reset.h
arch/arm/mach-s3c64xx/include/mach/system.h
arch/arm/mach-shmobile/include/mach/system.h
arch/arm/mach-vt8500/include/mach/system.h
arch/arm/plat-samsung/include/plat/system-reset.h
arch/arm/plat-tcc/include/mach/system.h

and this includes *all* of the Samsung s3* and s5* stuff.  Exynos4 at
least avoids it because all platforms there use the exynos4_restart()
function.

Also note: it's likely that some platform maintainers *will* want to
base their code off this series.  People submitting new platforms will
want at least part 1 of the series so they can use the new feature.

So we owe it to them (and yourselves) to get the remaining problems
resolved as soon as possible so that the entire series is sound.  So,
don't think there's three months to work on this.

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-08  5:00 ` Kukjin Kim
@ 2011-11-08 10:05   ` Russell King - ARM Linux
  0 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-08 10:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 08, 2011 at 02:00:36PM +0900, Kukjin Kim wrote:
> For Samsung stuff,
> 
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>

I'm assuming that means just for
ARM: restart: only perform setup for restart when soft-restarting

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

* [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset()
  2011-11-06 17:53 ` [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset() Russell King - ARM Linux
  2011-11-07  2:59   ` Nicolas Pitre
@ 2011-11-08 15:47   ` Jamie Iles
  2011-11-10 23:35   ` Tony Lindgren
  2 siblings, 0 replies; 162+ messages in thread
From: Jamie Iles @ 2011-11-08 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 06, 2011 at 05:53:30PM +0000, Russell King - ARM Linux wrote:
> arch_reset() is deprecated; systems should hook into system restart via
> the 'restart' method in the platforms machine description record.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Jamie Iles <jamie@jamieiles.com>

Thanks Russell!

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

* [PATCH 41/41] ARM: restart: remove the now empty arch_reset()
  2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
  2011-11-07  3:02   ` Nicolas Pitre
  2011-11-07 17:15   ` H Hartley Sweeten
@ 2011-11-08 15:48   ` Jamie Iles
  2011-11-10 23:38   ` Tony Lindgren
  2011-11-25 21:44   ` Linus Walleij
  4 siblings, 0 replies; 162+ messages in thread
From: Jamie Iles @ 2011-11-08 15:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 06, 2011 at 05:53:51PM +0000, Russell King - ARM Linux wrote:
> Remove the now empty arch_reset() from all the mach/system.h includes,
> and remove its callsite.  Remove arm_machine_restart() as this function
> no longer does anything useful.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Jamie Iles <jamie@jamieiles.com>

Jamie

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-08  9:00       ` Russell King - ARM Linux
@ 2011-11-09  5:06         ` Kukjin Kim
  0 siblings, 0 replies; 162+ messages in thread
From: Kukjin Kim @ 2011-11-09  5:06 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> On Tue, Nov 08, 2011 at 04:00:16PM +0900, Kukjin Kim wrote:
> > Russell King - ARM Linux wrote:
> > >
> > > Part 3 - the remaining stuff
> > >
> > > These are patches which I've managed to get half way through before
> > > getting - to be honest - totally hacked off with the code found in
> > > various platforms (as mentioned in previous mails).
> > >
> > > These platforms are broken as a result of the final patch in part 2,
> > > and these patches move these platforms _towards_ a solution.  They
> > > are not a complete solution though, but the start of the solution.
> > >
> > > For instance, the Exynos4 and S5PV210 patches both consist of almost
> > > a full solution -but- with the new function prototype missing because
> > > there is _no_ local header file to put it in, and I'm damned well not
> > > putting it in the remote plat-samsung/include/plat headers.
> > >
> > Russell,
> >
> > The new restart prototype for s5pv210 and exynos can be placed in their
> > respective<mach/system.h>file.
> 
> No - mach/system.h will be removed once arch_idle is gone as well.  In
> any case, this should not be in a mach/*.h file.  There should be a
> header in the arch/arm/mach-* directory for functions and data structures
> local _only_ to the files in that directory.
> 
Okay, I agree. So how about mach-xxx/common.h for it?

If required, I will sort out all of Samsung stuff as per your suggestion.

> Please read my 'pet peaves' email, point 4.

Okay, I see.

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] 162+ messages in thread

* [PATCH 2/5] ARM: restart: omap: use new restart hook XXX WIP XXX
  2011-11-06 17:55     ` [PATCH 2/5] ARM: restart: omap: use new restart hook XXX WIP XXX Russell King - ARM Linux
@ 2011-11-09 22:27       ` Tony Lindgren
  2011-11-10 22:32         ` Russell King - ARM Linux
  0 siblings, 1 reply; 162+ messages in thread
From: Tony Lindgren @ 2011-11-09 22:27 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [111106 09:32]:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-omap1/board-voiceblue.c     |    5 ++---
>  arch/arm/mach-omap1/include/mach/system.h |    6 ++++++
>  arch/arm/mach-omap1/reset.c               |    4 +---
>  arch/arm/mach-omap2/include/mach/system.h |    6 ++++++
>  arch/arm/mach-omap2/prcm.c                |    4 +---
>  arch/arm/plat-omap/include/plat/system.h  |    2 --
>  6 files changed, 16 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
> index 2a6545b..b0111b6 100644
> --- a/arch/arm/mach-omap1/board-voiceblue.c
> +++ b/arch/arm/mach-omap1/board-voiceblue.c
> @@ -220,7 +220,7 @@ void voiceblue_wdt_ping(void)
>  	gpio_set_value(0, wdt_gpio_state);
>  }
>  
> -static void voiceblue_reset(char mode, const char *cmd)
> +static void voiceblue_restart(char mode, const char *cmd)
>  {
>  	/*
>  	 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
> @@ -284,8 +284,6 @@ static void __init voiceblue_init(void)
>  	 * (it is connected through invertor) */
>  	omap_writeb(0x00, OMAP_LPG1_LCR);
>  	omap_writeb(0x00, OMAP_LPG1_PMR);	/* Disable clock */
> -
> -	arch_reset = voiceblue_reset;
>  }
>  
>  MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
> @@ -297,4 +295,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
>  	.init_irq	= omap1_init_irq,
>  	.init_machine	= voiceblue_init,
>  	.timer		= &omap1_timer,
> +	.restart	= voiceblue_restart,
>  MACHINE_END

I guess we want the rest of the board files to set .restart
to omap1_restart or omap_prcm_restart? Do you already have
some script doing that or do you need some help there?

Regards,

Tony

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

* [PATCH 1/7] ARM: restart: add restart hook to machine_desc record
  2011-11-06 17:31 ` [PATCH 1/7] ARM: restart: add restart hook to machine_desc record Russell King - ARM Linux
@ 2011-11-09 22:28   ` Tony Lindgren
  2011-11-11 19:10   ` Linus Walleij
  1 sibling, 0 replies; 162+ messages in thread
From: Tony Lindgren @ 2011-11-09 22:28 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [111106 09:00]:
> Add a restart hook to the machine_desc record so we don't have to
> populate all platforms with init_early methods to initialize the
> arm_pm_restart function pointer.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/mach/arch.h |    1 +
>  arch/arm/kernel/setup.c          |    3 +++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
> index 7d19425..8aa397a 100644
> --- a/arch/arm/include/asm/mach/arch.h
> +++ b/arch/arm/include/asm/mach/arch.h
> @@ -45,6 +45,7 @@ struct machine_desc {
>  #ifdef CONFIG_MULTI_IRQ_HANDLER
>  	void			(*handle_irq)(struct pt_regs *);
>  #endif
> +	void			(*restart)(char, const char *);
>  };
>  
>  /*
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index bda0a21..d187d0a 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -922,6 +922,9 @@ void __init setup_arch(char **cmdline_p)
>  	paging_init(mdesc);
>  	request_standard_resources(mdesc);
>  
> +	if (mdesc->restart)
> +		arm_pm_restart = mdesc->restart;
> +
>  	unflatten_device_tree();
>  
>  #ifdef CONFIG_SMP

Good to see this happening:

Acked-by: Tony Lindgren <tony@atomide.com>

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

* [PATCH 4/7] ARM: restart: move reboot failure handing into machine_restart()
  2011-11-06 17:32 ` [PATCH 4/7] ARM: restart: move reboot failure handing into machine_restart() Russell King - ARM Linux
@ 2011-11-09 22:29   ` Tony Lindgren
  0 siblings, 0 replies; 162+ messages in thread
From: Tony Lindgren @ 2011-11-09 22:29 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [111106 09:01]:
> Move the failure to reboot into machine_restart() to always catch
> this condition, even if a platform decides to hook the restarting
> via arm_pm_restart().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Tony Lindgren <tony@atomide.com>

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

* [PATCH 5/7] ARM: restart: remove argument to setup_mm_for_reboot()
  2011-11-06 17:33 ` [PATCH 5/7] ARM: restart: remove argument to setup_mm_for_reboot() Russell King - ARM Linux
@ 2011-11-09 22:30   ` Tony Lindgren
  0 siblings, 0 replies; 162+ messages in thread
From: Tony Lindgren @ 2011-11-09 22:30 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [111106 09:02]:
> setup_mm_for_reboot() doesn't make use of its argument, so remove it.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Tony Lindgren <tony@atomide.com>

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

* [PATCH 2/5] ARM: restart: omap: use new restart hook XXX WIP XXX
  2011-11-09 22:27       ` Tony Lindgren
@ 2011-11-10 22:32         ` Russell King - ARM Linux
  0 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-10 22:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 09, 2011 at 02:27:29PM -0800, Tony Lindgren wrote:
> I guess we want the rest of the board files to set .restart
> to omap1_restart or omap_prcm_restart? Do you already have
> some script doing that or do you need some help there?

It's fairly easy to do using my editor and grep to find the files needing
editing.  As you'll notice from the previous message, I've already fixed
this up.

It passes both my OMAP3 and OMAP4 build checks, but I've not yet booted
the results.

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

* [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-08  5:21             ` Kukjin Kim
@ 2011-11-10 23:15               ` Russell King - ARM Linux
  2011-11-15  7:47                 ` Kukjin Kim
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-10 23:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 08, 2011 at 02:21:39PM +0900, Kukjin Kim wrote:
> Russell King - ARM Linux wrote:
> > 
> > On Mon, Nov 07, 2011 at 08:17:58PM +0900, Kyungmin Park wrote:
> > > On 11/7/11, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > > > On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux
> wrote:
> > > >> Hook these platforms restart code into the new restart hook rather
> > > >> than using arch_reset().
> > > >>
> > > >> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > > >> ---
> > > >>  arch/arm/mach-exynos4/cpu.c                 |    6 +-----
> > > >>  arch/arm/mach-exynos4/mach-armlex4210.c     |    1 +
> > > >>  arch/arm/mach-exynos4/mach-nuri.c           |    1 +
> > > >>  arch/arm/mach-exynos4/mach-origen.c         |    1 +
> > > >>  arch/arm/mach-exynos4/mach-smdk4x12.c       |    2 ++
> > > >>  arch/arm/mach-exynos4/mach-smdkv310.c       |    2 ++
> > > >>  arch/arm/mach-exynos4/mach-universal_c210.c |    1 +
> > > >>  7 files changed, 9 insertions(+), 5 deletions(-)
> > > >>
> > > >> diff --git a/arch/arm/mach-exynos4/cpu.c
> b/arch/arm/mach-exynos4/cpu.c
> > > >> index 5b1765b..5b1ee56 100644
> > > >> --- a/arch/arm/mach-exynos4/cpu.c
> > > >> +++ b/arch/arm/mach-exynos4/cpu.c
> > > >> @@ -27,7 +27,6 @@
> > > >>  #include <plat/fb-core.h>
> > > >>  #include <plat/fimc-core.h>
> > > >>  #include <plat/iic-core.h>
> > > >> -#include <plat/reset.h>
> > > >>  #include <plat/tv-core.h>
> > > >>
> > > >>  #include <mach/regs-irq.h>
> > > >> @@ -145,7 +144,7 @@ static void exynos4_idle(void)
> > > >>  	local_irq_enable();
> > > >>  }
> > > >>
> > > >> -static void exynos4_sw_reset(void)
> > > >> +void exynos4_restart(char mode, const char *cmd)
> > > >>  {
> > > >>  	__raw_writel(0x1, S5P_SWRESET);
> > > >>  }
> > > >> @@ -286,8 +285,5 @@ int __init exynos4_init(void)
> > > >>  	/* set idle function */
> > > >>  	pm_idle = exynos4_idle;
> > > >>
> > > >> -	/* set sw_reset function */
> > > >> -	s5p_reset_hook = exynos4_sw_reset;
> > > >> -
> > > >
> > > > I notice in last nights merge of the Samsung stuff, this has become
> > > > less trivial - it's now:
> > > >         /* set sw_reset function */
> > > >         if (soc_is_exynos4210() || soc_is_exynos4212() ||
> > > > soc_is_exynos4412())
> > > >                 s5p_reset_hook = exynos4_sw_reset;
> > > >
> > > > So which of the boards should be converted and which shouldn't ?
> > > > In other words, which exynos4210, 4212 or 4412 platforms?
> > >
> > > except the arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is used.
> > > currently all exynos4 series has same reset function. it's preparation
> > > for exynos5 series maybe.
> > >
> > > you can use the exynos4_sw_reset for all boards.
> > 
> Thanks, Kyungmin.
> 
> > Thanks, that gets me back to where I was with the patch before the
> > exynos4 move.
> > 
> 
> Thanks.

I have to point out that even so, this patch as it stands will break
the exynos build (that's why the subject line contains the XXX WIP XXX
stuff.)

As I said in my pet peaves mail, there should be a header in
arch/arm/mach-exynos for the data and function declarations which are
only used by and only provided by files in this directory.  Such things
as:

struct sys_timer exynos4_timer;
void exynos4_init_irq(void);

etc.  This stuff should not be inappropriately placed:

arch/arm/plat-samsung/include/plat/exynos4.h:extern struct sys_timer exynos4_timer;
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4_init_irq(void);

(e.g.,
$ grep exynos4_init_irq\\\> arch/arm -r
arch/arm/mach-exynos/mach-nuri.c:   .init_irq       = exynos4_init_irq,
arch/arm/mach-exynos/mach-origen.c: .init_irq       = exynos4_init_irq,
arch/arm/mach-exynos/mach-armlex4210.c:     .init_irq       = exynos4_init_irq,
arch/arm/mach-exynos/mach-smdkv310.c:       .init_irq       = exynos4_init_irq,
arch/arm/mach-exynos/mach-smdkv310.c:       .init_irq       = exynos4_init_irq,
arch/arm/mach-exynos/mach-smdk4x12.c:       .init_irq       = exynos4_init_irq,
arch/arm/mach-exynos/mach-smdk4x12.c:       .init_irq       = exynos4_init_irq,
arch/arm/mach-exynos/cpu.c:void __init exynos4_init_irq(void)
arch/arm/mach-exynos/mach-universal_c210.c: .init_irq       = exynos4_init_irq,
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4_init_irq(void);
$ grep exynos4_timer arch/arm -r
arch/arm/mach-exynos/mach-nuri.c:   .timer          = &exynos4_timer,
arch/arm/mach-exynos/mach-origen.c: .timer          = &exynos4_timer,
arch/arm/mach-exynos/mach-armlex4210.c:     .timer          = &exynos4_timer,
arch/arm/mach-exynos/mach-smdkv310.c:       .timer          = &exynos4_timer,
arch/arm/mach-exynos/mach-smdkv310.c:       .timer          = &exynos4_timer,
arch/arm/mach-exynos/mach-smdk4x12.c:       .timer          = &exynos4_timer,
arch/arm/mach-exynos/mach-smdk4x12.c:       .timer          = &exynos4_timer,
arch/arm/mach-exynos/mct.c:struct sys_timer exynos4_timer = {
arch/arm/mach-exynos/mach-universal_c210.c: .timer          = &exynos4_timer,
arch/arm/plat-samsung/include/plat/exynos4.h:extern struct sys_timer exynos4_timer;
$ grep exynos4_register_clocks arch/arm -r
arch/arm/mach-exynos/clock.c:void __init exynos4_register_clocks(void)
arch/arm/mach-exynos/cpu.c: exynos4_register_clocks();
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4_register_clock(void);
$ grep exynos421._register_clocks arch/arm -r
arch/arm/mach-exynos/clock-exynos4212.c:void __init exynos4212_register_clocks(void)
arch/arm/mach-exynos/cpu.c:         exynos4210_register_clocks();
arch/arm/mach-exynos/cpu.c:         exynos4212_register_clocks();
arch/arm/mach-exynos/clock-exynos4210.c:void __init exynos4210_register_clocks(void)
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4210_register_clocks(void);
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4212_register_clocks(void);
)

I suspect a sizeable proportion of plat/exynos4.h could move into
arch/arm/mach-exynos.

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

* [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset()
  2011-11-06 17:53 ` [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset() Russell King - ARM Linux
  2011-11-07  2:59   ` Nicolas Pitre
  2011-11-08 15:47   ` Jamie Iles
@ 2011-11-10 23:35   ` Tony Lindgren
  2 siblings, 0 replies; 162+ messages in thread
From: Tony Lindgren @ 2011-11-10 23:35 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [111106 09:31]:
> arch_reset() is deprecated; systems should hook into system restart via
> the 'restart' method in the platforms machine description record.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Tony Lindgren <tony@atomide.com>

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

* [PATCH 41/41] ARM: restart: remove the now empty arch_reset()
  2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
                     ` (2 preceding siblings ...)
  2011-11-08 15:48   ` Jamie Iles
@ 2011-11-10 23:38   ` Tony Lindgren
  2011-11-25 21:44   ` Linus Walleij
  4 siblings, 0 replies; 162+ messages in thread
From: Tony Lindgren @ 2011-11-10 23:38 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [111106 09:31]:
> Remove the now empty arch_reset() from all the mach/system.h includes,
> and remove its callsite.  Remove arm_machine_restart() as this function
> no longer does anything useful.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Assuming arch_reset can now also be removed for omaps:

Acked-by: Tony Lindgren <tony@atomide.com>

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

* [PATCH 24/41] ARM: restart: mxs: use new restart hook
  2011-11-06 17:48 ` [PATCH 24/41] ARM: restart: mxs: " Russell King - ARM Linux
@ 2011-11-11  4:02   ` Shawn Guo
  0 siblings, 0 replies; 162+ messages in thread
From: Shawn Guo @ 2011-11-11  4:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 06, 2011 at 05:48:06PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Shawn Guo <shawn.guo@linaro.org>

Regards,
Shawn

> ---
>  arch/arm/mach-mxs/include/mach/common.h |    1 +
>  arch/arm/mach-mxs/include/mach/system.h |    4 +++-
>  arch/arm/mach-mxs/mach-m28evk.c         |    1 +
>  arch/arm/mach-mxs/mach-mx23evk.c        |    1 +
>  arch/arm/mach-mxs/mach-mx28evk.c        |    1 +
>  arch/arm/mach-mxs/mach-stmp378x_devb.c  |    1 +
>  arch/arm/mach-mxs/mach-tx28.c           |    1 +
>  arch/arm/mach-mxs/system.c              |    2 +-
>  8 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-mxs/include/mach/common.h b/arch/arm/mach-mxs/include/mach/common.h
> index 635bb5d..1388485 100644
> --- a/arch/arm/mach-mxs/include/mach/common.h
> +++ b/arch/arm/mach-mxs/include/mach/common.h
> @@ -16,6 +16,7 @@ struct clk;
>  extern const u32 *mxs_get_ocotp(void);
>  extern int mxs_reset_block(void __iomem *);
>  extern void mxs_timer_init(struct clk *, int);
> +extern void mxs_restart(char, const char *);
>  
>  extern int mx23_register_gpios(void);
>  extern int mx23_clocks_init(void);
> diff --git a/arch/arm/mach-mxs/include/mach/system.h b/arch/arm/mach-mxs/include/mach/system.h
> index 0e42823..bcd8989 100644
> --- a/arch/arm/mach-mxs/include/mach/system.h
> +++ b/arch/arm/mach-mxs/include/mach/system.h
> @@ -22,6 +22,8 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -void arch_reset(char mode, const char *cmd);
> +static inline void arch_reset(char mode, const char *cmd)
> +{
> +}
>  
>  #endif /* __MACH_MXS_SYSTEM_H__ */
> diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c
> index 3b1681e..7799cd9 100644
> --- a/arch/arm/mach-mxs/mach-m28evk.c
> +++ b/arch/arm/mach-mxs/mach-m28evk.c
> @@ -363,4 +363,5 @@ MACHINE_START(M28EVK, "DENX M28 EVK")
>  	.init_irq	= mx28_init_irq,
>  	.init_machine	= m28evk_init,
>  	.timer		= &m28evk_timer,
> +	.restart	= mxs_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c
> index c325fbe..5ea1c57 100644
> --- a/arch/arm/mach-mxs/mach-mx23evk.c
> +++ b/arch/arm/mach-mxs/mach-mx23evk.c
> @@ -184,4 +184,5 @@ MACHINE_START(MX23EVK, "Freescale MX23 EVK")
>  	.init_irq	= mx23_init_irq,
>  	.timer		= &mx23evk_timer,
>  	.init_machine	= mx23evk_init,
> +	.restart	= mxs_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
> index ac2316d..1d2548f 100644
> --- a/arch/arm/mach-mxs/mach-mx28evk.c
> +++ b/arch/arm/mach-mxs/mach-mx28evk.c
> @@ -501,4 +501,5 @@ MACHINE_START(MX28EVK, "Freescale MX28 EVK")
>  	.init_irq	= mx28_init_irq,
>  	.timer		= &mx28evk_timer,
>  	.init_machine	= mx28evk_init,
> +	.restart	= mxs_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c
> index 177e531..857e857 100644
> --- a/arch/arm/mach-mxs/mach-stmp378x_devb.c
> +++ b/arch/arm/mach-mxs/mach-stmp378x_devb.c
> @@ -117,4 +117,5 @@ MACHINE_START(STMP378X, "STMP378X")
>  	.init_irq	= mx23_init_irq,
>  	.init_machine	= stmp378x_dvb_init,
>  	.timer		= &stmp378x_dvb_timer,
> +	.restart	= mxs_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c
> index 9a1f0e7..2c0862e 100644
> --- a/arch/arm/mach-mxs/mach-tx28.c
> +++ b/arch/arm/mach-mxs/mach-tx28.c
> @@ -178,4 +178,5 @@ MACHINE_START(TX28, "Ka-Ro electronics TX28 module")
>  	.init_irq = mx28_init_irq,
>  	.timer = &tx28_timer,
>  	.init_machine = tx28_stk5v3_init,
> +	.restart	= mxs_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index cab8836..b936633 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -42,7 +42,7 @@ static void __iomem *mxs_clkctrl_reset_addr;
>  /*
>   * Reset the system. It is called by machine_restart().
>   */
> -void arch_reset(char mode, const char *cmd)
> +void mxs_restart(char mode, const char *cmd)
>  {
>  	/* reset the chip */
>  	__mxs_setl(MXS_CLKCTRL_RESET_CHIP, mxs_clkctrl_reset_addr);
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
                       ` (5 preceding siblings ...)
  2011-11-08  7:00     ` [03: PATCH 0/5] The remaining stuff Kukjin Kim
@ 2011-11-11 17:16     ` Russell King - ARM Linux
  2011-11-14 19:01       ` Nori, Sekhar
  2011-11-28 10:40       ` Linus Walleij
  6 siblings, 2 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-11 17:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 06, 2011 at 05:54:57PM +0000, Russell King - ARM Linux wrote:
> Part 3 - the remaining stuff
> 
> These are patches which I've managed to get half way through before
> getting - to be honest - totally hacked off with the code found in
> various platforms (as mentioned in previous mails).
> 
> These platforms are broken as a result of the final patch in part 2,
> and these patches move these platforms _towards_ a solution.  They
> are not a complete solution though, but the start of the solution.
> 
> For instance, the Exynos4 and S5PV210 patches both consist of almost
> a full solution -but- with the new function prototype missing because
> there is _no_ local header file to put it in, and I'm damned well not
> putting it in the remote plat-samsung/include/plat headers.
> 
> The final set of platforms - touched neither by part 3 nor 4, are
> broken by the final patch in part 2, and at present I have no plans
> to fix them.  I would welcome patches to fix these which address the
> issues raised in the "pet peaves" email (which is why I have no plans
> to fix them.)

The list of platforms which are still broken (today) by part 2 of this
series are:

arch/arm/mach-davinci/include/mach/system.h
arch/arm/mach-gemini/include/mach/system.h
arch/arm/mach-nomadik/include/mach/system.h
arch/arm/mach-s3c2410/include/mach/system-reset.h
arch/arm/mach-s3c64xx/include/mach/system.h
arch/arm/mach-shmobile/include/mach/system.h
arch/arm/mach-vt8500/include/mach/system.h
arch/arm/plat-samsung/include/plat/system-reset.h
arch/arm/plat-tcc/include/mach/system.h

which require assistance to get these into shape.

As I've already implied, I'm quite prepared to break these platforms at
the next merge window for the greater good if there's no sign of
maintainers willing to help sort them out - which will then ultimately
result in them being deleted from mainline.

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

* [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk
  2011-11-06 17:53 ` [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk Russell King - ARM Linux
@ 2011-11-11 18:46   ` Linus Walleij
  2011-11-11 19:00     ` Russell King - ARM Linux
  0 siblings, 1 reply; 162+ messages in thread
From: Linus Walleij @ 2011-11-11 18:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 6, 2011 at 6:53 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> Remove the:
> ? ? ? ?KERN_CRIT "RESET: Rebooting system\n" (lpc32xx)
> ? ? ? ?KERN_CRIT "RESET: shutting down/rebooting system\n" (u300)
>
> printk from the restart handler; we already print such a message from
> kernel_restart() in kernel/sys.c:
>
> ? ? ? ?KERN_EMERG "Restarting system.\n"
>
> so this is unnecessary.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks Russell,
Linus Walleij

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

* [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk
  2011-11-11 18:46   ` Linus Walleij
@ 2011-11-11 19:00     ` Russell King - ARM Linux
  2011-11-11 19:32       ` Linus Walleij
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-11 19:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 11, 2011 at 07:46:41PM +0100, Linus Walleij wrote:
> On Sun, Nov 6, 2011 at 6:53 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> 
> > Remove the:
> > ? ? ? ?KERN_CRIT "RESET: Rebooting system\n" (lpc32xx)
> > ? ? ? ?KERN_CRIT "RESET: shutting down/rebooting system\n" (u300)
> >
> > printk from the restart handler; we already print such a message from
> > kernel_restart() in kernel/sys.c:
> >
> > ? ? ? ?KERN_EMERG "Restarting system.\n"
> >
> > so this is unnecessary.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks.  Could you look at what's required for Nomadik please?  I couldn't
see am obvious file to move the arch_reset code from mach/system.h into,
nor could I see a local header file to put the new prototype into.

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

* [PATCH 1/7] ARM: restart: add restart hook to machine_desc record
  2011-11-06 17:31 ` [PATCH 1/7] ARM: restart: add restart hook to machine_desc record Russell King - ARM Linux
  2011-11-09 22:28   ` Tony Lindgren
@ 2011-11-11 19:10   ` Linus Walleij
  1 sibling, 0 replies; 162+ messages in thread
From: Linus Walleij @ 2011-11-11 19:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 6, 2011 at 6:31 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> Add a restart hook to the machine_desc record so we don't have to
> populate all platforms with init_early methods to initialize the
> arm_pm_restart function pointer.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Obviously the right thing to do.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Thanks,
Linus Walleij

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

* [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk
  2011-11-11 19:00     ` Russell King - ARM Linux
@ 2011-11-11 19:32       ` Linus Walleij
  0 siblings, 0 replies; 162+ messages in thread
From: Linus Walleij @ 2011-11-11 19:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 11, 2011 at 8:00 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> Thanks. ?Could you look at what's required for Nomadik please? ?I couldn't
> see am obvious file to move the arch_reset code from mach/system.h into,
> nor could I see a local header file to put the new prototype into.

Rubini is the master of Nomadik, but I would put that into
mach-nomadik/cpu-8815.c.

As for header the functions in cpu-8815.c are broadcast
in mach-nomadik/include/mach/setup.h which is *wrong*,
so I would

- Create mach-nomadik/cpu-8815.h
- Move the cpu_8815_* function from <mach/setup.h>
  into this file.
- Replace #include <mach/setup.h> with #include "cpu-8815.h"
  in board-nhk8815.c and cpu-8815.c
- Add the reset stuff to cpu-8815.[c|h]

Feel free to fold in the below at your convenience:

>From b0f26c142e5fbc75d10e75c96f2c753b3fe7c2d9 Mon Sep 17 00:00:00 2001
From: Linus Walleij <linus.walleij@linaro.org>
Date: Fri, 11 Nov 2011 20:30:32 +0100
Subject: [PATCH] ARM: nomadik: localize cpu-8815 header

The symbols from cpu-8815.c were being broadcast across the
entire kernel but are only really used locally in mach-nomadik
so let's localize them.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-nomadik/board-nhk8815.c      |    2 ++
 arch/arm/mach-nomadik/cpu-8815.c           |    1 +
 arch/arm/mach-nomadik/cpu-8815.h           |    3 +++
 arch/arm/mach-nomadik/include/mach/setup.h |    3 ---
 4 files changed, 6 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/mach-nomadik/cpu-8815.h

diff --git a/arch/arm/mach-nomadik/board-nhk8815.c
b/arch/arm/mach-nomadik/board-nhk8815.c
index 0cbb74c..4518050 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -34,6 +34,8 @@
 #include <mach/nand.h>
 #include <mach/fsmc.h>

+#include "cpu-8815.h"
+
 /* Initial value for SRC control register: all timers use MXTAL/8 source */
 #define SRC_CR_INIT_MASK	0x00007fff
 #define SRC_CR_INIT_VAL		0x2aaa8000
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index dc67717..c087ea9 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -32,6 +32,7 @@
 #include <asm/hardware/cache-l2x0.h>

 #include "clock.h"
+#include "cpu-8815.h"

 #define __MEM_4K_RESOURCE(x) \
 	.res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
diff --git a/arch/arm/mach-nomadik/cpu-8815.h b/arch/arm/mach-nomadik/cpu-8815.h
new file mode 100644
index 0000000..e041794
--- /dev/null
+++ b/arch/arm/mach-nomadik/cpu-8815.h
@@ -0,0 +1,3 @@
+extern void cpu8815_map_io(void);
+extern void cpu8815_platform_init(void);
+extern void cpu8815_init_irq(void);
diff --git a/arch/arm/mach-nomadik/include/mach/setup.h
b/arch/arm/mach-nomadik/include/mach/setup.h
index b7897ed..bcaeaf4 100644
--- a/arch/arm/mach-nomadik/include/mach/setup.h
+++ b/arch/arm/mach-nomadik/include/mach/setup.h
@@ -12,9 +12,6 @@

 #ifdef CONFIG_NOMADIK_8815

-extern void cpu8815_map_io(void);
-extern void cpu8815_platform_init(void);
-extern void cpu8815_init_irq(void);
 extern void nmdk_timer_init(void);

 #endif /* NOMADIK_8815 */
-- 
1.7.3.2

Yours,
Linus Walleij

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-11 17:16     ` Russell King - ARM Linux
@ 2011-11-14 19:01       ` Nori, Sekhar
  2011-11-28 10:40       ` Linus Walleij
  1 sibling, 0 replies; 162+ messages in thread
From: Nori, Sekhar @ 2011-11-14 19:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Russell,

On Fri, Nov 11, 2011 at 22:46:50, Russell King - ARM Linux wrote:
> On Sun, Nov 06, 2011 at 05:54:57PM +0000, Russell King - ARM Linux wrote:
> > Part 3 - the remaining stuff
> > 
> > These are patches which I've managed to get half way through before
> > getting - to be honest - totally hacked off with the code found in
> > various platforms (as mentioned in previous mails).
> > 
> > These platforms are broken as a result of the final patch in part 2,
> > and these patches move these platforms _towards_ a solution.  They
> > are not a complete solution though, but the start of the solution.
> > 
> > For instance, the Exynos4 and S5PV210 patches both consist of almost
> > a full solution -but- with the new function prototype missing because
> > there is _no_ local header file to put it in, and I'm damned well not
> > putting it in the remote plat-samsung/include/plat headers.
> > 
> > The final set of platforms - touched neither by part 3 nor 4, are
> > broken by the final patch in part 2, and at present I have no plans
> > to fix them.  I would welcome patches to fix these which address the
> > issues raised in the "pet peaves" email (which is why I have no plans
> > to fix them.)
> 
> The list of platforms which are still broken (today) by part 2 of this
> series are:
> 
> arch/arm/mach-davinci/include/mach/system.h
> arch/arm/mach-gemini/include/mach/system.h
> arch/arm/mach-nomadik/include/mach/system.h
> arch/arm/mach-s3c2410/include/mach/system-reset.h
> arch/arm/mach-s3c64xx/include/mach/system.h
> arch/arm/mach-shmobile/include/mach/system.h
> arch/arm/mach-vt8500/include/mach/system.h
> arch/arm/plat-samsung/include/plat/system-reset.h
> arch/arm/plat-tcc/include/mach/system.h
> 
> which require assistance to get these into shape.
> 
> As I've already implied, I'm quite prepared to break these platforms at
> the next merge window for the greater good if there's no sign of
> maintainers willing to help sort them out - which will then ultimately
> result in them being deleted from mainline.

I just sent a patch for which gets reboot working on DaVinci.
I have used the arm_pm_restart hook for now. I am working on
moving the arch/arm/mach-davinci/common.h (and other local headers)
to mach-davinci folder but that needs updates to some drivers like
USB and GPIO as well. I expect to be finished in about a weeks time.

Thanks,
Sekhar

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

* [PATCH 04/41] ARM: restart: at91: use new restart hook
  2011-11-06 17:41 ` [PATCH 04/41] ARM: restart: at91: use new restart hook Russell King - ARM Linux
@ 2011-11-15  1:16   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-11-15  8:52     ` Russell King - ARM Linux
  0 siblings, 1 reply; 162+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-15  1:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 17:41 Sun 06 Nov     , Russell King - ARM Linux wrote:
> Rather than using a private function pointer, use the existing
> arm_pm_restart function pointer instead.  We no longer need to enable
> the I-cache in at91sam9_alt_reset() as the caches will now be on when
> this function is called.
> 
> Update the function names to use the 'restart' terminology rather than
> the 'reboot' terminology.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
I'll appply this one via at91-treee as I've patch that touch this part too in
the queue if you do'nt mind

Best Regsards,
J.

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

* [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
  2011-11-10 23:15               ` Russell King - ARM Linux
@ 2011-11-15  7:47                 ` Kukjin Kim
  0 siblings, 0 replies; 162+ messages in thread
From: Kukjin Kim @ 2011-11-15  7:47 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> On Tue, Nov 08, 2011 at 02:21:39PM +0900, Kukjin Kim wrote:
> > Russell King - ARM Linux wrote:
> > >
> > > On Mon, Nov 07, 2011 at 08:17:58PM +0900, Kyungmin Park wrote:
> > > > On 11/7/11, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > > > > On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux
> > wrote:
> > > > >> Hook these platforms restart code into the new restart hook
rather
> > > > >> than using arch_reset().
> > > > >>
> > > > >> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > > > >> ---
> > > > >>  arch/arm/mach-exynos4/cpu.c                 |    6 +-----
> > > > >>  arch/arm/mach-exynos4/mach-armlex4210.c     |    1 +
> > > > >>  arch/arm/mach-exynos4/mach-nuri.c           |    1 +
> > > > >>  arch/arm/mach-exynos4/mach-origen.c         |    1 +
> > > > >>  arch/arm/mach-exynos4/mach-smdk4x12.c       |    2 ++
> > > > >>  arch/arm/mach-exynos4/mach-smdkv310.c       |    2 ++
> > > > >>  arch/arm/mach-exynos4/mach-universal_c210.c |    1 +
> > > > >>  7 files changed, 9 insertions(+), 5 deletions(-)
> > > > >>
> > > > >> diff --git a/arch/arm/mach-exynos4/cpu.c
> > b/arch/arm/mach-exynos4/cpu.c
> > > > >> index 5b1765b..5b1ee56 100644
> > > > >> --- a/arch/arm/mach-exynos4/cpu.c
> > > > >> +++ b/arch/arm/mach-exynos4/cpu.c
> > > > >> @@ -27,7 +27,6 @@
> > > > >>  #include <plat/fb-core.h>
> > > > >>  #include <plat/fimc-core.h>
> > > > >>  #include <plat/iic-core.h>
> > > > >> -#include <plat/reset.h>
> > > > >>  #include <plat/tv-core.h>
> > > > >>
> > > > >>  #include <mach/regs-irq.h>
> > > > >> @@ -145,7 +144,7 @@ static void exynos4_idle(void)
> > > > >>  	local_irq_enable();
> > > > >>  }
> > > > >>
> > > > >> -static void exynos4_sw_reset(void)
> > > > >> +void exynos4_restart(char mode, const char *cmd)
> > > > >>  {
> > > > >>  	__raw_writel(0x1, S5P_SWRESET);
> > > > >>  }
> > > > >> @@ -286,8 +285,5 @@ int __init exynos4_init(void)
> > > > >>  	/* set idle function */
> > > > >>  	pm_idle = exynos4_idle;
> > > > >>
> > > > >> -	/* set sw_reset function */
> > > > >> -	s5p_reset_hook = exynos4_sw_reset;
> > > > >> -
> > > > >
> > > > > I notice in last nights merge of the Samsung stuff, this has
become
> > > > > less trivial - it's now:
> > > > >         /* set sw_reset function */
> > > > >         if (soc_is_exynos4210() || soc_is_exynos4212() ||
> > > > > soc_is_exynos4412())
> > > > >                 s5p_reset_hook = exynos4_sw_reset;
> > > > >
> > > > > So which of the boards should be converted and which shouldn't ?
> > > > > In other words, which exynos4210, 4212 or 4412 platforms?
> > > >
> > > > except the arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is
used.
> > > > currently all exynos4 series has same reset function. it's
preparation
> > > > for exynos5 series maybe.
> > > >
> > > > you can use the exynos4_sw_reset for all boards.
> > >
> > Thanks, Kyungmin.
> >
> > > Thanks, that gets me back to where I was with the patch before the
> > > exynos4 move.
> > >
> >
> > Thanks.
> 
> I have to point out that even so, this patch as it stands will break
> the exynos build (that's why the subject line contains the XXX WIP XXX
> stuff.)
> 
> As I said in my pet peaves mail, there should be a header in
> arch/arm/mach-exynos for the data and function declarations which are

OK, I see.

> only used by and only provided by files in this directory.  Such things
> as:
> 
> struct sys_timer exynos4_timer;
> void exynos4_init_irq(void);
> 
> etc.  This stuff should not be inappropriately placed:
> 
> arch/arm/plat-samsung/include/plat/exynos4.h:extern struct sys_timer
> exynos4_timer;
> arch/arm/plat-samsung/include/plat/exynos4.h:extern void
exynos4_init_irq(void);
> 
> (e.g.,
> $ grep exynos4_init_irq\\\> arch/arm -r
> arch/arm/mach-exynos/mach-nuri.c:   .init_irq       = exynos4_init_irq,
> arch/arm/mach-exynos/mach-origen.c: .init_irq       = exynos4_init_irq,
> arch/arm/mach-exynos/mach-armlex4210.c:     .init_irq       =
exynos4_init_irq,
> arch/arm/mach-exynos/mach-smdkv310.c:       .init_irq       =
> exynos4_init_irq,
> arch/arm/mach-exynos/mach-smdkv310.c:       .init_irq       =
> exynos4_init_irq,
> arch/arm/mach-exynos/mach-smdk4x12.c:       .init_irq       =
> exynos4_init_irq,
> arch/arm/mach-exynos/mach-smdk4x12.c:       .init_irq       =
> exynos4_init_irq,
> arch/arm/mach-exynos/cpu.c:void __init exynos4_init_irq(void)
> arch/arm/mach-exynos/mach-universal_c210.c: .init_irq       =
exynos4_init_irq,
> arch/arm/plat-samsung/include/plat/exynos4.h:extern void
exynos4_init_irq(void);
> $ grep exynos4_timer arch/arm -r
> arch/arm/mach-exynos/mach-nuri.c:   .timer          = &exynos4_timer,
> arch/arm/mach-exynos/mach-origen.c: .timer          = &exynos4_timer,
> arch/arm/mach-exynos/mach-armlex4210.c:     .timer          =
> &exynos4_timer,
> arch/arm/mach-exynos/mach-smdkv310.c:       .timer          =
> &exynos4_timer,
> arch/arm/mach-exynos/mach-smdkv310.c:       .timer          =
> &exynos4_timer,
> arch/arm/mach-exynos/mach-smdk4x12.c:       .timer          =
> &exynos4_timer,
> arch/arm/mach-exynos/mach-smdk4x12.c:       .timer          =
> &exynos4_timer,
> arch/arm/mach-exynos/mct.c:struct sys_timer exynos4_timer = {
> arch/arm/mach-exynos/mach-universal_c210.c: .timer          =
&exynos4_timer,
> arch/arm/plat-samsung/include/plat/exynos4.h:extern struct sys_timer
> exynos4_timer;
> $ grep exynos4_register_clocks arch/arm -r
> arch/arm/mach-exynos/clock.c:void __init exynos4_register_clocks(void)
> arch/arm/mach-exynos/cpu.c: exynos4_register_clocks();
> arch/arm/plat-samsung/include/plat/exynos4.h:extern void
> exynos4_register_clock(void);
> $ grep exynos421._register_clocks arch/arm -r
> arch/arm/mach-exynos/clock-exynos4212.c:void __init
> exynos4212_register_clocks(void)
> arch/arm/mach-exynos/cpu.c:         exynos4210_register_clocks();
> arch/arm/mach-exynos/cpu.c:         exynos4212_register_clocks();
> arch/arm/mach-exynos/clock-exynos4210.c:void __init
> exynos4210_register_clocks(void)
> arch/arm/plat-samsung/include/plat/exynos4.h:extern void
> exynos4210_register_clocks(void);
> arch/arm/plat-samsung/include/plat/exynos4.h:extern void
> exynos4212_register_clocks(void);
> )
> 
> I suspect a sizeable proportion of plat/exynos4.h could move into
> arch/arm/mach-exynos.

OK, as I replied previous, I agree with you and I will sort them out as per
your suggestion.

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] 162+ messages in thread

* [PATCH 04/41] ARM: restart: at91: use new restart hook
  2011-11-15  1:16   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-11-15  8:52     ` Russell King - ARM Linux
  2011-11-15  9:15       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-15  8:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 15, 2011 at 02:16:10AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:41 Sun 06 Nov     , Russell King - ARM Linux wrote:
> > Rather than using a private function pointer, use the existing
> > arm_pm_restart function pointer instead.  We no longer need to enable
> > the I-cache in at91sam9_alt_reset() as the caches will now be on when
> > this function is called.
> > 
> > Update the function names to use the 'restart' terminology rather than
> > the 'reboot' terminology.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> I'll appply this one via at91-treee as I've patch that touch this part too in
> the queue if you do'nt mind

Which will break my patch queue.  As I said to Tony, I'm looking to
stabilize this in about a week and a half's time, at which point
you'll be able to pull these changes into your tree.

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

* [PATCH 04/41] ARM: restart: at91: use new restart hook
  2011-11-15  8:52     ` Russell King - ARM Linux
@ 2011-11-15  9:15       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 162+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-15  9:15 UTC (permalink / raw)
  To: linux-arm-kernel

On 08:52 Tue 15 Nov     , Russell King - ARM Linux wrote:
> On Tue, Nov 15, 2011 at 02:16:10AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 17:41 Sun 06 Nov     , Russell King - ARM Linux wrote:
> > > Rather than using a private function pointer, use the existing
> > > arm_pm_restart function pointer instead.  We no longer need to enable
> > > the I-cache in at91sam9_alt_reset() as the caches will now be on when
> > > this function is called.
> > > 
> > > Update the function names to use the 'restart' terminology rather than
> > > the 'reboot' terminology.
> > > 
> > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > > ---
> > I'll appply this one via at91-treee as I've patch that touch this part too in
> > the queue if you do'nt mind
> 
> Which will break my patch queue.  As I said to Tony, I'm looking to
> stabilize this in about a week and a half's time, at which point
> you'll be able to pull these changes into your tree.
so let do the invert mine is stable will go to the next today

Best Regards,
J.

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

* [PATCH 02/41] ARM: restart: remove poodle restart handler
  2011-11-06 17:40 ` [PATCH 02/41] ARM: restart: remove poodle restart handler Russell King - ARM Linux
@ 2011-11-17 17:24   ` Russell King - ARM Linux
  2011-11-18 10:11     ` Richard Purdie
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:24 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:40:37PM +0000, Russell King - ARM Linux wrote:
> The poodle restart handler was added in 74617fb6b8 (3593/1: Add reboot
> and shutdown handlers for Zaurus handhelds), and at that time it was
> necessary to deal with the RCSR register.  This commit also forced all
> restarts to use the 'hard' restart method.
> 
> In dc38e2ad53 (pxa: Fix RCSR handling), the RCSR handling was removed,
> leaving just the forcing to use a 'hard' restart.  As hard restarts are
> the default (in the absense of a reboot= command line argument), this
> seems pointless.  In any case, Richard Purdie says:
> 
> > From what I remember that hardware either always reboots or always
> > halts. I think the option was therefore left hardcoded to make it clear
> > it wasn't expected to work. Later Zaurii models could do either but
> > required some manual poking of registers to make it happen iirc.
> >
> > Regardless, you can probably clean this up as you suggest now.
> 
> So, lets remove the unnecessary interception and rely on the default
> restart mode.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-pxa/poodle.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
> index 948ce3e..1c597ad 100644
> --- a/arch/arm/mach-pxa/poodle.c
> +++ b/arch/arm/mach-pxa/poodle.c
> @@ -419,17 +419,11 @@ static void poodle_poweroff(void)
>  	arm_machine_restart('h', NULL);
>  }
>  
> -static void poodle_restart(char mode, const char *cmd)
> -{
> -	arm_machine_restart('h', cmd);
> -}
> -
>  static void __init poodle_init(void)
>  {
>  	int ret = 0;
>  
>  	pm_power_off = poodle_poweroff;
> -	arm_pm_restart = poodle_restart;
>  
>  	PCFR |= PCFR_OPDE;
>  
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 28/41] ARM: restart: pxa: use new restart hook
  2011-11-06 17:49 ` [PATCH 28/41] ARM: restart: pxa: " Russell King - ARM Linux
@ 2011-11-17 17:27   ` Russell King - ARM Linux
  2011-11-18 10:11     ` Richard Purdie
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:49:28PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-pxa/balloon3.c            |    1 +
>  arch/arm/mach-pxa/capc7117.c            |    3 ++-
>  arch/arm/mach-pxa/cm-x2xx.c             |    1 +
>  arch/arm/mach-pxa/cm-x300.c             |    1 +
>  arch/arm/mach-pxa/colibri-pxa270.c      |    2 ++
>  arch/arm/mach-pxa/colibri-pxa300.c      |    1 +
>  arch/arm/mach-pxa/colibri-pxa320.c      |    1 +
>  arch/arm/mach-pxa/corgi.c               |    8 +++++---
>  arch/arm/mach-pxa/csb726.c              |    1 +
>  arch/arm/mach-pxa/em-x270.c             |    2 ++
>  arch/arm/mach-pxa/eseries.c             |    6 ++++++
>  arch/arm/mach-pxa/ezx.c                 |    6 ++++++
>  arch/arm/mach-pxa/generic.h             |    2 ++
>  arch/arm/mach-pxa/gumstix.c             |    1 +
>  arch/arm/mach-pxa/h5000.c               |    1 +
>  arch/arm/mach-pxa/himalaya.c            |    1 +
>  arch/arm/mach-pxa/hx4700.c              |    1 +
>  arch/arm/mach-pxa/icontrol.c            |    3 ++-
>  arch/arm/mach-pxa/idp.c                 |    1 +
>  arch/arm/mach-pxa/include/mach/system.h |   10 +++-------
>  arch/arm/mach-pxa/littleton.c           |    1 +
>  arch/arm/mach-pxa/lpd270.c              |    1 +
>  arch/arm/mach-pxa/lubbock.c             |    1 +
>  arch/arm/mach-pxa/magician.c            |    1 +
>  arch/arm/mach-pxa/mainstone.c           |    1 +
>  arch/arm/mach-pxa/mioa701.c             |    6 +++---
>  arch/arm/mach-pxa/mp900.c               |    1 +
>  arch/arm/mach-pxa/palmld.c              |    3 ++-
>  arch/arm/mach-pxa/palmt5.c              |    3 ++-
>  arch/arm/mach-pxa/palmtc.c              |    3 ++-
>  arch/arm/mach-pxa/palmte2.c             |    3 ++-
>  arch/arm/mach-pxa/palmtreo.c            |    2 ++
>  arch/arm/mach-pxa/palmtx.c              |    3 ++-
>  arch/arm/mach-pxa/palmz72.c             |    3 ++-
>  arch/arm/mach-pxa/pcm027.c              |    1 +
>  arch/arm/mach-pxa/poodle.c              |    3 ++-
>  arch/arm/mach-pxa/raumfeld.c            |    3 +++
>  arch/arm/mach-pxa/reset.c               |    5 ++++-
>  arch/arm/mach-pxa/saar.c                |    1 +
>  arch/arm/mach-pxa/saarb.c               |    1 +
>  arch/arm/mach-pxa/spitz.c               |    6 ++++--
>  arch/arm/mach-pxa/stargate2.c           |    2 ++
>  arch/arm/mach-pxa/tavorevb.c            |    1 +
>  arch/arm/mach-pxa/tavorevb3.c           |    1 +
>  arch/arm/mach-pxa/tosa.c                |    4 ++--
>  arch/arm/mach-pxa/trizeps4.c            |    2 ++
>  arch/arm/mach-pxa/viper.c               |    1 +
>  arch/arm/mach-pxa/vpac270.c             |    3 ++-
>  arch/arm/mach-pxa/xcep.c                |    1 +
>  arch/arm/mach-pxa/z2.c                  |    1 +
>  arch/arm/mach-pxa/zeus.c                |    1 +
>  arch/arm/mach-pxa/zylonite.c            |    1 +
>  52 files changed, 95 insertions(+), 28 deletions(-)
> 
> diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
> index fc0b854..5e25e17 100644
> --- a/arch/arm/mach-pxa/balloon3.c
> +++ b/arch/arm/mach-pxa/balloon3.c
> @@ -829,4 +829,5 @@ MACHINE_START(BALLOON3, "Balloon3")
>  	.timer		= &pxa_timer,
>  	.init_machine	= balloon3_init,
>  	.atag_offset	= 0x100,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/capc7117.c b/arch/arm/mach-pxa/capc7117.c
> index 4efc16d..c2f0be0 100644
> --- a/arch/arm/mach-pxa/capc7117.c
> +++ b/arch/arm/mach-pxa/capc7117.c
> @@ -153,5 +153,6 @@ MACHINE_START(CAPC7117,
>  	.init_irq = pxa3xx_init_irq,
>  	.handle_irq = pxa3xx_handle_irq,
>  	.timer = &pxa_timer,
> -	.init_machine = capc7117_init
> +	.init_machine = capc7117_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c
> index f2e4190..ec170a5 100644
> --- a/arch/arm/mach-pxa/cm-x2xx.c
> +++ b/arch/arm/mach-pxa/cm-x2xx.c
> @@ -524,4 +524,5 @@ MACHINE_START(ARMCORE, "Compulab CM-X2XX")
>  #ifdef CONFIG_PCI
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
> index 3a7387f..dfd51d7 100644
> --- a/arch/arm/mach-pxa/cm-x300.c
> +++ b/arch/arm/mach-pxa/cm-x300.c
> @@ -857,4 +857,5 @@ MACHINE_START(CM_X300, "CM-X300 module")
>  	.timer		= &pxa_timer,
>  	.init_machine	= cm_x300_init,
>  	.fixup		= cm_x300_fixup,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
> index 7db6646..17a29be 100644
> --- a/arch/arm/mach-pxa/colibri-pxa270.c
> +++ b/arch/arm/mach-pxa/colibri-pxa270.c
> @@ -312,6 +312,7 @@ MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
>  MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC")
> @@ -321,5 +322,6 @@ MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
> index c825e8b..c01059a 100644
> --- a/arch/arm/mach-pxa/colibri-pxa300.c
> +++ b/arch/arm/mach-pxa/colibri-pxa300.c
> @@ -189,5 +189,6 @@ MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
>  	.init_irq	= pxa3xx_init_irq,
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
> index 692e1ff..6cc3caa 100644
> --- a/arch/arm/mach-pxa/colibri-pxa320.c
> +++ b/arch/arm/mach-pxa/colibri-pxa320.c
> @@ -259,5 +259,6 @@ MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
>  	.init_irq	= pxa3xx_init_irq,
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
> index 3e9483b..66faaaf 100644
> --- a/arch/arm/mach-pxa/corgi.c
> +++ b/arch/arm/mach-pxa/corgi.c
> @@ -654,7 +654,7 @@ static void corgi_poweroff(void)
>  		/* Green LED off tells the bootloader to halt */
>  		gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
>  
> -	arm_machine_restart('h', NULL);
> +	pxa_restart('h', NULL);
>  }
>  
>  static void corgi_restart(char mode, const char *cmd)
> @@ -663,13 +663,12 @@ static void corgi_restart(char mode, const char *cmd)
>  		/* Green LED on tells the bootloader to reboot */
>  		gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
>  
> -	arm_machine_restart('h', cmd);
> +	pxa_restart('h', cmd);
>  }
>  
>  static void __init corgi_init(void)
>  {
>  	pm_power_off = corgi_poweroff;
> -	arm_pm_restart = corgi_restart;
>  
>  	/* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
>  	PCFR |= PCFR_OPDE;
> @@ -725,6 +724,7 @@ MACHINE_START(CORGI, "SHARP Corgi")
>  	.handle_irq	= pxa25x_handle_irq,
>  	.init_machine	= corgi_init,
>  	.timer		= &pxa_timer,
> +	.restart	= corgi_restart,
>  MACHINE_END
>  #endif
>  
> @@ -736,6 +736,7 @@ MACHINE_START(SHEPHERD, "SHARP Shepherd")
>  	.handle_irq	= pxa25x_handle_irq,
>  	.init_machine	= corgi_init,
>  	.timer		= &pxa_timer,
> +	.restart	= corgi_restart,
>  MACHINE_END
>  #endif
>  
> @@ -747,6 +748,7 @@ MACHINE_START(HUSKY, "SHARP Husky")
>  	.handle_irq	= pxa25x_handle_irq,
>  	.init_machine	= corgi_init,
>  	.timer		= &pxa_timer,
> +	.restart	= corgi_restart,
>  MACHINE_END
>  #endif
>  
> diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c
> index 5e2cf39..fb5a51d 100644
> --- a/arch/arm/mach-pxa/csb726.c
> +++ b/arch/arm/mach-pxa/csb726.c
> @@ -278,4 +278,5 @@ MACHINE_START(CSB726, "Cogent CSB726")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.init_machine   = csb726_init,
>  	.timer          = &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
> index 94acc0b..bd396ba 100644
> --- a/arch/arm/mach-pxa/em-x270.c
> +++ b/arch/arm/mach-pxa/em-x270.c
> @@ -1305,6 +1305,7 @@ MACHINE_START(EM_X270, "Compulab EM-X270")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= em_x270_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
>  MACHINE_START(EXEDA, "Compulab eXeda")
> @@ -1314,4 +1315,5 @@ MACHINE_START(EXEDA, "Compulab eXeda")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= em_x270_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
> index 8e697dd..8cafafa 100644
> --- a/arch/arm/mach-pxa/eseries.c
> +++ b/arch/arm/mach-pxa/eseries.c
> @@ -196,6 +196,7 @@ MACHINE_START(E330, "Toshiba e330")
>  	.fixup		= eseries_fixup,
>  	.init_machine	= e330_init,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -246,6 +247,7 @@ MACHINE_START(E350, "Toshiba e350")
>  	.fixup		= eseries_fixup,
>  	.init_machine	= e350_init,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -369,6 +371,7 @@ MACHINE_START(E400, "Toshiba e400")
>  	.fixup		= eseries_fixup,
>  	.init_machine	= e400_init,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -558,6 +561,7 @@ MACHINE_START(E740, "Toshiba e740")
>  	.fixup		= eseries_fixup,
>  	.init_machine	= e740_init,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -750,6 +754,7 @@ MACHINE_START(E750, "Toshiba e750")
>  	.fixup		= eseries_fixup,
>  	.init_machine	= e750_init,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -955,5 +960,6 @@ MACHINE_START(E800, "Toshiba e800")
>  	.fixup		= eseries_fixup,
>  	.init_machine	= e800_init,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
> index 8308eee..15ab253 100644
> --- a/arch/arm/mach-pxa/ezx.c
> +++ b/arch/arm/mach-pxa/ezx.c
> @@ -804,6 +804,7 @@ MACHINE_START(EZX_A780, "Motorola EZX A780")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = a780_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -870,6 +871,7 @@ MACHINE_START(EZX_E680, "Motorola EZX E680")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = e680_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -936,6 +938,7 @@ MACHINE_START(EZX_A1200, "Motorola EZX A1200")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = a1200_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -1127,6 +1130,7 @@ MACHINE_START(EZX_A910, "Motorola EZX A910")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = a910_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -1193,6 +1197,7 @@ MACHINE_START(EZX_E6, "Motorola EZX E6")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = e6_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -1233,5 +1238,6 @@ MACHINE_START(EZX_E2, "Motorola EZX E2")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = e2_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
> index 92a2e85..0d729e6 100644
> --- a/arch/arm/mach-pxa/generic.h
> +++ b/arch/arm/mach-pxa/generic.h
> @@ -57,3 +57,5 @@ void __init pxa_set_ffuart_info(void *info);
>  void __init pxa_set_btuart_info(void *info);
>  void __init pxa_set_stuart_info(void *info);
>  void __init pxa_set_hwuart_info(void *info);
> +
> +void pxa_restart(char, const char *);
> diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
> index 9c8208c..03e5e0b 100644
> --- a/arch/arm/mach-pxa/gumstix.c
> +++ b/arch/arm/mach-pxa/gumstix.c
> @@ -239,4 +239,5 @@ MACHINE_START(GUMSTIX, "Gumstix")
>  	.handle_irq	= pxa25x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= gumstix_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c
> index 4b5e110..fde6b4c 100644
> --- a/arch/arm/mach-pxa/h5000.c
> +++ b/arch/arm/mach-pxa/h5000.c
> @@ -209,4 +209,5 @@ MACHINE_START(H5400, "HP iPAQ H5000")
>  	.handle_irq = pxa25x_handle_irq,
>  	.timer = &pxa_timer,
>  	.init_machine = h5000_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/himalaya.c b/arch/arm/mach-pxa/himalaya.c
> index f2c3245..26d069a 100644
> --- a/arch/arm/mach-pxa/himalaya.c
> +++ b/arch/arm/mach-pxa/himalaya.c
> @@ -164,4 +164,5 @@ MACHINE_START(HIMALAYA, "HTC Himalaya")
>  	.handle_irq = pxa25x_handle_irq,
>  	.init_machine = himalaya_init,
>  	.timer = &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
> index 6f6368e..ce16bda 100644
> --- a/arch/arm/mach-pxa/hx4700.c
> +++ b/arch/arm/mach-pxa/hx4700.c
> @@ -845,4 +845,5 @@ MACHINE_START(H4700, "HP iPAQ HX4700")
>  	.handle_irq     = pxa27x_handle_irq,
>  	.init_machine = hx4700_init,
>  	.timer        = &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/icontrol.c b/arch/arm/mach-pxa/icontrol.c
> index f78d5db..e239b82 100644
> --- a/arch/arm/mach-pxa/icontrol.c
> +++ b/arch/arm/mach-pxa/icontrol.c
> @@ -196,5 +196,6 @@ MACHINE_START(ICONTROL, "iControl/SafeTcam boards using Embedian MXM-8x10 CoM")
>  	.init_irq	= pxa3xx_init_irq,
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer		= &pxa_timer,
> -	.init_machine	= icontrol_init
> +	.init_machine	= icontrol_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
> index ddf20e5..fbabd84 100644
> --- a/arch/arm/mach-pxa/idp.c
> +++ b/arch/arm/mach-pxa/idp.c
> @@ -199,4 +199,5 @@ MACHINE_START(PXA_IDP, "Vibren PXA255 IDP")
>  	.handle_irq	= pxa25x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= idp_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
> index d1fce8b..85494ff 100644
> --- a/arch/arm/mach-pxa/include/mach/system.h
> +++ b/arch/arm/mach-pxa/include/mach/system.h
> @@ -9,15 +9,11 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -
> -#include <asm/proc-fns.h>
> -#include "hardware.h"
> -#include "pxa2xx-regs.h"
> -
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
>  }
>  
> -
> -void arch_reset(char mode, const char *cmd);
> +static inline void arch_reset(char mode, const char *cmd)
> +{
> +}
> diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
> index 0037e57..1799a8e 100644
> --- a/arch/arm/mach-pxa/littleton.c
> +++ b/arch/arm/mach-pxa/littleton.c
> @@ -444,4 +444,5 @@ MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleto
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= littleton_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
> index 1dd5302..6119c01 100644
> --- a/arch/arm/mach-pxa/lpd270.c
> +++ b/arch/arm/mach-pxa/lpd270.c
> @@ -505,4 +505,5 @@ MACHINE_START(LOGICPD_PXA270, "LogicPD PXA270 Card Engine")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= lpd270_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
> index c48ce6d..4b7a528 100644
> --- a/arch/arm/mach-pxa/lubbock.c
> +++ b/arch/arm/mach-pxa/lubbock.c
> @@ -556,4 +556,5 @@ MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)")
>  	.handle_irq	= pxa25x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= lubbock_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
> index 4b796c3..4e6774f 100644
> --- a/arch/arm/mach-pxa/magician.c
> +++ b/arch/arm/mach-pxa/magician.c
> @@ -760,4 +760,5 @@ MACHINE_START(MAGICIAN, "HTC Magician")
>  	.handle_irq = pxa27x_handle_irq,
>  	.init_machine = magician_init,
>  	.timer = &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
> index 0567d39..ca14555 100644
> --- a/arch/arm/mach-pxa/mainstone.c
> +++ b/arch/arm/mach-pxa/mainstone.c
> @@ -622,4 +622,5 @@ MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= mainstone_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
> index 4f47a76..924a3b5 100644
> --- a/arch/arm/mach-pxa/mioa701.c
> +++ b/arch/arm/mach-pxa/mioa701.c
> @@ -696,13 +696,13 @@ static void mioa701_machine_exit(void);
>  static void mioa701_poweroff(void)
>  {
>  	mioa701_machine_exit();
> -	arm_machine_restart('s', NULL);
> +	pxa_restart('s', NULL);
>  }
>  
>  static void mioa701_restart(char c, const char *cmd)
>  {
>  	mioa701_machine_exit();
> -	arm_machine_restart('s', cmd);
> +	pxa_restart('s', cmd);
>  }
>  
>  static struct gpio global_gpios[] = {
> @@ -734,7 +734,6 @@ static void __init mioa701_machine_init(void)
>  	pxa_set_udc_info(&mioa701_udc_info);
>  	pxa_set_ac97_info(&mioa701_ac97_info);
>  	pm_power_off = mioa701_poweroff;
> -	arm_pm_restart = mioa701_restart;
>  	platform_add_devices(devices, ARRAY_SIZE(devices));
>  	gsm_init();
>  
> @@ -758,4 +757,5 @@ MACHINE_START(MIOA701, "MIO A701")
>  	.handle_irq	= &pxa27x_handle_irq,
>  	.init_machine	= mioa701_machine_init,
>  	.timer		= &pxa_timer,
> +	.restart	= mioa701_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/mp900.c b/arch/arm/mach-pxa/mp900.c
> index 4af5d51..169bf8f 100644
> --- a/arch/arm/mach-pxa/mp900.c
> +++ b/arch/arm/mach-pxa/mp900.c
> @@ -98,5 +98,6 @@ MACHINE_START(NEC_MP900, "MobilePro900/C")
>  	.init_irq	= pxa25x_init_irq,
>  	.handle_irq	= pxa25x_handle_irq,
>  	.init_machine	= mp900c_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
> index 3d4a281..1fa80f4f 100644
> --- a/arch/arm/mach-pxa/palmld.c
> +++ b/arch/arm/mach-pxa/palmld.c
> @@ -347,5 +347,6 @@ MACHINE_START(PALMLD, "Palm LifeDrive")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> -	.init_machine	= palmld_init
> +	.init_machine	= palmld_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
> index 99d6bcf..5ba1431 100644
> --- a/arch/arm/mach-pxa/palmt5.c
> +++ b/arch/arm/mach-pxa/palmt5.c
> @@ -208,5 +208,6 @@ MACHINE_START(PALMT5, "Palm Tungsten|T5")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> -	.init_machine	= palmt5_init
> +	.init_machine	= palmt5_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
> index 6ec7cae..e4dd719 100644
> --- a/arch/arm/mach-pxa/palmtc.c
> +++ b/arch/arm/mach-pxa/palmtc.c
> @@ -542,5 +542,6 @@ MACHINE_START(PALMTC, "Palm Tungsten|C")
>  	.init_irq	= pxa25x_init_irq,
>  	.handle_irq	= pxa25x_handle_irq,
>  	.timer		= &pxa_timer,
> -	.init_machine	= palmtc_init
> +	.init_machine	= palmtc_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
> index 9376da0..5ebf49acb 100644
> --- a/arch/arm/mach-pxa/palmte2.c
> +++ b/arch/arm/mach-pxa/palmte2.c
> @@ -361,5 +361,6 @@ MACHINE_START(PALMTE2, "Palm Tungsten|E2")
>  	.init_irq	= pxa25x_init_irq,
>  	.handle_irq	= pxa25x_handle_irq,
>  	.timer		= &pxa_timer,
> -	.init_machine	= palmte2_init
> +	.init_machine	= palmte2_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
> index 94e9708..ec82491 100644
> --- a/arch/arm/mach-pxa/palmtreo.c
> +++ b/arch/arm/mach-pxa/palmtreo.c
> @@ -452,6 +452,7 @@ MACHINE_START(TREO680, "Palm Treo 680")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = treo680_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -464,5 +465,6 @@ MACHINE_START(CENTRO, "Palm Centro 685")
>  	.handle_irq       = pxa27x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine	= centro_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
> index 4e3e459..6170d76 100644
> --- a/arch/arm/mach-pxa/palmtx.c
> +++ b/arch/arm/mach-pxa/palmtx.c
> @@ -369,5 +369,6 @@ MACHINE_START(PALMTX, "Palm T|X")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> -	.init_machine	= palmtx_init
> +	.init_machine	= palmtx_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
> index 68e18ba..b2dff9d 100644
> --- a/arch/arm/mach-pxa/palmz72.c
> +++ b/arch/arm/mach-pxa/palmz72.c
> @@ -404,5 +404,6 @@ MACHINE_START(PALMZ72, "Palm Zire72")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> -	.init_machine	= palmz72_init
> +	.init_machine	= palmz72_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
> index 0b825a3..fe90544 100644
> --- a/arch/arm/mach-pxa/pcm027.c
> +++ b/arch/arm/mach-pxa/pcm027.c
> @@ -265,4 +265,5 @@ MACHINE_START(PCM027, "Phytec Messtechnik GmbH phyCORE-PXA270")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= pcm027_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
> index 1c597ad..7e054d4 100644
> --- a/arch/arm/mach-pxa/poodle.c
> +++ b/arch/arm/mach-pxa/poodle.c
> @@ -416,7 +416,7 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = {
>  
>  static void poodle_poweroff(void)
>  {
> -	arm_machine_restart('h', NULL);
> +	pxa_restart('h', NULL);
>  }
>  
>  static void __init poodle_init(void)
> @@ -465,4 +465,5 @@ MACHINE_START(POODLE, "SHARP Poodle")
>  	.handle_irq	= pxa25x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= poodle_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
> index 6810cdd..697cbcd 100644
> --- a/arch/arm/mach-pxa/raumfeld.c
> +++ b/arch/arm/mach-pxa/raumfeld.c
> @@ -1092,6 +1092,7 @@ MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
>  	.init_irq	= pxa3xx_init_irq,
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -1103,6 +1104,7 @@ MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
>  	.init_irq	= pxa3xx_init_irq,
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -1114,5 +1116,6 @@ MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
>  	.init_irq	= pxa3xx_init_irq,
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> index b8bcda1..c8497b0 100644
> --- a/arch/arm/mach-pxa/reset.c
> +++ b/arch/arm/mach-pxa/reset.c
> @@ -81,8 +81,11 @@ static void do_hw_reset(void)
>  	OSMR3 = OSCR + 368640;	/* ... in 100 ms */
>  }
>  
> -void arch_reset(char mode, const char *cmd)
> +void pxa_restart(char mode, const char *cmd)
>  {
> +	local_irq_disable();
> +	local_fiq_disable();
> +
>  	clear_reset_status(RESET_STATUS_ALL);
>  
>  	switch (mode) {
> diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c
> index fc2c1e0..8787070 100644
> --- a/arch/arm/mach-pxa/saar.c
> +++ b/arch/arm/mach-pxa/saar.c
> @@ -602,4 +602,5 @@ MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")
>  	.handle_irq       = pxa3xx_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = saar_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c
> index 3e999e3..b6dbaca 100644
> --- a/arch/arm/mach-pxa/saarb.c
> +++ b/arch/arm/mach-pxa/saarb.c
> @@ -111,5 +111,6 @@ MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)")
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = saarb_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
> index f5bafcc..d8d089e 100644
> --- a/arch/arm/mach-pxa/spitz.c
> +++ b/arch/arm/mach-pxa/spitz.c
> @@ -925,7 +925,7 @@ static inline void spitz_i2c_init(void) {}
>   ******************************************************************************/
>  static void spitz_poweroff(void)
>  {
> -	arm_machine_restart('g', NULL);
> +	pxa_restart('g', NULL);
>  }
>  
>  static void spitz_restart(char mode, const char *cmd)
> @@ -942,7 +942,6 @@ static void __init spitz_init(void)
>  {
>  	init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
>  	pm_power_off = spitz_poweroff;
> -	arm_pm_restart = spitz_restart;
>  
>  	PMCR = 0x00;
>  
> @@ -988,6 +987,7 @@ MACHINE_START(SPITZ, "SHARP Spitz")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.init_machine	= spitz_init,
>  	.timer		= &pxa_timer,
> +	.restart	= spitz_restart,
>  MACHINE_END
>  #endif
>  
> @@ -1000,6 +1000,7 @@ MACHINE_START(BORZOI, "SHARP Borzoi")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.init_machine	= spitz_init,
>  	.timer		= &pxa_timer,
> +	.restart	= spitz_restart,
>  MACHINE_END
>  #endif
>  
> @@ -1012,5 +1013,6 @@ MACHINE_START(AKITA, "SHARP Akita")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.init_machine	= spitz_init,
>  	.timer		= &pxa_timer,
> +	.restart	= spitz_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
> index 4c9a48b..80d7f23 100644
> --- a/arch/arm/mach-pxa/stargate2.c
> +++ b/arch/arm/mach-pxa/stargate2.c
> @@ -1005,6 +1005,7 @@ MACHINE_START(INTELMOTE2, "IMOTE 2")
>  	.timer		= &pxa_timer,
>  	.init_machine	= imote2_init,
>  	.atag_offset	= 0x100,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
>  
> @@ -1017,5 +1018,6 @@ MACHINE_START(STARGATE2, "Stargate 2")
>  	.timer = &pxa_timer,
>  	.init_machine = stargate2_init,
>  	.atag_offset = 0x100,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
> index ad47bb9..4fa36a3 100644
> --- a/arch/arm/mach-pxa/tavorevb.c
> +++ b/arch/arm/mach-pxa/tavorevb.c
> @@ -495,4 +495,5 @@ MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)")
>  	.handle_irq       = pxa3xx_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = tavorevb_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/tavorevb3.c b/arch/arm/mach-pxa/tavorevb3.c
> index fd56916..8a22879 100644
> --- a/arch/arm/mach-pxa/tavorevb3.c
> +++ b/arch/arm/mach-pxa/tavorevb3.c
> @@ -132,4 +132,5 @@ MACHINE_START(TAVOREVB3, "PXA950 Evaluation Board (aka TavorEVB3)")
>  	.handle_irq       = pxa3xx_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine   = evb3_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
> index ef64530..dfe40f8 100644
> --- a/arch/arm/mach-pxa/tosa.c
> +++ b/arch/arm/mach-pxa/tosa.c
> @@ -905,7 +905,7 @@ static struct platform_device *devices[] __initdata = {
>  
>  static void tosa_poweroff(void)
>  {
> -	arm_machine_restart('g', NULL);
> +	pxa_restart('g', NULL);
>  }
>  
>  static void tosa_restart(char mode, const char *cmd)
> @@ -935,7 +935,6 @@ static void __init tosa_init(void)
>  	init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);
>  
>  	pm_power_off = tosa_poweroff;
> -	arm_pm_restart = tosa_restart;
>  
>  	PCFR |= PCFR_OPDE;
>  
> @@ -978,4 +977,5 @@ MACHINE_START(TOSA, "SHARP Tosa")
>  	.handle_irq       = pxa25x_handle_irq,
>  	.init_machine   = tosa_init,
>  	.timer          = &pxa_timer,
> +	.restart	= tosa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
> index 35bbf13..55ee85a 100644
> --- a/arch/arm/mach-pxa/trizeps4.c
> +++ b/arch/arm/mach-pxa/trizeps4.c
> @@ -560,6 +560,7 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
>  MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
> @@ -570,4 +571,5 @@ MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
> index 242ddae..afe2b74 100644
> --- a/arch/arm/mach-pxa/viper.c
> +++ b/arch/arm/mach-pxa/viper.c
> @@ -998,4 +998,5 @@ MACHINE_START(VIPER, "Arcom/Eurotech VIPER SBC")
>  	.handle_irq	= pxa25x_handle_irq,
>  	.timer          = &pxa_timer,
>  	.init_machine	= viper_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
> index a7539a6..d2bd677 100644
> --- a/arch/arm/mach-pxa/vpac270.c
> +++ b/arch/arm/mach-pxa/vpac270.c
> @@ -721,5 +721,6 @@ MACHINE_START(VPAC270, "Voipac PXA270")
>  	.init_irq	= pxa27x_init_irq,
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
> -	.init_machine	= vpac270_init
> +	.init_machine	= vpac270_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
> index 70e1730..4bbe9a3 100644
> --- a/arch/arm/mach-pxa/xcep.c
> +++ b/arch/arm/mach-pxa/xcep.c
> @@ -185,5 +185,6 @@ MACHINE_START(XCEP, "Iskratel XCEP")
>  	.init_irq	= pxa25x_init_irq,
>  	.handle_irq	= pxa25x_handle_irq,
>  	.timer		= &pxa_timer,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
> index ead32c9..d75f66a 100644
> --- a/arch/arm/mach-pxa/z2.c
> +++ b/arch/arm/mach-pxa/z2.c
> @@ -725,4 +725,5 @@ MACHINE_START(ZIPIT2, "Zipit Z2")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= z2_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
> index 498b83b..9db35a7 100644
> --- a/arch/arm/mach-pxa/zeus.c
> +++ b/arch/arm/mach-pxa/zeus.c
> @@ -911,5 +911,6 @@ MACHINE_START(ARCOM_ZEUS, "Arcom/Eurotech ZEUS")
>  	.handle_irq	= pxa27x_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= zeus_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
> index 31d4968..4e53c2d 100644
> --- a/arch/arm/mach-pxa/zylonite.c
> +++ b/arch/arm/mach-pxa/zylonite.c
> @@ -429,4 +429,5 @@ MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
>  	.handle_irq	= pxa3xx_handle_irq,
>  	.timer		= &pxa_timer,
>  	.init_machine	= zylonite_init,
> +	.restart	= pxa_restart,
>  MACHINE_END
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 14/41] ARM: restart: iop3xx: use new restart hook
  2011-11-06 17:44 ` [PATCH 14/41] ARM: restart: iop3xx: " Russell King - ARM Linux
@ 2011-11-17 17:28   ` Russell King - ARM Linux
  2011-11-24  6:45     ` Lennert Buytenhek
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:44:42PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the arm_pm_restart hook rather
> than using arch_reset().
> 
> In doing so, we split out the n2100 platform specific restart handler
> into the n2100 platform file.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/hardware/iop3xx.h     |    1 +
>  arch/arm/mach-iop32x/em7210.c              |    1 +
>  arch/arm/mach-iop32x/glantank.c            |    1 +
>  arch/arm/mach-iop32x/include/mach/system.h |   15 ---------------
>  arch/arm/mach-iop32x/iq31244.c             |    2 ++
>  arch/arm/mach-iop32x/iq80321.c             |    1 +
>  arch/arm/mach-iop32x/n2100.c               |    9 +++++++++
>  arch/arm/mach-iop33x/include/mach/system.h |    6 ------
>  arch/arm/mach-iop33x/iq80331.c             |    1 +
>  arch/arm/mach-iop33x/iq80332.c             |    1 +
>  arch/arm/plat-iop/Makefile                 |    2 ++
>  arch/arm/plat-iop/restart.c                |   19 +++++++++++++++++++
>  12 files changed, 38 insertions(+), 21 deletions(-)
>  create mode 100644 arch/arm/plat-iop/restart.c
> 
> diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h
> index 5daea29..077c323 100644
> --- a/arch/arm/include/asm/hardware/iop3xx.h
> +++ b/arch/arm/include/asm/hardware/iop3xx.h
> @@ -234,6 +234,7 @@ extern int iop3xx_get_init_atu(void);
>  void iop3xx_map_io(void);
>  void iop_init_cp6_handler(void);
>  void iop_init_time(unsigned long tickrate);
> +void iop3xx_restart(char, const char *);
>  
>  static inline u32 read_tmr0(void)
>  {
> diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c
> index 4325055..24069e0 100644
> --- a/arch/arm/mach-iop32x/em7210.c
> +++ b/arch/arm/mach-iop32x/em7210.c
> @@ -208,4 +208,5 @@ MACHINE_START(EM7210, "Lanner EM7210")
>  	.init_irq	= iop32x_init_irq,
>  	.timer		= &em7210_timer,
>  	.init_machine	= em7210_init_machine,
> +	.restart	= iop3xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
> index 0edc880..204e1d1 100644
> --- a/arch/arm/mach-iop32x/glantank.c
> +++ b/arch/arm/mach-iop32x/glantank.c
> @@ -212,4 +212,5 @@ MACHINE_START(GLANTANK, "GLAN Tank")
>  	.init_irq	= iop32x_init_irq,
>  	.timer		= &glantank_timer,
>  	.init_machine	= glantank_init_machine,
> +	.restart	= iop3xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
> index b4f83e5..44e46f2 100644
> --- a/arch/arm/mach-iop32x/include/mach/system.h
> +++ b/arch/arm/mach-iop32x/include/mach/system.h
> @@ -7,10 +7,6 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -#include <asm/mach-types.h>
> -#include <asm/hardware/iop3xx.h>
> -#include <mach/n2100.h>
> -
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
> @@ -18,15 +14,4 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	if (machine_is_n2100()) {
> -		gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
> -		gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
> -		while (1)
> -			;
> -	}
> -
> -	*IOP3XX_PCSR = 0x30;
> -
> -	/* Jump into ROM at address 0 */
> -	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
> index 9e7aacc..3eb642a 100644
> --- a/arch/arm/mach-iop32x/iq31244.c
> +++ b/arch/arm/mach-iop32x/iq31244.c
> @@ -318,6 +318,7 @@ MACHINE_START(IQ31244, "Intel IQ31244")
>  	.init_irq	= iop32x_init_irq,
>  	.timer		= &iq31244_timer,
>  	.init_machine	= iq31244_init_machine,
> +	.restart	= iop3xx_restart,
>  MACHINE_END
>  
>  /* There should have been an ep80219 machine identifier from the beginning.
> @@ -332,4 +333,5 @@ MACHINE_START(EP80219, "Intel EP80219")
>  	.init_irq	= iop32x_init_irq,
>  	.timer		= &iq31244_timer,
>  	.init_machine	= iq31244_init_machine,
> +	.restart	= iop3xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
> index 53ea86f..2ec724b 100644
> --- a/arch/arm/mach-iop32x/iq80321.c
> +++ b/arch/arm/mach-iop32x/iq80321.c
> @@ -191,4 +191,5 @@ MACHINE_START(IQ80321, "Intel IQ80321")
>  	.init_irq	= iop32x_init_irq,
>  	.timer		= &iq80321_timer,
>  	.init_machine	= iq80321_init_machine,
> +	.restart	= iop3xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
> index d726927..6b6d559 100644
> --- a/arch/arm/mach-iop32x/n2100.c
> +++ b/arch/arm/mach-iop32x/n2100.c
> @@ -291,6 +291,14 @@ static void n2100_power_off(void)
>  		;
>  }
>  
> +static void n2100_restart(char mode, const char *cmd)
> +{
> +	gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
> +	gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
> +	while (1)
> +		;
> +}
> +
>  
>  static struct timer_list power_button_poll_timer;
>  
> @@ -332,4 +340,5 @@ MACHINE_START(N2100, "Thecus N2100")
>  	.init_irq	= iop32x_init_irq,
>  	.timer		= &n2100_timer,
>  	.init_machine	= n2100_init_machine,
> +	.restart	= n2100_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
> index 86d1b20..696d88c 100644
> --- a/arch/arm/mach-iop33x/include/mach/system.h
> +++ b/arch/arm/mach-iop33x/include/mach/system.h
> @@ -7,8 +7,6 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -#include <asm/hardware/iop3xx.h>
> -
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
> @@ -16,8 +14,4 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	*IOP3XX_PCSR = 0x30;
> -
> -	/* Jump into ROM at address 0 */
> -	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
> index 9e14ccc..abce934 100644
> --- a/arch/arm/mach-iop33x/iq80331.c
> +++ b/arch/arm/mach-iop33x/iq80331.c
> @@ -146,4 +146,5 @@ MACHINE_START(IQ80331, "Intel IQ80331")
>  	.init_irq	= iop33x_init_irq,
>  	.timer		= &iq80331_timer,
>  	.init_machine	= iq80331_init_machine,
> +	.restart	= iop3xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
> index 09c899a..7513559 100644
> --- a/arch/arm/mach-iop33x/iq80332.c
> +++ b/arch/arm/mach-iop33x/iq80332.c
> @@ -146,4 +146,5 @@ MACHINE_START(IQ80332, "Intel IQ80332")
>  	.init_irq	= iop33x_init_irq,
>  	.timer		= &iq80332_timer,
>  	.init_machine	= iq80332_init_machine,
> +	.restart	= iop3xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile
> index 69b09c1..f5aebfe 100644
> --- a/arch/arm/plat-iop/Makefile
> +++ b/arch/arm/plat-iop/Makefile
> @@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_IOP32X) += io.o
>  obj-$(CONFIG_ARCH_IOP32X) += cp6.o
>  obj-$(CONFIG_ARCH_IOP32X) += adma.o
>  obj-$(CONFIG_ARCH_IOP32X) += pmu.o
> +obj-$(CONFIG_ARCH_IOP32X) += restart.o
>  
>  # IOP33X
>  obj-$(CONFIG_ARCH_IOP33X) += gpio.o
> @@ -25,6 +26,7 @@ obj-$(CONFIG_ARCH_IOP33X) += io.o
>  obj-$(CONFIG_ARCH_IOP33X) += cp6.o
>  obj-$(CONFIG_ARCH_IOP33X) += adma.o
>  obj-$(CONFIG_ARCH_IOP33X) += pmu.o
> +obj-$(CONFIG_ARCH_IOP33X) += restart.o
>  
>  # IOP13XX
>  obj-$(CONFIG_ARCH_IOP13XX) += cp6.o
> diff --git a/arch/arm/plat-iop/restart.c b/arch/arm/plat-iop/restart.c
> new file mode 100644
> index 0000000..6a85a0c
> --- /dev/null
> +++ b/arch/arm/plat-iop/restart.c
> @@ -0,0 +1,19 @@
> +/*
> + * restart.c
> + *
> + * Copyright (C) 2001 MontaVista Software, Inc.
> + *
> + * 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 <asm/hardware/iop3xx.h>
> +#include <mach/hardware.h>
> +
> +void iop3xx_restart(char mode, const char *cmd)
> +{
> +	*IOP3XX_PCSR = 0x30;
> +
> +	/* Jump into ROM at address 0 */
> +	soft_restart(0);
> +}
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 15/41] ARM: restart: iop13xx: use new restart hook
  2011-11-06 17:45 ` [PATCH 15/41] ARM: restart: iop13xx: " Russell King - ARM Linux
@ 2011-11-17 17:29   ` Russell King - ARM Linux
  2011-11-24  6:45     ` Lennert Buytenhek
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:29 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:45:02PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-iop13xx/include/mach/iop13xx.h |    1 +
>  arch/arm/mach-iop13xx/include/mach/system.h  |   10 ----------
>  arch/arm/mach-iop13xx/iq81340mc.c            |    1 +
>  arch/arm/mach-iop13xx/iq81340sc.c            |    1 +
>  arch/arm/mach-iop13xx/setup.c                |   11 +++++++++++
>  5 files changed, 14 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/mach-iop13xx/include/mach/iop13xx.h b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
> index 52b7fab..07e9ff7 100644
> --- a/arch/arm/mach-iop13xx/include/mach/iop13xx.h
> +++ b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
> @@ -10,6 +10,7 @@ void iop13xx_map_io(void);
>  void iop13xx_platform_init(void);
>  void iop13xx_add_tpmi_devices(void);
>  void iop13xx_init_irq(void);
> +void iop13xx_restart(char, const char *);
>  
>  /* CPUID CP6 R0 Page 0 */
>  static inline int iop13xx_cpu_id(void)
> diff --git a/arch/arm/mach-iop13xx/include/mach/system.h b/arch/arm/mach-iop13xx/include/mach/system.h
> index d0c66ef..7f798dc 100644
> --- a/arch/arm/mach-iop13xx/include/mach/system.h
> +++ b/arch/arm/mach-iop13xx/include/mach/system.h
> @@ -7,7 +7,6 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -#include <mach/iop13xx.h>
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
> @@ -15,13 +14,4 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/*
> -	 * Reset the internal bus (warning both cores are reset)
> -	 */
> -	write_wdtcr(IOP_WDTCR_EN_ARM);
> -	write_wdtcr(IOP_WDTCR_EN);
> -	write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET);
> -	write_wdtcr(0x1000);
> -
> -	for(;;);
>  }
> diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
> index 4cf2cc4..abaee88 100644
> --- a/arch/arm/mach-iop13xx/iq81340mc.c
> +++ b/arch/arm/mach-iop13xx/iq81340mc.c
> @@ -96,4 +96,5 @@ MACHINE_START(IQ81340MC, "Intel IQ81340MC")
>  	.init_irq       = iop13xx_init_irq,
>  	.timer          = &iq81340mc_timer,
>  	.init_machine   = iq81340mc_init,
> +	.restart	= iop13xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
> index cd9e274..690916a 100644
> --- a/arch/arm/mach-iop13xx/iq81340sc.c
> +++ b/arch/arm/mach-iop13xx/iq81340sc.c
> @@ -98,4 +98,5 @@ MACHINE_START(IQ81340SC, "Intel IQ81340SC")
>  	.init_irq       = iop13xx_init_irq,
>  	.timer          = &iq81340sc_timer,
>  	.init_machine   = iq81340sc_init,
> +	.restart	= iop13xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
> index a5b9897..daabb1f 100644
> --- a/arch/arm/mach-iop13xx/setup.c
> +++ b/arch/arm/mach-iop13xx/setup.c
> @@ -606,3 +606,14 @@ static int __init iop13xx_init_adma_setup(char *str)
>  __setup("iop13xx_init_adma", iop13xx_init_adma_setup);
>  __setup("iop13xx_init_uart", iop13xx_init_uart_setup);
>  __setup("iop13xx_init_i2c", iop13xx_init_i2c_setup);
> +
> +void iop13xx_restart(char mode, const char *cmd)
> +{
> +	/*
> +	 * Reset the internal bus (warning both cores are reset)
> +	 */
> +	write_wdtcr(IOP_WDTCR_EN_ARM);
> +	write_wdtcr(IOP_WDTCR_EN);
> +	write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET);
> +	write_wdtcr(0x1000);
> +}
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 16/41] ARM: restart: ixp2000: use new restart hook
  2011-11-06 17:45 ` [PATCH 16/41] ARM: restart: ixp2000: " Russell King - ARM Linux
@ 2011-11-17 17:29   ` Russell King - ARM Linux
  2011-11-24  6:45     ` Lennert Buytenhek
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:29 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:45:23PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> In doing so, we split out the IXDP2401, IXDP2801 and IXDP2805 platform
> specific restart code into their own platform files.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-ixp2000/core.c                  |    4 +++
>  arch/arm/mach-ixp2000/enp2611.c               |    1 +
>  arch/arm/mach-ixp2000/include/mach/platform.h |    1 +
>  arch/arm/mach-ixp2000/include/mach/system.h   |   29 ----------------------
>  arch/arm/mach-ixp2000/ixdp2400.c              |    1 +
>  arch/arm/mach-ixp2000/ixdp2800.c              |    1 +
>  arch/arm/mach-ixp2000/ixdp2x01.c              |   32 +++++++++++++++++++++++++
>  7 files changed, 40 insertions(+), 29 deletions(-)
> 
> diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
> index 59a5126..e5916b7 100644
> --- a/arch/arm/mach-ixp2000/core.c
> +++ b/arch/arm/mach-ixp2000/core.c
> @@ -514,3 +514,7 @@ void __init ixp2000_init_irq(void)
>  	}
>  }
>  
> +void ixp2000_restart(char mode, const char *cmd)
> +{
> +	ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
> +}
> diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
> index af99945..ee52541 100644
> --- a/arch/arm/mach-ixp2000/enp2611.c
> +++ b/arch/arm/mach-ixp2000/enp2611.c
> @@ -259,6 +259,7 @@ MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board")
>  	.init_irq	= ixp2000_init_irq,
>  	.timer		= &enp2611_timer,
>  	.init_machine	= enp2611_init_machine,
> +	.restart	= ixp2000_restart,
>  MACHINE_END
>  
>  
> diff --git a/arch/arm/mach-ixp2000/include/mach/platform.h b/arch/arm/mach-ixp2000/include/mach/platform.h
> index 42182c79..bb0f8dc 100644
> --- a/arch/arm/mach-ixp2000/include/mach/platform.h
> +++ b/arch/arm/mach-ixp2000/include/mach/platform.h
> @@ -122,6 +122,7 @@ void ixp2000_map_io(void);
>  void ixp2000_uart_init(void);
>  void ixp2000_init_irq(void);
>  void ixp2000_init_time(unsigned long);
> +void ixp2000_restart(char, const char *);
>  unsigned long ixp2000_gettimeoffset(void);
>  
>  struct pci_sys_data;
> diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
> index 810df7b..e981fd2 100644
> --- a/arch/arm/mach-ixp2000/include/mach/system.h
> +++ b/arch/arm/mach-ixp2000/include/mach/system.h
> @@ -8,10 +8,6 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -
> -#include <mach/hardware.h>
> -#include <asm/mach-types.h>
> -
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
> @@ -19,29 +15,4 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/*
> -	 * Reset flash banking register so that we are pointing at
> -	 * RedBoot bank.
> -	 */
> -	if (machine_is_ixdp2401()) {
> -		ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
> -					((0 >> IXDP2X01_FLASH_WINDOW_BITS)
> -						| IXDP2X01_CPLD_FLASH_INTERN));
> -		ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
> -	}
> -
> -	/*
> -	 * On IXDP2801 we need to write this magic sequence to the CPLD
> -	 * to cause a complete reset of the CPU and all external devices
> -	 * and move the flash bank register back to 0.
> -	 */
> -	if (machine_is_ixdp2801() || machine_is_ixdp28x5()) {
> -		unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
> -
> -		reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
> -		ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
> -		ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
> -	}
> -
> -	ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
>  }
> diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
> index f7dfd97..f53e911 100644
> --- a/arch/arm/mach-ixp2000/ixdp2400.c
> +++ b/arch/arm/mach-ixp2000/ixdp2400.c
> @@ -176,5 +176,6 @@ MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform")
>  	.init_irq	= ixdp2400_init_irq,
>  	.timer		= &ixdp2400_timer,
>  	.init_machine	= ixdp2x00_init_machine,
> +	.restart	= ixp2000_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
> index d33bcac..a2e7c39 100644
> --- a/arch/arm/mach-ixp2000/ixdp2800.c
> +++ b/arch/arm/mach-ixp2000/ixdp2800.c
> @@ -291,5 +291,6 @@ MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform")
>  	.init_irq	= ixdp2800_init_irq,
>  	.timer		= &ixdp2800_timer,
>  	.init_machine	= ixdp2x00_init_machine,
> +	.restart	= ixp2000_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
> index 61a2867..7632bea 100644
> --- a/arch/arm/mach-ixp2000/ixdp2x01.c
> +++ b/arch/arm/mach-ixp2000/ixdp2x01.c
> @@ -413,6 +413,35 @@ static void __init ixdp2x01_init_machine(void)
>  	ixdp2x01_uart_init();
>  }
>  
> +static void ixdp2401_restart(char mode, const char *cmd)
> +{
> +	/*
> +	 * Reset flash banking register so that we are pointing at
> +	 * RedBoot bank.
> +	 */
> +	ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
> +				((0 >> IXDP2X01_FLASH_WINDOW_BITS)
> +					| IXDP2X01_CPLD_FLASH_INTERN));
> +	ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
> +
> +	ixp2000_restart(mode, cmd);
> +}
> +
> +static void ixdp280x_restart(char mode, const char *cmd)
> +{
> +	/*
> +	 * On IXDP2801 we need to write this magic sequence to the CPLD
> +	 * to cause a complete reset of the CPU and all external devices
> +	 * and move the flash bank register back to 0.
> +	 */
> +	unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
> +
> +	reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
> +	ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
> +	ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
> +
> +	ixp2000_restart(mode, cmd);
> +}
>  
>  #ifdef CONFIG_ARCH_IXDP2401
>  MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform")
> @@ -422,6 +451,7 @@ MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform")
>  	.init_irq	= ixdp2x01_init_irq,
>  	.timer		= &ixdp2x01_timer,
>  	.init_machine	= ixdp2x01_init_machine,
> +	.restart	= ixdp2401_restart,
>  MACHINE_END
>  #endif
>  
> @@ -433,6 +463,7 @@ MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform")
>  	.init_irq	= ixdp2x01_init_irq,
>  	.timer		= &ixdp2x01_timer,
>  	.init_machine	= ixdp2x01_init_machine,
> +	.restart	= ixdp280x_restart,
>  MACHINE_END
>  
>  /*
> @@ -446,6 +477,7 @@ MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform")
>  	.init_irq	= ixdp2x01_init_irq,
>  	.timer		= &ixdp2x01_timer,
>  	.init_machine	= ixdp2x01_init_machine,
> +	.restart	= ixdp280x_restart,
>  MACHINE_END
>  #endif
>  
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 17/41] ARM: restart: ixp23xx: use new restart hook
  2011-11-06 17:45 ` [PATCH 17/41] ARM: restart: ixp23xx: " Russell King - ARM Linux
@ 2011-11-17 17:30   ` Russell King - ARM Linux
  2011-11-24  6:46     ` Lennert Buytenhek
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:30 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:45:43PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> In doing so, we split out the ixdp2351 restart code into its own
> platform file.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-ixp23xx/core.c                  |    6 ++++++
>  arch/arm/mach-ixp23xx/espresso.c              |    1 +
>  arch/arm/mach-ixp23xx/include/mach/platform.h |    1 +
>  arch/arm/mach-ixp23xx/include/mach/system.h   |   13 -------------
>  arch/arm/mach-ixp23xx/ixdp2351.c              |   12 ++++++++++++
>  arch/arm/mach-ixp23xx/roadrunner.c            |    1 +
>  6 files changed, 21 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
> index a1bee33..0923bb9 100644
> --- a/arch/arm/mach-ixp23xx/core.c
> +++ b/arch/arm/mach-ixp23xx/core.c
> @@ -444,3 +444,9 @@ void __init ixp23xx_sys_init(void)
>  	*IXP23XX_EXP_UNIT_FUSE |= 0xf;
>  	platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices));
>  }
> +
> +void ixp23xx_restart(char mode, const char *cmd)
> +{
> +	/* Use on-chip reset capability */
> +	*IXP23XX_RESET0 |= IXP23XX_RST_ALL;
> +}
> diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c
> index 30dd316..8f2487e 100644
> --- a/arch/arm/mach-ixp23xx/espresso.c
> +++ b/arch/arm/mach-ixp23xx/espresso.c
> @@ -90,4 +90,5 @@ MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso")
>  	.timer		= &ixp23xx_timer,
>  	.atag_offset	= 0x100,
>  	.init_machine	= espresso_init,
> +	.restart	= ixp23xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ixp23xx/include/mach/platform.h b/arch/arm/mach-ixp23xx/include/mach/platform.h
> index db9d941..50de558 100644
> --- a/arch/arm/mach-ixp23xx/include/mach/platform.h
> +++ b/arch/arm/mach-ixp23xx/include/mach/platform.h
> @@ -34,6 +34,7 @@ struct pci_sys_data;
>  void ixp23xx_map_io(void);
>  void ixp23xx_init_irq(void);
>  void ixp23xx_sys_init(void);
> +void ixp23xx_restart(char, const char *);
>  int ixp23xx_pci_setup(int, struct pci_sys_data *);
>  void ixp23xx_pci_preinit(void);
>  struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*);
> diff --git a/arch/arm/mach-ixp23xx/include/mach/system.h b/arch/arm/mach-ixp23xx/include/mach/system.h
> index 8920ff2..7a1b96a 100644
> --- a/arch/arm/mach-ixp23xx/include/mach/system.h
> +++ b/arch/arm/mach-ixp23xx/include/mach/system.h
> @@ -7,10 +7,6 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -
> -#include <mach/hardware.h>
> -#include <asm/mach-types.h>
> -
>  static inline void arch_idle(void)
>  {
>  #if 0
> @@ -21,13 +17,4 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/* First try machine specific support */
> -	if (machine_is_ixdp2351()) {
> -		*IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC;
> -		(void) *IXDP2351_CPLD_RESET1_REG;
> -		*IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE;
> -	}
> -
> -	/* Use on-chip reset capability */
> -	*IXP23XX_RESET0 |= IXP23XX_RST_ALL;
>  }
> diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c
> index b3a57e0..5d5dd3e 100644
> --- a/arch/arm/mach-ixp23xx/ixdp2351.c
> +++ b/arch/arm/mach-ixp23xx/ixdp2351.c
> @@ -326,6 +326,17 @@ static void __init ixdp2351_init(void)
>  	ixp23xx_sys_init();
>  }
>  
> +static void ixdp2351_restart(char mode, const char *cmd)
> +{
> +	/* First try machine specific support */
> +
> +	*IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC;
> +	(void) *IXDP2351_CPLD_RESET1_REG;
> +	*IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE;
> +
> +	ixp23xx_restart(mode, cmd);
> +}
> +
>  MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform")
>  	/* Maintainer: MontaVista Software, Inc. */
>  	.map_io		= ixdp2351_map_io,
> @@ -333,4 +344,5 @@ MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform")
>  	.timer		= &ixp23xx_timer,
>  	.atag_offset	= 0x100,
>  	.init_machine	= ixdp2351_init,
> +	.restart	= ixdp2351_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c
> index 8f4dcbb..377283f 100644
> --- a/arch/arm/mach-ixp23xx/roadrunner.c
> +++ b/arch/arm/mach-ixp23xx/roadrunner.c
> @@ -177,4 +177,5 @@ MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform")
>  	.timer		= &ixp23xx_timer,
>  	.atag_offset	= 0x100,
>  	.init_machine	= roadrunner_init,
> +	.restart	= ixp23xx_restart,
>  MACHINE_END
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 18/41] ARM: restart: ixp4xx: use new restart hook
  2011-11-06 17:46 ` [PATCH 18/41] ARM: restart: ixp4xx: " Russell King - ARM Linux
@ 2011-11-17 17:30   ` Russell King - ARM Linux
  2011-11-18  7:49     ` Krzysztof Halasa
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:30 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:46:04PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-ixp4xx/avila-setup.c           |    2 ++
>  arch/arm/mach-ixp4xx/common.c                |   20 ++++++++++++++++++++
>  arch/arm/mach-ixp4xx/coyote-setup.c          |    2 ++
>  arch/arm/mach-ixp4xx/dsmg600-setup.c         |    1 +
>  arch/arm/mach-ixp4xx/fsg-setup.c             |    1 +
>  arch/arm/mach-ixp4xx/gateway7001-setup.c     |    1 +
>  arch/arm/mach-ixp4xx/goramo_mlr.c            |    1 +
>  arch/arm/mach-ixp4xx/gtwx5715-setup.c        |    1 +
>  arch/arm/mach-ixp4xx/include/mach/platform.h |    1 +
>  arch/arm/mach-ixp4xx/include/mach/system.h   |   21 ---------------------
>  arch/arm/mach-ixp4xx/ixdp425-setup.c         |    1 +
>  arch/arm/mach-ixp4xx/nas100d-setup.c         |    1 +
>  arch/arm/mach-ixp4xx/nslu2-setup.c           |    1 +
>  arch/arm/mach-ixp4xx/omixp-setup.c           |    3 +++
>  arch/arm/mach-ixp4xx/vulcan-setup.c          |    1 +
>  arch/arm/mach-ixp4xx/wg302v2-setup.c         |    1 +
>  16 files changed, 38 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
> index 37609a2..a7277ad 100644
> --- a/arch/arm/mach-ixp4xx/avila-setup.c
> +++ b/arch/arm/mach-ixp4xx/avila-setup.c
> @@ -172,6 +172,7 @@ MACHINE_START(AVILA, "Gateworks Avila Network Platform")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  
>   /*
> @@ -190,6 +191,7 @@ MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
>  
> diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
> index 0777257..4a02619 100644
> --- a/arch/arm/mach-ixp4xx/common.c
> +++ b/arch/arm/mach-ixp4xx/common.c
> @@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)
>  
>  	clockevents_register_device(&clockevent_ixp4xx);
>  }
> +
> +void ixp4xx_restart(char mode, const char *cmd)
> +{
> +	if ( 1 && mode == 's') {
> +		/* Jump into ROM at address 0 */
> +		soft_restart(0);
> +	} else {
> +		/* Use on-chip reset capability */
> +
> +		/* set the "key" register to enable access to
> +		 * "timer" and "enable" registers
> +		 */
> +		*IXP4XX_OSWK = IXP4XX_WDT_KEY;
> +
> +		/* write 0 to the timer register for an immediate reset */
> +		*IXP4XX_OSWT = 0;
> +
> +		*IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;
> +	}
> +}
> diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
> index 81dfec3..a74f86c 100644
> --- a/arch/arm/mach-ixp4xx/coyote-setup.c
> +++ b/arch/arm/mach-ixp4xx/coyote-setup.c
> @@ -117,6 +117,7 @@ MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
>  
> @@ -132,6 +133,7 @@ MACHINE_START(IXDPG425, "Intel IXDPG425")
>  	.timer		= &ixp4xx_timer,
>  	.atag_offset	= 0x100,
>  	.init_machine	= coyote_init,
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
>  
> diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
> index 8837fbc..67be177 100644
> --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
> +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
> @@ -286,4 +286,5 @@ MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
> index 2887c35..6d58182 100644
> --- a/arch/arm/mach-ixp4xx/fsg-setup.c
> +++ b/arch/arm/mach-ixp4xx/fsg-setup.c
> @@ -277,5 +277,6 @@ MACHINE_START(FSG, "Freecom FSG-3")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c
> index d69d1b0..7ecf9b2 100644
> --- a/arch/arm/mach-ixp4xx/gateway7001-setup.c
> +++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
> @@ -104,5 +104,6 @@ MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c
> index bf6678d..c0e3d69 100644
> --- a/arch/arm/mach-ixp4xx/goramo_mlr.c
> +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c
> @@ -504,4 +504,5 @@ MACHINE_START(GORAMO_MLR, "MultiLink")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
> index aa029fc..a23f893 100644
> --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
> +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
> @@ -172,6 +172,7 @@ MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  
>  
> diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h
> index e824c02..df9250b 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/platform.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/platform.h
> @@ -125,6 +125,7 @@ extern void ixp4xx_init_irq(void);
>  extern void ixp4xx_sys_init(void);
>  extern void ixp4xx_timer_init(void);
>  extern struct sys_timer ixp4xx_timer;
> +extern void ixp4xx_restart(char, const char *);
>  extern void ixp4xx_pci_preinit(void);
>  struct pci_sys_data;
>  extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
> diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
> index 24337d9..72db2bb 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> @@ -8,9 +8,6 @@
>   * published by the Free Software Foundation.
>   *
>   */
> -
> -#include <mach/hardware.h>
> -
>  static inline void arch_idle(void)
>  {
>  	/* ixp4xx does not implement the XScale PWRMODE register,
> @@ -21,24 +18,6 @@ static inline void arch_idle(void)
>  #endif
>  }
>  
> -
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	if ( 1 && mode == 's') {
> -		/* Jump into ROM at address 0 */
> -		soft_restart(0);
> -	} else {
> -		/* Use on-chip reset capability */
> -
> -		/* set the "key" register to enable access to
> -		 * "timer" and "enable" registers
> -		 */
> -		*IXP4XX_OSWK = IXP4XX_WDT_KEY;
> -
> -		/* write 0 to the timer register for an immediate reset */
> -		*IXP4XX_OSWT = 0;
> -
> -		*IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;
> -	}
>  }
> -
> diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
> index f235f82..8a38b39 100644
> --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
> +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
> @@ -261,6 +261,7 @@ MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
>  
> diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
> index de716fa..1010eb7 100644
> --- a/arch/arm/mach-ixp4xx/nas100d-setup.c
> +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
> @@ -321,4 +321,5 @@ MACHINE_START(NAS100D, "Iomega NAS 100d")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
> index ac81ccb..aa355c3 100644
> --- a/arch/arm/mach-ixp4xx/nslu2-setup.c
> +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
> @@ -307,4 +307,5 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ixp4xx/omixp-setup.c b/arch/arm/mach-ixp4xx/omixp-setup.c
> index 3b6a81a..0940869 100644
> --- a/arch/arm/mach-ixp4xx/omixp-setup.c
> +++ b/arch/arm/mach-ixp4xx/omixp-setup.c
> @@ -246,6 +246,7 @@ MACHINE_START(DEVIXP, "Omicron DEVIXP")
>  	.init_irq	= ixp4xx_init_irq,
>  	.timer          = &ixp4xx_timer,
>  	.init_machine	= omixp_init,
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
>  
> @@ -259,6 +260,7 @@ MACHINE_START(MICCPT, "Omicron MICCPT")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
>  
> @@ -269,5 +271,6 @@ MACHINE_START(MIC256, "Omicron MIC256")
>  	.init_irq	= ixp4xx_init_irq,
>  	.timer          = &ixp4xx_timer,
>  	.init_machine	= omixp_init,
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-ixp4xx/vulcan-setup.c b/arch/arm/mach-ixp4xx/vulcan-setup.c
> index 27e469e..9dec206 100644
> --- a/arch/arm/mach-ixp4xx/vulcan-setup.c
> +++ b/arch/arm/mach-ixp4xx/vulcan-setup.c
> @@ -244,4 +244,5 @@ MACHINE_START(ARCOM_VULCAN, "Arcom/Eurotech Vulcan")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c
> index b14144b..5ac0f0a 100644
> --- a/arch/arm/mach-ixp4xx/wg302v2-setup.c
> +++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
> @@ -105,5 +105,6 @@ MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")
>  #if defined(CONFIG_PCI)
>  	.dma_zone_size	= SZ_64M,
>  #endif
> +	.restart	= ixp4xx_restart,
>  MACHINE_END
>  #endif
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 6/7] ARM: restart: only perform setup for restart when
  2011-11-06 17:33 ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-17 17:42     ` Russell King - ARM Linux
  2011-11-18  3:43   ` Wan ZongShun
  2011-11-21  3:42   ` Eric Miao
  2 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

(If you're in the To: list I'm expecting a reply because this patch is
touching something you're responsible for.  Thanks.)

On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> We only need to set the system up for a soft-restart if we're going to
> be doing a soft-restart.  Provide a new function (soft_restart()) which
> does the setup and final call for this, and make platforms use it.
> Eliminate the call to setup_restart() from the default handler.
> 
> This means that platforms arch_reset() function is no longer called with
> the page tables prepared for a soft-restart, and caches will still be
> enabled.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/system.h                     |    1 +
>  arch/arm/kernel/process.c                         |   13 +++++++++++--
>  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
>  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
>  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
>  arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
>  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
>  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
>  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
>  arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
>  arch/arm/mach-mxs/system.c                        |    2 +-
>  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
>  arch/arm/mach-pxa/reset.c                         |    2 +-
>  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
>  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
>  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
>  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
>  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
>  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
>  arch/arm/plat-mxc/system.c                        |    2 +-
>  arch/arm/plat-spear/include/plat/system.h         |    2 +-
>  21 files changed, 33 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> index 984014b..fe7de75 100644
> --- a/arch/arm/include/asm/system.h
> +++ b/arch/arm/include/asm/system.h
> @@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
>  extern void cpu_init(void);
>  
>  void arm_machine_restart(char mode, const char *cmd);
> +void soft_restart(unsigned long);
>  extern void (*arm_pm_restart)(char str, const char *cmd);
>  
>  #define UDBG_UNDEFINED	(1 << 0)
> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> index dca7971..52b4306 100644
> --- a/arch/arm/kernel/process.c
> +++ b/arch/arm/kernel/process.c
> @@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
>  __setup("nohlt", nohlt_setup);
>  __setup("hlt", hlt_setup);
>  
> -void arm_machine_restart(char mode, const char *cmd)
> +void soft_restart(unsigned long addr)
>  {
>  	/* Disable interrupts first */
>  	local_irq_disable();
> @@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)
>  	/* Push out any further dirty data, and ensure cache is empty */
>  	flush_cache_all();
>  
> -	/* Now call the architecture specific reboot code. */
> +	cpu_reset(addr);
> +}
> +
> +void arm_machine_restart(char mode, const char *cmd)
> +{
> +	/* Disable interrupts first */
> +	local_irq_disable();
> +	local_fiq_disable();
> +
> +	/* Call the architecture specific reboot code. */
>  	arch_reset(mode, cmd);
>  }
>  
> diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
> index f916cd7..6c11993 100644
> --- a/arch/arm/mach-clps711x/include/mach/system.h
> +++ b/arch/arm/mach-clps711x/include/mach/system.h
> @@ -34,7 +34,7 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  #endif
> diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
> index 9a26245..0d5df72 100644
> --- a/arch/arm/mach-ebsa110/include/mach/system.h
> +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> @@ -34,6 +34,6 @@ static inline void arch_idle(void)
>  	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
>  }
>  
> -#define arch_reset(mode, cmd)	cpu_reset(0x80000000)
> +#define arch_reset(mode, cmd)	soft_restart(0x80000000)
>  
>  #endif
> diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
> index 0b29315..249f895 100644
> --- a/arch/arm/mach-footbridge/include/mach/system.h
> +++ b/arch/arm/mach-footbridge/include/mach/system.h
> @@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)
>  		/*
>  		 * Jump into the ROM
>  		 */
> -		cpu_reset(0x41000000);
> +		soft_restart(0x41000000);
>  	} else {
>  		if (machine_is_netwinder()) {
>  			/* open up the SuperIO chip
> diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
> index a4b808f..4865a9b 100644
> --- a/arch/arm/mach-iop32x/include/mach/system.h
> +++ b/arch/arm/mach-iop32x/include/mach/system.h
> @@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd)
>  	*IOP3XX_PCSR = 0x30;
>  
>  	/* Jump into ROM at address 0 */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
> index f192a34..86d1b20 100644
> --- a/arch/arm/mach-iop33x/include/mach/system.h
> +++ b/arch/arm/mach-iop33x/include/mach/system.h
> @@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd)
>  	*IOP3XX_PCSR = 0x30;
>  
>  	/* Jump into ROM at address 0 */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
> index 54c0af7..24337d9 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> @@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd)
>  {
>  	if ( 1 && mode = 's') {
>  		/* Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  	} else {
>  		/* Use on-chip reset capability */
>  
> diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
> index fb1dda9..ceb19c9 100644
> --- a/arch/arm/mach-ks8695/include/mach/system.h
> +++ b/arch/arm/mach-ks8695/include/mach/system.h
> @@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
>  	unsigned int reg;
>  
>  	if (mode = 's')
> -		cpu_reset(0);
> +		soft_restart(0);
>  
>  	/* disable timer0 */
>  	reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
> diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
> index 1a8a25e..cb06379 100644
> --- a/arch/arm/mach-mmp/include/mach/system.h
> +++ b/arch/arm/mach-mmp/include/mach/system.h
> @@ -19,8 +19,8 @@ static inline void arch_idle(void)
>  static inline void arch_reset(char mode, const char *cmd)
>  {
>  	if (cpu_is_pxa168())
> -		cpu_reset(0xffff0000);
> +		soft_restart(0xffff0000);
>  	else
> -		cpu_reset(0);
> +		soft_restart(0);
>  }
>  #endif /* __ASM_MACH_SYSTEM_H */
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..cab8836 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
>  	mdelay(50);
>  
>  	/* We'll take a jump through zero as a poor second */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  static int __init mxs_arch_reset_init(void)
> diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
> index 5dda2bb..5d6384a 100644
> --- a/arch/arm/mach-pnx4008/include/mach/system.h
> +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> @@ -32,7 +32,7 @@ static void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  #endif
> diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> index 01e9d64..b8bcda1 100644
> --- a/arch/arm/mach-pxa/reset.c
> +++ b/arch/arm/mach-pxa/reset.c
> @@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
>  	switch (mode) {
>  	case 's':
>  		/* Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  		break;
>  	case 'g':
>  		do_gpio_reset();
> diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
> index 45c7b93..a354f4d 100644
> --- a/arch/arm/mach-rpc/include/mach/system.h
> +++ b/arch/arm/mach-rpc/include/mach/system.h
> @@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
>  	/*
>  	 * Jump into the ROM
>  	 */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> index 6faadce..913893d 100644
> --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> @@ -19,7 +19,7 @@ static void
>  arch_reset(char mode, const char *cmd)
>  {
>  	if (mode = 's') {
> -		cpu_reset(0);
> +		soft_restart(0);
>  	}
>  
>  	if (s3c24xx_reset_hook)
> @@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
>  	arch_wdt_reset();
>  
>  	/* we'll take a jump through zero as a poor second */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
> index 2e58cb7..d8ca578 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/system.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
> @@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
>  		arch_wdt_reset();
>  
>  	/* if all else fails, or mode was for soft, jump to 0 */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  #endif /* __ASM_ARCH_IRQ_H */
> diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
> index ba9da9f..345d35b 100644
> --- a/arch/arm/mach-sa1100/include/mach/system.h
> +++ b/arch/arm/mach-sa1100/include/mach/system.h
> @@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd)
>  {
>  	if (mode = 's') {
>  		/* Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  	} else {
>  		/* Use on-chip reset capability */
>  		RSRR = RSRR_SWR;
> diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
> index 76a687e..956ac18 100644
> --- a/arch/arm/mach-shmobile/include/mach/system.h
> +++ b/arch/arm/mach-shmobile/include/mach/system.h
> @@ -8,7 +8,7 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  #endif
> diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
> index ce228bd..68875a1 100644
> --- a/arch/arm/mach-w90x900/include/mach/system.h
> +++ b/arch/arm/mach-w90x900/include/mach/system.h
> @@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
>  {
>  	if (mode = 's') {
>  		/* Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  	} else {
>  		__raw_writel(WTE | WTRE | WTCLK, WTCR);
>  	}
> diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> index 9dad8dc..b1cfc6a 100644
> --- a/arch/arm/plat-mxc/system.c
> +++ b/arch/arm/plat-mxc/system.c
> @@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
>  	mdelay(50);
>  
>  	/* we'll take a jump through zero as a poor second */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  void mxc_arch_reset_init(void __iomem *base)
> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
> index a235fa0..1171f22 100644
> --- a/arch/arm/plat-spear/include/plat/system.h
> +++ b/arch/arm/plat-spear/include/plat/system.h
> @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
>  {
>  	if (mode = 's') {
>  		/* software reset, Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  	} else {
>  		/* hardware reset, Use on-chip reset capability */
>  		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-11-17 17:42     ` Russell King - ARM Linux
  0 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-17 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

(If you're in the To: list I'm expecting a reply because this patch is
touching something you're responsible for.  Thanks.)

On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> We only need to set the system up for a soft-restart if we're going to
> be doing a soft-restart.  Provide a new function (soft_restart()) which
> does the setup and final call for this, and make platforms use it.
> Eliminate the call to setup_restart() from the default handler.
> 
> This means that platforms arch_reset() function is no longer called with
> the page tables prepared for a soft-restart, and caches will still be
> enabled.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/system.h                     |    1 +
>  arch/arm/kernel/process.c                         |   13 +++++++++++--
>  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
>  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
>  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
>  arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
>  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
>  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
>  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
>  arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
>  arch/arm/mach-mxs/system.c                        |    2 +-
>  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
>  arch/arm/mach-pxa/reset.c                         |    2 +-
>  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
>  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
>  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
>  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
>  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
>  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
>  arch/arm/plat-mxc/system.c                        |    2 +-
>  arch/arm/plat-spear/include/plat/system.h         |    2 +-
>  21 files changed, 33 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> index 984014b..fe7de75 100644
> --- a/arch/arm/include/asm/system.h
> +++ b/arch/arm/include/asm/system.h
> @@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
>  extern void cpu_init(void);
>  
>  void arm_machine_restart(char mode, const char *cmd);
> +void soft_restart(unsigned long);
>  extern void (*arm_pm_restart)(char str, const char *cmd);
>  
>  #define UDBG_UNDEFINED	(1 << 0)
> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> index dca7971..52b4306 100644
> --- a/arch/arm/kernel/process.c
> +++ b/arch/arm/kernel/process.c
> @@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
>  __setup("nohlt", nohlt_setup);
>  __setup("hlt", hlt_setup);
>  
> -void arm_machine_restart(char mode, const char *cmd)
> +void soft_restart(unsigned long addr)
>  {
>  	/* Disable interrupts first */
>  	local_irq_disable();
> @@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)
>  	/* Push out any further dirty data, and ensure cache is empty */
>  	flush_cache_all();
>  
> -	/* Now call the architecture specific reboot code. */
> +	cpu_reset(addr);
> +}
> +
> +void arm_machine_restart(char mode, const char *cmd)
> +{
> +	/* Disable interrupts first */
> +	local_irq_disable();
> +	local_fiq_disable();
> +
> +	/* Call the architecture specific reboot code. */
>  	arch_reset(mode, cmd);
>  }
>  
> diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
> index f916cd7..6c11993 100644
> --- a/arch/arm/mach-clps711x/include/mach/system.h
> +++ b/arch/arm/mach-clps711x/include/mach/system.h
> @@ -34,7 +34,7 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  #endif
> diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
> index 9a26245..0d5df72 100644
> --- a/arch/arm/mach-ebsa110/include/mach/system.h
> +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> @@ -34,6 +34,6 @@ static inline void arch_idle(void)
>  	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
>  }
>  
> -#define arch_reset(mode, cmd)	cpu_reset(0x80000000)
> +#define arch_reset(mode, cmd)	soft_restart(0x80000000)
>  
>  #endif
> diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
> index 0b29315..249f895 100644
> --- a/arch/arm/mach-footbridge/include/mach/system.h
> +++ b/arch/arm/mach-footbridge/include/mach/system.h
> @@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)
>  		/*
>  		 * Jump into the ROM
>  		 */
> -		cpu_reset(0x41000000);
> +		soft_restart(0x41000000);
>  	} else {
>  		if (machine_is_netwinder()) {
>  			/* open up the SuperIO chip
> diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
> index a4b808f..4865a9b 100644
> --- a/arch/arm/mach-iop32x/include/mach/system.h
> +++ b/arch/arm/mach-iop32x/include/mach/system.h
> @@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd)
>  	*IOP3XX_PCSR = 0x30;
>  
>  	/* Jump into ROM at address 0 */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
> index f192a34..86d1b20 100644
> --- a/arch/arm/mach-iop33x/include/mach/system.h
> +++ b/arch/arm/mach-iop33x/include/mach/system.h
> @@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd)
>  	*IOP3XX_PCSR = 0x30;
>  
>  	/* Jump into ROM at address 0 */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
> index 54c0af7..24337d9 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> @@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd)
>  {
>  	if ( 1 && mode == 's') {
>  		/* Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  	} else {
>  		/* Use on-chip reset capability */
>  
> diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
> index fb1dda9..ceb19c9 100644
> --- a/arch/arm/mach-ks8695/include/mach/system.h
> +++ b/arch/arm/mach-ks8695/include/mach/system.h
> @@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
>  	unsigned int reg;
>  
>  	if (mode == 's')
> -		cpu_reset(0);
> +		soft_restart(0);
>  
>  	/* disable timer0 */
>  	reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
> diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
> index 1a8a25e..cb06379 100644
> --- a/arch/arm/mach-mmp/include/mach/system.h
> +++ b/arch/arm/mach-mmp/include/mach/system.h
> @@ -19,8 +19,8 @@ static inline void arch_idle(void)
>  static inline void arch_reset(char mode, const char *cmd)
>  {
>  	if (cpu_is_pxa168())
> -		cpu_reset(0xffff0000);
> +		soft_restart(0xffff0000);
>  	else
> -		cpu_reset(0);
> +		soft_restart(0);
>  }
>  #endif /* __ASM_MACH_SYSTEM_H */
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..cab8836 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
>  	mdelay(50);
>  
>  	/* We'll take a jump through zero as a poor second */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  static int __init mxs_arch_reset_init(void)
> diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
> index 5dda2bb..5d6384a 100644
> --- a/arch/arm/mach-pnx4008/include/mach/system.h
> +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> @@ -32,7 +32,7 @@ static void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  #endif
> diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> index 01e9d64..b8bcda1 100644
> --- a/arch/arm/mach-pxa/reset.c
> +++ b/arch/arm/mach-pxa/reset.c
> @@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
>  	switch (mode) {
>  	case 's':
>  		/* Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  		break;
>  	case 'g':
>  		do_gpio_reset();
> diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
> index 45c7b93..a354f4d 100644
> --- a/arch/arm/mach-rpc/include/mach/system.h
> +++ b/arch/arm/mach-rpc/include/mach/system.h
> @@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
>  	/*
>  	 * Jump into the ROM
>  	 */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> index 6faadce..913893d 100644
> --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> @@ -19,7 +19,7 @@ static void
>  arch_reset(char mode, const char *cmd)
>  {
>  	if (mode == 's') {
> -		cpu_reset(0);
> +		soft_restart(0);
>  	}
>  
>  	if (s3c24xx_reset_hook)
> @@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
>  	arch_wdt_reset();
>  
>  	/* we'll take a jump through zero as a poor second */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
> diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
> index 2e58cb7..d8ca578 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/system.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
> @@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
>  		arch_wdt_reset();
>  
>  	/* if all else fails, or mode was for soft, jump to 0 */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  #endif /* __ASM_ARCH_IRQ_H */
> diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
> index ba9da9f..345d35b 100644
> --- a/arch/arm/mach-sa1100/include/mach/system.h
> +++ b/arch/arm/mach-sa1100/include/mach/system.h
> @@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd)
>  {
>  	if (mode == 's') {
>  		/* Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  	} else {
>  		/* Use on-chip reset capability */
>  		RSRR = RSRR_SWR;
> diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
> index 76a687e..956ac18 100644
> --- a/arch/arm/mach-shmobile/include/mach/system.h
> +++ b/arch/arm/mach-shmobile/include/mach/system.h
> @@ -8,7 +8,7 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  #endif
> diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
> index ce228bd..68875a1 100644
> --- a/arch/arm/mach-w90x900/include/mach/system.h
> +++ b/arch/arm/mach-w90x900/include/mach/system.h
> @@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
>  {
>  	if (mode == 's') {
>  		/* Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  	} else {
>  		__raw_writel(WTE | WTRE | WTCLK, WTCR);
>  	}
> diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> index 9dad8dc..b1cfc6a 100644
> --- a/arch/arm/plat-mxc/system.c
> +++ b/arch/arm/plat-mxc/system.c
> @@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
>  	mdelay(50);
>  
>  	/* we'll take a jump through zero as a poor second */
> -	cpu_reset(0);
> +	soft_restart(0);
>  }
>  
>  void mxc_arch_reset_init(void __iomem *base)
> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
> index a235fa0..1171f22 100644
> --- a/arch/arm/plat-spear/include/plat/system.h
> +++ b/arch/arm/plat-spear/include/plat/system.h
> @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
>  {
>  	if (mode == 's') {
>  		/* software reset, Jump into ROM at address 0 */
> -		cpu_reset(0);
> +		soft_restart(0);
>  	} else {
>  		/* hardware reset, Use on-chip reset capability */
>  		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 6/7] ARM: restart: only perform setup for restart when
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-17 18:00       ` Sascha Hauer
  -1 siblings, 0 replies; 162+ messages in thread
From: Sascha Hauer @ 2011-11-17 18:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:42:47PM +0000, Russell King - ARM Linux wrote:
> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

> 
> On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > We only need to set the system up for a soft-restart if we're going to
> > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > does the setup and final call for this, and make platforms use it.
> > Eliminate the call to setup_restart() from the default handler.
> > 
> > This means that platforms arch_reset() function is no longer called with
> > the page tables prepared for a soft-restart, and caches will still be
> > enabled.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> >  arch/arm/include/asm/system.h                     |    1 +
> >  arch/arm/kernel/process.c                         |   13 +++++++++++--
> >  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
> >  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
> >  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
> >  arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
> >  arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
> >  arch/arm/mach-mxs/system.c                        |    2 +-
> >  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
> >  arch/arm/mach-pxa/reset.c                         |    2 +-
> >  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
> >  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
> >  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
> >  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
> >  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
> >  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
> >  arch/arm/plat-mxc/system.c                        |    2 +-
> >  arch/arm/plat-spear/include/plat/system.h         |    2 +-
> >  21 files changed, 33 insertions(+), 23 deletions(-)
> > 
> > diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> > index 984014b..fe7de75 100644
> > --- a/arch/arm/include/asm/system.h
> > +++ b/arch/arm/include/asm/system.h
> > @@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
> >  extern void cpu_init(void);
> >  
> >  void arm_machine_restart(char mode, const char *cmd);
> > +void soft_restart(unsigned long);
> >  extern void (*arm_pm_restart)(char str, const char *cmd);
> >  
> >  #define UDBG_UNDEFINED	(1 << 0)
> > diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> > index dca7971..52b4306 100644
> > --- a/arch/arm/kernel/process.c
> > +++ b/arch/arm/kernel/process.c
> > @@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
> >  __setup("nohlt", nohlt_setup);
> >  __setup("hlt", hlt_setup);
> >  
> > -void arm_machine_restart(char mode, const char *cmd)
> > +void soft_restart(unsigned long addr)
> >  {
> >  	/* Disable interrupts first */
> >  	local_irq_disable();
> > @@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)
> >  	/* Push out any further dirty data, and ensure cache is empty */
> >  	flush_cache_all();
> >  
> > -	/* Now call the architecture specific reboot code. */
> > +	cpu_reset(addr);
> > +}
> > +
> > +void arm_machine_restart(char mode, const char *cmd)
> > +{
> > +	/* Disable interrupts first */
> > +	local_irq_disable();
> > +	local_fiq_disable();
> > +
> > +	/* Call the architecture specific reboot code. */
> >  	arch_reset(mode, cmd);
> >  }
> >  
> > diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
> > index f916cd7..6c11993 100644
> > --- a/arch/arm/mach-clps711x/include/mach/system.h
> > +++ b/arch/arm/mach-clps711x/include/mach/system.h
> > @@ -34,7 +34,7 @@ static inline void arch_idle(void)
> >  
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  #endif
> > diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
> > index 9a26245..0d5df72 100644
> > --- a/arch/arm/mach-ebsa110/include/mach/system.h
> > +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> > @@ -34,6 +34,6 @@ static inline void arch_idle(void)
> >  	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
> >  }
> >  
> > -#define arch_reset(mode, cmd)	cpu_reset(0x80000000)
> > +#define arch_reset(mode, cmd)	soft_restart(0x80000000)
> >  
> >  #endif
> > diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
> > index 0b29315..249f895 100644
> > --- a/arch/arm/mach-footbridge/include/mach/system.h
> > +++ b/arch/arm/mach-footbridge/include/mach/system.h
> > @@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)
> >  		/*
> >  		 * Jump into the ROM
> >  		 */
> > -		cpu_reset(0x41000000);
> > +		soft_restart(0x41000000);
> >  	} else {
> >  		if (machine_is_netwinder()) {
> >  			/* open up the SuperIO chip
> > diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
> > index a4b808f..4865a9b 100644
> > --- a/arch/arm/mach-iop32x/include/mach/system.h
> > +++ b/arch/arm/mach-iop32x/include/mach/system.h
> > @@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd)
> >  	*IOP3XX_PCSR = 0x30;
> >  
> >  	/* Jump into ROM at address 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
> > index f192a34..86d1b20 100644
> > --- a/arch/arm/mach-iop33x/include/mach/system.h
> > +++ b/arch/arm/mach-iop33x/include/mach/system.h
> > @@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd)
> >  	*IOP3XX_PCSR = 0x30;
> >  
> >  	/* Jump into ROM at address 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
> > index 54c0af7..24337d9 100644
> > --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> > +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> > @@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if ( 1 && mode = 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* Use on-chip reset capability */
> >  
> > diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
> > index fb1dda9..ceb19c9 100644
> > --- a/arch/arm/mach-ks8695/include/mach/system.h
> > +++ b/arch/arm/mach-ks8695/include/mach/system.h
> > @@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
> >  	unsigned int reg;
> >  
> >  	if (mode = 's')
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  
> >  	/* disable timer0 */
> >  	reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
> > diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
> > index 1a8a25e..cb06379 100644
> > --- a/arch/arm/mach-mmp/include/mach/system.h
> > +++ b/arch/arm/mach-mmp/include/mach/system.h
> > @@ -19,8 +19,8 @@ static inline void arch_idle(void)
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (cpu_is_pxa168())
> > -		cpu_reset(0xffff0000);
> > +		soft_restart(0xffff0000);
> >  	else
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  }
> >  #endif /* __ASM_MACH_SYSTEM_H */
> > diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> > index 20ec3bd..cab8836 100644
> > --- a/arch/arm/mach-mxs/system.c
> > +++ b/arch/arm/mach-mxs/system.c
> > @@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
> >  	mdelay(50);
> >  
> >  	/* We'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  static int __init mxs_arch_reset_init(void)
> > diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
> > index 5dda2bb..5d6384a 100644
> > --- a/arch/arm/mach-pnx4008/include/mach/system.h
> > +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> > @@ -32,7 +32,7 @@ static void arch_idle(void)
> >  
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  #endif
> > diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> > index 01e9d64..b8bcda1 100644
> > --- a/arch/arm/mach-pxa/reset.c
> > +++ b/arch/arm/mach-pxa/reset.c
> > @@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
> >  	switch (mode) {
> >  	case 's':
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  		break;
> >  	case 'g':
> >  		do_gpio_reset();
> > diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
> > index 45c7b93..a354f4d 100644
> > --- a/arch/arm/mach-rpc/include/mach/system.h
> > +++ b/arch/arm/mach-rpc/include/mach/system.h
> > @@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
> >  	/*
> >  	 * Jump into the ROM
> >  	 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > index 6faadce..913893d 100644
> > --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > @@ -19,7 +19,7 @@ static void
> >  arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode = 's') {
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	}
> >  
> >  	if (s3c24xx_reset_hook)
> > @@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
> >  	arch_wdt_reset();
> >  
> >  	/* we'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
> > index 2e58cb7..d8ca578 100644
> > --- a/arch/arm/mach-s3c64xx/include/mach/system.h
> > +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
> > @@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
> >  		arch_wdt_reset();
> >  
> >  	/* if all else fails, or mode was for soft, jump to 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  #endif /* __ASM_ARCH_IRQ_H */
> > diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
> > index ba9da9f..345d35b 100644
> > --- a/arch/arm/mach-sa1100/include/mach/system.h
> > +++ b/arch/arm/mach-sa1100/include/mach/system.h
> > @@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode = 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* Use on-chip reset capability */
> >  		RSRR = RSRR_SWR;
> > diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
> > index 76a687e..956ac18 100644
> > --- a/arch/arm/mach-shmobile/include/mach/system.h
> > +++ b/arch/arm/mach-shmobile/include/mach/system.h
> > @@ -8,7 +8,7 @@ static inline void arch_idle(void)
> >  
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  #endif
> > diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
> > index ce228bd..68875a1 100644
> > --- a/arch/arm/mach-w90x900/include/mach/system.h
> > +++ b/arch/arm/mach-w90x900/include/mach/system.h
> > @@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode = 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		__raw_writel(WTE | WTRE | WTCLK, WTCR);
> >  	}
> > diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> > index 9dad8dc..b1cfc6a 100644
> > --- a/arch/arm/plat-mxc/system.c
> > +++ b/arch/arm/plat-mxc/system.c
> > @@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
> >  	mdelay(50);
> >  
> >  	/* we'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  void mxc_arch_reset_init(void __iomem *base)
> > diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
> > index a235fa0..1171f22 100644
> > --- a/arch/arm/plat-spear/include/plat/system.h
> > +++ b/arch/arm/plat-spear/include/plat/system.h
> > @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode = 's') {
> >  		/* software reset, Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* hardware reset, Use on-chip reset capability */
> >  		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> > -- 
> > 1.7.4.4
> > 
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-11-17 18:00       ` Sascha Hauer
  0 siblings, 0 replies; 162+ messages in thread
From: Sascha Hauer @ 2011-11-17 18:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:42:47PM +0000, Russell King - ARM Linux wrote:
> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

> 
> On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > We only need to set the system up for a soft-restart if we're going to
> > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > does the setup and final call for this, and make platforms use it.
> > Eliminate the call to setup_restart() from the default handler.
> > 
> > This means that platforms arch_reset() function is no longer called with
> > the page tables prepared for a soft-restart, and caches will still be
> > enabled.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> >  arch/arm/include/asm/system.h                     |    1 +
> >  arch/arm/kernel/process.c                         |   13 +++++++++++--
> >  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
> >  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
> >  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
> >  arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
> >  arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
> >  arch/arm/mach-mxs/system.c                        |    2 +-
> >  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
> >  arch/arm/mach-pxa/reset.c                         |    2 +-
> >  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
> >  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
> >  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
> >  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
> >  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
> >  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
> >  arch/arm/plat-mxc/system.c                        |    2 +-
> >  arch/arm/plat-spear/include/plat/system.h         |    2 +-
> >  21 files changed, 33 insertions(+), 23 deletions(-)
> > 
> > diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> > index 984014b..fe7de75 100644
> > --- a/arch/arm/include/asm/system.h
> > +++ b/arch/arm/include/asm/system.h
> > @@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
> >  extern void cpu_init(void);
> >  
> >  void arm_machine_restart(char mode, const char *cmd);
> > +void soft_restart(unsigned long);
> >  extern void (*arm_pm_restart)(char str, const char *cmd);
> >  
> >  #define UDBG_UNDEFINED	(1 << 0)
> > diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> > index dca7971..52b4306 100644
> > --- a/arch/arm/kernel/process.c
> > +++ b/arch/arm/kernel/process.c
> > @@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
> >  __setup("nohlt", nohlt_setup);
> >  __setup("hlt", hlt_setup);
> >  
> > -void arm_machine_restart(char mode, const char *cmd)
> > +void soft_restart(unsigned long addr)
> >  {
> >  	/* Disable interrupts first */
> >  	local_irq_disable();
> > @@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)
> >  	/* Push out any further dirty data, and ensure cache is empty */
> >  	flush_cache_all();
> >  
> > -	/* Now call the architecture specific reboot code. */
> > +	cpu_reset(addr);
> > +}
> > +
> > +void arm_machine_restart(char mode, const char *cmd)
> > +{
> > +	/* Disable interrupts first */
> > +	local_irq_disable();
> > +	local_fiq_disable();
> > +
> > +	/* Call the architecture specific reboot code. */
> >  	arch_reset(mode, cmd);
> >  }
> >  
> > diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
> > index f916cd7..6c11993 100644
> > --- a/arch/arm/mach-clps711x/include/mach/system.h
> > +++ b/arch/arm/mach-clps711x/include/mach/system.h
> > @@ -34,7 +34,7 @@ static inline void arch_idle(void)
> >  
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  #endif
> > diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
> > index 9a26245..0d5df72 100644
> > --- a/arch/arm/mach-ebsa110/include/mach/system.h
> > +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> > @@ -34,6 +34,6 @@ static inline void arch_idle(void)
> >  	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
> >  }
> >  
> > -#define arch_reset(mode, cmd)	cpu_reset(0x80000000)
> > +#define arch_reset(mode, cmd)	soft_restart(0x80000000)
> >  
> >  #endif
> > diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
> > index 0b29315..249f895 100644
> > --- a/arch/arm/mach-footbridge/include/mach/system.h
> > +++ b/arch/arm/mach-footbridge/include/mach/system.h
> > @@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)
> >  		/*
> >  		 * Jump into the ROM
> >  		 */
> > -		cpu_reset(0x41000000);
> > +		soft_restart(0x41000000);
> >  	} else {
> >  		if (machine_is_netwinder()) {
> >  			/* open up the SuperIO chip
> > diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
> > index a4b808f..4865a9b 100644
> > --- a/arch/arm/mach-iop32x/include/mach/system.h
> > +++ b/arch/arm/mach-iop32x/include/mach/system.h
> > @@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd)
> >  	*IOP3XX_PCSR = 0x30;
> >  
> >  	/* Jump into ROM at address 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
> > index f192a34..86d1b20 100644
> > --- a/arch/arm/mach-iop33x/include/mach/system.h
> > +++ b/arch/arm/mach-iop33x/include/mach/system.h
> > @@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd)
> >  	*IOP3XX_PCSR = 0x30;
> >  
> >  	/* Jump into ROM at address 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
> > index 54c0af7..24337d9 100644
> > --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> > +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> > @@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if ( 1 && mode == 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* Use on-chip reset capability */
> >  
> > diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
> > index fb1dda9..ceb19c9 100644
> > --- a/arch/arm/mach-ks8695/include/mach/system.h
> > +++ b/arch/arm/mach-ks8695/include/mach/system.h
> > @@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
> >  	unsigned int reg;
> >  
> >  	if (mode == 's')
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  
> >  	/* disable timer0 */
> >  	reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
> > diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
> > index 1a8a25e..cb06379 100644
> > --- a/arch/arm/mach-mmp/include/mach/system.h
> > +++ b/arch/arm/mach-mmp/include/mach/system.h
> > @@ -19,8 +19,8 @@ static inline void arch_idle(void)
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (cpu_is_pxa168())
> > -		cpu_reset(0xffff0000);
> > +		soft_restart(0xffff0000);
> >  	else
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  }
> >  #endif /* __ASM_MACH_SYSTEM_H */
> > diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> > index 20ec3bd..cab8836 100644
> > --- a/arch/arm/mach-mxs/system.c
> > +++ b/arch/arm/mach-mxs/system.c
> > @@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
> >  	mdelay(50);
> >  
> >  	/* We'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  static int __init mxs_arch_reset_init(void)
> > diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
> > index 5dda2bb..5d6384a 100644
> > --- a/arch/arm/mach-pnx4008/include/mach/system.h
> > +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> > @@ -32,7 +32,7 @@ static void arch_idle(void)
> >  
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  #endif
> > diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> > index 01e9d64..b8bcda1 100644
> > --- a/arch/arm/mach-pxa/reset.c
> > +++ b/arch/arm/mach-pxa/reset.c
> > @@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
> >  	switch (mode) {
> >  	case 's':
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  		break;
> >  	case 'g':
> >  		do_gpio_reset();
> > diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
> > index 45c7b93..a354f4d 100644
> > --- a/arch/arm/mach-rpc/include/mach/system.h
> > +++ b/arch/arm/mach-rpc/include/mach/system.h
> > @@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
> >  	/*
> >  	 * Jump into the ROM
> >  	 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > index 6faadce..913893d 100644
> > --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > @@ -19,7 +19,7 @@ static void
> >  arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode == 's') {
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	}
> >  
> >  	if (s3c24xx_reset_hook)
> > @@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
> >  	arch_wdt_reset();
> >  
> >  	/* we'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
> > index 2e58cb7..d8ca578 100644
> > --- a/arch/arm/mach-s3c64xx/include/mach/system.h
> > +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
> > @@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
> >  		arch_wdt_reset();
> >  
> >  	/* if all else fails, or mode was for soft, jump to 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  #endif /* __ASM_ARCH_IRQ_H */
> > diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
> > index ba9da9f..345d35b 100644
> > --- a/arch/arm/mach-sa1100/include/mach/system.h
> > +++ b/arch/arm/mach-sa1100/include/mach/system.h
> > @@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode == 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* Use on-chip reset capability */
> >  		RSRR = RSRR_SWR;
> > diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
> > index 76a687e..956ac18 100644
> > --- a/arch/arm/mach-shmobile/include/mach/system.h
> > +++ b/arch/arm/mach-shmobile/include/mach/system.h
> > @@ -8,7 +8,7 @@ static inline void arch_idle(void)
> >  
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  #endif
> > diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
> > index ce228bd..68875a1 100644
> > --- a/arch/arm/mach-w90x900/include/mach/system.h
> > +++ b/arch/arm/mach-w90x900/include/mach/system.h
> > @@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode == 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		__raw_writel(WTE | WTRE | WTCLK, WTCR);
> >  	}
> > diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> > index 9dad8dc..b1cfc6a 100644
> > --- a/arch/arm/plat-mxc/system.c
> > +++ b/arch/arm/plat-mxc/system.c
> > @@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
> >  	mdelay(50);
> >  
> >  	/* we'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >  
> >  void mxc_arch_reset_init(void __iomem *base)
> > diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
> > index a235fa0..1171f22 100644
> > --- a/arch/arm/plat-spear/include/plat/system.h
> > +++ b/arch/arm/plat-spear/include/plat/system.h
> > @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode == 's') {
> >  		/* software reset, Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* hardware reset, Use on-chip reset capability */
> >  		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> > -- 
> > 1.7.4.4
> > 
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-18  3:41       ` Viresh Kumar
  -1 siblings, 0 replies; 162+ messages in thread
From: Viresh Kumar @ 2011-11-18  3:29 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/17/2011 11:12 PM, Russell King - ARM Linux wrote:
>> We only need to set the system up for a soft-restart if we're going to
>> be doing a soft-restart.  Provide a new function (soft_restart()) which
>> does the setup and final call for this, and make platforms use it.
>> Eliminate the call to setup_restart() from the default handler.
>>
>> This means that platforms arch_reset() function is no longer called with
>> the page tables prepared for a soft-restart, and caches will still be
>> enabled.
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> ---
> 
> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
>> index a235fa0..1171f22 100644
>> --- a/arch/arm/plat-spear/include/plat/system.h
>> +++ b/arch/arm/plat-spear/include/plat/system.h
>> @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
>>  {
>>       if (mode == 's') {
>>               /* software reset, Jump into ROM at address 0 */
>> -             cpu_reset(0);
>> +             soft_restart(0);
>>       } else {
>>               /* hardware reset, Use on-chip reset capability */
>>               sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);

For SPEAr:

Acked-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

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

* Re: [PATCH 6/7] ARM: restart: only perform setup for restart when
@ 2011-11-18  3:41       ` Viresh Kumar
  0 siblings, 0 replies; 162+ messages in thread
From: Viresh Kumar @ 2011-11-18  3:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/17/2011 11:12 PM, Russell King - ARM Linux wrote:
>> We only need to set the system up for a soft-restart if we're going to
>> be doing a soft-restart.  Provide a new function (soft_restart()) which
>> does the setup and final call for this, and make platforms use it.
>> Eliminate the call to setup_restart() from the default handler.
>>
>> This means that platforms arch_reset() function is no longer called with
>> the page tables prepared for a soft-restart, and caches will still be
>> enabled.
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> ---
> 
> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
>> index a235fa0..1171f22 100644
>> --- a/arch/arm/plat-spear/include/plat/system.h
>> +++ b/arch/arm/plat-spear/include/plat/system.h
>> @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
>>  {
>>       if (mode = 's') {
>>               /* software reset, Jump into ROM at address 0 */
>> -             cpu_reset(0);
>> +             soft_restart(0);
>>       } else {
>>               /* hardware reset, Use on-chip reset capability */
>>               sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);

For SPEAr:

Acked-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
  2011-11-06 17:33 ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-18  3:43   ` Wan ZongShun
  2011-11-21  3:42   ` Eric Miao
  2 siblings, 0 replies; 162+ messages in thread
From: Wan ZongShun @ 2011-11-18  3:43 UTC (permalink / raw)
  To: linux-arm-kernel

2011/11/7 Russell King - ARM Linux <linux@arm.linux.org.uk>
>
> We only need to set the system up for a soft-restart if we're going to
> be doing a soft-restart. ?Provide a new function (soft_restart()) which
> does the setup and final call for this, and make platforms use it.
> Eliminate the call to setup_restart() from the default handler.
>
> This means that platforms arch_reset() function is no longer called with
> the page tables prepared for a soft-restart, and caches will still be
> enabled.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> ?arch/arm/include/asm/system.h ? ? ? ? ? ? ? ? ? ? | ? ?1 +
> ?arch/arm/kernel/process.c ? ? ? ? ? ? ? ? ? ? ? ? | ? 13 +++++++++++--
> ?arch/arm/mach-clps711x/include/mach/system.h ? ? ?| ? ?2 +-
> ?arch/arm/mach-ebsa110/include/mach/system.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-footbridge/include/mach/system.h ? ?| ? ?2 +-
> ?arch/arm/mach-iop32x/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-iop33x/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-ixp4xx/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-ks8695/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-mmp/include/mach/system.h ? ? ? ? ? | ? ?4 ++--
> ?arch/arm/mach-mxs/system.c ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-pnx4008/include/mach/system.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-pxa/reset.c ? ? ? ? ? ? ? ? ? ? ? ? | ? ?2 +-
> ?arch/arm/mach-rpc/include/mach/system.h ? ? ? ? ? | ? ?2 +-
> ?arch/arm/mach-s3c2410/include/mach/system-reset.h | ? ?4 ++--
> ?arch/arm/mach-s3c64xx/include/mach/system.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-sa1100/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-shmobile/include/mach/system.h ? ? ?| ? ?2 +-
> ?arch/arm/mach-w90x900/include/mach/system.h ? ? ? | ? ?2 +-
> ?arch/arm/plat-mxc/system.c ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/plat-spear/include/plat/system.h ? ? ? ? | ? ?2 +-
> ?21 files changed, 33 insertions(+), 23 deletions(-)
>
> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> index 984014b..fe7de75 100644
> --- a/arch/arm/include/asm/system.h
> +++ b/arch/arm/include/asm/system.h
> @@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
> ?extern void cpu_init(void);
>
> ?void arm_machine_restart(char mode, const char *cmd);
> +void soft_restart(unsigned long);
> ?extern void (*arm_pm_restart)(char str, const char *cmd);
>
> ?#define UDBG_UNDEFINED (1 << 0)
> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> index dca7971..52b4306 100644
> --- a/arch/arm/kernel/process.c
> +++ b/arch/arm/kernel/process.c
> @@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
> ?__setup("nohlt", nohlt_setup);
> ?__setup("hlt", hlt_setup);
>
> -void arm_machine_restart(char mode, const char *cmd)
> +void soft_restart(unsigned long addr)
> ?{
> ? ? ? ?/* Disable interrupts first */
> ? ? ? ?local_irq_disable();
> @@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)
> ? ? ? ?/* Push out any further dirty data, and ensure cache is empty */
> ? ? ? ?flush_cache_all();
>
> - ? ? ? /* Now call the architecture specific reboot code. */
> + ? ? ? cpu_reset(addr);
> +}
> +
> +void arm_machine_restart(char mode, const char *cmd)
> +{
> + ? ? ? /* Disable interrupts first */
> + ? ? ? local_irq_disable();
> + ? ? ? local_fiq_disable();
> +
> + ? ? ? /* Call the architecture specific reboot code. */
> ? ? ? ?arch_reset(mode, cmd);
> ?}
>
> diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
> index f916cd7..6c11993 100644
> --- a/arch/arm/mach-clps711x/include/mach/system.h
> +++ b/arch/arm/mach-clps711x/include/mach/system.h
> @@ -34,7 +34,7 @@ static inline void arch_idle(void)
>
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?#endif
> diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
> index 9a26245..0d5df72 100644
> --- a/arch/arm/mach-ebsa110/include/mach/system.h
> +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> @@ -34,6 +34,6 @@ static inline void arch_idle(void)
> ? ? ? ?asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
> ?}
>
> -#define arch_reset(mode, cmd) ?cpu_reset(0x80000000)
> +#define arch_reset(mode, cmd) ?soft_restart(0x80000000)
>
> ?#endif
> diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
> index 0b29315..249f895 100644
> --- a/arch/arm/mach-footbridge/include/mach/system.h
> +++ b/arch/arm/mach-footbridge/include/mach/system.h
> @@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * Jump into the ROM
> ? ? ? ? ? ? ? ? */
> - ? ? ? ? ? ? ? cpu_reset(0x41000000);
> + ? ? ? ? ? ? ? soft_restart(0x41000000);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?if (machine_is_netwinder()) {
> ? ? ? ? ? ? ? ? ? ? ? ?/* open up the SuperIO chip
> diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
> index a4b808f..4865a9b 100644
> --- a/arch/arm/mach-iop32x/include/mach/system.h
> +++ b/arch/arm/mach-iop32x/include/mach/system.h
> @@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd)
> ? ? ? ?*IOP3XX_PCSR = 0x30;
>
> ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
> diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
> index f192a34..86d1b20 100644
> --- a/arch/arm/mach-iop33x/include/mach/system.h
> +++ b/arch/arm/mach-iop33x/include/mach/system.h
> @@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd)
> ? ? ? ?*IOP3XX_PCSR = 0x30;
>
> ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
> diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
> index 54c0af7..24337d9 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> @@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if ( 1 && mode == 's') {
> ? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?/* Use on-chip reset capability */
>
> diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
> index fb1dda9..ceb19c9 100644
> --- a/arch/arm/mach-ks8695/include/mach/system.h
> +++ b/arch/arm/mach-ks8695/include/mach/system.h
> @@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
> ? ? ? ?unsigned int reg;
>
> ? ? ? ?if (mode == 's')
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
>
> ? ? ? ?/* disable timer0 */
> ? ? ? ?reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
> diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
> index 1a8a25e..cb06379 100644
> --- a/arch/arm/mach-mmp/include/mach/system.h
> +++ b/arch/arm/mach-mmp/include/mach/system.h
> @@ -19,8 +19,8 @@ static inline void arch_idle(void)
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (cpu_is_pxa168())
> - ? ? ? ? ? ? ? cpu_reset(0xffff0000);
> + ? ? ? ? ? ? ? soft_restart(0xffff0000);
> ? ? ? ?else
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ?}
> ?#endif /* __ASM_MACH_SYSTEM_H */
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..cab8836 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
> ? ? ? ?mdelay(50);
>
> ? ? ? ?/* We'll take a jump through zero as a poor second */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?static int __init mxs_arch_reset_init(void)
> diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
> index 5dda2bb..5d6384a 100644
> --- a/arch/arm/mach-pnx4008/include/mach/system.h
> +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> @@ -32,7 +32,7 @@ static void arch_idle(void)
>
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?#endif
> diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> index 01e9d64..b8bcda1 100644
> --- a/arch/arm/mach-pxa/reset.c
> +++ b/arch/arm/mach-pxa/reset.c
> @@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
> ? ? ? ?switch (mode) {
> ? ? ? ?case 's':
> ? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?case 'g':
> ? ? ? ? ? ? ? ?do_gpio_reset();
> diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
> index 45c7b93..a354f4d 100644
> --- a/arch/arm/mach-rpc/include/mach/system.h
> +++ b/arch/arm/mach-rpc/include/mach/system.h
> @@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
> ? ? ? ?/*
> ? ? ? ? * Jump into the ROM
> ? ? ? ? */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
> diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> index 6faadce..913893d 100644
> --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> @@ -19,7 +19,7 @@ static void
> ?arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (mode == 's') {
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?}
>
> ? ? ? ?if (s3c24xx_reset_hook)
> @@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
> ? ? ? ?arch_wdt_reset();
>
> ? ? ? ?/* we'll take a jump through zero as a poor second */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
> diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
> index 2e58cb7..d8ca578 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/system.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
> @@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
> ? ? ? ? ? ? ? ?arch_wdt_reset();
>
> ? ? ? ?/* if all else fails, or mode was for soft, jump to 0 */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?#endif /* __ASM_ARCH_IRQ_H */
> diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
> index ba9da9f..345d35b 100644
> --- a/arch/arm/mach-sa1100/include/mach/system.h
> +++ b/arch/arm/mach-sa1100/include/mach/system.h
> @@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (mode == 's') {
> ? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?/* Use on-chip reset capability */
> ? ? ? ? ? ? ? ?RSRR = RSRR_SWR;
> diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
> index 76a687e..956ac18 100644
> --- a/arch/arm/mach-shmobile/include/mach/system.h
> +++ b/arch/arm/mach-shmobile/include/mach/system.h
> @@ -8,7 +8,7 @@ static inline void arch_idle(void)
>
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?#endif
> diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
> index ce228bd..68875a1 100644
> --- a/arch/arm/mach-w90x900/include/mach/system.h
> +++ b/arch/arm/mach-w90x900/include/mach/system.h
> @@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (mode == 's') {
> ? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?__raw_writel(WTE | WTRE | WTCLK, WTCR);
> ? ? ? ?}
> diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> index 9dad8dc..b1cfc6a 100644
> --- a/arch/arm/plat-mxc/system.c
> +++ b/arch/arm/plat-mxc/system.c
> @@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
> ? ? ? ?mdelay(50);
>
> ? ? ? ?/* we'll take a jump through zero as a poor second */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?void mxc_arch_reset_init(void __iomem *base)
> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
> index a235fa0..1171f22 100644
> --- a/arch/arm/plat-spear/include/plat/system.h
> +++ b/arch/arm/plat-spear/include/plat/system.h
> @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (mode == 's') {
> ? ? ? ? ? ? ? ?/* software reset, Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?/* hardware reset, Use on-chip reset capability */
> ? ? ? ? ? ? ? ?sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);


For NUC900:

Acked-by: Wan ZongShun <mcuos.com@gmail.com>


> --
> 1.7.4.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



--
Wan ZongShun.
www.mcuos.com

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

* [PATCH 18/41] ARM: restart: ixp4xx: use new restart hook
  2011-11-17 17:30   ` Russell King - ARM Linux
@ 2011-11-18  7:49     ` Krzysztof Halasa
  2011-11-18 19:46       ` Russell King - ARM Linux
  0 siblings, 1 reply; 162+ messages in thread
From: Krzysztof Halasa @ 2011-11-18  7:49 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

>> Hook these platforms restart code into the new restart hook rather
>> than using arch_reset().

Looks good basically, except a detail:

>> --- a/arch/arm/mach-ixp4xx/common.c
>> +++ b/arch/arm/mach-ixp4xx/common.c
>> @@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)
>>  
>>  	clockevents_register_device(&clockevent_ixp4xx);
>>  }
>> +
>> +void ixp4xx_restart(char mode, const char *cmd)
>> +{
>> +	if ( 1 && mode == 's') {
           ^^^^^^^
This one. Yeah, I can see where does it come from.
Otherwise,
Acked-by: Krzysztof Ha?asa <khc@pm.waw.pl>

>> +		/* Jump into ROM at address 0 */
>> +		soft_restart(0);

OTOH I probably need to investigate this soft_restart, "when time
permits", that's another story of course.
-- 
Krzysztof Halasa

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

* Re: [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-18  7:51       ` Krzysztof Halasa
  -1 siblings, 0 replies; 162+ messages in thread
From: Krzysztof Halasa @ 2011-11-18  7:51 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

>> We only need to set the system up for a soft-restart if we're going to
>> be doing a soft-restart.  Provide a new function (soft_restart()) which
>> does the setup and final call for this, and make platforms use it.
>> Eliminate the call to setup_restart() from the default handler.

>>  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-

Acked-by: Krzysztof Hałasa <khc@pm.waw.pl>
-- 
Krzysztof Halasa

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-11-18  7:51       ` Krzysztof Halasa
  0 siblings, 0 replies; 162+ messages in thread
From: Krzysztof Halasa @ 2011-11-18  7:51 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

>> We only need to set the system up for a soft-restart if we're going to
>> be doing a soft-restart.  Provide a new function (soft_restart()) which
>> does the setup and final call for this, and make platforms use it.
>> Eliminate the call to setup_restart() from the default handler.

>>  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-

Acked-by: Krzysztof Ha?asa <khc@pm.waw.pl>
-- 
Krzysztof Halasa

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

* Re: [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-18  7:56       ` Paul Mundt
  -1 siblings, 0 replies; 162+ messages in thread
From: Paul Mundt @ 2011-11-18  7:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:42:47PM +0000, Russell King - ARM Linux wrote:
> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)

For the SH-Mobile bits:

Acked-by: Paul Mundt <lethal@linux-sh.org>

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-11-18  7:56       ` Paul Mundt
  0 siblings, 0 replies; 162+ messages in thread
From: Paul Mundt @ 2011-11-18  7:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:42:47PM +0000, Russell King - ARM Linux wrote:
> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)

For the SH-Mobile bits:

Acked-by: Paul Mundt <lethal@linux-sh.org>

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

* [PATCH 28/41] ARM: restart: pxa: use new restart hook
  2011-11-17 17:27   ` Russell King - ARM Linux
@ 2011-11-18 10:11     ` Richard Purdie
  0 siblings, 0 replies; 162+ messages in thread
From: Richard Purdie @ 2011-11-18 10:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2011-11-17 at 17:27 +0000, Russell King - ARM Linux wrote:
> Ack?
> 
> On Sun, Nov 06, 2011 at 05:49:28PM +0000, Russell King - ARM Linux wrote:
> > Hook these platforms restart code into the new restart hook rather
> > than using arch_reset().
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>

> > ---
> >  arch/arm/mach-pxa/balloon3.c            |    1 +
> >  arch/arm/mach-pxa/capc7117.c            |    3 ++-
> >  arch/arm/mach-pxa/cm-x2xx.c             |    1 +
> >  arch/arm/mach-pxa/cm-x300.c             |    1 +
> >  arch/arm/mach-pxa/colibri-pxa270.c      |    2 ++
> >  arch/arm/mach-pxa/colibri-pxa300.c      |    1 +
> >  arch/arm/mach-pxa/colibri-pxa320.c      |    1 +
> >  arch/arm/mach-pxa/corgi.c               |    8 +++++---
> >  arch/arm/mach-pxa/csb726.c              |    1 +
> >  arch/arm/mach-pxa/em-x270.c             |    2 ++
> >  arch/arm/mach-pxa/eseries.c             |    6 ++++++
> >  arch/arm/mach-pxa/ezx.c                 |    6 ++++++
> >  arch/arm/mach-pxa/generic.h             |    2 ++
> >  arch/arm/mach-pxa/gumstix.c             |    1 +
> >  arch/arm/mach-pxa/h5000.c               |    1 +
> >  arch/arm/mach-pxa/himalaya.c            |    1 +
> >  arch/arm/mach-pxa/hx4700.c              |    1 +
> >  arch/arm/mach-pxa/icontrol.c            |    3 ++-
> >  arch/arm/mach-pxa/idp.c                 |    1 +
> >  arch/arm/mach-pxa/include/mach/system.h |   10 +++-------
> >  arch/arm/mach-pxa/littleton.c           |    1 +
> >  arch/arm/mach-pxa/lpd270.c              |    1 +
> >  arch/arm/mach-pxa/lubbock.c             |    1 +
> >  arch/arm/mach-pxa/magician.c            |    1 +
> >  arch/arm/mach-pxa/mainstone.c           |    1 +
> >  arch/arm/mach-pxa/mioa701.c             |    6 +++---
> >  arch/arm/mach-pxa/mp900.c               |    1 +
> >  arch/arm/mach-pxa/palmld.c              |    3 ++-
> >  arch/arm/mach-pxa/palmt5.c              |    3 ++-
> >  arch/arm/mach-pxa/palmtc.c              |    3 ++-
> >  arch/arm/mach-pxa/palmte2.c             |    3 ++-
> >  arch/arm/mach-pxa/palmtreo.c            |    2 ++
> >  arch/arm/mach-pxa/palmtx.c              |    3 ++-
> >  arch/arm/mach-pxa/palmz72.c             |    3 ++-
> >  arch/arm/mach-pxa/pcm027.c              |    1 +
> >  arch/arm/mach-pxa/poodle.c              |    3 ++-
> >  arch/arm/mach-pxa/raumfeld.c            |    3 +++
> >  arch/arm/mach-pxa/reset.c               |    5 ++++-
> >  arch/arm/mach-pxa/saar.c                |    1 +
> >  arch/arm/mach-pxa/saarb.c               |    1 +
> >  arch/arm/mach-pxa/spitz.c               |    6 ++++--
> >  arch/arm/mach-pxa/stargate2.c           |    2 ++
> >  arch/arm/mach-pxa/tavorevb.c            |    1 +
> >  arch/arm/mach-pxa/tavorevb3.c           |    1 +
> >  arch/arm/mach-pxa/tosa.c                |    4 ++--
> >  arch/arm/mach-pxa/trizeps4.c            |    2 ++
> >  arch/arm/mach-pxa/viper.c               |    1 +
> >  arch/arm/mach-pxa/vpac270.c             |    3 ++-
> >  arch/arm/mach-pxa/xcep.c                |    1 +
> >  arch/arm/mach-pxa/z2.c                  |    1 +
> >  arch/arm/mach-pxa/zeus.c                |    1 +
> >  arch/arm/mach-pxa/zylonite.c            |    1 +
> >  52 files changed, 95 insertions(+), 28 deletions(-)

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

* [PATCH 02/41] ARM: restart: remove poodle restart handler
  2011-11-17 17:24   ` Russell King - ARM Linux
@ 2011-11-18 10:11     ` Richard Purdie
  0 siblings, 0 replies; 162+ messages in thread
From: Richard Purdie @ 2011-11-18 10:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2011-11-17 at 17:24 +0000, Russell King - ARM Linux wrote:
> Ack?
> 
> On Sun, Nov 06, 2011 at 05:40:37PM +0000, Russell King - ARM Linux wrote:
> > The poodle restart handler was added in 74617fb6b8 (3593/1: Add reboot
> > and shutdown handlers for Zaurus handhelds), and at that time it was
> > necessary to deal with the RCSR register.  This commit also forced all
> > restarts to use the 'hard' restart method.
> > 
> > In dc38e2ad53 (pxa: Fix RCSR handling), the RCSR handling was removed,
> > leaving just the forcing to use a 'hard' restart.  As hard restarts are
> > the default (in the absense of a reboot= command line argument), this
> > seems pointless.  In any case, Richard Purdie says:
> > 
> > > From what I remember that hardware either always reboots or always
> > > halts. I think the option was therefore left hardcoded to make it clear
> > > it wasn't expected to work. Later Zaurii models could do either but
> > > required some manual poking of registers to make it happen iirc.
> > >
> > > Regardless, you can probably clean this up as you suggest now.
> > 
> > So, lets remove the unnecessary interception and rely on the default
> > restart mode.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> >  arch/arm/mach-pxa/poodle.c |    6 ------
> >  1 files changed, 0 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
> > index 948ce3e..1c597ad 100644
> > --- a/arch/arm/mach-pxa/poodle.c
> > +++ b/arch/arm/mach-pxa/poodle.c
> > @@ -419,17 +419,11 @@ static void poodle_poweroff(void)
> >  	arm_machine_restart('h', NULL);
> >  }
> >  
> > -static void poodle_restart(char mode, const char *cmd)
> > -{
> > -	arm_machine_restart('h', cmd);
> > -}
> > -
> >  static void __init poodle_init(void)
> >  {
> >  	int ret = 0;
> >  
> >  	pm_power_off = poodle_poweroff;
> > -	arm_pm_restart = poodle_restart;
> >  
> >  	PCFR |= PCFR_OPDE;
> >  

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

* Re: [PATCH 6/7] ARM: restart: only perform setup for restart when
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-18 10:13       ` Richard Purdie
  -1 siblings, 0 replies; 162+ messages in thread
From: Richard Purdie @ 2011-11-18 10:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2011-11-17 at 17:42 +0000, Russell King - ARM Linux wrote:
> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)
> 
> On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > We only need to set the system up for a soft-restart if we're going to
> > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > does the setup and final call for this, and make platforms use it.
> > Eliminate the call to setup_restart() from the default handler.
> > 
> > This means that platforms arch_reset() function is no longer called with
> > the page tables prepared for a soft-restart, and caches will still be
> > enabled.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> >  arch/arm/include/asm/system.h                     |    1 +
> >  arch/arm/kernel/process.c                         |   13 +++++++++++--
> >  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
> >  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
> >  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
> >  arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
> >  arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
> >  arch/arm/mach-mxs/system.c                        |    2 +-
> >  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
> >  arch/arm/mach-pxa/reset.c                         |    2 +-
> >  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
> >  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
> >  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
> >  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
> >  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
> >  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
> >  arch/arm/plat-mxc/system.c                        |    2 +-
> >  arch/arm/plat-spear/include/plat/system.h         |    2 +-
> >  21 files changed, 33 insertions(+), 23 deletions(-)
> > 



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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-11-18 10:13       ` Richard Purdie
  0 siblings, 0 replies; 162+ messages in thread
From: Richard Purdie @ 2011-11-18 10:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2011-11-17 at 17:42 +0000, Russell King - ARM Linux wrote:
> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)
> 
> On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > We only need to set the system up for a soft-restart if we're going to
> > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > does the setup and final call for this, and make platforms use it.
> > Eliminate the call to setup_restart() from the default handler.
> > 
> > This means that platforms arch_reset() function is no longer called with
> > the page tables prepared for a soft-restart, and caches will still be
> > enabled.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> >  arch/arm/include/asm/system.h                     |    1 +
> >  arch/arm/kernel/process.c                         |   13 +++++++++++--
> >  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
> >  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
> >  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
> >  arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
> >  arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
> >  arch/arm/mach-mxs/system.c                        |    2 +-
> >  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
> >  arch/arm/mach-pxa/reset.c                         |    2 +-
> >  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
> >  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
> >  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
> >  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
> >  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
> >  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
> >  arch/arm/plat-mxc/system.c                        |    2 +-
> >  arch/arm/plat-spear/include/plat/system.h         |    2 +-
> >  21 files changed, 33 insertions(+), 23 deletions(-)
> > 

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

* [PATCH 18/41] ARM: restart: ixp4xx: use new restart hook
  2011-11-18  7:49     ` Krzysztof Halasa
@ 2011-11-18 19:46       ` Russell King - ARM Linux
  2011-11-18 22:11         ` Krzysztof Halasa
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-18 19:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 18, 2011 at 08:49:01AM +0100, Krzysztof Halasa wrote:
> Russell King - ARM Linux <linux@arm.linux.org.uk> writes:
> 
> >> Hook these platforms restart code into the new restart hook rather
> >> than using arch_reset().
> 
> Looks good basically, except a detail:
> 
> >> --- a/arch/arm/mach-ixp4xx/common.c
> >> +++ b/arch/arm/mach-ixp4xx/common.c
> >> @@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)
> >>  
> >>  	clockevents_register_device(&clockevent_ixp4xx);
> >>  }
> >> +
> >> +void ixp4xx_restart(char mode, const char *cmd)
> >> +{
> >> +	if ( 1 && mode == 's') {
>            ^^^^^^^
> This one. Yeah, I can see where does it come from.

It's weird, I suspect it was supposed to be 1 || there, but I've no idea
what the intention is there.  So I left the code as-is.

> Otherwise,
> Acked-by: Krzysztof Ha?asa <khc@pm.waw.pl>

I'm going to assume that applies to this version - because I think fixing
that should be done independently of this patch series.

> >> +		/* Jump into ROM at address 0 */
> >> +		soft_restart(0);
> 
> OTOH I probably need to investigate this soft_restart, "when time
> permits", that's another story of course.
> -- 
> Krzysztof Halasa

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

* [PATCH 18/41] ARM: restart: ixp4xx: use new restart hook
  2011-11-18 19:46       ` Russell King - ARM Linux
@ 2011-11-18 22:11         ` Krzysztof Halasa
  0 siblings, 0 replies; 162+ messages in thread
From: Krzysztof Halasa @ 2011-11-18 22:11 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

>> Acked-by: Krzysztof Ha?asa <khc@pm.waw.pl>
>
> I'm going to assume that applies to this version - because I think fixing
> that should be done independently of this patch series.

No problem, it doesn't look like a terribly important thing to me.
-- 
Krzysztof Halasa

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
  2011-11-06 17:33 ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
  2011-11-18  3:43   ` Wan ZongShun
@ 2011-11-21  3:42   ` Eric Miao
  2 siblings, 0 replies; 162+ messages in thread
From: Eric Miao @ 2011-11-21  3:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 7, 2011 at 1:33 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> We only need to set the system up for a soft-restart if we're going to
> be doing a soft-restart. ?Provide a new function (soft_restart()) which
> does the setup and final call for this, and make platforms use it.
> Eliminate the call to setup_restart() from the default handler.
>
> This means that platforms arch_reset() function is no longer called with
> the page tables prepared for a soft-restart, and caches will still be
> enabled.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

For the part of MMP and PXA,

Acked-by: Eric Miao <eric.y.miao@gmail.com>

> ---
> ?arch/arm/include/asm/system.h ? ? ? ? ? ? ? ? ? ? | ? ?1 +
> ?arch/arm/kernel/process.c ? ? ? ? ? ? ? ? ? ? ? ? | ? 13 +++++++++++--
> ?arch/arm/mach-clps711x/include/mach/system.h ? ? ?| ? ?2 +-
> ?arch/arm/mach-ebsa110/include/mach/system.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-footbridge/include/mach/system.h ? ?| ? ?2 +-
> ?arch/arm/mach-iop32x/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-iop33x/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-ixp4xx/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-ks8695/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-mmp/include/mach/system.h ? ? ? ? ? | ? ?4 ++--
> ?arch/arm/mach-mxs/system.c ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-pnx4008/include/mach/system.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-pxa/reset.c ? ? ? ? ? ? ? ? ? ? ? ? | ? ?2 +-
> ?arch/arm/mach-rpc/include/mach/system.h ? ? ? ? ? | ? ?2 +-
> ?arch/arm/mach-s3c2410/include/mach/system-reset.h | ? ?4 ++--
> ?arch/arm/mach-s3c64xx/include/mach/system.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-sa1100/include/mach/system.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-shmobile/include/mach/system.h ? ? ?| ? ?2 +-
> ?arch/arm/mach-w90x900/include/mach/system.h ? ? ? | ? ?2 +-
> ?arch/arm/plat-mxc/system.c ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/plat-spear/include/plat/system.h ? ? ? ? | ? ?2 +-
> ?21 files changed, 33 insertions(+), 23 deletions(-)
>
> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
> index 984014b..fe7de75 100644
> --- a/arch/arm/include/asm/system.h
> +++ b/arch/arm/include/asm/system.h
> @@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
> ?extern void cpu_init(void);
>
> ?void arm_machine_restart(char mode, const char *cmd);
> +void soft_restart(unsigned long);
> ?extern void (*arm_pm_restart)(char str, const char *cmd);
>
> ?#define UDBG_UNDEFINED (1 << 0)
> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> index dca7971..52b4306 100644
> --- a/arch/arm/kernel/process.c
> +++ b/arch/arm/kernel/process.c
> @@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
> ?__setup("nohlt", nohlt_setup);
> ?__setup("hlt", hlt_setup);
>
> -void arm_machine_restart(char mode, const char *cmd)
> +void soft_restart(unsigned long addr)
> ?{
> ? ? ? ?/* Disable interrupts first */
> ? ? ? ?local_irq_disable();
> @@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)
> ? ? ? ?/* Push out any further dirty data, and ensure cache is empty */
> ? ? ? ?flush_cache_all();
>
> - ? ? ? /* Now call the architecture specific reboot code. */
> + ? ? ? cpu_reset(addr);
> +}
> +
> +void arm_machine_restart(char mode, const char *cmd)
> +{
> + ? ? ? /* Disable interrupts first */
> + ? ? ? local_irq_disable();
> + ? ? ? local_fiq_disable();
> +
> + ? ? ? /* Call the architecture specific reboot code. */
> ? ? ? ?arch_reset(mode, cmd);
> ?}
>
> diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
> index f916cd7..6c11993 100644
> --- a/arch/arm/mach-clps711x/include/mach/system.h
> +++ b/arch/arm/mach-clps711x/include/mach/system.h
> @@ -34,7 +34,7 @@ static inline void arch_idle(void)
>
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?#endif
> diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
> index 9a26245..0d5df72 100644
> --- a/arch/arm/mach-ebsa110/include/mach/system.h
> +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> @@ -34,6 +34,6 @@ static inline void arch_idle(void)
> ? ? ? ?asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
> ?}
>
> -#define arch_reset(mode, cmd) ?cpu_reset(0x80000000)
> +#define arch_reset(mode, cmd) ?soft_restart(0x80000000)
>
> ?#endif
> diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
> index 0b29315..249f895 100644
> --- a/arch/arm/mach-footbridge/include/mach/system.h
> +++ b/arch/arm/mach-footbridge/include/mach/system.h
> @@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * Jump into the ROM
> ? ? ? ? ? ? ? ? */
> - ? ? ? ? ? ? ? cpu_reset(0x41000000);
> + ? ? ? ? ? ? ? soft_restart(0x41000000);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?if (machine_is_netwinder()) {
> ? ? ? ? ? ? ? ? ? ? ? ?/* open up the SuperIO chip
> diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
> index a4b808f..4865a9b 100644
> --- a/arch/arm/mach-iop32x/include/mach/system.h
> +++ b/arch/arm/mach-iop32x/include/mach/system.h
> @@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd)
> ? ? ? ?*IOP3XX_PCSR = 0x30;
>
> ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
> diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
> index f192a34..86d1b20 100644
> --- a/arch/arm/mach-iop33x/include/mach/system.h
> +++ b/arch/arm/mach-iop33x/include/mach/system.h
> @@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd)
> ? ? ? ?*IOP3XX_PCSR = 0x30;
>
> ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
> diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
> index 54c0af7..24337d9 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> @@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if ( 1 && mode == 's') {
> ? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?/* Use on-chip reset capability */
>
> diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
> index fb1dda9..ceb19c9 100644
> --- a/arch/arm/mach-ks8695/include/mach/system.h
> +++ b/arch/arm/mach-ks8695/include/mach/system.h
> @@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
> ? ? ? ?unsigned int reg;
>
> ? ? ? ?if (mode == 's')
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
>
> ? ? ? ?/* disable timer0 */
> ? ? ? ?reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
> diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
> index 1a8a25e..cb06379 100644
> --- a/arch/arm/mach-mmp/include/mach/system.h
> +++ b/arch/arm/mach-mmp/include/mach/system.h
> @@ -19,8 +19,8 @@ static inline void arch_idle(void)
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (cpu_is_pxa168())
> - ? ? ? ? ? ? ? cpu_reset(0xffff0000);
> + ? ? ? ? ? ? ? soft_restart(0xffff0000);
> ? ? ? ?else
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ?}
> ?#endif /* __ASM_MACH_SYSTEM_H */
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..cab8836 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
> ? ? ? ?mdelay(50);
>
> ? ? ? ?/* We'll take a jump through zero as a poor second */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?static int __init mxs_arch_reset_init(void)
> diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
> index 5dda2bb..5d6384a 100644
> --- a/arch/arm/mach-pnx4008/include/mach/system.h
> +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> @@ -32,7 +32,7 @@ static void arch_idle(void)
>
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?#endif
> diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> index 01e9d64..b8bcda1 100644
> --- a/arch/arm/mach-pxa/reset.c
> +++ b/arch/arm/mach-pxa/reset.c
> @@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
> ? ? ? ?switch (mode) {
> ? ? ? ?case 's':
> ? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?case 'g':
> ? ? ? ? ? ? ? ?do_gpio_reset();
> diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
> index 45c7b93..a354f4d 100644
> --- a/arch/arm/mach-rpc/include/mach/system.h
> +++ b/arch/arm/mach-rpc/include/mach/system.h
> @@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
> ? ? ? ?/*
> ? ? ? ? * Jump into the ROM
> ? ? ? ? */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
> diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> index 6faadce..913893d 100644
> --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> @@ -19,7 +19,7 @@ static void
> ?arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (mode == 's') {
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?}
>
> ? ? ? ?if (s3c24xx_reset_hook)
> @@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
> ? ? ? ?arch_wdt_reset();
>
> ? ? ? ?/* we'll take a jump through zero as a poor second */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
> diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
> index 2e58cb7..d8ca578 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/system.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
> @@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
> ? ? ? ? ? ? ? ?arch_wdt_reset();
>
> ? ? ? ?/* if all else fails, or mode was for soft, jump to 0 */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?#endif /* __ASM_ARCH_IRQ_H */
> diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
> index ba9da9f..345d35b 100644
> --- a/arch/arm/mach-sa1100/include/mach/system.h
> +++ b/arch/arm/mach-sa1100/include/mach/system.h
> @@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (mode == 's') {
> ? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?/* Use on-chip reset capability */
> ? ? ? ? ? ? ? ?RSRR = RSRR_SWR;
> diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
> index 76a687e..956ac18 100644
> --- a/arch/arm/mach-shmobile/include/mach/system.h
> +++ b/arch/arm/mach-shmobile/include/mach/system.h
> @@ -8,7 +8,7 @@ static inline void arch_idle(void)
>
> ?static inline void arch_reset(char mode, const char *cmd)
> ?{
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?#endif
> diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
> index ce228bd..68875a1 100644
> --- a/arch/arm/mach-w90x900/include/mach/system.h
> +++ b/arch/arm/mach-w90x900/include/mach/system.h
> @@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (mode == 's') {
> ? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?__raw_writel(WTE | WTRE | WTCLK, WTCR);
> ? ? ? ?}
> diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> index 9dad8dc..b1cfc6a 100644
> --- a/arch/arm/plat-mxc/system.c
> +++ b/arch/arm/plat-mxc/system.c
> @@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
> ? ? ? ?mdelay(50);
>
> ? ? ? ?/* we'll take a jump through zero as a poor second */
> - ? ? ? cpu_reset(0);
> + ? ? ? soft_restart(0);
> ?}
>
> ?void mxc_arch_reset_init(void __iomem *base)
> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
> index a235fa0..1171f22 100644
> --- a/arch/arm/plat-spear/include/plat/system.h
> +++ b/arch/arm/plat-spear/include/plat/system.h
> @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
> ?{
> ? ? ? ?if (mode == 's') {
> ? ? ? ? ? ? ? ?/* software reset, Jump into ROM at address 0 */
> - ? ? ? ? ? ? ? cpu_reset(0);
> + ? ? ? ? ? ? ? soft_restart(0);
> ? ? ? ?} else {
> ? ? ? ? ? ? ? ?/* hardware reset, Use on-chip reset capability */
> ? ? ? ? ? ? ? ?sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> --
> 1.7.4.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
                   ` (52 preceding siblings ...)
  2011-11-08  5:00 ` Kukjin Kim
@ 2011-11-21  9:56 ` Russell King - ARM Linux
  2011-11-22 11:21   ` Will Deacon
  53 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-21  9:56 UTC (permalink / raw)
  To: linux-arm-kernel

As of today, I'm going to start freezing the restart changes, which
covers those which have been in linux-next so far.  I've collected up
all the acks, etc, to date, and will not be applying any more to these
commits.

At the end of today, I'll merge these into my 'devel-stable' branch
to signify their new status, so if anyone has any objections they need
to speak up _now_.

The base set of changes are:

ARM: restart: only perform setup for restart when soft-restarting
ARM: restart: remove argument to setup_mm_for_reboot()
ARM: restart: move reboot failure handing into machine_restart()
ARM: restart: add default restart modes for PXA mioa701, spitz and tosa
ARM: restart: allow platforms more flexibility specifying restart mode
ARM: restart: add restart hook to machine_desc record

and the cleanups to prepare for the rest of the restart changes:

ARM: restart: remove poodle restart handler
ARM: w90x900: add common nuc9xx.h
ARM: clps711x: consolidate irq/mm/time code into a single file
ARM: 7159/1: OMAP: Introduce local common.h files
ARM: restart: remove local_irq_disable() from within arch_reset()

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-21  9:56 ` Russell King - ARM Linux
@ 2011-11-22 11:21   ` Will Deacon
  2011-11-22 15:24     ` Russell King - ARM Linux
  0 siblings, 1 reply; 162+ messages in thread
From: Will Deacon @ 2011-11-22 11:21 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Russell,

On Mon, Nov 21, 2011 at 09:56:58AM +0000, Russell King - ARM Linux wrote:
> As of today, I'm going to start freezing the restart changes, which
> covers those which have been in linux-next so far.  I've collected up
> all the acks, etc, to date, and will not be applying any more to these
> commits.
> 
> At the end of today, I'll merge these into my 'devel-stable' branch
> to signify their new status, so if anyone has any objections they need
> to speak up _now_.

Is your reset branch stable now? I only ask because it doesn't look like
you've merged these into devel-stable so I wondered if you have any further
changes pending.

Thanks,

Will

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-22 11:21   ` Will Deacon
@ 2011-11-22 15:24     ` Russell King - ARM Linux
  2011-11-22 15:29       ` Will Deacon
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-22 15:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 22, 2011 at 11:21:34AM +0000, Will Deacon wrote:
> Hi Russell,
> 
> On Mon, Nov 21, 2011 at 09:56:58AM +0000, Russell King - ARM Linux wrote:
> > As of today, I'm going to start freezing the restart changes, which
> > covers those which have been in linux-next so far.  I've collected up
> > all the acks, etc, to date, and will not be applying any more to these
> > commits.
> > 
> > At the end of today, I'll merge these into my 'devel-stable' branch
> > to signify their new status, so if anyone has any objections they need
> > to speak up _now_.
> 
> Is your reset branch stable now? I only ask because it doesn't look like
> you've merged these into devel-stable so I wondered if you have any further
> changes pending.

See the message I sent to Marc about his irqchip consolidation - I was
waiting for Marc to confirm that the resolution was good before I push
the stuff over to the devel-stable branch.  Marc has confirmed that
shortly after your message, so we're all good for this evening.

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

* [01: PATCH 0/7] Preparation for arch_reset changes
  2011-11-22 15:24     ` Russell King - ARM Linux
@ 2011-11-22 15:29       ` Will Deacon
  0 siblings, 0 replies; 162+ messages in thread
From: Will Deacon @ 2011-11-22 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 22, 2011 at 03:24:31PM +0000, Russell King - ARM Linux wrote:
> On Tue, Nov 22, 2011 at 11:21:34AM +0000, Will Deacon wrote:
> > Is your reset branch stable now? I only ask because it doesn't look like
> > you've merged these into devel-stable so I wondered if you have any further
> > changes pending.
> 
> See the message I sent to Marc about his irqchip consolidation - I was
> waiting for Marc to confirm that the resolution was good before I push
> the stuff over to the devel-stable branch.  Marc has confirmed that
> shortly after your message, so we're all good for this evening.

Ok, cracking, I'll rebase my stuff tonight or tomorrow morning.

Thanks,

Will

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

* [PATCH 14/41] ARM: restart: iop3xx: use new restart hook
  2011-11-17 17:28   ` Russell King - ARM Linux
@ 2011-11-24  6:45     ` Lennert Buytenhek
  0 siblings, 0 replies; 162+ messages in thread
From: Lennert Buytenhek @ 2011-11-24  6:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:28:58PM +0000, Russell King - ARM Linux wrote:

> Ack?
> 
> On Sun, Nov 06, 2011 at 05:44:42PM +0000, Russell King - ARM Linux wrote:
> > Hook these platforms restart code into the arm_pm_restart hook rather
> > than using arch_reset().
> > 
> > In doing so, we split out the n2100 platform specific restart handler
> > into the n2100 platform file.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

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

* [PATCH 15/41] ARM: restart: iop13xx: use new restart hook
  2011-11-17 17:29   ` Russell King - ARM Linux
@ 2011-11-24  6:45     ` Lennert Buytenhek
  0 siblings, 0 replies; 162+ messages in thread
From: Lennert Buytenhek @ 2011-11-24  6:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:29:19PM +0000, Russell King - ARM Linux wrote:

> Ack?
> 
> On Sun, Nov 06, 2011 at 05:45:02PM +0000, Russell King - ARM Linux wrote:
> > Hook these platforms restart code into the new restart hook rather
> > than using arch_reset().

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

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

* [PATCH 16/41] ARM: restart: ixp2000: use new restart hook
  2011-11-17 17:29   ` Russell King - ARM Linux
@ 2011-11-24  6:45     ` Lennert Buytenhek
  0 siblings, 0 replies; 162+ messages in thread
From: Lennert Buytenhek @ 2011-11-24  6:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:29:40PM +0000, Russell King - ARM Linux wrote:

> Ack?
> 
> On Sun, Nov 06, 2011 at 05:45:23PM +0000, Russell King - ARM Linux wrote:
> > Hook these platforms restart code into the new restart hook rather
> > than using arch_reset().
> > 
> > In doing so, we split out the IXDP2401, IXDP2801 and IXDP2805 platform
> > specific restart code into their own platform files.

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

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

* [PATCH 17/41] ARM: restart: ixp23xx: use new restart hook
  2011-11-17 17:30   ` Russell King - ARM Linux
@ 2011-11-24  6:46     ` Lennert Buytenhek
  0 siblings, 0 replies; 162+ messages in thread
From: Lennert Buytenhek @ 2011-11-24  6:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:30:03PM +0000, Russell King - ARM Linux wrote:

> Ack?
> 
> On Sun, Nov 06, 2011 at 05:45:43PM +0000, Russell King - ARM Linux wrote:
> > Hook these platforms restart code into the new restart hook rather
> > than using arch_reset().
> > 
> > In doing so, we split out the ixdp2351 restart code into its own
> > platform file.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

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

* Re: [PATCH 6/7] ARM: restart: only perform setup for restart when
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-11-24  6:47       ` Lennert Buytenhek
  -1 siblings, 0 replies; 162+ messages in thread
From: Lennert Buytenhek @ 2011-11-24  6:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:42:47PM +0000, Russell King - ARM Linux wrote:

> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)
> 
> On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > We only need to set the system up for a soft-restart if we're going to
> > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > does the setup and final call for this, and make platforms use it.
> > Eliminate the call to setup_restart() from the default handler.
> > 
> > This means that platforms arch_reset() function is no longer called with
> > the page tables prepared for a soft-restart, and caches will still be
> > enabled.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-11-24  6:47       ` Lennert Buytenhek
  0 siblings, 0 replies; 162+ messages in thread
From: Lennert Buytenhek @ 2011-11-24  6:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 17, 2011 at 05:42:47PM +0000, Russell King - ARM Linux wrote:

> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)
> 
> On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > We only need to set the system up for a soft-restart if we're going to
> > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > does the setup and final call for this, and make platforms use it.
> > Eliminate the call to setup_restart() from the default handler.
> > 
> > This means that platforms arch_reset() function is no longer called with
> > the page tables prepared for a soft-restart, and caches will still be
> > enabled.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

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

* [PATCH 06/41] ARM: restart: cns3xxx: use new restart hook
  2011-11-06 17:41 ` [PATCH 06/41] ARM: restart: cns3xxx: " Russell King - ARM Linux
@ 2011-11-24 20:30   ` Russell King - ARM Linux
  2011-11-24 21:00     ` Anton Vorontsov
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-24 20:30 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:41:59PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-cns3xxx/cns3420vb.c           |    1 +
>  arch/arm/mach-cns3xxx/core.h                |    1 +
>  arch/arm/mach-cns3xxx/include/mach/system.h |    5 +++--
>  arch/arm/mach-cns3xxx/pm.c                  |    2 +-
>  4 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
> index 55f7b4b..9b8c3d5 100644
> --- a/arch/arm/mach-cns3xxx/cns3420vb.c
> +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
> @@ -202,4 +202,5 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board")
>  	.init_irq	= cns3xxx_init_irq,
>  	.timer		= &cns3xxx_timer,
>  	.init_machine	= cns3420_init,
> +	.restart	= cns3xxx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-cns3xxx/core.h b/arch/arm/mach-cns3xxx/core.h
> index fcd2253..4894b8c 100644
> --- a/arch/arm/mach-cns3xxx/core.h
> +++ b/arch/arm/mach-cns3xxx/core.h
> @@ -22,5 +22,6 @@ static inline void cns3xxx_l2x0_init(void) {}
>  void __init cns3xxx_map_io(void);
>  void __init cns3xxx_init_irq(void);
>  void cns3xxx_power_off(void);
> +void cns3xxx_restart(char, const char *);
>  
>  #endif /* __CNS3XXX_CORE_H */
> diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h
> index 4f16c9b..f92540d 100644
> --- a/arch/arm/mach-cns3xxx/include/mach/system.h
> +++ b/arch/arm/mach-cns3xxx/include/mach/system.h
> @@ -11,7 +11,6 @@
>  #ifndef __MACH_SYSTEM_H
>  #define __MACH_SYSTEM_H
>  
> -#include <linux/io.h>
>  #include <asm/proc-fns.h>
>  
>  static inline void arch_idle(void)
> @@ -23,6 +22,8 @@ static inline void arch_idle(void)
>  	cpu_do_idle();
>  }
>  
> -void arch_reset(char mode, const char *cmd);
> +static inline void arch_reset(char mode, const char *cmd)
> +{
> +}
>  
>  #endif
> diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c
> index 0c04678..5136c4c 100644
> --- a/arch/arm/mach-cns3xxx/pm.c
> +++ b/arch/arm/mach-cns3xxx/pm.c
> @@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block)
>  }
>  EXPORT_SYMBOL(cns3xxx_pwr_soft_rst);
>  
> -void arch_reset(char mode, const char *cmd)
> +void cns3xxx_restart(char mode, const char *cmd)
>  {
>  	/*
>  	 * To reset, we hit the on-board reset register
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 23/41] ARM: restart: mxc: use new restart hook
  2011-11-06 17:47 ` [PATCH 23/41] ARM: restart: mxc: " Russell King - ARM Linux
@ 2011-11-24 20:31   ` Russell King - ARM Linux
  2011-11-25 12:06     ` Sascha Hauer
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-24 20:31 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:47:46PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-imx/mach-apf9328.c            |    1 +
>  arch/arm/mach-imx/mach-armadillo5x0.c       |    1 +
>  arch/arm/mach-imx/mach-bug.c                |    1 +
>  arch/arm/mach-imx/mach-cpuimx27.c           |    1 +
>  arch/arm/mach-imx/mach-cpuimx35.c           |    1 +
>  arch/arm/mach-imx/mach-eukrea_cpuimx25.c    |    1 +
>  arch/arm/mach-imx/mach-imx27_visstrim_m10.c |    1 +
>  arch/arm/mach-imx/mach-imx27ipcam.c         |    1 +
>  arch/arm/mach-imx/mach-imx27lite.c          |    1 +
>  arch/arm/mach-imx/mach-imx6q.c              |    1 +
>  arch/arm/mach-imx/mach-kzm_arm11_01.c       |    1 +
>  arch/arm/mach-imx/mach-mx1ads.c             |    2 ++
>  arch/arm/mach-imx/mach-mx21ads.c            |    1 +
>  arch/arm/mach-imx/mach-mx25_3ds.c           |    1 +
>  arch/arm/mach-imx/mach-mx27_3ds.c           |    1 +
>  arch/arm/mach-imx/mach-mx27ads.c            |    1 +
>  arch/arm/mach-imx/mach-mx31_3ds.c           |    1 +
>  arch/arm/mach-imx/mach-mx31ads.c            |    1 +
>  arch/arm/mach-imx/mach-mx31lilly.c          |    1 +
>  arch/arm/mach-imx/mach-mx31lite.c           |    1 +
>  arch/arm/mach-imx/mach-mx31moboard.c        |    1 +
>  arch/arm/mach-imx/mach-mx35_3ds.c           |    1 +
>  arch/arm/mach-imx/mach-mxt_td60.c           |    1 +
>  arch/arm/mach-imx/mach-pca100.c             |    1 +
>  arch/arm/mach-imx/mach-pcm037.c             |    1 +
>  arch/arm/mach-imx/mach-pcm038.c             |    1 +
>  arch/arm/mach-imx/mach-pcm043.c             |    1 +
>  arch/arm/mach-imx/mach-qong.c               |    1 +
>  arch/arm/mach-imx/mach-scb9328.c            |    1 +
>  arch/arm/mach-imx/mach-vpr200.c             |    1 +
>  arch/arm/mach-mx5/board-cpuimx51.c          |    1 +
>  arch/arm/mach-mx5/board-cpuimx51sd.c        |    1 +
>  arch/arm/mach-mx5/board-mx50_rdp.c          |    1 +
>  arch/arm/mach-mx5/board-mx51_3ds.c          |    1 +
>  arch/arm/mach-mx5/board-mx51_babbage.c      |    1 +
>  arch/arm/mach-mx5/board-mx51_efikamx.c      |    3 ++-
>  arch/arm/mach-mx5/board-mx51_efikasb.c      |    1 +
>  arch/arm/mach-mx5/board-mx53_ard.c          |    1 +
>  arch/arm/mach-mx5/board-mx53_evk.c          |    1 +
>  arch/arm/mach-mx5/board-mx53_loco.c         |    1 +
>  arch/arm/mach-mx5/board-mx53_smd.c          |    1 +
>  arch/arm/mach-mx5/imx51-dt.c                |    1 +
>  arch/arm/mach-mx5/imx53-dt.c                |    1 +
>  arch/arm/plat-mxc/include/mach/common.h     |    2 +-
>  arch/arm/plat-mxc/include/mach/system.h     |    4 +++-
>  arch/arm/plat-mxc/system.c                  |    9 +--------
>  46 files changed, 50 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c
> index 1e486e6..146a4f0 100644
> --- a/arch/arm/mach-imx/mach-apf9328.c
> +++ b/arch/arm/mach-imx/mach-apf9328.c
> @@ -139,4 +139,5 @@ MACHINE_START(APF9328, "Armadeus APF9328")
>  	.handle_irq   = imx1_handle_irq,
>  	.timer        = &apf9328_timer,
>  	.init_machine = apf9328_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
> index c9a9cf6..e4f426a 100644
> --- a/arch/arm/mach-imx/mach-armadillo5x0.c
> +++ b/arch/arm/mach-imx/mach-armadillo5x0.c
> @@ -561,4 +561,5 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &armadillo5x0_timer,
>  	.init_machine = armadillo5x0_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c
> index 313f62d..9a98977 100644
> --- a/arch/arm/mach-imx/mach-bug.c
> +++ b/arch/arm/mach-imx/mach-bug.c
> @@ -65,4 +65,5 @@ MACHINE_START(BUG, "BugLabs BUGBase")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &bug_timer,
>  	.init_machine = bug_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
> index edb3730..d085aea 100644
> --- a/arch/arm/mach-imx/mach-cpuimx27.c
> +++ b/arch/arm/mach-imx/mach-cpuimx27.c
> @@ -318,4 +318,5 @@ MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
>  	.handle_irq = imx27_handle_irq,
>  	.timer = &eukrea_cpuimx27_timer,
>  	.init_machine = eukrea_cpuimx27_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
> index 66af2e8..012e120 100644
> --- a/arch/arm/mach-imx/mach-cpuimx35.c
> +++ b/arch/arm/mach-imx/mach-cpuimx35.c
> @@ -201,4 +201,5 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35")
>  	.handle_irq = imx35_handle_irq,
>  	.timer = &eukrea_cpuimx35_timer,
>  	.init_machine = eukrea_cpuimx35_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
> index ab8fbcc..76a97a5 100644
> --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
> +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
> @@ -170,4 +170,5 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
>  	.handle_irq = imx25_handle_irq,
>  	.timer = &eukrea_cpuimx25_timer,
>  	.init_machine = eukrea_cpuimx25_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
> index 38eb9e4..c2766ae 100644
> --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
> +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
> @@ -282,4 +282,5 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
>  	.handle_irq = imx27_handle_irq,
>  	.timer = &visstrim_m10_timer,
>  	.init_machine = visstrim_m10_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c
> index 7052155..c9d350c 100644
> --- a/arch/arm/mach-imx/mach-imx27ipcam.c
> +++ b/arch/arm/mach-imx/mach-imx27ipcam.c
> @@ -78,4 +78,5 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
>  	.handle_irq = imx27_handle_irq,
>  	.timer = &mx27ipcam_timer,
>  	.init_machine = mx27ipcam_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c
> index 8d6a635..1f45b91 100644
> --- a/arch/arm/mach-imx/mach-imx27lite.c
> +++ b/arch/arm/mach-imx/mach-imx27lite.c
> @@ -84,4 +84,5 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
>  	.handle_irq = imx27_handle_irq,
>  	.timer = &mx27lite_timer,
>  	.init_machine = mx27lite_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
> index 8bf5fa3..dc8b6e2 100644
> --- a/arch/arm/mach-imx/mach-imx6q.c
> +++ b/arch/arm/mach-imx/mach-imx6q.c
> @@ -81,4 +81,5 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)")
>  	.timer		= &imx6q_timer,
>  	.init_machine	= imx6q_init_machine,
>  	.dt_compat	= imx6q_dt_compat,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c
> index 5f37f89..fc78e80 100644
> --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c
> +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c
> @@ -279,4 +279,5 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &kzm_timer,
>  	.init_machine = kzm_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
> index fc49785..9704608 100644
> --- a/arch/arm/mach-imx/mach-mx1ads.c
> +++ b/arch/arm/mach-imx/mach-mx1ads.c
> @@ -147,6 +147,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
>  	.handle_irq = imx1_handle_irq,
>  	.timer = &mx1ads_timer,
>  	.init_machine = mx1ads_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
>  
>  MACHINE_START(MXLADS, "Freescale MXLADS")
> @@ -157,4 +158,5 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
>  	.handle_irq = imx1_handle_irq,
>  	.timer = &mx1ads_timer,
>  	.init_machine = mx1ads_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c
> index 25f8402..8d9f955 100644
> --- a/arch/arm/mach-imx/mach-mx21ads.c
> +++ b/arch/arm/mach-imx/mach-mx21ads.c
> @@ -312,4 +312,5 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
>  	.handle_irq = imx21_handle_irq,
>  	.timer = &mx21ads_timer,
>  	.init_machine = mx21ads_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
> index 88dccf1..f267342 100644
> --- a/arch/arm/mach-imx/mach-mx25_3ds.c
> +++ b/arch/arm/mach-imx/mach-mx25_3ds.c
> @@ -270,4 +270,5 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
>  	.handle_irq = imx25_handle_irq,
>  	.timer = &mx25pdk_timer,
>  	.init_machine = mx25pdk_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
> index ba232d7..18f3581 100644
> --- a/arch/arm/mach-imx/mach-mx27_3ds.c
> +++ b/arch/arm/mach-imx/mach-mx27_3ds.c
> @@ -425,4 +425,5 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK")
>  	.handle_irq = imx27_handle_irq,
>  	.timer = &mx27pdk_timer,
>  	.init_machine = mx27pdk_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c
> index 74dd573..0228d2e 100644
> --- a/arch/arm/mach-imx/mach-mx27ads.c
> +++ b/arch/arm/mach-imx/mach-mx27ads.c
> @@ -351,4 +351,5 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
>  	.handle_irq = imx27_handle_irq,
>  	.timer = &mx27ads_timer,
>  	.init_machine = mx27ads_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c
> index b8c54b8..2b565c3 100644
> --- a/arch/arm/mach-imx/mach-mx31_3ds.c
> +++ b/arch/arm/mach-imx/mach-mx31_3ds.c
> @@ -770,4 +770,5 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
>  	.timer = &mx31_3ds_timer,
>  	.init_machine = mx31_3ds_init,
>  	.reserve = mx31_3ds_reserve,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
> index 9cc1a49..4917aab 100644
> --- a/arch/arm/mach-imx/mach-mx31ads.c
> +++ b/arch/arm/mach-imx/mach-mx31ads.c
> @@ -542,4 +542,5 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &mx31ads_timer,
>  	.init_machine = mx31ads_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c
> index 5defd8e..1e0db94 100644
> --- a/arch/arm/mach-imx/mach-mx31lilly.c
> +++ b/arch/arm/mach-imx/mach-mx31lilly.c
> @@ -302,4 +302,5 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &mx31lilly_timer,
>  	.init_machine = mx31lilly_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
> index 05f1c71..67e538d 100644
> --- a/arch/arm/mach-imx/mach-mx31lite.c
> +++ b/arch/arm/mach-imx/mach-mx31lite.c
> @@ -286,4 +286,5 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &mx31lite_timer,
>  	.init_machine = mx31lite_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
> index 07034f4..f1e1b7d 100644
> --- a/arch/arm/mach-imx/mach-mx31moboard.c
> +++ b/arch/arm/mach-imx/mach-mx31moboard.c
> @@ -599,4 +599,5 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &mx31moboard_timer,
>  	.init_machine = mx31moboard_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
> index 7a46202..0af6c9c 100644
> --- a/arch/arm/mach-imx/mach-mx35_3ds.c
> +++ b/arch/arm/mach-imx/mach-mx35_3ds.c
> @@ -224,4 +224,5 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
>  	.handle_irq = imx35_handle_irq,
>  	.timer = &mx35pdk_timer,
>  	.init_machine = mx35_3ds_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c
> index 125c196..8b3d3f0 100644
> --- a/arch/arm/mach-imx/mach-mxt_td60.c
> +++ b/arch/arm/mach-imx/mach-mxt_td60.c
> @@ -274,4 +274,5 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
>  	.handle_irq = imx27_handle_irq,
>  	.timer = &mxt_td60_timer,
>  	.init_machine = mxt_td60_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
> index 26072f4..d3b9c6b 100644
> --- a/arch/arm/mach-imx/mach-pca100.c
> +++ b/arch/arm/mach-imx/mach-pca100.c
> @@ -442,4 +442,5 @@ MACHINE_START(PCA100, "phyCARD-i.MX27")
>  	.handle_irq = imx27_handle_irq,
>  	.init_machine = pca100_init,
>  	.timer = &pca100_timer,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
> index efd6b53..d7e1516 100644
> --- a/arch/arm/mach-imx/mach-pcm037.c
> +++ b/arch/arm/mach-imx/mach-pcm037.c
> @@ -696,4 +696,5 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &pcm037_timer,
>  	.init_machine = pcm037_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
> index a17e9c7..16f126d 100644
> --- a/arch/arm/mach-imx/mach-pcm038.c
> +++ b/arch/arm/mach-imx/mach-pcm038.c
> @@ -357,4 +357,5 @@ MACHINE_START(PCM038, "phyCORE-i.MX27")
>  	.handle_irq = imx27_handle_irq,
>  	.timer = &pcm038_timer,
>  	.init_machine = pcm038_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
> index 7366c2a..06dc106 100644
> --- a/arch/arm/mach-imx/mach-pcm043.c
> +++ b/arch/arm/mach-imx/mach-pcm043.c
> @@ -425,4 +425,5 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
>  	.handle_irq = imx35_handle_irq,
>  	.timer = &pcm043_timer,
>  	.init_machine = pcm043_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c
> index 4ff5faf..2606210 100644
> --- a/arch/arm/mach-imx/mach-qong.c
> +++ b/arch/arm/mach-imx/mach-qong.c
> @@ -273,4 +273,5 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
>  	.handle_irq = imx31_handle_irq,
>  	.timer = &qong_timer,
>  	.init_machine = qong_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c
> index bb6e5b2..cb9ceae 100644
> --- a/arch/arm/mach-imx/mach-scb9328.c
> +++ b/arch/arm/mach-imx/mach-scb9328.c
> @@ -144,4 +144,5 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
>  	.handle_irq = imx1_handle_irq,
>  	.timer = &scb9328_timer,
>  	.init_machine = scb9328_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
> index 6909245..033257e 100644
> --- a/arch/arm/mach-imx/mach-vpr200.c
> +++ b/arch/arm/mach-imx/mach-vpr200.c
> @@ -322,4 +322,5 @@ MACHINE_START(VPR200, "VPR200")
>  	.handle_irq = imx35_handle_irq,
>  	.timer = &vpr200_timer,
>  	.init_machine = vpr200_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
> index 1fc1103..944025d 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51.c
> @@ -297,4 +297,5 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
>  	.handle_irq = imx51_handle_irq,
>  	.timer = &mxc_timer,
>  	.init_machine = eukrea_cpuimx51_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
> index 52a11c1..9fbe923 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51sd.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
> @@ -335,4 +335,5 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
>  	.handle_irq = imx51_handle_irq,
>  	.timer = &mxc_timer,
>  	.init_machine = eukrea_cpuimx51sd_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
> index fc3621d..42b66e8 100644
> --- a/arch/arm/mach-mx5/board-mx50_rdp.c
> +++ b/arch/arm/mach-mx5/board-mx50_rdp.c
> @@ -222,4 +222,5 @@ MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform")
>  	.handle_irq = imx50_handle_irq,
>  	.timer = &mx50_rdp_timer,
>  	.init_machine = mx50_rdp_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
> index 0578390..83eab41 100644
> --- a/arch/arm/mach-mx5/board-mx51_3ds.c
> +++ b/arch/arm/mach-mx5/board-mx51_3ds.c
> @@ -175,4 +175,5 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
>  	.handle_irq = imx51_handle_irq,
>  	.timer = &mx51_3ds_timer,
>  	.init_machine = mx51_3ds_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
> index 5c83760..68cdfda 100644
> --- a/arch/arm/mach-mx5/board-mx51_babbage.c
> +++ b/arch/arm/mach-mx5/board-mx51_babbage.c
> @@ -426,4 +426,5 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
>  	.handle_irq = imx51_handle_irq,
>  	.timer = &mx51_babbage_timer,
>  	.init_machine = mx51_babbage_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
> index a9e4866..3a5ed2d 100644
> --- a/arch/arm/mach-mx5/board-mx51_efikamx.c
> +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
> @@ -182,7 +182,7 @@ static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initcon
>  	.nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey),
>  };
>  
> -void mx51_efikamx_reset(void)
> +static void mx51_efikamx_restart(char mode, const char *cmd)
>  {
>  	if (system_rev == 0x11)
>  		gpio_direction_output(EFIKAMX_RESET1_1, 0);
> @@ -292,4 +292,5 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
>  	.handle_irq = imx51_handle_irq,
>  	.timer = &mx51_efikamx_timer,
>  	.init_machine = mx51_efikamx_init,
> +	.restart = mx51_efikamx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c
> index 38c4a3e..ea5f65b 100644
> --- a/arch/arm/mach-mx5/board-mx51_efikasb.c
> +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c
> @@ -287,4 +287,5 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
>  	.handle_irq = imx51_handle_irq,
>  	.init_machine =  efikasb_board_init,
>  	.timer = &mx51_efikasb_timer,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c
> index 0d7f0ff..5f224f1 100644
> --- a/arch/arm/mach-mx5/board-mx53_ard.c
> +++ b/arch/arm/mach-mx5/board-mx53_ard.c
> @@ -257,4 +257,5 @@ MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board")
>  	.handle_irq = imx53_handle_irq,
>  	.timer = &mx53_ard_timer,
>  	.init_machine = mx53_ard_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
> index 6bea31a..c2d27cf 100644
> --- a/arch/arm/mach-mx5/board-mx53_evk.c
> +++ b/arch/arm/mach-mx5/board-mx53_evk.c
> @@ -175,4 +175,5 @@ MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board")
>  	.handle_irq = imx53_handle_irq,
>  	.timer = &mx53_evk_timer,
>  	.init_machine = mx53_evk_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c
> index 7678f77..62f4aa3 100644
> --- a/arch/arm/mach-mx5/board-mx53_loco.c
> +++ b/arch/arm/mach-mx5/board-mx53_loco.c
> @@ -317,4 +317,5 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board")
>  	.handle_irq = imx53_handle_irq,
>  	.timer = &mx53_loco_timer,
>  	.init_machine = mx53_loco_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c
> index 59c0845..2a78e62 100644
> --- a/arch/arm/mach-mx5/board-mx53_smd.c
> +++ b/arch/arm/mach-mx5/board-mx53_smd.c
> @@ -164,4 +164,5 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board")
>  	.handle_irq = imx53_handle_irq,
>  	.timer = &mx53_smd_timer,
>  	.init_machine = mx53_smd_board_init,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/imx51-dt.c b/arch/arm/mach-mx5/imx51-dt.c
> index ccc6158..edf2c4c 100644
> --- a/arch/arm/mach-mx5/imx51-dt.c
> +++ b/arch/arm/mach-mx5/imx51-dt.c
> @@ -113,4 +113,5 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
>  	.timer		= &imx51_timer,
>  	.init_machine	= imx51_dt_init,
>  	.dt_compat	= imx51_dt_board_compat,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mx5/imx53-dt.c b/arch/arm/mach-mx5/imx53-dt.c
> index ccaa0b8..106070a 100644
> --- a/arch/arm/mach-mx5/imx53-dt.c
> +++ b/arch/arm/mach-mx5/imx53-dt.c
> @@ -123,4 +123,5 @@ DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
>  	.timer		= &imx53_timer,
>  	.init_machine	= imx53_dt_init,
>  	.dt_compat	= imx53_dt_board_compat,
> +	.restart	= mxc_restart,
>  MACHINE_END
> diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
> index 83b745a..4ee98d5 100644
> --- a/arch/arm/plat-mxc/include/mach/common.h
> +++ b/arch/arm/plat-mxc/include/mach/common.h
> @@ -71,8 +71,8 @@ extern int mx6q_clocks_init(void);
>  extern struct platform_device *mxc_register_gpio(char *name, int id,
>  	resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
>  extern void mxc_set_cpu_type(unsigned int type);
> +extern void mxc_restart(char, const char *);
>  extern void mxc_arch_reset_init(void __iomem *);
> -extern void mx51_efikamx_reset(void);
>  extern int mx53_revision(void);
>  extern int mx53_display_revision(void);
>  
> diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
> index cf88b35..22b8911 100644
> --- a/arch/arm/plat-mxc/include/mach/system.h
> +++ b/arch/arm/plat-mxc/include/mach/system.h
> @@ -27,6 +27,8 @@ static inline void arch_idle(void)
>  		cpu_do_idle();
>  }
>  
> -void arch_reset(char mode, const char *cmd);
> +static inline void arch_reset(char mode, const char *cmd)
> +{
> +}
>  
>  #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
> diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> index b1cfc6a..80de9e2 100644
> --- a/arch/arm/plat-mxc/system.c
> +++ b/arch/arm/plat-mxc/system.c
> @@ -36,17 +36,10 @@ static void __iomem *wdog_base;
>  /*
>   * Reset the system. It is called by machine_restart().
>   */
> -void arch_reset(char mode, const char *cmd)
> +void mxc_restart(char mode, const char *cmd)
>  {
>  	unsigned int wcr_enable;
>  
> -#ifdef CONFIG_MACH_MX51_EFIKAMX
> -	if (machine_is_mx51_efikamx()) {
> -		mx51_efikamx_reset();
> -		return;
> -	}
> -#endif
> -
>  	if (cpu_is_mx1()) {
>  		wcr_enable = (1 << 0);
>  	} else {
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 33/41] ARM: restart: spear: use new restart hook
  2011-11-06 17:51 ` [PATCH 33/41] ARM: restart: spear: " Russell King - ARM Linux
@ 2011-11-24 20:32   ` Russell King - ARM Linux
  2011-11-25  3:35     ` Viresh Kumar
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-24 20:32 UTC (permalink / raw)
  To: linux-arm-kernel

Ack?

On Sun, Nov 06, 2011 at 05:51:09PM +0000, Russell King - ARM Linux wrote:
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/mach-spear3xx/include/mach/generic.h |    2 +
>  arch/arm/mach-spear3xx/spear300_evb.c         |    1 +
>  arch/arm/mach-spear3xx/spear310_evb.c         |    1 +
>  arch/arm/mach-spear3xx/spear320_evb.c         |    1 +
>  arch/arm/mach-spear6xx/include/mach/generic.h |    2 +
>  arch/arm/mach-spear6xx/spear600_evb.c         |    1 +
>  arch/arm/plat-spear/Makefile                  |    2 +-
>  arch/arm/plat-spear/include/plat/system.h     |   11 ----------
>  arch/arm/plat-spear/restart.c                 |   27 +++++++++++++++++++++++++
>  9 files changed, 36 insertions(+), 12 deletions(-)
>  create mode 100644 arch/arm/plat-spear/restart.c
> 
> diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
> index b8f31c3..14276e5 100644
> --- a/arch/arm/mach-spear3xx/include/mach/generic.h
> +++ b/arch/arm/mach-spear3xx/include/mach/generic.h
> @@ -42,6 +42,8 @@ void __init spear3xx_map_io(void);
>  void __init spear3xx_init_irq(void);
>  void __init spear3xx_init(void);
>  
> +void spear_restart(char, const char *);
> +
>  /* pad mux declarations */
>  #define PMX_FIRDA_MASK		(1 << 14)
>  #define PMX_I2C_MASK		(1 << 13)
> diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c
> index a5ff98e..8b429f0 100644
> --- a/arch/arm/mach-spear3xx/spear300_evb.c
> +++ b/arch/arm/mach-spear3xx/spear300_evb.c
> @@ -69,4 +69,5 @@ MACHINE_START(SPEAR300, "ST-SPEAR300-EVB")
>  	.init_irq	=	spear3xx_init_irq,
>  	.timer		=	&spear3xx_timer,
>  	.init_machine	=	spear300_evb_init,
> +	.restart	=	spear_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c
> index 45d180d..a11d6ea 100644
> --- a/arch/arm/mach-spear3xx/spear310_evb.c
> +++ b/arch/arm/mach-spear3xx/spear310_evb.c
> @@ -75,4 +75,5 @@ MACHINE_START(SPEAR310, "ST-SPEAR310-EVB")
>  	.init_irq	=	spear3xx_init_irq,
>  	.timer		=	&spear3xx_timer,
>  	.init_machine	=	spear310_evb_init,
> +	.restart	=	spear_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c
> index 2287984..4239a70 100644
> --- a/arch/arm/mach-spear3xx/spear320_evb.c
> +++ b/arch/arm/mach-spear3xx/spear320_evb.c
> @@ -73,4 +73,5 @@ MACHINE_START(SPEAR320, "ST-SPEAR320-EVB")
>  	.init_irq	=	spear3xx_init_irq,
>  	.timer		=	&spear3xx_timer,
>  	.init_machine	=	spear320_evb_init,
> +	.restart	=	spear_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h
> index 183f023..116b993 100644
> --- a/arch/arm/mach-spear6xx/include/mach/generic.h
> +++ b/arch/arm/mach-spear6xx/include/mach/generic.h
> @@ -41,6 +41,8 @@ void __init spear6xx_init(void);
>  void __init spear600_init(void);
>  void __init spear6xx_clk_init(void);
>  
> +void spear_restart(char, const char *);
> +
>  /* Add spear600 machine device structure declarations here */
>  
>  #endif /* __MACH_GENERIC_H */
> diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c
> index 8238fe3..0a16559 100644
> --- a/arch/arm/mach-spear6xx/spear600_evb.c
> +++ b/arch/arm/mach-spear6xx/spear600_evb.c
> @@ -48,4 +48,5 @@ MACHINE_START(SPEAR600, "ST-SPEAR600-EVB")
>  	.init_irq	=	spear6xx_init_irq,
>  	.timer		=	&spear6xx_timer,
>  	.init_machine	=	spear600_evb_init,
> +	.restart	=	spear_restart,
>  MACHINE_END
> diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile
> index b4f340b..e0f2e5b 100644
> --- a/arch/arm/plat-spear/Makefile
> +++ b/arch/arm/plat-spear/Makefile
> @@ -3,6 +3,6 @@
>  #
>  
>  # Common support
> -obj-y	:= clock.o time.o
> +obj-y	:= clock.o restart.o time.o
>  
>  obj-$(CONFIG_ARCH_SPEAR3XX)	+= shirq.o padmux.o
> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
> index 1171f22..4a0d125 100644
> --- a/arch/arm/plat-spear/include/plat/system.h
> +++ b/arch/arm/plat-spear/include/plat/system.h
> @@ -14,10 +14,6 @@
>  #ifndef __PLAT_SYSTEM_H
>  #define __PLAT_SYSTEM_H
>  
> -#include <linux/io.h>
> -#include <asm/hardware/sp810.h>
> -#include <mach/hardware.h>
> -
>  static inline void arch_idle(void)
>  {
>  	/*
> @@ -29,13 +25,6 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	if (mode == 's') {
> -		/* software reset, Jump into ROM at address 0 */
> -		soft_restart(0);
> -	} else {
> -		/* hardware reset, Use on-chip reset capability */
> -		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> -	}
>  }
>  
>  #endif /* __PLAT_SYSTEM_H */
> diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c
> new file mode 100644
> index 0000000..2b4e3d8
> --- /dev/null
> +++ b/arch/arm/plat-spear/restart.c
> @@ -0,0 +1,27 @@
> +/*
> + * arch/arm/plat-spear/restart.c
> + *
> + * SPEAr platform specific restart functions
> + *
> + * Copyright (C) 2009 ST Microelectronics
> + * Viresh Kumar<viresh.kumar@st.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +#include <linux/io.h>
> +#include <asm/hardware/sp810.h>
> +#include <mach/hardware.h>
> +#include <mach/generic.h>
> +
> +void spear_restart(char mode, const char *cmd)
> +{
> +	if (mode == 's') {
> +		/* software reset, Jump into ROM at address 0 */
> +		soft_restart(0);
> +	} else {
> +		/* hardware reset, Use on-chip reset capability */
> +		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> +	}
> +}
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 06/41] ARM: restart: cns3xxx: use new restart hook
  2011-11-24 20:30   ` Russell King - ARM Linux
@ 2011-11-24 21:00     ` Anton Vorontsov
  0 siblings, 0 replies; 162+ messages in thread
From: Anton Vorontsov @ 2011-11-24 21:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 24, 2011 at 08:30:38PM +0000, Russell King - ARM Linux wrote:
> Ack?

Sure, except that pm.c now needs to include core.h (or the prototype
has to be added to pm.h). Otherwise I'm getting the following warning:

    CHECK   arch/arm/mach-cns3xxx/pm.c
  arch/arm/mach-cns3xxx/pm.c:92:6: warning: symbol 'cns3xxx_restart' was not declared. Should it be static?

Following hunk helps:

diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c
index 5136c4c..335494c 100644
--- a/arch/arm/mach-cns3xxx/pm.c
+++ b/arch/arm/mach-cns3xxx/pm.c
@@ -14,6 +14,7 @@
 #include <mach/system.h>
 #include <mach/cns3xxx.h>
 #include <mach/pm.h>
+#include "core.h"
 
 void cns3xxx_pwr_clk_en(unsigned int block)
 {


Other than that,

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>

Thanks!

-- 
Anton Vorontsov
Email: cbouatmailru at gmail.com

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

* [PATCH 22/41] ARM: restart: mv78xx0: use new restart hook
  2011-11-06 17:47 ` [PATCH 22/41] ARM: restart: mv78xx0: " Russell King - ARM Linux
@ 2011-11-24 22:02   ` Nicolas Pitre
  0 siblings, 0 replies; 162+ messages in thread
From: Nicolas Pitre @ 2011-11-24 22:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 6 Nov 2011, Russell King - ARM Linux wrote:

> Hook these platforms restart code into the new restart hook rather than
> using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: ?Nicolas pitre <nico@linaro.org>

(missed the non Kirkwood ones before)


> ---
>  arch/arm/mach-mv78xx0/buffalo-wxl-setup.c   |    1 +
>  arch/arm/mach-mv78xx0/common.c              |   16 ++++++++++++++++
>  arch/arm/mach-mv78xx0/common.h              |    1 +
>  arch/arm/mach-mv78xx0/db78x00-bp-setup.c    |    1 +
>  arch/arm/mach-mv78xx0/include/mach/system.h |   14 --------------
>  arch/arm/mach-mv78xx0/rd78x00-masa-setup.c  |    1 +
>  6 files changed, 20 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
> index 0e94268..ee74ec9 100644
> --- a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
> +++ b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
> @@ -151,4 +151,5 @@ MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL")
>  	.init_early	= mv78xx0_init_early,
>  	.init_irq	= mv78xx0_init_irq,
>  	.timer		= &mv78xx0_timer,
> +	.restart	= mv78xx0_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
> index 23d3980..5b9632b 100644
> --- a/arch/arm/mach-mv78xx0/common.c
> +++ b/arch/arm/mach-mv78xx0/common.c
> @@ -401,3 +401,19 @@ void __init mv78xx0_init(void)
>  	feroceon_l2_init(is_l2_writethrough());
>  #endif
>  }
> +
> +void mv78xx0_restart(char mode, const char *cmd)
> +{
> +	/*
> +	 * Enable soft reset to assert RSTOUTn.
> +	 */
> +	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
> +
> +	/*
> +	 * Assert soft reset.
> +	 */
> +	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
> +
> +	while (1)
> +		;
> +}
> diff --git a/arch/arm/mach-mv78xx0/common.h b/arch/arm/mach-mv78xx0/common.h
> index 632e63d..07d5f8f 100644
> --- a/arch/arm/mach-mv78xx0/common.h
> +++ b/arch/arm/mach-mv78xx0/common.h
> @@ -46,6 +46,7 @@ void mv78xx0_uart1_init(void);
>  void mv78xx0_uart2_init(void);
>  void mv78xx0_uart3_init(void);
>  void mv78xx0_i2c_init(void);
> +void mv78xx0_restart(char, const char *);
>  
>  extern struct sys_timer mv78xx0_timer;
>  
> diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
> index 50b85ae..4d6d48b 100644
> --- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
> +++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
> @@ -99,4 +99,5 @@ MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
>  	.init_early	= mv78xx0_init_early,
>  	.init_irq	= mv78xx0_init_irq,
>  	.timer		= &mv78xx0_timer,
> +	.restart	= mv78xx0_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-mv78xx0/include/mach/system.h b/arch/arm/mach-mv78xx0/include/mach/system.h
> index 66e7ce4..1ae3585 100644
> --- a/arch/arm/mach-mv78xx0/include/mach/system.h
> +++ b/arch/arm/mach-mv78xx0/include/mach/system.h
> @@ -9,8 +9,6 @@
>  #ifndef __ASM_ARCH_SYSTEM_H
>  #define __ASM_ARCH_SYSTEM_H
>  
> -#include <mach/bridge-regs.h>
> -
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
> @@ -18,18 +16,6 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/*
> -	 * Enable soft reset to assert RSTOUTn.
> -	 */
> -	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
> -
> -	/*
> -	 * Assert soft reset.
> -	 */
> -	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
> -
> -	while (1)
> -		;
>  }
>  
>  
> diff --git a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
> index e85222e..9a88270 100644
> --- a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
> +++ b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
> @@ -84,4 +84,5 @@ MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board")
>  	.init_early	= mv78xx0_init_early,
>  	.init_irq	= mv78xx0_init_irq,
>  	.timer		= &mv78xx0_timer,
> +	.restart	= mv78xx0_restart,
>  MACHINE_END
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH 25/41] ARM: restart: orion5x: use new restart hook
  2011-11-06 17:48 ` [PATCH 25/41] ARM: restart: orion5x: " Russell King - ARM Linux
@ 2011-11-24 22:05   ` Nicolas Pitre
  0 siblings, 0 replies; 162+ messages in thread
From: Nicolas Pitre @ 2011-11-24 22:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 6 Nov 2011, Russell King - ARM Linux wrote:

> Hook these platforms restart code into the new restart hook rather than
> using arch_reset().
> 
> In addition, convert calls to arm_machine_restart() to orion5x_restart()
> to ensure that they continue to work as intended.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nico@linaro.org>

> ---
>  arch/arm/mach-orion5x/common.c                 |   12 ++++++++++++
>  arch/arm/mach-orion5x/common.h                 |    1 +
>  arch/arm/mach-orion5x/d2net-setup.c            |    2 ++
>  arch/arm/mach-orion5x/db88f5281-setup.c        |    1 +
>  arch/arm/mach-orion5x/dns323-setup.c           |    1 +
>  arch/arm/mach-orion5x/edmini_v2-setup.c        |    1 +
>  arch/arm/mach-orion5x/include/mach/system.h    |   10 ----------
>  arch/arm/mach-orion5x/kurobox_pro-setup.c      |    2 ++
>  arch/arm/mach-orion5x/ls-chl-setup.c           |    3 ++-
>  arch/arm/mach-orion5x/ls_hgl-setup.c           |    3 ++-
>  arch/arm/mach-orion5x/lsmini-setup.c           |    3 ++-
>  arch/arm/mach-orion5x/mss2-setup.c             |    3 ++-
>  arch/arm/mach-orion5x/mv2120-setup.c           |    3 ++-
>  arch/arm/mach-orion5x/net2big-setup.c          |    1 +
>  arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c   |    1 +
>  arch/arm/mach-orion5x/rd88f5181l-ge-setup.c    |    1 +
>  arch/arm/mach-orion5x/rd88f5182-setup.c        |    1 +
>  arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c   |    1 +
>  arch/arm/mach-orion5x/terastation_pro2-setup.c |    1 +
>  arch/arm/mach-orion5x/ts209-setup.c            |    1 +
>  arch/arm/mach-orion5x/ts409-setup.c            |    1 +
>  arch/arm/mach-orion5x/ts78xx-setup.c           |    1 +
>  arch/arm/mach-orion5x/wnr854t-setup.c          |    1 +
>  arch/arm/mach-orion5x/wrt350n-v2-setup.c       |    1 +
>  24 files changed, 41 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
> index 22ace0b..41127e8 100644
> --- a/arch/arm/mach-orion5x/common.c
> +++ b/arch/arm/mach-orion5x/common.c
> @@ -18,6 +18,7 @@
>  #include <linux/mbus.h>
>  #include <linux/mv643xx_i2c.h>
>  #include <linux/ata_platform.h>
> +#include <linux/delay.h>
>  #include <net/dsa.h>
>  #include <asm/page.h>
>  #include <asm/setup.h>
> @@ -304,6 +305,17 @@ void __init orion5x_init(void)
>  	orion5x_wdt_init();
>  }
>  
> +void orion5x_restart(char mode, const char *cmd)
> +{
> +	/*
> +	 * Enable and issue soft reset
> +	 */
> +	orion5x_setbits(RSTOUTn_MASK, (1 << 2));
> +	orion5x_setbits(CPU_SOFT_RESET, 1);
> +	mdelay(200);
> +	orion5x_clrbits(CPU_SOFT_RESET, 1);
> +}
> +
>  /*
>   * Many orion-based systems have buggy bootloader implementations.
>   * This is a common fixup for bogus memory tags.
> diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
> index 909489f..37ef18d 100644
> --- a/arch/arm/mach-orion5x/common.h
> +++ b/arch/arm/mach-orion5x/common.h
> @@ -39,6 +39,7 @@ void orion5x_spi_init(void);
>  void orion5x_uart0_init(void);
>  void orion5x_uart1_init(void);
>  void orion5x_xor_init(void);
> +void orion5x_restart(char, const char *);
>  
>  /*
>   * PCIe/PCI functions.
> diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c
> index 8c83009..d75dcfa 100644
> --- a/arch/arm/mach-orion5x/d2net-setup.c
> +++ b/arch/arm/mach-orion5x/d2net-setup.c
> @@ -343,6 +343,7 @@ MACHINE_START(D2NET, "LaCie d2 Network")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
>  #endif
>  
> @@ -355,6 +356,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
>  #endif
>  
> diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
> index 4b79a80..a104d5a 100644
> --- a/arch/arm/mach-orion5x/db88f5281-setup.c
> +++ b/arch/arm/mach-orion5x/db88f5281-setup.c
> @@ -364,4 +364,5 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
>  	.init_early	= orion5x_init_early,
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
> index 343f60e..91b0f47 100644
> --- a/arch/arm/mach-orion5x/dns323-setup.c
> +++ b/arch/arm/mach-orion5x/dns323-setup.c
> @@ -736,4 +736,5 @@ MACHINE_START(DNS323, "D-Link DNS-323")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c
> index 70a4e92..355e962 100644
> --- a/arch/arm/mach-orion5x/edmini_v2-setup.c
> +++ b/arch/arm/mach-orion5x/edmini_v2-setup.c
> @@ -258,4 +258,5 @@ MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h
> index a1d6e46..6677677 100644
> --- a/arch/arm/mach-orion5x/include/mach/system.h
> +++ b/arch/arm/mach-orion5x/include/mach/system.h
> @@ -11,8 +11,6 @@
>  #ifndef __ASM_ARCH_SYSTEM_H
>  #define __ASM_ARCH_SYSTEM_H
>  
> -#include <mach/bridge-regs.h>
> -
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
> @@ -20,14 +18,6 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/*
> -	 * Enable and issue soft reset
> -	 */
> -	orion5x_setbits(RSTOUTn_MASK, (1 << 2));
> -	orion5x_setbits(CPU_SOFT_RESET, 1);
> -	mdelay(200);
> -	orion5x_clrbits(CPU_SOFT_RESET, 1);
>  }
>  
> -
>  #endif
> diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
> index d3cd3f6..47587b8 100644
> --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
> +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
> @@ -386,6 +386,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
>  #endif
>  
> @@ -399,5 +400,6 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c
> index 9503fff..5272131 100644
> --- a/arch/arm/mach-orion5x/ls-chl-setup.c
> +++ b/arch/arm/mach-orion5x/ls-chl-setup.c
> @@ -140,7 +140,7 @@ static struct mv_sata_platform_data lschl_sata_data = {
>  
>  static void lschl_power_off(void)
>  {
> -	arm_machine_restart('h', NULL);
> +	orion5x_restart('h', NULL);
>  }
>  
>  /*****************************************************************************
> @@ -325,4 +325,5 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c
> index ed6d772..9a8697b 100644
> --- a/arch/arm/mach-orion5x/ls_hgl-setup.c
> +++ b/arch/arm/mach-orion5x/ls_hgl-setup.c
> @@ -186,7 +186,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {
>  
>  static void ls_hgl_power_off(void)
>  {
> -	arm_machine_restart('h', NULL);
> +	orion5x_restart('h', NULL);
>  }
>  
>  
> @@ -272,4 +272,5 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c
> index 743f7f1..09c7365 100644
> --- a/arch/arm/mach-orion5x/lsmini-setup.c
> +++ b/arch/arm/mach-orion5x/lsmini-setup.c
> @@ -186,7 +186,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {
>  
>  static void lsmini_power_off(void)
>  {
> -	arm_machine_restart('h', NULL);
> +	orion5x_restart('h', NULL);
>  }
>  
>  
> @@ -274,5 +274,6 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c
> index 6020e26..65faaa3 100644
> --- a/arch/arm/mach-orion5x/mss2-setup.c
> +++ b/arch/arm/mach-orion5x/mss2-setup.c
> @@ -267,5 +267,6 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II")
>  	.init_early	= orion5x_init_early,
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
> -	.fixup		= tag_fixup_mem32
> +	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c
> index 201ae36..c87fde4 100644
> --- a/arch/arm/mach-orion5x/mv2120-setup.c
> +++ b/arch/arm/mach-orion5x/mv2120-setup.c
> @@ -234,5 +234,6 @@ MACHINE_START(MV2120, "HP Media Vault mv2120")
>  	.init_early	= orion5x_init_early,
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
> -	.fixup		= tag_fixup_mem32
> +	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c
> index 6197c79..0180c39 100644
> --- a/arch/arm/mach-orion5x/net2big-setup.c
> +++ b/arch/arm/mach-orion5x/net2big-setup.c
> @@ -426,5 +426,6 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
>  
> diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
> index ebd6767..292038f 100644
> --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
> +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
> @@ -175,4 +175,5 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
> index 05db2d3..c44eaba 100644
> --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
> +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
> @@ -187,4 +187,5 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
> index e47fa05..96438b6 100644
> --- a/arch/arm/mach-orion5x/rd88f5182-setup.c
> +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
> @@ -311,4 +311,5 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
>  	.init_early	= orion5x_init_early,
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
> index 6431725..2c5fab0 100644
> --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
> +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
> @@ -128,4 +128,5 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c
> index 29f1526..632a861 100644
> --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c
> +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c
> @@ -364,4 +364,5 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
> index 31e51f9..62c156b 100644
> --- a/arch/arm/mach-orion5x/ts209-setup.c
> +++ b/arch/arm/mach-orion5x/ts209-setup.c
> @@ -329,4 +329,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c
> index 0fbcc14..4e6ff75 100644
> --- a/arch/arm/mach-orion5x/ts409-setup.c
> +++ b/arch/arm/mach-orion5x/ts409-setup.c
> @@ -318,4 +318,5 @@ MACHINE_START(TS409, "QNAP TS-409")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
> index 6c75cd3..0a236dd 100644
> --- a/arch/arm/mach-orion5x/ts78xx-setup.c
> +++ b/arch/arm/mach-orion5x/ts78xx-setup.c
> @@ -627,4 +627,5 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
>  	.init_early	= orion5x_init_early,
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c
> index b8be7d8..078c03f 100644
> --- a/arch/arm/mach-orion5x/wnr854t-setup.c
> +++ b/arch/arm/mach-orion5x/wnr854t-setup.c
> @@ -179,4 +179,5 @@ MACHINE_START(WNR854T, "Netgear WNR854T")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
> index faf81a0..46a9778 100644
> --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
> +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
> @@ -267,4 +267,5 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
>  	.init_irq	= orion5x_init_irq,
>  	.timer		= &orion5x_timer,
>  	.fixup		= tag_fixup_mem32,
> +	.restart	= orion5x_restart,
>  MACHINE_END
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH 07/41] ARM: restart: dove: use new restart hook
  2011-11-06 17:42 ` [PATCH 07/41] ARM: restart: dove: " Russell King - ARM Linux
@ 2011-11-24 22:07   ` Nicolas Pitre
  0 siblings, 0 replies; 162+ messages in thread
From: Nicolas Pitre @ 2011-11-24 22:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 6 Nov 2011, Russell King - ARM Linux wrote:

> Hook these platforms restart code into the new restart hook rather than
> using arch_reset().
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nico@linaro.org>

> ---
>  arch/arm/mach-dove/cm-a510.c             |    1 +
>  arch/arm/mach-dove/common.c              |   16 ++++++++++++++++
>  arch/arm/mach-dove/common.h              |    1 +
>  arch/arm/mach-dove/dove-db-setup.c       |    1 +
>  arch/arm/mach-dove/include/mach/system.h |   14 --------------
>  5 files changed, 19 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/arm/mach-dove/cm-a510.c b/arch/arm/mach-dove/cm-a510.c
> index c8a406f..792b4e2 100644
> --- a/arch/arm/mach-dove/cm-a510.c
> +++ b/arch/arm/mach-dove/cm-a510.c
> @@ -93,4 +93,5 @@ MACHINE_START(CM_A510, "Compulab CM-A510 Board")
>  	.init_early	= dove_init_early,
>  	.init_irq	= dove_init_irq,
>  	.timer		= &dove_timer,
> +	.restart	= dove_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
> index a9e0dae..13bb236 100644
> --- a/arch/arm/mach-dove/common.c
> +++ b/arch/arm/mach-dove/common.c
> @@ -292,3 +292,19 @@ void __init dove_init(void)
>  	dove_xor0_init();
>  	dove_xor1_init();
>  }
> +
> +void dove_restart(char mode, const char *cmd)
> +{
> +	/*
> +	 * Enable soft reset to assert RSTOUTn.
> +	 */
> +	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
> +
> +	/*
> +	 * Assert soft reset.
> +	 */
> +	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
> +
> +	while (1)
> +		;
> +}
> diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h
> index 6a2046e..4202730 100644
> --- a/arch/arm/mach-dove/common.h
> +++ b/arch/arm/mach-dove/common.h
> @@ -39,5 +39,6 @@ void dove_spi1_init(void);
>  void dove_i2c_init(void);
>  void dove_sdio0_init(void);
>  void dove_sdio1_init(void);
> +void dove_restart(char, const char *);
>  
>  #endif
> diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c
> index 11ea34e..ea77ae4 100644
> --- a/arch/arm/mach-dove/dove-db-setup.c
> +++ b/arch/arm/mach-dove/dove-db-setup.c
> @@ -100,4 +100,5 @@ MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board")
>  	.init_early	= dove_init_early,
>  	.init_irq	= dove_init_irq,
>  	.timer		= &dove_timer,
> +	.restart	= dove_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-dove/include/mach/system.h b/arch/arm/mach-dove/include/mach/system.h
> index 356afda..25a3a65 100644
> --- a/arch/arm/mach-dove/include/mach/system.h
> +++ b/arch/arm/mach-dove/include/mach/system.h
> @@ -9,8 +9,6 @@
>  #ifndef __ASM_ARCH_SYSTEM_H
>  #define __ASM_ARCH_SYSTEM_H
>  
> -#include <mach/bridge-regs.h>
> -
>  static inline void arch_idle(void)
>  {
>  	cpu_do_idle();
> @@ -18,18 +16,6 @@ static inline void arch_idle(void)
>  
>  static inline void arch_reset(char mode, const char *cmd)
>  {
> -	/*
> -	 * Enable soft reset to assert RSTOUTn.
> -	 */
> -	writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
> -
> -	/*
> -	 * Assert soft reset.
> -	 */
> -	writel(SOFT_RESET, SYSTEM_SOFT_RESET);
> -
> -	while (1)
> -		;
>  }
>  
>  
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH 33/41] ARM: restart: spear: use new restart hook
  2011-11-24 20:32   ` Russell King - ARM Linux
@ 2011-11-25  3:35     ` Viresh Kumar
  0 siblings, 0 replies; 162+ messages in thread
From: Viresh Kumar @ 2011-11-25  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/25/2011 2:02 AM, Russell King - ARM Linux wrote:
> Ack?
> 
> On Sun, Nov 06, 2011 at 05:51:09PM +0000, Russell King - ARM Linux wrote:
>> Hook these platforms restart code into the new restart hook rather
>> than using arch_reset().
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> ---
>>  arch/arm/mach-spear3xx/include/mach/generic.h |    2 +
>>  arch/arm/mach-spear3xx/spear300_evb.c         |    1 +
>>  arch/arm/mach-spear3xx/spear310_evb.c         |    1 +
>>  arch/arm/mach-spear3xx/spear320_evb.c         |    1 +
>>  arch/arm/mach-spear6xx/include/mach/generic.h |    2 +
>>  arch/arm/mach-spear6xx/spear600_evb.c         |    1 +
>>  arch/arm/plat-spear/Makefile                  |    2 +-
>>  arch/arm/plat-spear/include/plat/system.h     |   11 ----------
>>  arch/arm/plat-spear/restart.c                 |   27 +++++++++++++++++++++++++
>>  9 files changed, 36 insertions(+), 12 deletions(-)
>>  create mode 100644 arch/arm/plat-spear/restart.c
>>

Sorry for missing it earlier.

Acked-by: Viresh Kumar <viresh.kumar@st.com>

>> diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
>> index b8f31c3..14276e5 100644
>> --- a/arch/arm/mach-spear3xx/include/mach/generic.h
>> +++ b/arch/arm/mach-spear3xx/include/mach/generic.h
>> @@ -42,6 +42,8 @@ void __init spear3xx_map_io(void);
>>  void __init spear3xx_init_irq(void);
>>  void __init spear3xx_init(void);
>>  
>> +void spear_restart(char, const char *);
>> +
>>  /* pad mux declarations */
>>  #define PMX_FIRDA_MASK		(1 << 14)
>>  #define PMX_I2C_MASK		(1 << 13)
>> diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c
>> index a5ff98e..8b429f0 100644
>> --- a/arch/arm/mach-spear3xx/spear300_evb.c
>> +++ b/arch/arm/mach-spear3xx/spear300_evb.c
>> @@ -69,4 +69,5 @@ MACHINE_START(SPEAR300, "ST-SPEAR300-EVB")
>>  	.init_irq	=	spear3xx_init_irq,
>>  	.timer		=	&spear3xx_timer,
>>  	.init_machine	=	spear300_evb_init,
>> +	.restart	=	spear_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c
>> index 45d180d..a11d6ea 100644
>> --- a/arch/arm/mach-spear3xx/spear310_evb.c
>> +++ b/arch/arm/mach-spear3xx/spear310_evb.c
>> @@ -75,4 +75,5 @@ MACHINE_START(SPEAR310, "ST-SPEAR310-EVB")
>>  	.init_irq	=	spear3xx_init_irq,
>>  	.timer		=	&spear3xx_timer,
>>  	.init_machine	=	spear310_evb_init,
>> +	.restart	=	spear_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c
>> index 2287984..4239a70 100644
>> --- a/arch/arm/mach-spear3xx/spear320_evb.c
>> +++ b/arch/arm/mach-spear3xx/spear320_evb.c
>> @@ -73,4 +73,5 @@ MACHINE_START(SPEAR320, "ST-SPEAR320-EVB")
>>  	.init_irq	=	spear3xx_init_irq,
>>  	.timer		=	&spear3xx_timer,
>>  	.init_machine	=	spear320_evb_init,
>> +	.restart	=	spear_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h
>> index 183f023..116b993 100644
>> --- a/arch/arm/mach-spear6xx/include/mach/generic.h
>> +++ b/arch/arm/mach-spear6xx/include/mach/generic.h
>> @@ -41,6 +41,8 @@ void __init spear6xx_init(void);
>>  void __init spear600_init(void);
>>  void __init spear6xx_clk_init(void);
>>  
>> +void spear_restart(char, const char *);
>> +
>>  /* Add spear600 machine device structure declarations here */
>>  
>>  #endif /* __MACH_GENERIC_H */
>> diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c
>> index 8238fe3..0a16559 100644
>> --- a/arch/arm/mach-spear6xx/spear600_evb.c
>> +++ b/arch/arm/mach-spear6xx/spear600_evb.c
>> @@ -48,4 +48,5 @@ MACHINE_START(SPEAR600, "ST-SPEAR600-EVB")
>>  	.init_irq	=	spear6xx_init_irq,
>>  	.timer		=	&spear6xx_timer,
>>  	.init_machine	=	spear600_evb_init,
>> +	.restart	=	spear_restart,
>>  MACHINE_END
>> diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile
>> index b4f340b..e0f2e5b 100644
>> --- a/arch/arm/plat-spear/Makefile
>> +++ b/arch/arm/plat-spear/Makefile
>> @@ -3,6 +3,6 @@
>>  #
>>  
>>  # Common support
>> -obj-y	:= clock.o time.o
>> +obj-y	:= clock.o restart.o time.o
>>  
>>  obj-$(CONFIG_ARCH_SPEAR3XX)	+= shirq.o padmux.o
>> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
>> index 1171f22..4a0d125 100644
>> --- a/arch/arm/plat-spear/include/plat/system.h
>> +++ b/arch/arm/plat-spear/include/plat/system.h
>> @@ -14,10 +14,6 @@
>>  #ifndef __PLAT_SYSTEM_H
>>  #define __PLAT_SYSTEM_H
>>  
>> -#include <linux/io.h>
>> -#include <asm/hardware/sp810.h>
>> -#include <mach/hardware.h>
>> -
>>  static inline void arch_idle(void)
>>  {
>>  	/*
>> @@ -29,13 +25,6 @@ static inline void arch_idle(void)
>>  
>>  static inline void arch_reset(char mode, const char *cmd)
>>  {
>> -	if (mode == 's') {
>> -		/* software reset, Jump into ROM at address 0 */
>> -		soft_restart(0);
>> -	} else {
>> -		/* hardware reset, Use on-chip reset capability */
>> -		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
>> -	}
>>  }
>>  
>>  #endif /* __PLAT_SYSTEM_H */
>> diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c
>> new file mode 100644
>> index 0000000..2b4e3d8
>> --- /dev/null
>> +++ b/arch/arm/plat-spear/restart.c
>> @@ -0,0 +1,27 @@
>> +/*
>> + * arch/arm/plat-spear/restart.c
>> + *
>> + * SPEAr platform specific restart functions
>> + *
>> + * Copyright (C) 2009 ST Microelectronics
>> + * Viresh Kumar<viresh.kumar@st.com>
>> + *
>> + * This file is licensed under the terms of the GNU General Public
>> + * License version 2. This program is licensed "as is" without any
>> + * warranty of any kind, whether express or implied.
>> + */
>> +#include <linux/io.h>
>> +#include <asm/hardware/sp810.h>
>> +#include <mach/hardware.h>
>> +#include <mach/generic.h>
>> +
>> +void spear_restart(char mode, const char *cmd)
>> +{
>> +	if (mode == 's') {
>> +		/* software reset, Jump into ROM at address 0 */
>> +		soft_restart(0);
>> +	} else {
>> +		/* hardware reset, Use on-chip reset capability */
>> +		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
>> +	}
>> +}
>> -- 
>> 1.7.4.4
>>

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

* [PATCH 23/41] ARM: restart: mxc: use new restart hook
  2011-11-24 20:31   ` Russell King - ARM Linux
@ 2011-11-25 12:06     ` Sascha Hauer
  0 siblings, 0 replies; 162+ messages in thread
From: Sascha Hauer @ 2011-11-25 12:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 24, 2011 at 08:31:49PM +0000, Russell King - ARM Linux wrote:
> Ack?

Yes:

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 13/41] ARM: restart: integrator: use new restart hook
  2011-11-06 17:44 ` [PATCH 13/41] ARM: restart: integrator: " Russell King - ARM Linux
@ 2011-11-25 21:41   ` Linus Walleij
  0 siblings, 0 replies; 162+ messages in thread
From: Linus Walleij @ 2011-11-25 21:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 6, 2011 at 6:44 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Since I tend to play around with this machine,
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks,
Linus Walleij

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

* [PATCH 41/41] ARM: restart: remove the now empty arch_reset()
  2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
                     ` (3 preceding siblings ...)
  2011-11-10 23:38   ` Tony Lindgren
@ 2011-11-25 21:44   ` Linus Walleij
  4 siblings, 0 replies; 162+ messages in thread
From: Linus Walleij @ 2011-11-25 21:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 6, 2011 at 6:53 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> Remove the now empty arch_reset() from all the mach/system.h includes,
> and remove its callsite. ?Remove arm_machine_restart() as this function
> no longer does anything useful.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks,
Linus Walleij

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-11 17:16     ` Russell King - ARM Linux
  2011-11-14 19:01       ` Nori, Sekhar
@ 2011-11-28 10:40       ` Linus Walleij
  2011-11-28 11:07         ` Russell King - ARM Linux
  1 sibling, 1 reply; 162+ messages in thread
From: Linus Walleij @ 2011-11-28 10:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 11, 2011 at 6:16 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> The list of platforms which are still broken (today) by part 2 of this
> series are:
>
(...)
> arch/arm/mach-nomadik/include/mach/system.h
(...)
>
> which require assistance to get these into shape.

Is this about the problem of where to place the hook
for restart as described in this message?
http://marc.info/?l=linux-arm-kernel&m=132104005724249&w=2

If you apply that patch I think it's easy to fix that up,
if you have some git branch I can base off I can fix
it up too.

Or you can just throw it into -next so it breaks and I'll fix
from there ASAP, no big deal.

Thanks,
Linus Walleij

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-28 10:40       ` Linus Walleij
@ 2011-11-28 11:07         ` Russell King - ARM Linux
  2011-11-28 11:23           ` Linus Walleij
  0 siblings, 1 reply; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-11-28 11:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 28, 2011 at 11:40:49AM +0100, Linus Walleij wrote:
> Is this about the problem of where to place the hook
> for restart as described in this message?
> http://marc.info/?l=linux-arm-kernel&m=132104005724249&w=2
> 
> If you apply that patch I think it's easy to fix that up,
> if you have some git branch I can base off I can fix
> it up too.
> 
> Or you can just throw it into -next so it breaks and I'll fix
> from there ASAP, no big deal.

This is about as far as I got with Nomadik.  The patch you point out above
does appear to fix the problem, and if you put it in the patch system, I'll
apply it to the restart-cleanup branch, and fix the patch below.

8<===
ARM: restart: nomadik: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS XXX

Hook the Nomadik NHK platform restart code into the new restart hook.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mach-nomadik/board-nhk8815.c       |    1 +
 arch/arm/mach-nomadik/cpu-8815.c            |   11 +++++++++++
 arch/arm/mach-nomadik/include/mach/system.h |    9 ---------
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 0cbb74c..c559ed6 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -282,4 +282,5 @@ MACHINE_START(NOMADIK, "NHK8815")
 	.init_irq	= cpu8815_init_irq,
 	.timer		= &nomadik_timer,
 	.init_machine	= nhk8815_platform_init,
+	.restart	= cpu8815_restart,
 MACHINE_END
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index dc67717..b4bbe51 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -21,6 +21,7 @@
 #include <linux/device.h>
 #include <linux/amba/bus.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <plat/gpio-nomadik.h>
 #include <mach/hardware.h>
@@ -164,3 +165,13 @@ void __init cpu8815_init_irq(void)
 #endif
 	 return;
 }
+
+void cpu8815_restart(char mode, const char *cmd)
+{
+	void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18);
+
+	/* FIXME: use egpio when implemented */
+
+	/* Write anything to Reset status register */
+	writel(1, src_rstsr);
+}
diff --git a/arch/arm/mach-nomadik/include/mach/system.h b/arch/arm/mach-nomadik/include/mach/system.h
index 7119f68..16f59f6 100644
--- a/arch/arm/mach-nomadik/include/mach/system.h
+++ b/arch/arm/mach-nomadik/include/mach/system.h
@@ -20,9 +20,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <linux/io.h>
-#include <mach/hardware.h>
-
 static inline void arch_idle(void)
 {
 	/*
@@ -34,12 +31,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18);
-
-	/* FIXME: use egpio when implemented */
-
-	/* Write anything to Reset status register */
-	writel(1, src_rstsr);
 }
 
 #endif
-- 
1.7.4.4

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

* [03: PATCH 0/5] The remaining stuff
  2011-11-28 11:07         ` Russell King - ARM Linux
@ 2011-11-28 11:23           ` Linus Walleij
  0 siblings, 0 replies; 162+ messages in thread
From: Linus Walleij @ 2011-11-28 11:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 28, 2011 at 12:07 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> This is about as far as I got with Nomadik. ?The patch you point out above
> does appear to fix the problem, and if you put it in the patch system, I'll
> apply it to the restart-cleanup branch, and fix the patch below.

Thanks, it's in the patch tracker as 7179/1.

Yours,
Linus Walleij

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

* RE: [PATCH 6/7] ARM: restart: only perform setup for restart when
  2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-12-03  9:23       ` Kukjin Kim
  -1 siblings, 0 replies; 162+ messages in thread
From: Kukjin Kim @ 2011-12-03  9:23 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)
> 
> On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > We only need to set the system up for a soft-restart if we're going to
> > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > does the setup and final call for this, and make platforms use it.
> > Eliminate the call to setup_restart() from the default handler.
> >
> > This means that platforms arch_reset() function is no longer called with
> > the page tables prepared for a soft-restart, and caches will still be
> > enabled.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Sorry for late response...

For Samsung stuff:
Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

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

> > ---
> >  arch/arm/include/asm/system.h                     |    1 +
> >  arch/arm/kernel/process.c                         |   13 +++++++++++--
> >  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
> >  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
> >  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
> >  arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
> >  arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
> >  arch/arm/mach-mxs/system.c                        |    2 +-
> >  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
> >  arch/arm/mach-pxa/reset.c                         |    2 +-
> >  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
> >  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
> >  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
> >  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
> >  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
> >  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
> >  arch/arm/plat-mxc/system.c                        |    2 +-
> >  arch/arm/plat-spear/include/plat/system.h         |    2 +-
> >  21 files changed, 33 insertions(+), 23 deletions(-)
> >
> > diff --git a/arch/arm/include/asm/system.h
> b/arch/arm/include/asm/system.h
> > index 984014b..fe7de75 100644
> > --- a/arch/arm/include/asm/system.h
> > +++ b/arch/arm/include/asm/system.h
> > @@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
> >  extern void cpu_init(void);
> >
> >  void arm_machine_restart(char mode, const char *cmd);
> > +void soft_restart(unsigned long);
> >  extern void (*arm_pm_restart)(char str, const char *cmd);
> >
> >  #define UDBG_UNDEFINED	(1 << 0)
> > diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> > index dca7971..52b4306 100644
> > --- a/arch/arm/kernel/process.c
> > +++ b/arch/arm/kernel/process.c
> > @@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
> >  __setup("nohlt", nohlt_setup);
> >  __setup("hlt", hlt_setup);
> >
> > -void arm_machine_restart(char mode, const char *cmd)
> > +void soft_restart(unsigned long addr)
> >  {
> >  	/* Disable interrupts first */
> >  	local_irq_disable();
> > @@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char
*cmd)
> >  	/* Push out any further dirty data, and ensure cache is empty */
> >  	flush_cache_all();
> >
> > -	/* Now call the architecture specific reboot code. */
> > +	cpu_reset(addr);
> > +}
> > +
> > +void arm_machine_restart(char mode, const char *cmd)
> > +{
> > +	/* Disable interrupts first */
> > +	local_irq_disable();
> > +	local_fiq_disable();
> > +
> > +	/* Call the architecture specific reboot code. */
> >  	arch_reset(mode, cmd);
> >  }
> >
> > diff --git a/arch/arm/mach-clps711x/include/mach/system.h
> b/arch/arm/mach-clps711x/include/mach/system.h
> > index f916cd7..6c11993 100644
> > --- a/arch/arm/mach-clps711x/include/mach/system.h
> > +++ b/arch/arm/mach-clps711x/include/mach/system.h
> > @@ -34,7 +34,7 @@ static inline void arch_idle(void)
> >
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  #endif
> > diff --git a/arch/arm/mach-ebsa110/include/mach/system.h
> b/arch/arm/mach-ebsa110/include/mach/system.h
> > index 9a26245..0d5df72 100644
> > --- a/arch/arm/mach-ebsa110/include/mach/system.h
> > +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> > @@ -34,6 +34,6 @@ static inline void arch_idle(void)
> >  	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
> >  }
> >
> > -#define arch_reset(mode, cmd)	cpu_reset(0x80000000)
> > +#define arch_reset(mode, cmd)	soft_restart(0x80000000)
> >
> >  #endif
> > diff --git a/arch/arm/mach-footbridge/include/mach/system.h
> b/arch/arm/mach-footbridge/include/mach/system.h
> > index 0b29315..249f895 100644
> > --- a/arch/arm/mach-footbridge/include/mach/system.h
> > +++ b/arch/arm/mach-footbridge/include/mach/system.h
> > @@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  		/*
> >  		 * Jump into the ROM
> >  		 */
> > -		cpu_reset(0x41000000);
> > +		soft_restart(0x41000000);
> >  	} else {
> >  		if (machine_is_netwinder()) {
> >  			/* open up the SuperIO chip
> > diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-
> iop32x/include/mach/system.h
> > index a4b808f..4865a9b 100644
> > --- a/arch/arm/mach-iop32x/include/mach/system.h
> > +++ b/arch/arm/mach-iop32x/include/mach/system.h
> > @@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  	*IOP3XX_PCSR = 0x30;
> >
> >  	/* Jump into ROM at address 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-
> iop33x/include/mach/system.h
> > index f192a34..86d1b20 100644
> > --- a/arch/arm/mach-iop33x/include/mach/system.h
> > +++ b/arch/arm/mach-iop33x/include/mach/system.h
> > @@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  	*IOP3XX_PCSR = 0x30;
> >
> >  	/* Jump into ROM at address 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-
> ixp4xx/include/mach/system.h
> > index 54c0af7..24337d9 100644
> > --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> > +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> > @@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  {
> >  	if ( 1 && mode = 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* Use on-chip reset capability */
> >
> > diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-
> ks8695/include/mach/system.h
> > index fb1dda9..ceb19c9 100644
> > --- a/arch/arm/mach-ks8695/include/mach/system.h
> > +++ b/arch/arm/mach-ks8695/include/mach/system.h
> > @@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
> >  	unsigned int reg;
> >
> >  	if (mode = 's')
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >
> >  	/* disable timer0 */
> >  	reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
> > diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-
> mmp/include/mach/system.h
> > index 1a8a25e..cb06379 100644
> > --- a/arch/arm/mach-mmp/include/mach/system.h
> > +++ b/arch/arm/mach-mmp/include/mach/system.h
> > @@ -19,8 +19,8 @@ static inline void arch_idle(void)
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (cpu_is_pxa168())
> > -		cpu_reset(0xffff0000);
> > +		soft_restart(0xffff0000);
> >  	else
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  }
> >  #endif /* __ASM_MACH_SYSTEM_H */
> > diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> > index 20ec3bd..cab8836 100644
> > --- a/arch/arm/mach-mxs/system.c
> > +++ b/arch/arm/mach-mxs/system.c
> > @@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
> >  	mdelay(50);
> >
> >  	/* We'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  static int __init mxs_arch_reset_init(void)
> > diff --git a/arch/arm/mach-pnx4008/include/mach/system.h
> b/arch/arm/mach-pnx4008/include/mach/system.h
> > index 5dda2bb..5d6384a 100644
> > --- a/arch/arm/mach-pnx4008/include/mach/system.h
> > +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> > @@ -32,7 +32,7 @@ static void arch_idle(void)
> >
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  #endif
> > diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> > index 01e9d64..b8bcda1 100644
> > --- a/arch/arm/mach-pxa/reset.c
> > +++ b/arch/arm/mach-pxa/reset.c
> > @@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
> >  	switch (mode) {
> >  	case 's':
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  		break;
> >  	case 'g':
> >  		do_gpio_reset();
> > diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-
> rpc/include/mach/system.h
> > index 45c7b93..a354f4d 100644
> > --- a/arch/arm/mach-rpc/include/mach/system.h
> > +++ b/arch/arm/mach-rpc/include/mach/system.h
> > @@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  	/*
> >  	 * Jump into the ROM
> >  	 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > index 6faadce..913893d 100644
> > --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > @@ -19,7 +19,7 @@ static void
> >  arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode = 's') {
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	}
> >
> >  	if (s3c24xx_reset_hook)
> > @@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
> >  	arch_wdt_reset();
> >
> >  	/* we'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h
> b/arch/arm/mach-s3c64xx/include/mach/system.h
> > index 2e58cb7..d8ca578 100644
> > --- a/arch/arm/mach-s3c64xx/include/mach/system.h
> > +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
> > @@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
> >  		arch_wdt_reset();
> >
> >  	/* if all else fails, or mode was for soft, jump to 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  #endif /* __ASM_ARCH_IRQ_H */
> > diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-
> sa1100/include/mach/system.h
> > index ba9da9f..345d35b 100644
> > --- a/arch/arm/mach-sa1100/include/mach/system.h
> > +++ b/arch/arm/mach-sa1100/include/mach/system.h
> > @@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  {
> >  	if (mode = 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* Use on-chip reset capability */
> >  		RSRR = RSRR_SWR;
> > diff --git a/arch/arm/mach-shmobile/include/mach/system.h
> b/arch/arm/mach-shmobile/include/mach/system.h
> > index 76a687e..956ac18 100644
> > --- a/arch/arm/mach-shmobile/include/mach/system.h
> > +++ b/arch/arm/mach-shmobile/include/mach/system.h
> > @@ -8,7 +8,7 @@ static inline void arch_idle(void)
> >
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  #endif
> > diff --git a/arch/arm/mach-w90x900/include/mach/system.h
> b/arch/arm/mach-w90x900/include/mach/system.h
> > index ce228bd..68875a1 100644
> > --- a/arch/arm/mach-w90x900/include/mach/system.h
> > +++ b/arch/arm/mach-w90x900/include/mach/system.h
> > @@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode = 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		__raw_writel(WTE | WTRE | WTCLK, WTCR);
> >  	}
> > diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> > index 9dad8dc..b1cfc6a 100644
> > --- a/arch/arm/plat-mxc/system.c
> > +++ b/arch/arm/plat-mxc/system.c
> > @@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
> >  	mdelay(50);
> >
> >  	/* we'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  void mxc_arch_reset_init(void __iomem *base)
> > diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-
> spear/include/plat/system.h
> > index a235fa0..1171f22 100644
> > --- a/arch/arm/plat-spear/include/plat/system.h
> > +++ b/arch/arm/plat-spear/include/plat/system.h
> > @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  {
> >  	if (mode = 's') {
> >  		/* software reset, Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* hardware reset, Use on-chip reset capability */
> >  		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> > --
> > 1.7.4.4
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-12-03  9:23       ` Kukjin Kim
  0 siblings, 0 replies; 162+ messages in thread
From: Kukjin Kim @ 2011-12-03  9:23 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> Ack?
> 
> (If you're in the To: list I'm expecting a reply because this patch is
> touching something you're responsible for.  Thanks.)
> 
> On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > We only need to set the system up for a soft-restart if we're going to
> > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > does the setup and final call for this, and make platforms use it.
> > Eliminate the call to setup_restart() from the default handler.
> >
> > This means that platforms arch_reset() function is no longer called with
> > the page tables prepared for a soft-restart, and caches will still be
> > enabled.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Sorry for late response...

For Samsung stuff:
Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

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

> > ---
> >  arch/arm/include/asm/system.h                     |    1 +
> >  arch/arm/kernel/process.c                         |   13 +++++++++++--
> >  arch/arm/mach-clps711x/include/mach/system.h      |    2 +-
> >  arch/arm/mach-ebsa110/include/mach/system.h       |    2 +-
> >  arch/arm/mach-footbridge/include/mach/system.h    |    2 +-
> >  arch/arm/mach-iop32x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-iop33x/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ixp4xx/include/mach/system.h        |    2 +-
> >  arch/arm/mach-ks8695/include/mach/system.h        |    2 +-
> >  arch/arm/mach-mmp/include/mach/system.h           |    4 ++--
> >  arch/arm/mach-mxs/system.c                        |    2 +-
> >  arch/arm/mach-pnx4008/include/mach/system.h       |    2 +-
> >  arch/arm/mach-pxa/reset.c                         |    2 +-
> >  arch/arm/mach-rpc/include/mach/system.h           |    2 +-
> >  arch/arm/mach-s3c2410/include/mach/system-reset.h |    4 ++--
> >  arch/arm/mach-s3c64xx/include/mach/system.h       |    2 +-
> >  arch/arm/mach-sa1100/include/mach/system.h        |    2 +-
> >  arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
> >  arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
> >  arch/arm/plat-mxc/system.c                        |    2 +-
> >  arch/arm/plat-spear/include/plat/system.h         |    2 +-
> >  21 files changed, 33 insertions(+), 23 deletions(-)
> >
> > diff --git a/arch/arm/include/asm/system.h
> b/arch/arm/include/asm/system.h
> > index 984014b..fe7de75 100644
> > --- a/arch/arm/include/asm/system.h
> > +++ b/arch/arm/include/asm/system.h
> > @@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
> >  extern void cpu_init(void);
> >
> >  void arm_machine_restart(char mode, const char *cmd);
> > +void soft_restart(unsigned long);
> >  extern void (*arm_pm_restart)(char str, const char *cmd);
> >
> >  #define UDBG_UNDEFINED	(1 << 0)
> > diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> > index dca7971..52b4306 100644
> > --- a/arch/arm/kernel/process.c
> > +++ b/arch/arm/kernel/process.c
> > @@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
> >  __setup("nohlt", nohlt_setup);
> >  __setup("hlt", hlt_setup);
> >
> > -void arm_machine_restart(char mode, const char *cmd)
> > +void soft_restart(unsigned long addr)
> >  {
> >  	/* Disable interrupts first */
> >  	local_irq_disable();
> > @@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char
*cmd)
> >  	/* Push out any further dirty data, and ensure cache is empty */
> >  	flush_cache_all();
> >
> > -	/* Now call the architecture specific reboot code. */
> > +	cpu_reset(addr);
> > +}
> > +
> > +void arm_machine_restart(char mode, const char *cmd)
> > +{
> > +	/* Disable interrupts first */
> > +	local_irq_disable();
> > +	local_fiq_disable();
> > +
> > +	/* Call the architecture specific reboot code. */
> >  	arch_reset(mode, cmd);
> >  }
> >
> > diff --git a/arch/arm/mach-clps711x/include/mach/system.h
> b/arch/arm/mach-clps711x/include/mach/system.h
> > index f916cd7..6c11993 100644
> > --- a/arch/arm/mach-clps711x/include/mach/system.h
> > +++ b/arch/arm/mach-clps711x/include/mach/system.h
> > @@ -34,7 +34,7 @@ static inline void arch_idle(void)
> >
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  #endif
> > diff --git a/arch/arm/mach-ebsa110/include/mach/system.h
> b/arch/arm/mach-ebsa110/include/mach/system.h
> > index 9a26245..0d5df72 100644
> > --- a/arch/arm/mach-ebsa110/include/mach/system.h
> > +++ b/arch/arm/mach-ebsa110/include/mach/system.h
> > @@ -34,6 +34,6 @@ static inline void arch_idle(void)
> >  	asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
> >  }
> >
> > -#define arch_reset(mode, cmd)	cpu_reset(0x80000000)
> > +#define arch_reset(mode, cmd)	soft_restart(0x80000000)
> >
> >  #endif
> > diff --git a/arch/arm/mach-footbridge/include/mach/system.h
> b/arch/arm/mach-footbridge/include/mach/system.h
> > index 0b29315..249f895 100644
> > --- a/arch/arm/mach-footbridge/include/mach/system.h
> > +++ b/arch/arm/mach-footbridge/include/mach/system.h
> > @@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  		/*
> >  		 * Jump into the ROM
> >  		 */
> > -		cpu_reset(0x41000000);
> > +		soft_restart(0x41000000);
> >  	} else {
> >  		if (machine_is_netwinder()) {
> >  			/* open up the SuperIO chip
> > diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-
> iop32x/include/mach/system.h
> > index a4b808f..4865a9b 100644
> > --- a/arch/arm/mach-iop32x/include/mach/system.h
> > +++ b/arch/arm/mach-iop32x/include/mach/system.h
> > @@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  	*IOP3XX_PCSR = 0x30;
> >
> >  	/* Jump into ROM at address 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-
> iop33x/include/mach/system.h
> > index f192a34..86d1b20 100644
> > --- a/arch/arm/mach-iop33x/include/mach/system.h
> > +++ b/arch/arm/mach-iop33x/include/mach/system.h
> > @@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  	*IOP3XX_PCSR = 0x30;
> >
> >  	/* Jump into ROM at address 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-
> ixp4xx/include/mach/system.h
> > index 54c0af7..24337d9 100644
> > --- a/arch/arm/mach-ixp4xx/include/mach/system.h
> > +++ b/arch/arm/mach-ixp4xx/include/mach/system.h
> > @@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  {
> >  	if ( 1 && mode == 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* Use on-chip reset capability */
> >
> > diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-
> ks8695/include/mach/system.h
> > index fb1dda9..ceb19c9 100644
> > --- a/arch/arm/mach-ks8695/include/mach/system.h
> > +++ b/arch/arm/mach-ks8695/include/mach/system.h
> > @@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
> >  	unsigned int reg;
> >
> >  	if (mode == 's')
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >
> >  	/* disable timer0 */
> >  	reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
> > diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-
> mmp/include/mach/system.h
> > index 1a8a25e..cb06379 100644
> > --- a/arch/arm/mach-mmp/include/mach/system.h
> > +++ b/arch/arm/mach-mmp/include/mach/system.h
> > @@ -19,8 +19,8 @@ static inline void arch_idle(void)
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (cpu_is_pxa168())
> > -		cpu_reset(0xffff0000);
> > +		soft_restart(0xffff0000);
> >  	else
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  }
> >  #endif /* __ASM_MACH_SYSTEM_H */
> > diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> > index 20ec3bd..cab8836 100644
> > --- a/arch/arm/mach-mxs/system.c
> > +++ b/arch/arm/mach-mxs/system.c
> > @@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)
> >  	mdelay(50);
> >
> >  	/* We'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  static int __init mxs_arch_reset_init(void)
> > diff --git a/arch/arm/mach-pnx4008/include/mach/system.h
> b/arch/arm/mach-pnx4008/include/mach/system.h
> > index 5dda2bb..5d6384a 100644
> > --- a/arch/arm/mach-pnx4008/include/mach/system.h
> > +++ b/arch/arm/mach-pnx4008/include/mach/system.h
> > @@ -32,7 +32,7 @@ static void arch_idle(void)
> >
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  #endif
> > diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
> > index 01e9d64..b8bcda1 100644
> > --- a/arch/arm/mach-pxa/reset.c
> > +++ b/arch/arm/mach-pxa/reset.c
> > @@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)
> >  	switch (mode) {
> >  	case 's':
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  		break;
> >  	case 'g':
> >  		do_gpio_reset();
> > diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-
> rpc/include/mach/system.h
> > index 45c7b93..a354f4d 100644
> > --- a/arch/arm/mach-rpc/include/mach/system.h
> > +++ b/arch/arm/mach-rpc/include/mach/system.h
> > @@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  	/*
> >  	 * Jump into the ROM
> >  	 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > index 6faadce..913893d 100644
> > --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
> > @@ -19,7 +19,7 @@ static void
> >  arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode == 's') {
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	}
> >
> >  	if (s3c24xx_reset_hook)
> > @@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)
> >  	arch_wdt_reset();
> >
> >  	/* we'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> > diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h
> b/arch/arm/mach-s3c64xx/include/mach/system.h
> > index 2e58cb7..d8ca578 100644
> > --- a/arch/arm/mach-s3c64xx/include/mach/system.h
> > +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
> > @@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)
> >  		arch_wdt_reset();
> >
> >  	/* if all else fails, or mode was for soft, jump to 0 */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  #endif /* __ASM_ARCH_IRQ_H */
> > diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-
> sa1100/include/mach/system.h
> > index ba9da9f..345d35b 100644
> > --- a/arch/arm/mach-sa1100/include/mach/system.h
> > +++ b/arch/arm/mach-sa1100/include/mach/system.h
> > @@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  {
> >  	if (mode == 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* Use on-chip reset capability */
> >  		RSRR = RSRR_SWR;
> > diff --git a/arch/arm/mach-shmobile/include/mach/system.h
> b/arch/arm/mach-shmobile/include/mach/system.h
> > index 76a687e..956ac18 100644
> > --- a/arch/arm/mach-shmobile/include/mach/system.h
> > +++ b/arch/arm/mach-shmobile/include/mach/system.h
> > @@ -8,7 +8,7 @@ static inline void arch_idle(void)
> >
> >  static inline void arch_reset(char mode, const char *cmd)
> >  {
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  #endif
> > diff --git a/arch/arm/mach-w90x900/include/mach/system.h
> b/arch/arm/mach-w90x900/include/mach/system.h
> > index ce228bd..68875a1 100644
> > --- a/arch/arm/mach-w90x900/include/mach/system.h
> > +++ b/arch/arm/mach-w90x900/include/mach/system.h
> > @@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd)
> >  {
> >  	if (mode == 's') {
> >  		/* Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		__raw_writel(WTE | WTRE | WTCLK, WTCR);
> >  	}
> > diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> > index 9dad8dc..b1cfc6a 100644
> > --- a/arch/arm/plat-mxc/system.c
> > +++ b/arch/arm/plat-mxc/system.c
> > @@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)
> >  	mdelay(50);
> >
> >  	/* we'll take a jump through zero as a poor second */
> > -	cpu_reset(0);
> > +	soft_restart(0);
> >  }
> >
> >  void mxc_arch_reset_init(void __iomem *base)
> > diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-
> spear/include/plat/system.h
> > index a235fa0..1171f22 100644
> > --- a/arch/arm/plat-spear/include/plat/system.h
> > +++ b/arch/arm/plat-spear/include/plat/system.h
> > @@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char
> *cmd)
> >  {
> >  	if (mode == 's') {
> >  		/* software reset, Jump into ROM at address 0 */
> > -		cpu_reset(0);
> > +		soft_restart(0);
> >  	} else {
> >  		/* hardware reset, Use on-chip reset capability */
> >  		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
> > --
> > 1.7.4.4
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 6/7] ARM: restart: only perform setup for restart when
  2011-12-03  9:23       ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Kukjin Kim
@ 2011-12-03  9:30         ` Russell King - ARM Linux
  -1 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-12-03  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Dec 03, 2011 at 06:23:09PM +0900, Kukjin Kim wrote:
> Russell King - ARM Linux wrote:
> > 
> > Ack?
> > 
> > (If you're in the To: list I'm expecting a reply because this patch is
> > touching something you're responsible for.  Thanks.)
> > 
> > On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > > We only need to set the system up for a soft-restart if we're going to
> > > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > > does the setup and final call for this, and make platforms use it.
> > > Eliminate the call to setup_restart() from the default handler.
> > >
> > > This means that platforms arch_reset() function is no longer called with
> > > the page tables prepared for a soft-restart, and caches will still be
> > > enabled.
> > >
> > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Sorry for late response...
> 
> For Samsung stuff:
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Too late, it's now part of devel-stable so I can't accept any more acks
for this.  Sorry.

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

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-12-03  9:30         ` Russell King - ARM Linux
  0 siblings, 0 replies; 162+ messages in thread
From: Russell King - ARM Linux @ 2011-12-03  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Dec 03, 2011 at 06:23:09PM +0900, Kukjin Kim wrote:
> Russell King - ARM Linux wrote:
> > 
> > Ack?
> > 
> > (If you're in the To: list I'm expecting a reply because this patch is
> > touching something you're responsible for.  Thanks.)
> > 
> > On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux wrote:
> > > We only need to set the system up for a soft-restart if we're going to
> > > be doing a soft-restart.  Provide a new function (soft_restart()) which
> > > does the setup and final call for this, and make platforms use it.
> > > Eliminate the call to setup_restart() from the default handler.
> > >
> > > This means that platforms arch_reset() function is no longer called with
> > > the page tables prepared for a soft-restart, and caches will still be
> > > enabled.
> > >
> > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Sorry for late response...
> 
> For Samsung stuff:
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Too late, it's now part of devel-stable so I can't accept any more acks
for this.  Sorry.

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

* RE: [PATCH 6/7] ARM: restart: only perform setup for restart when
  2011-12-03  9:30         ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
@ 2011-12-03  9:45           ` Kukjin Kim
  -1 siblings, 0 replies; 162+ messages in thread
From: Kukjin Kim @ 2011-12-03  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> On Sat, Dec 03, 2011 at 06:23:09PM +0900, Kukjin Kim wrote:
> > Russell King - ARM Linux wrote:
> > >
> > > Ack?
> > >
> > > (If you're in the To: list I'm expecting a reply because this patch is
> > > touching something you're responsible for.  Thanks.)
> > >
> > > On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux
> wrote:
> > > > We only need to set the system up for a soft-restart if we're going
> to
> > > > be doing a soft-restart.  Provide a new function (soft_restart())
> which
> > > > does the setup and final call for this, and make platforms use it.
> > > > Eliminate the call to setup_restart() from the default handler.
> > > >
> > > > This means that platforms arch_reset() function is no longer called
> with
> > > > the page tables prepared for a soft-restart, and caches will still
> be
> > > > enabled.
> > > >
> > > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> >
> > Sorry for late response...
> >
> > For Samsung stuff:
> > Acked-by: Kukjin Kim <kgene.kim@samsung.com>
> 
> Too late, it's now part of devel-stable so I can't accept any more acks
> for this.  Sorry.

OK, I see.

But I did send my ack in the beginning of Nov on cover [0/7] like
following...
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-November/071800.h
tml

So I didn't send my ack on this...

As a note, I'm sorting out header files, local headers in Samsung stuff as
per your suggestion and you can see them in the next week.

Anyway, 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] 162+ messages in thread

* [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting
@ 2011-12-03  9:45           ` Kukjin Kim
  0 siblings, 0 replies; 162+ messages in thread
From: Kukjin Kim @ 2011-12-03  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> On Sat, Dec 03, 2011 at 06:23:09PM +0900, Kukjin Kim wrote:
> > Russell King - ARM Linux wrote:
> > >
> > > Ack?
> > >
> > > (If you're in the To: list I'm expecting a reply because this patch is
> > > touching something you're responsible for.  Thanks.)
> > >
> > > On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux
> wrote:
> > > > We only need to set the system up for a soft-restart if we're going
> to
> > > > be doing a soft-restart.  Provide a new function (soft_restart())
> which
> > > > does the setup and final call for this, and make platforms use it.
> > > > Eliminate the call to setup_restart() from the default handler.
> > > >
> > > > This means that platforms arch_reset() function is no longer called
> with
> > > > the page tables prepared for a soft-restart, and caches will still
> be
> > > > enabled.
> > > >
> > > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> >
> > Sorry for late response...
> >
> > For Samsung stuff:
> > Acked-by: Kukjin Kim <kgene.kim@samsung.com>
> 
> Too late, it's now part of devel-stable so I can't accept any more acks
> for this.  Sorry.

OK, I see.

But I did send my ack in the beginning of Nov on cover [0/7] like
following...
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-November/071800.h
tml

So I didn't send my ack on this...

As a note, I'm sorting out header files, local headers in Samsung stuff as
per your suggestion and you can see them in the next week.

Anyway, 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] 162+ messages in thread

end of thread, other threads:[~2011-12-03  9:45 UTC | newest]

Thread overview: 162+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
2011-11-06 17:31 ` [PATCH 1/7] ARM: restart: add restart hook to machine_desc record Russell King - ARM Linux
2011-11-09 22:28   ` Tony Lindgren
2011-11-11 19:10   ` Linus Walleij
2011-11-06 17:32 ` [PATCH 2/7] ARM: restart: allow platforms more flexibility specifying restart mode Russell King - ARM Linux
2011-11-06 17:32 ` [PATCH 3/7] ARM: restart: add default restart modes for PXA mioa701, spitz and tosa Russell King - ARM Linux
2011-11-07 18:02   ` Robert Jarzmik
2011-11-06 17:32 ` [PATCH 4/7] ARM: restart: move reboot failure handing into machine_restart() Russell King - ARM Linux
2011-11-09 22:29   ` Tony Lindgren
2011-11-06 17:33 ` [PATCH 5/7] ARM: restart: remove argument to setup_mm_for_reboot() Russell King - ARM Linux
2011-11-09 22:30   ` Tony Lindgren
2011-11-06 17:33 ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
2011-11-17 17:42   ` [PATCH 6/7] ARM: restart: only perform setup for restart when Russell King - ARM Linux
2011-11-17 17:42     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
2011-11-17 18:00     ` [PATCH 6/7] ARM: restart: only perform setup for restart when Sascha Hauer
2011-11-17 18:00       ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Sascha Hauer
2011-11-18  3:29     ` Viresh Kumar
2011-11-18  3:41       ` [PATCH 6/7] ARM: restart: only perform setup for restart when Viresh Kumar
2011-11-18  7:51     ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Krzysztof Halasa
2011-11-18  7:51       ` Krzysztof Halasa
2011-11-18  7:56     ` Paul Mundt
2011-11-18  7:56       ` Paul Mundt
2011-11-18 10:13     ` [PATCH 6/7] ARM: restart: only perform setup for restart when Richard Purdie
2011-11-18 10:13       ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Richard Purdie
2011-11-24  6:47     ` [PATCH 6/7] ARM: restart: only perform setup for restart when Lennert Buytenhek
2011-11-24  6:47       ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Lennert Buytenhek
2011-12-03  9:23     ` [PATCH 6/7] ARM: restart: only perform setup for restart when Kukjin Kim
2011-12-03  9:23       ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Kukjin Kim
2011-12-03  9:30       ` [PATCH 6/7] ARM: restart: only perform setup for restart when Russell King - ARM Linux
2011-12-03  9:30         ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
2011-12-03  9:45         ` [PATCH 6/7] ARM: restart: only perform setup for restart when Kukjin Kim
2011-12-03  9:45           ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Kukjin Kim
2011-11-18  3:43   ` Wan ZongShun
2011-11-21  3:42   ` Eric Miao
2011-11-06 17:33 ` [PATCH 7/7] ARM: restart: remove local_irq_disable() from within arch_reset() Russell King - ARM Linux
2011-11-06 17:39 ` [02: PATCH 0/41] Platform arch_reset changes Russell King - ARM Linux
2011-11-06 17:54   ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
2011-11-06 17:55     ` [PATCH 1/5] XXX: tcc8k Russell King - ARM Linux
2011-11-06 17:55     ` [PATCH 2/5] ARM: restart: omap: use new restart hook XXX WIP XXX Russell King - ARM Linux
2011-11-09 22:27       ` Tony Lindgren
2011-11-10 22:32         ` Russell King - ARM Linux
2011-11-06 17:56     ` [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX Russell King - ARM Linux
2011-11-07 10:30       ` Russell King - ARM Linux
2011-11-07 11:17         ` Kyungmin Park
2011-11-07 11:52           ` Russell King - ARM Linux
2011-11-08  5:21             ` Kukjin Kim
2011-11-10 23:15               ` Russell King - ARM Linux
2011-11-15  7:47                 ` Kukjin Kim
2011-11-06 17:56     ` [PATCH 4/5] ARM: restart: s5pv210: " Russell King - ARM Linux
2011-11-08  5:23       ` Kukjin Kim
2011-11-08 10:04         ` Russell King - ARM Linux
2011-11-06 17:56     ` [PATCH 5/5] ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook Russell King - ARM Linux
2011-11-08  5:22       ` Kukjin Kim
2011-11-08  7:00     ` [03: PATCH 0/5] The remaining stuff Kukjin Kim
2011-11-08  9:00       ` Russell King - ARM Linux
2011-11-09  5:06         ` Kukjin Kim
2011-11-11 17:16     ` Russell King - ARM Linux
2011-11-14 19:01       ` Nori, Sekhar
2011-11-28 10:40       ` Linus Walleij
2011-11-28 11:07         ` Russell King - ARM Linux
2011-11-28 11:23           ` Linus Walleij
2011-11-07 13:38   ` [02: PATCH 0/41] Platform arch_reset changes Will Deacon
2011-11-07 13:52     ` Russell King - ARM Linux
2011-11-08  4:24       ` Nicolas Pitre
2011-11-06 17:40 ` [PATCH 01/41] ARM: clps711x: consolidate irq/mm/time code into a single file Russell King - ARM Linux
2011-11-06 17:40 ` [PATCH 02/41] ARM: restart: remove poodle restart handler Russell King - ARM Linux
2011-11-17 17:24   ` Russell King - ARM Linux
2011-11-18 10:11     ` Richard Purdie
2011-11-06 17:40 ` [PATCH 03/41] ARM: restart: remove s3c24xx " Russell King - ARM Linux
2011-11-08  5:00   ` Kukjin Kim
2011-11-06 17:41 ` [PATCH 04/41] ARM: restart: at91: use new restart hook Russell King - ARM Linux
2011-11-15  1:16   ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-15  8:52     ` Russell King - ARM Linux
2011-11-15  9:15       ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-06 17:41 ` [PATCH 05/41] ARM: restart: clps711x: " Russell King - ARM Linux
2011-11-06 17:41 ` [PATCH 06/41] ARM: restart: cns3xxx: " Russell King - ARM Linux
2011-11-24 20:30   ` Russell King - ARM Linux
2011-11-24 21:00     ` Anton Vorontsov
2011-11-06 17:42 ` [PATCH 07/41] ARM: restart: dove: " Russell King - ARM Linux
2011-11-24 22:07   ` Nicolas Pitre
2011-11-06 17:42 ` [PATCH 08/41] ARM: restart: ebsa110: " Russell King - ARM Linux
2011-11-06 17:43 ` [PATCH 09/41] ARM: restart: ep93xx: " Russell King - ARM Linux
2011-11-07 17:10   ` H Hartley Sweeten
2011-11-06 17:43 ` [PATCH 10/41] ARM: restart: footbridge: " Russell King - ARM Linux
2011-11-06 17:43 ` [PATCH 11/41] ARM: restart: h720x: " Russell King - ARM Linux
2011-11-06 17:44 ` [PATCH 12/41] ARM: restart: highbank: " Russell King - ARM Linux
2011-11-07 15:43   ` Rob Herring
2011-11-06 17:44 ` [PATCH 13/41] ARM: restart: integrator: " Russell King - ARM Linux
2011-11-25 21:41   ` Linus Walleij
2011-11-06 17:44 ` [PATCH 14/41] ARM: restart: iop3xx: " Russell King - ARM Linux
2011-11-17 17:28   ` Russell King - ARM Linux
2011-11-24  6:45     ` Lennert Buytenhek
2011-11-06 17:45 ` [PATCH 15/41] ARM: restart: iop13xx: " Russell King - ARM Linux
2011-11-17 17:29   ` Russell King - ARM Linux
2011-11-24  6:45     ` Lennert Buytenhek
2011-11-06 17:45 ` [PATCH 16/41] ARM: restart: ixp2000: " Russell King - ARM Linux
2011-11-17 17:29   ` Russell King - ARM Linux
2011-11-24  6:45     ` Lennert Buytenhek
2011-11-06 17:45 ` [PATCH 17/41] ARM: restart: ixp23xx: " Russell King - ARM Linux
2011-11-17 17:30   ` Russell King - ARM Linux
2011-11-24  6:46     ` Lennert Buytenhek
2011-11-06 17:46 ` [PATCH 18/41] ARM: restart: ixp4xx: " Russell King - ARM Linux
2011-11-17 17:30   ` Russell King - ARM Linux
2011-11-18  7:49     ` Krzysztof Halasa
2011-11-18 19:46       ` Russell King - ARM Linux
2011-11-18 22:11         ` Krzysztof Halasa
2011-11-06 17:46 ` [PATCH 19/41] ARM: restart: kirkwood: " Russell King - ARM Linux
2011-11-07  2:58   ` Nicolas Pitre
2011-11-06 17:46 ` [PATCH 20/41] ARM: restart: lpc32xx: " Russell King - ARM Linux
2011-11-06 17:47 ` [PATCH 21/41] ARM: restart: mmp: " Russell King - ARM Linux
2011-11-06 17:47 ` [PATCH 22/41] ARM: restart: mv78xx0: " Russell King - ARM Linux
2011-11-24 22:02   ` Nicolas Pitre
2011-11-06 17:47 ` [PATCH 23/41] ARM: restart: mxc: " Russell King - ARM Linux
2011-11-24 20:31   ` Russell King - ARM Linux
2011-11-25 12:06     ` Sascha Hauer
2011-11-06 17:48 ` [PATCH 24/41] ARM: restart: mxs: " Russell King - ARM Linux
2011-11-11  4:02   ` Shawn Guo
2011-11-06 17:48 ` [PATCH 25/41] ARM: restart: orion5x: " Russell King - ARM Linux
2011-11-24 22:05   ` Nicolas Pitre
2011-11-06 17:48 ` [PATCH 26/41] ARM: restart: pnx4008: " Russell King - ARM Linux
2011-11-06 17:49 ` [PATCH 27/41] ARM: restart: prima2: " Russell King - ARM Linux
2011-11-07  8:15   ` Barry Song
2011-11-06 17:49 ` [PATCH 28/41] ARM: restart: pxa: " Russell King - ARM Linux
2011-11-17 17:27   ` Russell King - ARM Linux
2011-11-18 10:11     ` Richard Purdie
2011-11-06 17:49 ` [PATCH 29/41] ARM: restart: realview: " Russell King - ARM Linux
2011-11-06 17:50 ` [PATCH 30/41] ARM: restart: riscpc: " Russell King - ARM Linux
2011-11-06 17:50 ` [PATCH 31/41] ARM: restart: sa1100: " Russell King - ARM Linux
2011-11-06 17:50 ` [PATCH 32/41] ARM: restart: shark: " Russell King - ARM Linux
2011-11-06 17:51 ` [PATCH 33/41] ARM: restart: spear: " Russell King - ARM Linux
2011-11-24 20:32   ` Russell King - ARM Linux
2011-11-25  3:35     ` Viresh Kumar
2011-11-06 17:51 ` [PATCH 34/41] ARM: restart: tegra: " Russell King - ARM Linux
2011-11-06 17:51 ` [PATCH 35/41] ARM: restart: u300: " Russell King - ARM Linux
2011-11-07  8:10   ` Linus Walleij
2011-11-06 17:52 ` [PATCH 36/41] ARM: restart: versatile: " Russell King - ARM Linux
2011-11-06 17:52 ` [PATCH 37/41] ARM: restart: Versatile Express: " Russell King - ARM Linux
2011-11-06 17:52 ` [PATCH 38/41] ARM: restart: w90x900: " Russell King - ARM Linux
2011-11-07 17:16   ` Russell King - ARM Linux
2011-11-06 17:53 ` [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk Russell King - ARM Linux
2011-11-11 18:46   ` Linus Walleij
2011-11-11 19:00     ` Russell King - ARM Linux
2011-11-11 19:32       ` Linus Walleij
2011-11-06 17:53 ` [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset() Russell King - ARM Linux
2011-11-07  2:59   ` Nicolas Pitre
2011-11-08 15:47   ` Jamie Iles
2011-11-10 23:35   ` Tony Lindgren
2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
2011-11-07  3:02   ` Nicolas Pitre
2011-11-07 17:15   ` H Hartley Sweeten
2011-11-08 15:48   ` Jamie Iles
2011-11-10 23:38   ` Tony Lindgren
2011-11-25 21:44   ` Linus Walleij
2011-11-07  2:48 ` [01: PATCH 0/7] Preparation for arch_reset changes Nicolas Pitre
2011-11-07 13:31 ` Will Deacon
2011-11-07 17:24 ` H Hartley Sweeten
2011-11-08  5:00 ` Kukjin Kim
2011-11-08 10:05   ` Russell King - ARM Linux
2011-11-21  9:56 ` Russell King - ARM Linux
2011-11-22 11:21   ` Will Deacon
2011-11-22 15:24     ` Russell King - ARM Linux
2011-11-22 15:29       ` Will Deacon

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.