Skip to contentSkip to conversation

Preparation for arch_reset changes

PATCH New Russell King - ARM Linux 24 participants 152 messages Nov 6, 2011 – Dec 3, 2011 Page 1 of 2

Subsystems (27)
lore
Share & tools
lore
#0 lore raw

cover Preparation for arch_reset changes

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(-)
#1 lore raw

PATCH 1/7 ARM: restart: add restart hook to machine_desc record

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.

---
 arch/arm/include/asm/mach/arch.h |    1 +
 arch/arm/kernel/setup.c          |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/include/asm/mach/arch.h +1 -0
index 7d19425..8aa397a 100644
@@ -45,6 +45,7 @@ struct machine_desc {
 #ifdef CONFIG_MULTI_IRQ_HANDLER
 	void			(*handle_irq)(struct pt_regs *);
 #endif
+	void			(*restart)(char, const char *);
 };
 
 /*
arch/arm/kernel/setup.c +3 -0
index bda0a21..d187d0a 100644
@@ -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
Signature · 1 line
1.7.4.4
maintainer
#2 lore raw

PATCH 1/7 ARM: restart: add restart hook to machine_desc record

Quoted 27 lines · Russell King - ARM Linux

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.

---
 arch/arm/include/asm/mach/arch.h |    1 +
 arch/arm/kernel/setup.c          |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/include/asm/mach/arch.h +1 -0
index 7d19425..8aa397a 100644
@@ -45,6 +45,7 @@ struct machine_desc {
 #ifdef CONFIG_MULTI_IRQ_HANDLER
 	void			(*handle_irq)(struct pt_regs *);
 #endif
+	void			(*restart)(char, const char *);
 };
 
 /*
arch/arm/kernel/setup.c +0 -0
index bda0a21..d187d0a 100644

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 930

Quoted 9 lines
arch/arm/kernel/setup.c +3 -0
@@ -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:

#4 lore raw

PATCH 2/7 ARM: restart: allow platforms more flexibility specifying restart mode

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/include/asm/mach/arch.h +4 -4
index 8aa397a..6fe6cf0 100644
@@ -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	*/
arch/arm/kernel/setup.c +2 -2
index d187d0a..2540b9c 100644
@@ -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;
arch/arm/mach-ebsa110/core.c +1 -1
index d0ce8ab..ce3ed24 100644
@@ -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,
arch/arm/mach-footbridge/cats-hw.c +1 -1
index d5f1785..60b6774 100644
@@ -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,
Signature · 1 line
1.7.4.4
#5 lore raw

PATCH 3/7 ARM: restart: add default restart modes for PXA mioa701, spitz and tosa

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-pxa/mioa701.c +1 -0
index b938fc2..4f47a76 100644
@@ -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,
arch/arm/mach-pxa/spitz.c +3 -0
index d8dec91..f5bafcc 100644
@@ -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,
arch/arm/mach-pxa/tosa.c +1 -0
index 402b0c9..ef64530 100644
@@ -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,
Signature · 1 line
1.7.4.4
maintainer
#6 lore raw

PATCH 3/7 ARM: restart: add default restart modes for PXA mioa701, spitz and tosa

Quoted 2 lines · Russell King - ARM Linux

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

For mioa701:

Cheers.

--
Robert

#7 lore raw

PATCH 4/7 ARM: restart: move reboot failure handing into machine_restart()

In reply to Russell King - ARM Linux

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

---
 arch/arm/kernel/process.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)
arch/arm/kernel/process.c +9 -11
index fd08140..18f1c21 100644
@@ -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)
Signature · 1 line
1.7.4.4
#9 lore raw

PATCH 5/7 ARM: restart: remove argument to setup_mm_for_reboot()

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/kernel/machine_kexec.c +2 -2
index c1b4463..cc40b96 100644
@@ -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();
arch/arm/kernel/process.c +2 -2
index 18f1c21..dca7971 100644
@@ -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();
arch/arm/mm/idmap.c +1 -1
index 2be9139..296ad2e 100644
@@ -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
arch/arm/mm/nommu.c +1 -1
index 941a98c..8841751 100644
@@ -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)
 {
 }
 
Signature · 1 line
1.7.4.4
#11 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

In reply to Russell King - ARM Linux

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.

---
 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(-)
arch/arm/include/asm/system.h +1 -0
index 984014b..fe7de75 100644
@@ -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)
arch/arm/kernel/process.c +11 -2
index dca7971..52b4306 100644
@@ -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);
 }
 
arch/arm/mach-clps711x/include/mach/system.h +1 -1
index f916cd7..6c11993 100644
@@ -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
arch/arm/mach-ebsa110/include/mach/system.h +1 -1
index 9a26245..0d5df72 100644
@@ -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
arch/arm/mach-footbridge/include/mach/system.h +1 -1
index 0b29315..249f895 100644
@@ -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
arch/arm/mach-iop32x/include/mach/system.h +1 -1
index a4b808f..4865a9b 100644
@@ -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);
 }
arch/arm/mach-iop33x/include/mach/system.h +1 -1
index f192a34..86d1b20 100644
@@ -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);
 }
arch/arm/mach-ixp4xx/include/mach/system.h +1 -1
index 54c0af7..24337d9 100644
@@ -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 */
 
arch/arm/mach-ks8695/include/mach/system.h +1 -1
index fb1dda9..ceb19c9 100644
@@ -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);
arch/arm/mach-mmp/include/mach/system.h +2 -2
index 1a8a25e..cb06379 100644
@@ -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 */
arch/arm/mach-mxs/system.c +1 -1
index 20ec3bd..cab8836 100644
@@ -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)
arch/arm/mach-pnx4008/include/mach/system.h +1 -1
index 5dda2bb..5d6384a 100644
@@ -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
arch/arm/mach-pxa/reset.c +1 -1
index 01e9d64..b8bcda1 100644
@@ -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();
arch/arm/mach-rpc/include/mach/system.h +1 -1
index 45c7b93..a354f4d 100644
@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
 	/*
 	 * Jump into the ROM
 	 */
-	cpu_reset(0);
+	soft_restart(0);
 }
arch/arm/mach-s3c2410/include/mach/system-reset.h +2 -2
index 6faadce..913893d 100644
@@ -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);
 }
arch/arm/mach-s3c64xx/include/mach/system.h +1 -1
index 2e58cb7..d8ca578 100644
@@ -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 */
arch/arm/mach-sa1100/include/mach/system.h +1 -1
index ba9da9f..345d35b 100644
@@ -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;
arch/arm/mach-shmobile/include/mach/system.h +1 -1
index 76a687e..956ac18 100644
@@ -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
arch/arm/mach-w90x900/include/mach/system.h +1 -1
index ce228bd..68875a1 100644
@@ -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);
 	}
arch/arm/plat-mxc/system.c +1 -1
index 9dad8dc..b1cfc6a 100644
@@ -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)
arch/arm/plat-spear/include/plat/system.h +1 -1
index a235fa0..1171f22 100644
@@ -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);
Signature · 1 line
1.7.4.4
#12 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

Ack?

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

Quoted 334 lines · Russell King - ARM Linux

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.

---
 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(-)
arch/arm/include/asm/system.h +1 -0
index 984014b..fe7de75 100644
@@ -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)
arch/arm/kernel/process.c +11 -2
index dca7971..52b4306 100644
@@ -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);
 }
 
arch/arm/mach-clps711x/include/mach/system.h +1 -1
index f916cd7..6c11993 100644
@@ -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
arch/arm/mach-ebsa110/include/mach/system.h +1 -1
index 9a26245..0d5df72 100644
@@ -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
arch/arm/mach-footbridge/include/mach/system.h +1 -1
index 0b29315..249f895 100644
@@ -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
arch/arm/mach-iop32x/include/mach/system.h +1 -1
index a4b808f..4865a9b 100644
@@ -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);
 }
arch/arm/mach-iop33x/include/mach/system.h +1 -1
index f192a34..86d1b20 100644
@@ -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);
 }
arch/arm/mach-ixp4xx/include/mach/system.h +1 -1
index 54c0af7..24337d9 100644
@@ -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 */
 
arch/arm/mach-ks8695/include/mach/system.h +1 -1
index fb1dda9..ceb19c9 100644
@@ -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);
arch/arm/mach-mmp/include/mach/system.h +2 -2
index 1a8a25e..cb06379 100644
@@ -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 */
arch/arm/mach-mxs/system.c +1 -1
index 20ec3bd..cab8836 100644
@@ -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)
arch/arm/mach-pnx4008/include/mach/system.h +1 -1
index 5dda2bb..5d6384a 100644
@@ -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
arch/arm/mach-pxa/reset.c +1 -1
index 01e9d64..b8bcda1 100644
@@ -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();
arch/arm/mach-rpc/include/mach/system.h +1 -1
index 45c7b93..a354f4d 100644
@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
 	/*
 	 * Jump into the ROM
 	 */
-	cpu_reset(0);
+	soft_restart(0);
 }
arch/arm/mach-s3c2410/include/mach/system-reset.h +2 -2
index 6faadce..913893d 100644
@@ -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);
 }
arch/arm/mach-s3c64xx/include/mach/system.h +1 -1
index 2e58cb7..d8ca578 100644
@@ -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 */
arch/arm/mach-sa1100/include/mach/system.h +1 -1
index ba9da9f..345d35b 100644
@@ -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;
arch/arm/mach-shmobile/include/mach/system.h +1 -1
index 76a687e..956ac18 100644
@@ -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
arch/arm/mach-w90x900/include/mach/system.h +1 -1
index ce228bd..68875a1 100644
@@ -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);
 	}
arch/arm/plat-mxc/system.c +1 -1
index 9dad8dc..b1cfc6a 100644
@@ -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)
arch/arm/plat-spear/include/plat/system.h +1 -1
index a235fa0..1171f22 100644
@@ -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);
Signature · 7 lines
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
maintainer
#13 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

Quoted 4 lines · Russell King - ARM Linux

Ack?

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

Quoted 337 lines · Russell King - ARM Linux
Quoted 334 lines

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.

---
 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(-)
arch/arm/include/asm/system.h +1 -0
index 984014b..fe7de75 100644
@@ -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)
arch/arm/kernel/process.c +11 -2
index dca7971..52b4306 100644
@@ -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);
 }
 
arch/arm/mach-clps711x/include/mach/system.h +1 -1
index f916cd7..6c11993 100644
@@ -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
arch/arm/mach-ebsa110/include/mach/system.h +1 -1
index 9a26245..0d5df72 100644
@@ -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
arch/arm/mach-footbridge/include/mach/system.h +1 -1
index 0b29315..249f895 100644
@@ -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
arch/arm/mach-iop32x/include/mach/system.h +1 -1
index a4b808f..4865a9b 100644
@@ -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);
 }
arch/arm/mach-iop33x/include/mach/system.h +1 -1
index f192a34..86d1b20 100644
@@ -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);
 }
arch/arm/mach-ixp4xx/include/mach/system.h +1 -1
index 54c0af7..24337d9 100644
@@ -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 */
 
arch/arm/mach-ks8695/include/mach/system.h +1 -1
index fb1dda9..ceb19c9 100644
@@ -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);
arch/arm/mach-mmp/include/mach/system.h +2 -2
index 1a8a25e..cb06379 100644
@@ -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 */
arch/arm/mach-mxs/system.c +1 -1
index 20ec3bd..cab8836 100644
@@ -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)
arch/arm/mach-pnx4008/include/mach/system.h +1 -1
index 5dda2bb..5d6384a 100644
@@ -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
arch/arm/mach-pxa/reset.c +1 -1
index 01e9d64..b8bcda1 100644
@@ -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();
arch/arm/mach-rpc/include/mach/system.h +1 -1
index 45c7b93..a354f4d 100644
@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)
 	/*
 	 * Jump into the ROM
 	 */
-	cpu_reset(0);
+	soft_restart(0);
 }
arch/arm/mach-s3c2410/include/mach/system-reset.h +2 -2
index 6faadce..913893d 100644
@@ -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);
 }
arch/arm/mach-s3c64xx/include/mach/system.h +1 -1
index 2e58cb7..d8ca578 100644
@@ -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 */
arch/arm/mach-sa1100/include/mach/system.h +1 -1
index ba9da9f..345d35b 100644
@@ -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;
arch/arm/mach-shmobile/include/mach/system.h +1 -1
index 76a687e..956ac18 100644
@@ -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
arch/arm/mach-w90x900/include/mach/system.h +1 -1
index ce228bd..68875a1 100644
@@ -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);
 	}
arch/arm/plat-mxc/system.c +1 -1
index 9dad8dc..b1cfc6a 100644
@@ -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)
arch/arm/plat-spear/include/plat/system.h +1 -1
index a235fa0..1171f22 100644
@@ -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);
Signature · 7 lines
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
Signature · 4 lines
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 |
#14 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

In reply to Russell King - ARM Linux
Quoted 17 lines · Russell King - ARM Linux
Quoted 11 lines

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.

---

arch/arm/plat-spear/include/plat/system.h +0 -0
Quoted 4 lines

index a235fa0..1171f22 100644

arch/arm/plat-spear/include/plat/system.h +0 -0
@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
Quoted 8 lines

arch/arm/plat-spear/include/plat/system.h static inline void arch_reset(char mode, const char *cmd) · line 37

Quoted 8 lines
arch/arm/plat-spear/include/plat/system.h +1 -1
 {
      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:

Signature · 1 line
viresh
#15 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

In reply to Russell King - ARM Linux
Quoted 6 lines · Russell King - ARM Linux
Quoted 6 lines

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 +-
Signature · 1 line
Krzysztof Halasa
#17 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

In reply to Russell King - ARM Linux
Quoted 16 lines · Russell King - ARM Linux

Ack?

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

Quoted 10 lines · Russell King - ARM Linux

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.

Quoted 24 lines
Quoted 24 lines
---
 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(-)
#18 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

In reply to Russell King - ARM Linux
Quoted 16 lines · Russell King - ARM Linux

Ack?

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

Quoted 10 lines · Russell King - ARM Linux

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.

#19 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

In reply to Russell King - ARM Linux
Quoted 17 lines · Russell King - ARM Linux

Ack?

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

Quoted 10 lines · Russell King - ARM Linux

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.

Sorry for late response...

For Samsung stuff:

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Quoted 45 lines
Quoted 24 lines
---
 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(-)

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/system.h

Quoted 19 lines

index 984014b..fe7de75 100644

arch/arm/include/asm/system.h +1 -0
@@ -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)
arch/arm/kernel/process.c +0 -0
index dca7971..52b4306 100644
@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
 __setup("nohlt", nohlt_setup);
 __setup("hlt", hlt_setup);
 
Quoted 6 lines

arch/arm/kernel/process.c void arm_machine_restart(char mode, const char

Quoted 6 lines
arch/arm/kernel/process.c +1 -1
-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)

Quoted 302 lines

Review

Quoted 18 lines
arch/arm/kernel/process.c +10 -1
 	/* 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);
 }
 
(quoted diff) +0 -0

b/arch/arm/mach-clps711x/include/mach/system.h

Review

Quoted 13 lines

index f916cd7..6c11993 100644

arch/arm/mach-clps711x/include/mach/system.h +1 -1
@@ -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
(quoted diff) +0 -0

b/arch/arm/mach-ebsa110/include/mach/system.h

Review

Quoted 12 lines

index 9a26245..0d5df72 100644

arch/arm/mach-ebsa110/include/mach/system.h +1 -1
@@ -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
(quoted diff) +0 -0

b/arch/arm/mach-footbridge/include/mach/system.h

arch/arm/mach-footbridge/include/mach/system.h static inline void arch_reset(char mode, const char

Quoted 4 lines

index 0b29315..249f895 100644

arch/arm/mach-footbridge/include/mach/system.h +0 -0
@@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char

*cmd)

arch/arm/mach-

Quoted 9 lines
arch/arm/mach-footbridge/include/mach/system.h +1 -1
 		/*
 		 * Jump into the ROM
 		 */
-		cpu_reset(0x41000000);
+		soft_restart(0x41000000);
 	} else {
 		if (machine_is_netwinder()) {
 			/* open up the SuperIO chip
arch/arm/mach- renamed from arch/arm/mach-iop32x/include/mach/system.h +0 -0

iop32x/include/mach/system.h

arch/arm/mach-iop32x/include/mach/system.h static inline void arch_reset(char mode, const char

Quoted 4 lines

index a4b808f..4865a9b 100644

arch/arm/mach-iop32x/include/mach/system.h +0 -0
@@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char

*cmd)

arch/arm/mach-

Quoted 7 lines
arch/arm/mach-iop32x/include/mach/system.h +1 -1
 	*IOP3XX_PCSR = 0x30;
 
 	/* Jump into ROM at address 0 */
-	cpu_reset(0);
+	soft_restart(0);
 }
arch/arm/mach- renamed from arch/arm/mach-iop33x/include/mach/system.h +0 -0

iop33x/include/mach/system.h

arch/arm/mach-iop33x/include/mach/system.h static inline void arch_reset(char mode, const char

Quoted 4 lines

index f192a34..86d1b20 100644

arch/arm/mach-iop33x/include/mach/system.h +0 -0
@@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char

*cmd)

arch/arm/mach-

Quoted 7 lines
arch/arm/mach-iop33x/include/mach/system.h +1 -1
 	*IOP3XX_PCSR = 0x30;
 
 	/* Jump into ROM at address 0 */
-	cpu_reset(0);
+	soft_restart(0);
 }
arch/arm/mach- renamed from arch/arm/mach-ixp4xx/include/mach/system.h +0 -0

ixp4xx/include/mach/system.h

arch/arm/mach-ixp4xx/include/mach/system.h static inline void arch_reset(char mode, const char

Quoted 4 lines

index 54c0af7..24337d9 100644

arch/arm/mach-ixp4xx/include/mach/system.h +0 -0
@@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char

*cmd)

arch/arm/mach-

Quoted 9 lines
arch/arm/mach-ixp4xx/include/mach/system.h +1 -1
 {
 	if ( 1 && mode == 's') {
 		/* Jump into ROM at address 0 */
-		cpu_reset(0);
+		soft_restart(0);
 	} else {
 		/* Use on-chip reset capability */
 
arch/arm/mach- renamed from arch/arm/mach-ks8695/include/mach/system.h +0 -0

ks8695/include/mach/system.h

arch/arm/mach-

Quoted 13 lines

index fb1dda9..ceb19c9 100644

arch/arm/mach-ks8695/include/mach/system.h +1 -1
@@ -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);
arch/arm/mach- renamed from arch/arm/mach-mmp/include/mach/system.h +0 -0

mmp/include/mach/system.h

Review

Quoted 28 lines

index 1a8a25e..cb06379 100644

arch/arm/mach-mmp/include/mach/system.h +2 -2
@@ -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 */
arch/arm/mach-mxs/system.c +1 -1
index 20ec3bd..cab8836 100644
@@ -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)
(quoted diff) +0 -0

b/arch/arm/mach-pnx4008/include/mach/system.h

arch/arm/mach-

Quoted 26 lines

index 5dda2bb..5d6384a 100644

arch/arm/mach-pnx4008/include/mach/system.h +1 -1
@@ -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
arch/arm/mach-pxa/reset.c +1 -1
index 01e9d64..b8bcda1 100644
@@ -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();
arch/arm/mach- renamed from arch/arm/mach-rpc/include/mach/system.h +0 -0

rpc/include/mach/system.h

arch/arm/mach-rpc/include/mach/system.h static inline void arch_reset(char mode, const char

Quoted 4 lines

index 45c7b93..a354f4d 100644

arch/arm/mach-rpc/include/mach/system.h +0 -0
@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char

*cmd)

Review

Quoted 7 lines
arch/arm/mach-rpc/include/mach/system.h +1 -1
 	/*
 	 * Jump into the ROM
 	 */
-	cpu_reset(0);
+	soft_restart(0);
 }
(quoted diff) +0 -0

b/arch/arm/mach-s3c2410/include/mach/system-reset.h

Review

Quoted 20 lines

index 6faadce..913893d 100644

arch/arm/mach-s3c2410/include/mach/system-reset.h +2 -2
@@ -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);
 }
(quoted diff) +0 -0

b/arch/arm/mach-s3c64xx/include/mach/system.h

arch/arm/mach-

Quoted 13 lines

index 2e58cb7..d8ca578 100644

arch/arm/mach-s3c64xx/include/mach/system.h +1 -1
@@ -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 */
arch/arm/mach- renamed from arch/arm/mach-sa1100/include/mach/system.h +0 -0

sa1100/include/mach/system.h

arch/arm/mach-sa1100/include/mach/system.h static inline void arch_reset(char mode, const char

Quoted 4 lines

index ba9da9f..345d35b 100644

arch/arm/mach-sa1100/include/mach/system.h +0 -0
@@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char

*cmd)

Review

Quoted 9 lines
arch/arm/mach-sa1100/include/mach/system.h +1 -1
 {
 	if (mode == 's') {
 		/* Jump into ROM at address 0 */
-		cpu_reset(0);
+		soft_restart(0);
 	} else {
 		/* Use on-chip reset capability */
 		RSRR = RSRR_SWR;
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/include/mach/system.h

Review

Quoted 13 lines

index 76a687e..956ac18 100644

arch/arm/mach-shmobile/include/mach/system.h +1 -1
@@ -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
(quoted diff) +0 -0

b/arch/arm/mach-w90x900/include/mach/system.h

arch/arm/plat-

Quoted 26 lines

index ce228bd..68875a1 100644

arch/arm/mach-w90x900/include/mach/system.h +1 -1
@@ -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);
 	}
arch/arm/plat-mxc/system.c +1 -1
index 9dad8dc..b1cfc6a 100644
@@ -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)
arch/arm/plat- renamed from arch/arm/plat-spear/include/plat/system.h +0 -0

spear/include/plat/system.h

arch/arm/plat-spear/include/plat/system.h static inline void arch_reset(char mode, const char

Quoted 4 lines

index a235fa0..1171f22 100644

arch/arm/plat-spear/include/plat/system.h +0 -0
@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char

*cmd)

Quoted 12 lines
arch/arm/plat-spear/include/plat/system.h +1 -2
 {
 	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

Quoted 4 lines

_______________________________________________
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

#20 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

Quoted 17 lines · Kukjin Kim
Quoted 16 lines · Russell King - ARM Linux

Ack?

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

Quoted 9 lines · Russell King - ARM Linux

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.

Quoted 6 lines
Quoted 1 line
Quoted 1 line

Sorry for late response...

For Samsung stuff:

Too late, it's now part of devel-stable so I can't accept any more acks for this. Sorry.

#21 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

Quoted 26 lines · Russell King - ARM Linux
Quoted 8 lines · Kukjin Kim
Quoted 7 lines · Russell King - ARM Linux

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

Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line

We only need to set the system up for a soft-restart if we're going

to

Quoted 1 line
Quoted 1 line
Quoted 1 line

be doing a soft-restart. Provide a new function (soft_restart())

which

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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

Quoted 1 line
Quoted 1 line
Quoted 1 line

the page tables prepared for a soft-restart, and caches will still

be

Quoted 4 lines
Quoted 3 lines
Quoted 3 lines

enabled.

Quoted 7 lines
Quoted 4 lines

Sorry for late response...

For Samsung stuff:

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 <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#22 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

In reply to Russell King - ARM Linux

2011/11/7 Russell King - ARM Linux <[email protected]>

Quoted 321 lines

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.

---

?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(-)

arch/arm/include/asm/system.h +1 -0
index 984014b..fe7de75 100644
@@ -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)
arch/arm/kernel/process.c +1 -1
index dca7971..52b4306 100644
@@ -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();

arch/arm/kernel/process.c +0 -0
@@ -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);

arch/arm/kernel/process.c +9 -0
+}
+
+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);
?}

arch/arm/mach-clps711x/include/mach/system.h +1 -1
index f916cd7..6c11993 100644
@@ -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

arch/arm/mach-ebsa110/include/mach/system.h +1 -1
index 9a26245..0d5df72 100644
@@ -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

arch/arm/mach-footbridge/include/mach/system.h +0 -0
index 0b29315..249f895 100644
@@ -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

arch/arm/mach-iop32x/include/mach/system.h +0 -0
index a4b808f..4865a9b 100644
@@ -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);
?}

arch/arm/mach-iop33x/include/mach/system.h +0 -0
index f192a34..86d1b20 100644
@@ -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);
?}

arch/arm/mach-ixp4xx/include/mach/system.h +0 -0
index 54c0af7..24337d9 100644
@@ -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 */

arch/arm/mach-ks8695/include/mach/system.h +1 -1
index fb1dda9..ceb19c9 100644
@@ -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);

arch/arm/mach-mmp/include/mach/system.h +1 -1
index 1a8a25e..cb06379 100644
@@ -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 */

arch/arm/mach-mxs/system.c +0 -0
index 20ec3bd..cab8836 100644
@@ -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)

arch/arm/mach-pnx4008/include/mach/system.h +1 -1
index 5dda2bb..5d6384a 100644
@@ -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

arch/arm/mach-pxa/reset.c +0 -0
index 01e9d64..b8bcda1 100644
@@ -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();

arch/arm/mach-rpc/include/mach/system.h +0 -0
index 45c7b93..a354f4d 100644
@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)

? ? ? ?/*
? ? ? ? * Jump into the ROM
? ? ? ? */
- ? ? ? cpu_reset(0);
+ ? ? ? soft_restart(0);
?}

arch/arm/mach-s3c2410/include/mach/system-reset.h +1 -1
index 6faadce..913893d 100644
@@ -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);
?}

arch/arm/mach-s3c64xx/include/mach/system.h +0 -0
index 2e58cb7..d8ca578 100644
@@ -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 */

arch/arm/mach-sa1100/include/mach/system.h +0 -0
index ba9da9f..345d35b 100644
@@ -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;

arch/arm/mach-shmobile/include/mach/system.h +1 -1
index 76a687e..956ac18 100644
@@ -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

arch/arm/mach-w90x900/include/mach/system.h +0 -0
index ce228bd..68875a1 100644
@@ -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); ? ? ? ?}

arch/arm/plat-mxc/system.c +0 -0
index 9dad8dc..b1cfc6a 100644
@@ -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)

arch/arm/plat-spear/include/plat/system.h +0 -0
index a235fa0..1171f22 100644
@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
 ?{
 ? ? ? ?if (mode == 's') {
Quoted 6 lines

? ? ? ? ? ? ? ?/* 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:

Quoted 8 lines

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

#23 lore raw

PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting

In reply to Russell King - ARM Linux
Quoted 10 lines · Russell King - ARM Linux

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.

For the part of MMP and PXA,

Quoted 325 lines

---

?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(-)

arch/arm/include/asm/system.h +1 -0
index 984014b..fe7de75 100644
@@ -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)
arch/arm/kernel/process.c +1 -1
index dca7971..52b4306 100644
@@ -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();

arch/arm/kernel/process.c +0 -0
@@ -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);

arch/arm/kernel/process.c +9 -0
+}
+
+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);
?}

arch/arm/mach-clps711x/include/mach/system.h +1 -1
index f916cd7..6c11993 100644
@@ -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

arch/arm/mach-ebsa110/include/mach/system.h +1 -1
index 9a26245..0d5df72 100644
@@ -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

arch/arm/mach-footbridge/include/mach/system.h +0 -0
index 0b29315..249f895 100644
@@ -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

arch/arm/mach-iop32x/include/mach/system.h +0 -0
index a4b808f..4865a9b 100644
@@ -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);
?}

arch/arm/mach-iop33x/include/mach/system.h +0 -0
index f192a34..86d1b20 100644
@@ -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);
?}

arch/arm/mach-ixp4xx/include/mach/system.h +0 -0
index 54c0af7..24337d9 100644
@@ -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 */

arch/arm/mach-ks8695/include/mach/system.h +1 -1
index fb1dda9..ceb19c9 100644
@@ -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);

arch/arm/mach-mmp/include/mach/system.h +1 -1
index 1a8a25e..cb06379 100644
@@ -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 */

arch/arm/mach-mxs/system.c +0 -0
index 20ec3bd..cab8836 100644
@@ -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)

arch/arm/mach-pnx4008/include/mach/system.h +1 -1
index 5dda2bb..5d6384a 100644
@@ -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

arch/arm/mach-pxa/reset.c +0 -0
index 01e9d64..b8bcda1 100644
@@ -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();

arch/arm/mach-rpc/include/mach/system.h +0 -0
index 45c7b93..a354f4d 100644
@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)

? ? ? ?/*
? ? ? ? * Jump into the ROM
? ? ? ? */
- ? ? ? cpu_reset(0);
+ ? ? ? soft_restart(0);
?}

arch/arm/mach-s3c2410/include/mach/system-reset.h +1 -1
index 6faadce..913893d 100644
@@ -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);
?}

arch/arm/mach-s3c64xx/include/mach/system.h +0 -0
index 2e58cb7..d8ca578 100644
@@ -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 */

arch/arm/mach-sa1100/include/mach/system.h +0 -0
index ba9da9f..345d35b 100644
@@ -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;

arch/arm/mach-shmobile/include/mach/system.h +1 -1
index 76a687e..956ac18 100644
@@ -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

arch/arm/mach-w90x900/include/mach/system.h +0 -0
index ce228bd..68875a1 100644
@@ -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); ? ? ? ?}

arch/arm/plat-mxc/system.c +0 -0
index 9dad8dc..b1cfc6a 100644
@@ -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)

arch/arm/plat-spear/include/plat/system.h +0 -0
index a235fa0..1171f22 100644
@@ -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

#24 lore raw

PATCH 7/7 ARM: restart: remove local_irq_disable() from within arch_reset()

In reply to Russell King - ARM Linux

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.

---
 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(-)
arch/arm/mach-ep93xx/include/mach/system.h +0 -2
index 6d661fe..bdf6c4f 100644
@@ -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
 	 */
arch/arm/mach-iop32x/include/mach/system.h +0 -2
index 4865a9b..b4f83e5 100644
@@ -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);
arch/arm/mach-ixp2000/include/mach/system.h +0 -2
index de37099..810df7b 100644
@@ -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.
arch/arm/mach-lpc32xx/include/mach/system.h +0 -3
index df3b0de..d47f3b1 100644
@@ -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;
 
arch/arm/mach-shark/core.c +0 -1
index feda3ca..f4b25d8 100644
@@ -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);
arch/arm/mach-u300/include/mach/system.h +0 -2
index 8daf136..6b6fef7 100644
@@ -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
Signature · 1 line
1.7.4.4
#25 lore raw

cover Platform arch_reset changes

In reply to Russell King - ARM Linux

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
#26 lore raw

cover The remaining stuff

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
#27 lore raw

PATCH 1/5 XXX: tcc8k

---
 arch/arm/plat-tcc/include/mach/system.h |    4 ++--
 arch/arm/plat-tcc/system.c              |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-tcc/include/mach/system.h +2 -2
index 909e603..9adf36f 100644
@@ -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
arch/arm/plat-tcc/system.c +1 -1
index cc208fa..88c041d 100644
@@ -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);
Signature · 1 line
1.7.4.4
#28 lore raw

PATCH 2/5 ARM: restart: omap: use new restart hook XXX WIP XXX

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-omap1/board-voiceblue.c +2 -3
index 2a6545b..b0111b6 100644
@@ -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
arch/arm/mach-omap1/include/mach/system.h +6 -0
index a6c1b3a..4faeef6 100644
@@ -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>
arch/arm/mach-omap1/reset.c +1 -3
index ad951ee..8b1cc6e 100644
@@ -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;
arch/arm/mach-omap2/include/mach/system.h +6 -0
index d488721..3062142 100644
@@ -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>
arch/arm/mach-omap2/prcm.c +1 -3
index 8db5f03..e64ffed 100644
@@ -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
arch/arm/plat-omap/include/plat/system.h +0 -2
index c5fa9e9..8e5ebd7 100644
@@ -12,6 +12,4 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-extern void (*arch_reset)(char, const char *);
-
 #endif
Signature · 1 line
1.7.4.4
maintainer
#29 lore raw

PATCH 2/5 ARM: restart: omap: use new restart hook XXX WIP XXX

Quoted 36 lines · Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-omap1/board-voiceblue.c +1 -3
index 2a6545b..b0111b6 100644
@@ -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")

arch/arm/mach-omap1/board-voiceblue.c MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") · line 299

Quoted 5 lines
arch/arm/mach-omap1/board-voiceblue.c +1 -0
@@ -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

#30 lore raw

PATCH 2/5 ARM: restart: omap: use new restart hook XXX WIP XXX

Quoted 3 lines · Tony Lindgren

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.

#31 lore raw

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

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-exynos4/cpu.c +1 -5
index 5b1765b..5b1ee56 100644
@@ -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);
 }
arch/arm/mach-exynos4/mach-armlex4210.c +1 -0
index f0ca6c1..9bb7e6c 100644
@@ -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
arch/arm/mach-exynos4/mach-nuri.c +1 -0
index 236bbe1..3504f56 100644
@@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI")
 	.init_machine	= nuri_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve        = &nuri_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
arch/arm/mach-exynos4/mach-origen.c +1 -0
index f80b563..161e5ee 100644
@@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN")
 	.init_machine	= origen_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve	= &origen_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
arch/arm/mach-exynos4/mach-smdk4x12.c +2 -0
index fcf2e0e..020284c 100644
@@ -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
arch/arm/mach-exynos4/mach-smdkv310.c +2 -0
index cec2afa..fdf5535 100644
@@ -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
arch/arm/mach-exynos4/mach-universal_c210.c +1 -0
index a2a177f..4bdd30c 100644
@@ -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
Signature · 1 line
1.7.4.4
#32 lore raw

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

Quoted 36 lines · Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-exynos4/cpu.c +1 -2
index 5b1765b..5b1ee56 100644
@@ -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);
 }

arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291

Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0 -3
@@ -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?

Quoted 86 lines
arch/arm/mach-exynos4/cpu.c +0 -0
 	return sysdev_register(&exynos4_sysdev);
 }
arch/arm/mach-exynos4/mach-armlex4210.c +1 -0
index f0ca6c1..9bb7e6c 100644
@@ -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
arch/arm/mach-exynos4/mach-nuri.c +1 -0
index 236bbe1..3504f56 100644
@@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI")
 	.init_machine	= nuri_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve        = &nuri_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
arch/arm/mach-exynos4/mach-origen.c +1 -0
index f80b563..161e5ee 100644
@@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN")
 	.init_machine	= origen_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve	= &origen_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
arch/arm/mach-exynos4/mach-smdk4x12.c +2 -0
index fcf2e0e..020284c 100644
@@ -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
arch/arm/mach-exynos4/mach-smdkv310.c +2 -0
index cec2afa..fdf5535 100644
@@ -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
arch/arm/mach-exynos4/mach-universal_c210.c +1 -0
index a2a177f..4bdd30c 100644
@@ -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
Signature · 7 lines
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
#33 lore raw

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

Quoted 46 lines · Russell King - ARM Linux
Quoted 36 lines · Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-exynos4/cpu.c +1 -2
index 5b1765b..5b1ee56 100644
@@ -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);
 }

arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291

Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0 -3
@@ -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:

Quoted 7 lines
        /* 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

Quoted 99 lines
Quoted 89 lines
arch/arm/mach-exynos4/cpu.c +0 -0
 	return sysdev_register(&exynos4_sysdev);
 }
arch/arm/mach-exynos4/mach-armlex4210.c +1 -0
index f0ca6c1..9bb7e6c 100644
@@ -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
arch/arm/mach-exynos4/mach-nuri.c +1 -0
index 236bbe1..3504f56 100644
@@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI")
 	.init_machine	= nuri_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve        = &nuri_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
arch/arm/mach-exynos4/mach-origen.c +1 -0
index f80b563..161e5ee 100644
@@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN")
 	.init_machine	= origen_machine_init,
 	.timer		= &exynos4_timer,
 	.reserve	= &origen_reserve,
+	.restart	= exynos4_restart,
 MACHINE_END
arch/arm/mach-exynos4/mach-smdk4x12.c +2 -0
index fcf2e0e..020284c 100644
@@ -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
arch/arm/mach-exynos4/mach-smdkv310.c +2 -0
index cec2afa..fdf5535 100644
@@ -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
arch/arm/mach-exynos4/mach-universal_c210.c +1 -1
index a2a177f..4bdd30c 100644
@@ -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

Quoted 4 lines

_______________________________________________
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

#34 lore raw

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

Quoted 52 lines · Kyungmin Park
Quoted 51 lines · Russell King - ARM Linux
Quoted 36 lines · Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-exynos4/cpu.c +1 -2
index 5b1765b..5b1ee56 100644
@@ -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);
 }

arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291

Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0 -3
@@ -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;
Quoted 8 lines
Quoted 2 lines

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.

#35 lore raw

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

Quoted 4 lines · Russell King - ARM Linux
Quoted 2 lines · Kyungmin Park
Quoted 1 line · Russell King - ARM Linux

On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux

Quoted 14 lines · wrote:
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines

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

---
 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(-)
Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-exynos4/cpu.c

Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 21 lines

index 5b1765b..5b1ee56 100644

arch/arm/mach-exynos4/cpu.c +1 -2
@@ -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);
 }

arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291

Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0 -3
@@ -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;
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

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.

Quoted 3 lines

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

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#36 lore raw

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

Quoted 66 lines · Kukjin Kim
Quoted 4 lines · Russell King - ARM Linux
Quoted 2 lines · Kyungmin Park
Quoted 1 line · Russell King - ARM Linux

On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux

Quoted 14 lines · wrote:
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines

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

---
 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(-)
Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-exynos4/cpu.c

Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 21 lines

index 5b1765b..5b1ee56 100644

arch/arm/mach-exynos4/cpu.c +1 -2
@@ -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);
 }

arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291

Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0 -3
@@ -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;
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

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.

Quoted 7 lines

Thanks, Kyungmin.

Quoted 3 lines

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.

#37 lore raw

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

Quoted 9 lines · Russell King - ARM Linux
Quoted 7 lines · Kukjin Kim
Quoted 4 lines · Russell King - ARM Linux
Quoted 2 lines · Kyungmin Park
Quoted 1 line · Russell King - ARM Linux

On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux

Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line

Hook these platforms restart code into the new restart hook

rather

Quoted 39 lines
Quoted 39 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

than using arch_reset().

---
 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(-)
Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-exynos4/cpu.c

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines

index 5b1765b..5b1ee56 100644

arch/arm/mach-exynos4/cpu.c +1 -2
@@ -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;
 
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291

Quoted 3 lines
arch/arm/mach-exynos4/cpu.c +0 -3
-	/* set sw_reset function */
-	s5p_reset_hook = exynos4_sw_reset;
-

I notice in last nights merge of the Samsung stuff, this has

become

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 8 lines

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.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

currently all exynos4 series has same reset function. it's

preparation

Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
Quoted 3 lines

for exynos5 series maybe.

you can use the exynos4_sw_reset for all boards.

Thanks, Kyungmin.

Quoted 3 lines

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

Quoted 8 lines
Quoted 1 line

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.

Quoted 11 lines

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

Quoted 6 lines

(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,

Quoted 10 lines

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,

Quoted 1 line

arch/arm/plat-samsung/include/plat/exynos4.h:extern void

exynos4_init_irq(void);

Quoted 7 lines
$ 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,
Quoted 8 lines
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,

Quoted 20 lines

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);
)
Quoted 2 lines

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 <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#38 lore raw

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

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-s5pv210/cpu.c +1 -5
index 84ec746..4c7b071 100644
@@ -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);
 }
arch/arm/mach-s5pv210/mach-aquila.c +1 -0
index 5811a96..68fd31d 100644
@@ -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
arch/arm/mach-s5pv210/mach-goni.c +1 -0
index 15edcae..1156a5b 100644
@@ -960,4 +960,5 @@ MACHINE_START(GONI, "GONI")
 	.init_machine	= goni_machine_init,
 	.timer		= &s5p_timer,
 	.reserve	= &goni_reserve,
+	.restart	= s5pv210_restart,
 MACHINE_END
arch/arm/mach-s5pv210/mach-smdkc110.c +1 -0
index f7266bb..a70fa53 100644
@@ -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
arch/arm/mach-s5pv210/mach-smdkv210.c +1 -0
index a9106c3..5e8a775 100644
@@ -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
arch/arm/mach-s5pv210/mach-torbreck.c +1 -0
index 97cc066..49e9c6d 100644
@@ -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
Signature · 1 line
1.7.4.4
#39 lore raw

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

Quoted 5 lines · Russell King - ARM Linux

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

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Review

Quoted 40 lines
---
 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(-)
arch/arm/mach-s5pv210/cpu.c +1 -5
index 84ec746..4c7b071 100644
@@ -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);
 }
(quoted diff) +0 -0

b/arch/arm/mach-s5pv210/mach-

Review

Quoted 11 lines

aquila.c
index 5811a96..68fd31d 100644

arch/arm/mach-s5pv210/mach-aquila.c +1 -0
@@ -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
(quoted diff) +0 -0

b/arch/arm/mach-s5pv210/mach-

Quoted 45 lines

goni.c
index 15edcae..1156a5b 100644

arch/arm/mach-s5pv210/mach-goni.c +1 -0
@@ -960,4 +960,5 @@ MACHINE_START(GONI, "GONI")
 	.init_machine	= goni_machine_init,
 	.timer		= &s5p_timer,
 	.reserve	= &goni_reserve,
+	.restart	= s5pv210_restart,
 MACHINE_END
arch/arm/mach- renamed from arch/arm/mach-s5pv210/mach-smdkc110.c +0 -0

s5pv210/mach-smdkc110.c
index f7266bb..a70fa53 100644

arch/arm/mach-s5pv210/mach-smdkc110.c +1 -0
@@ -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
arch/arm/mach- renamed from arch/arm/mach-s5pv210/mach-smdkv210.c +0 -0

s5pv210/mach-smdkv210.c
index a9106c3..5e8a775 100644

arch/arm/mach-s5pv210/mach-smdkv210.c +1 -0
@@ -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
arch/arm/mach- renamed from arch/arm/mach-s5pv210/mach-torbreck.c +0 -0

s5pv210/mach-torbreck.c
index 97cc066..49e9c6d 100644

arch/arm/mach-s5pv210/mach-torbreck.c +1 -1
@@ -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

#40 lore raw

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

Quoted 8 lines · Kukjin Kim
Quoted 5 lines · Russell King - ARM Linux

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

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.

#41 lore raw

PATCH 5/5 ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook

In reply to Russell King - ARM Linux

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.

---
 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
arch/arm/plat-samsung/include/plat/reset.h deleted +0 -16
deleted file mode 100644
index 32ca517..0000000
@@ -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 */
arch/arm/plat-samsung/include/plat/system-reset.h +0 -11
index a448e99..73d7808 100644
@@ -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();
 }
Signature · 1 line
1.7.4.4
#42 lore raw

PATCH 5/5 ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook

Quoted 5 lines · Russell King - ARM Linux

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.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Review

Quoted 30 lines
---
 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
arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/reset.h +0 -0

samsung/include/plat/reset.h
deleted file mode 100644
index 32ca517..0000000

arch/arm/plat-samsung/include/plat/reset.h deleted +0 -16
@@ -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 */
(quoted diff) +0 -0

b/arch/arm/plat-

Quoted 25 lines

samsung/include/plat/system-reset.h
index a448e99..73d7808 100644

arch/arm/plat-samsung/include/plat/system-reset.h +0 -12
@@ -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

#43 lore raw

cover The remaining stuff

In reply to Russell King - ARM Linux
Quoted 7 lines · Russell King - ARM Linux

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

Quoted 9 lines

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 <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Quoted 32 lines

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
#44 lore raw

cover The remaining stuff

Quoted 17 lines · Kukjin Kim
Quoted 7 lines · Russell King - ARM Linux

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

Quoted 9 lines

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.

Quoted 4 lines

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.

#45 lore raw

cover The remaining stuff

Quoted 21 lines · Russell King - ARM Linux
Quoted 19 lines · Kukjin Kim
Quoted 7 lines · Russell King - ARM Linux

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

Quoted 9 lines

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,

Quoted 8 lines
Quoted 2 lines

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.

Quoted 1 line

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

Okay, I see.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#46 lore raw

cover The remaining stuff

In reply to Russell King - ARM Linux
Quoted 15 lines · Russell King - ARM Linux

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.

Quoted 5 lines

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.

#47 lore raw

cover The remaining stuff

Hi Russell,

Quoted 35 lines · Russell King - ARM Linux
Quoted 15 lines · Russell King - ARM Linux

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.

Quoted 5 lines

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

Quoted 6 lines

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

#48 lore raw

cover The remaining stuff

In reply to Russell King - ARM Linux
Quoted 3 lines · Russell King - ARM Linux

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

(...)

Quoted 1 line

arch/arm/mach-nomadik/include/mach/system.h

(...)

Quoted 2 lines

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

#49 lore raw

cover The remaining stuff

Quoted 10 lines · Linus Walleij

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.

---
 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(-)
arch/arm/mach-nomadik/board-nhk8815.c +1 -0
index 0cbb74c..c559ed6 100644
@@ -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
arch/arm/mach-nomadik/cpu-8815.c +11 -0
index dc67717..b4bbe51 100644
@@ -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);
+}
arch/arm/mach-nomadik/include/mach/system.h +0 -9
index 7119f68..16f59f6 100644
@@ -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
Signature · 1 line
1.7.4.4
#50 lore raw

cover The remaining stuff

Quoted 3 lines · Russell King - ARM Linux

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

#51 lore raw

cover Platform arch_reset changes

In reply to Russell King - ARM Linux

Russell,

Quoted 6 lines · Russell King - ARM Linux

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.

Quoted 7 lines

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

#52 lore raw

cover Platform arch_reset changes

Quoted 17 lines · Will Deacon

Russell,

Quoted 6 lines · Russell King - ARM Linux

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.

Quoted 7 lines

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.

Quoted 4 lines

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!

Quoted 2 lines

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.

#53 lore raw

cover Platform arch_reset changes

Quoted 10 lines · Russell King - ARM Linux

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.

Quoted 11 lines
Quoted 2 lines

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

Quoted 4 lines

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.

Quoted 7 lines

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.

Quoted 5 lines

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

#54 lore raw

PATCH 1/41 ARM: clps711x: consolidate irq/mm/time code into a single file

In reply to Russell King - ARM Linux

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.

---
 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
arch/arm/mach-clps711x/Makefile +1 -1
index 4a19731..f2f0256 100644
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y			:= irq.o mm.o time.o
+obj-y			:= common.o
 obj-m			:=
 obj-n			:=
 obj-			:=
arch/arm/mach-clps711x/common.c new file +222 -0

222 lines not on this page · raw message

arch/arm/mach-clps711x/irq.c deleted +0 -143

143 lines not on this page · raw message

arch/arm/mach-clps711x/mm.c deleted +0 -48

48 lines not on this page · raw message

arch/arm/mach-clps711x/time.c deleted +0 -84

84 lines not on this page · raw message

Signature · 1 line
1.7.4.4
#55 lore raw

PATCH 2/41 ARM: restart: remove poodle restart handler

In reply to Russell King - ARM Linux

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:

Quoted 6 lines

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.

---
 arch/arm/mach-pxa/poodle.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-pxa/poodle.c +0 -6
index 948ce3e..1c597ad 100644
@@ -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;
 
Signature · 1 line
1.7.4.4
#56 lore raw

PATCH 2/41 ARM: restart: remove poodle restart handler

Ack?

Quoted 55 lines · Russell King - ARM Linux

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:

Quoted 6 lines

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.

---
 arch/arm/mach-pxa/poodle.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-pxa/poodle.c +0 -6
index 948ce3e..1c597ad 100644
@@ -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;
 
Signature · 7 lines
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
#57 lore raw

PATCH 2/41 ARM: restart: remove poodle restart handler

Quoted 24 lines · Russell King - ARM Linux

Ack?

Quoted 21 lines · Russell King - ARM Linux

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:

Quoted 6 lines

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.

Quoted 26 lines
Quoted 26 lines
---
 arch/arm/mach-pxa/poodle.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-pxa/poodle.c +0 -6
index 948ce3e..1c597ad 100644
@@ -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;
 
#58 lore raw

PATCH 3/41 ARM: restart: remove s3c24xx restart handler

In reply to Russell King - ARM Linux

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.

---
 arch/arm/plat-s3c24xx/cpu.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)
arch/arm/plat-s3c24xx/cpu.c +0 -23
index 3c63353..1121df1 100644
@@ -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));
 }
Signature · 1 line
1.7.4.4
#59 lore raw

PATCH 3/41 ARM: restart: remove s3c24xx restart handler

Quoted 7 lines · Russell King - ARM Linux

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.

Thanks for removing some workaround :)

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

arch/arm/plat-s3c24xx/cpu.c void __init s3c24xx_init_io(struct map_desc

Quoted 37 lines
---
 arch/arm/plat-s3c24xx/cpu.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)
arch/arm/plat-s3c24xx/cpu.c +0 -21
index 3c63353..1121df1 100644
@@ -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,

Quoted 10 lines
arch/arm/plat-s3c24xx/cpu.c +0 -2
 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

#60 lore raw

PATCH 4/41 ARM: restart: at91: use new restart hook

In reply to Russell King - ARM Linux

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.

---
 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(-)
arch/arm/mach-at91/at91cap9.c +2 -2
index ecdd54d..2937339 100644
@@ -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);
 
arch/arm/mach-at91/at91rm9200.c +2 -2
index 713d3bd..430a9fd 100644
@@ -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)
arch/arm/mach-at91/at91sam9260.c +1 -1
index b84a9f6..ec9e23d 100644
@@ -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);
arch/arm/mach-at91/at91sam9261.c +1 -1
index 658a518..19ac7c0 100644
@@ -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);
arch/arm/mach-at91/at91sam9263.c +1 -1
index f83fbb0..50d0163 100644
@@ -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);
 
arch/arm/mach-at91/at91sam9_alt_reset.S +2 -7
index e0256de..d3f931c 100644
@@ -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
arch/arm/mach-at91/at91sam9g45.c +2 -2
index 318b040..ff21f7a 100644
@@ -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);
 
arch/arm/mach-at91/at91sam9rl.c +1 -1
index a238105..61cbb46 100644
@@ -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);
 
arch/arm/mach-at91/generic.h +1 -2
index 938b34f..7f4503b 100644
@@ -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;
arch/arm/mach-at91/include/mach/system.h +0 -5
index 36af14b..079eb12 100644
@@ -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
Signature · 1 line
1.7.4.4
#61 lore raw

PATCH 4/41 ARM: restart: at91: use new restart hook

Quoted 10 lines · Russell King - ARM Linux

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.

---

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.

#62 lore raw

PATCH 4/41 ARM: restart: at91: use new restart hook

Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines · Russell King - ARM Linux

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.

Quoted 7 lines
Quoted 5 lines

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

---

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.

#63 lore raw

PATCH 4/41 ARM: restart: at91: use new restart hook

Quoted 10 lines · Russell King - ARM Linux
Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 8 lines · Russell King - ARM Linux

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.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

---

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.

#64 lore raw

PATCH 5/41 ARM: restart: clps711x: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-clps711x/autcpu12.c +1 -0
index 0276091..3fb79a1 100644
@@ -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
 
arch/arm/mach-clps711x/cdb89712.c +1 -0
index 25b3bfd..c314f49 100644
@@ -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
arch/arm/mach-clps711x/ceiva.c +1 -0
index 1df9ec6..a70147e 100644
@@ -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
arch/arm/mach-clps711x/clep7312.c +1 -0
index 80496c0..dbc7842 100644
@@ -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
 
arch/arm/mach-clps711x/common.c +5 -0
index aa273e7..fedf0e3 100644
@@ -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);
+}
arch/arm/mach-clps711x/edb7211-arch.c +1 -0
index 9721f61..5fad0b4 100644
@@ -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
arch/arm/mach-clps711x/fortunet.c +1 -0
index d992566..3a3f0b7 100644
@@ -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
arch/arm/mach-clps711x/include/mach/system.h +0 -1
index 6c11993..9982deb 100644
@@ -34,7 +34,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	soft_restart(0);
 }
 
 #endif
arch/arm/mach-clps711x/p720t.c +1 -0
index 6ecea95..42ee8f3 100644
@@ -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)
Signature · 1 line
1.7.4.4
#65 lore raw

PATCH 6/41 ARM: restart: cns3xxx: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-cns3xxx/cns3420vb.c +1 -0
index 55f7b4b..9b8c3d5 100644
@@ -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
arch/arm/mach-cns3xxx/core.h +1 -0
index fcd2253..4894b8c 100644
@@ -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 */
arch/arm/mach-cns3xxx/include/mach/system.h +3 -2
index 4f16c9b..f92540d 100644
@@ -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
arch/arm/mach-cns3xxx/pm.c +1 -1
index 0c04678..5136c4c 100644
@@ -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
Signature · 1 line
1.7.4.4
#66 lore raw

PATCH 6/41 ARM: restart: cns3xxx: use new restart hook

Ack?

Quoted 75 lines · Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-cns3xxx/cns3420vb.c +1 -0
index 55f7b4b..9b8c3d5 100644
@@ -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
arch/arm/mach-cns3xxx/core.h +1 -0
index fcd2253..4894b8c 100644
@@ -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 */
arch/arm/mach-cns3xxx/include/mach/system.h +3 -2
index 4f16c9b..f92540d 100644
@@ -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
arch/arm/mach-cns3xxx/pm.c +1 -1
index 0c04678..5136c4c 100644
@@ -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
Signature · 7 lines
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
#67 lore raw

PATCH 6/41 ARM: restart: cns3xxx: use new restart hook

Quoted 1 line · Russell King - ARM Linux

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:

arch/arm/mach-cns3xxx/pm.c +1 -0
index 5136c4c..335494c 100644
@@ -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,

Thanks!

Signature · 2 lines
Anton Vorontsov
Email: cbouatmailru at gmail.com
#68 lore raw

PATCH 7/41 ARM: restart: dove: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-dove/cm-a510.c +1 -0
index c8a406f..792b4e2 100644
@@ -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
arch/arm/mach-dove/common.c +16 -0
index a9e0dae..13bb236 100644
@@ -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)
+		;
+}
arch/arm/mach-dove/common.h +1 -0
index 6a2046e..4202730 100644
@@ -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
arch/arm/mach-dove/dove-db-setup.c +1 -0
index 11ea34e..ea77ae4 100644
@@ -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
arch/arm/mach-dove/include/mach/system.h +0 -14
index 356afda..25a3a65 100644
@@ -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)
-		;
 }
 
 
Signature · 1 line
1.7.4.4
#69 lore raw

PATCH 7/41 ARM: restart: dove: use new restart hook

Quoted 4 lines · Russell King - ARM Linux

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

Quoted 104 lines
---
 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(-)
arch/arm/mach-dove/cm-a510.c +1 -0
index c8a406f..792b4e2 100644
@@ -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
arch/arm/mach-dove/common.c +16 -0
index a9e0dae..13bb236 100644
@@ -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)
+		;
+}
arch/arm/mach-dove/common.h +1 -0
index 6a2046e..4202730 100644
@@ -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
arch/arm/mach-dove/dove-db-setup.c +1 -0
index 11ea34e..ea77ae4 100644
@@ -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
arch/arm/mach-dove/include/mach/system.h +0 -14
index 356afda..25a3a65 100644
@@ -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)
-		;
 }
 
 
Signature · 7 lines
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
#70 lore raw

PATCH 8/41 ARM: restart: ebsa110: use new restart hook

In reply to Russell King - ARM Linux

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

---
 arch/arm/mach-ebsa110/core.c                |    6 ++++++
 arch/arm/mach-ebsa110/include/mach/system.h |    4 +++-
 2 files changed, 9 insertions(+), 1 deletions(-)
arch/arm/mach-ebsa110/core.c +6 -0
index ce3ed24..294aad0 100644
@@ -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
arch/arm/mach-ebsa110/include/mach/system.h +3 -1
index 0d5df72..574e633 100644
@@ -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
Signature · 1 line
1.7.4.4
#71 lore raw

PATCH 9/41 ARM: restart: ep93xx: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-ep93xx/adssphere.c +1 -0
index 0713448..7b41651 100644
@@ -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
arch/arm/mach-ep93xx/core.c +12 -0
index 94c78bc..348e13e 100644
@@ -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)
+		;
+}
arch/arm/mach-ep93xx/edb93xx.c +8 -0
index 70ef8c5..c5731c6 100644
@@ -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
arch/arm/mach-ep93xx/gesbc9312.c +1 -0
index 45ee205..7b89e8a 100644
@@ -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
arch/arm/mach-ep93xx/include/mach/platform.h +2 -0
index 5066045..d4c9349 100644
@@ -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
arch/arm/mach-ep93xx/include/mach/system.h +0 -11
index bdf6c4f..b27a654 100644
@@ -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)
-		;
 }
arch/arm/mach-ep93xx/micro9.c +4 -0
index e72f736..050ce92 100644
@@ -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
arch/arm/mach-ep93xx/simone.c +1 -0
index 52e090d..188cbdb 100644
@@ -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
arch/arm/mach-ep93xx/snappercl15.c +1 -0
index 8121e3a..797afde 100644
@@ -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
arch/arm/mach-ep93xx/ts72xx.c +1 -0
index 1ade3c3..8fa6169 100644
@@ -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
arch/arm/mach-ep93xx/vision_ep9307.c +1 -0
index d96e4db..03dd401 100644
@@ -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
Signature · 1 line
1.7.4.4
#72 lore raw

PATCH 9/41 ARM: restart: ep93xx: use new restart hook

Quoted 5 lines · Russell King

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

Quoted 13 lines
---
 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(-)

Thanks!

#73 lore raw

PATCH 10/41 ARM: restart: footbridge: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-footbridge/cats-hw.c +1 -0
index 60b6774..25b4536 100644
@@ -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
arch/arm/mach-footbridge/common.c +27 -0
index 38a44f9..41978ee 100644
@@ -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)
arch/arm/mach-footbridge/common.h +1 -0
index b05e662..c9767b8 100644
@@ -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 *);
arch/arm/mach-footbridge/ebsa285.c +1 -0
index 012210c..27716a7 100644
@@ -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
 
arch/arm/mach-footbridge/include/mach/system.h +0 -52

62 lines not on this page · raw message

arch/arm/mach-footbridge/netwinder-hw.c +27 -0
index 0d3846f..80a1c5c 100644
@@ -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
arch/arm/mach-footbridge/personal.c +1 -0
index f41dba3..e1e9990 100644
@@ -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
 
Signature · 1 line
1.7.4.4
#74 lore raw

PATCH 11/41 ARM: restart: h720x: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-h720x/common.c +5 -0
index 51d4e44..f8a2f6b 100644
@@ -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;
+}
arch/arm/mach-h720x/common.h +1 -0
index 7dd5fa6..2489537 100644
@@ -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;
arch/arm/mach-h720x/h7201-eval.c +1 -0
index 9886f19..5fdb20c 100644
@@ -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
arch/arm/mach-h720x/h7202-eval.c +1 -0
index 284a134..1696730 100644
@@ -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
arch/arm/mach-h720x/include/mach/system.h +1 -3
index a708d24..b04f08d 100644
@@ -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
Signature · 1 line
1.7.4.4
#75 lore raw

PATCH 12/41 ARM: restart: highbank: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-highbank/core.h +1 -0
index 7e33fc9..d8e2d0b 100644
@@ -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);
arch/arm/mach-highbank/highbank.c +1 -0
index b82dcf0..9d356a1 100644
@@ -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
arch/arm/mach-highbank/include/mach/system.h +3 -1
index 7e81922..0754c79 100644
@@ -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
arch/arm/mach-highbank/system.c +1 -1
index 53f0c4c..82c2723 100644
@@ -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();
Signature · 1 line
1.7.4.4
#76 lore raw

PATCH 12/41 ARM: restart: highbank: use new restart hook

Quoted 11 lines · Russell King - ARM Linux

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

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

Rob

Quoted 48 lines
arch/arm/mach-highbank/core.h +1 -0
index 7e33fc9..d8e2d0b 100644
@@ -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);
arch/arm/mach-highbank/highbank.c +1 -0
index b82dcf0..9d356a1 100644
@@ -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
arch/arm/mach-highbank/include/mach/system.h +3 -1
index 7e81922..0754c79 100644
@@ -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
arch/arm/mach-highbank/system.c +1 -1
index 53f0c4c..82c2723 100644
@@ -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();
#77 lore raw

PATCH 13/41 ARM: restart: integrator: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-integrator/common.h +1 -0
index a08f9b0..899561d 100644
@@ -1,2 +1,3 @@
 void integrator_init_early(void);
 void integrator_reserve(void);
+void integrator_restart(char, const char *);
arch/arm/mach-integrator/core.c +8 -0
index 4b38e13..0a3e097 100644
@@ -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);
+}
arch/arm/mach-integrator/include/mach/system.h +0 -7
index e1551b8..12fc8c3 100644
@@ -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
arch/arm/mach-integrator/integrator_ap.c +1 -0
index a1769f3..21a1d6c 100644
@@ -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
arch/arm/mach-integrator/integrator_cp.c +1 -0
index 5de49c3..3a730d44 100644
@@ -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
Signature · 1 line
1.7.4.4
#79 lore raw

PATCH 14/41 ARM: restart: iop3xx: use new restart hook

In reply to Russell King - ARM Linux

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.

---
 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
arch/arm/include/asm/hardware/iop3xx.h +1 -0
index 5daea29..077c323 100644
@@ -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)
 {
arch/arm/mach-iop32x/em7210.c +1 -0
index 4325055..24069e0 100644
@@ -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
arch/arm/mach-iop32x/glantank.c +1 -0
index 0edc880..204e1d1 100644
@@ -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
arch/arm/mach-iop32x/include/mach/system.h +0 -15
index b4f83e5..44e46f2 100644
@@ -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);
 }
arch/arm/mach-iop32x/iq31244.c +2 -0
index 9e7aacc..3eb642a 100644
@@ -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
arch/arm/mach-iop32x/iq80321.c +1 -0
index 53ea86f..2ec724b 100644
@@ -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
arch/arm/mach-iop32x/n2100.c +9 -0
index d726927..6b6d559 100644
@@ -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
arch/arm/mach-iop33x/include/mach/system.h +0 -6
index 86d1b20..696d88c 100644
@@ -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);
 }
arch/arm/mach-iop33x/iq80331.c +1 -0
index 9e14ccc..abce934 100644
@@ -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
arch/arm/mach-iop33x/iq80332.c +1 -0
index 09c899a..7513559 100644
@@ -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
arch/arm/plat-iop/Makefile +2 -0
index 69b09c1..f5aebfe 100644
@@ -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
arch/arm/plat-iop/restart.c new file +19 -0
new file mode 100644
index 0000000..6a85a0c
@@ -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);
+}
Signature · 1 line
1.7.4.4
#80 lore raw

PATCH 14/41 ARM: restart: iop3xx: use new restart hook

Ack?

Quoted 234 lines · Russell King - ARM Linux

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.

---
 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
arch/arm/include/asm/hardware/iop3xx.h +1 -0
index 5daea29..077c323 100644
@@ -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)
 {
arch/arm/mach-iop32x/em7210.c +1 -0
index 4325055..24069e0 100644
@@ -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
arch/arm/mach-iop32x/glantank.c +1 -0
index 0edc880..204e1d1 100644
@@ -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
arch/arm/mach-iop32x/include/mach/system.h +0 -15
index b4f83e5..44e46f2 100644
@@ -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);
 }
arch/arm/mach-iop32x/iq31244.c +2 -0
index 9e7aacc..3eb642a 100644
@@ -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
arch/arm/mach-iop32x/iq80321.c +1 -0
index 53ea86f..2ec724b 100644
@@ -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
arch/arm/mach-iop32x/n2100.c +9 -0
index d726927..6b6d559 100644
@@ -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
arch/arm/mach-iop33x/include/mach/system.h +0 -6
index 86d1b20..696d88c 100644
@@ -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);
 }
arch/arm/mach-iop33x/iq80331.c +1 -0
index 9e14ccc..abce934 100644
@@ -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
arch/arm/mach-iop33x/iq80332.c +1 -0
index 09c899a..7513559 100644
@@ -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
arch/arm/plat-iop/Makefile +2 -0
index 69b09c1..f5aebfe 100644
@@ -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
arch/arm/plat-iop/restart.c new file +19 -0
new file mode 100644
index 0000000..6a85a0c
@@ -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);
+}
Signature · 7 lines
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
#82 lore raw

PATCH 15/41 ARM: restart: iop13xx: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-iop13xx/include/mach/iop13xx.h +1 -0
index 52b7fab..07e9ff7 100644
@@ -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)
arch/arm/mach-iop13xx/include/mach/system.h +0 -10
index d0c66ef..7f798dc 100644
@@ -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(;;);
 }
arch/arm/mach-iop13xx/iq81340mc.c +1 -0
index 4cf2cc4..abaee88 100644
@@ -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
arch/arm/mach-iop13xx/iq81340sc.c +1 -0
index cd9e274..690916a 100644
@@ -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
arch/arm/mach-iop13xx/setup.c +11 -0
index a5b9897..daabb1f 100644
@@ -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);
+}
Signature · 1 line
1.7.4.4
#83 lore raw

PATCH 15/41 ARM: restart: iop13xx: use new restart hook

Ack?

Quoted 97 lines · Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-iop13xx/include/mach/iop13xx.h +1 -0
index 52b7fab..07e9ff7 100644
@@ -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)
arch/arm/mach-iop13xx/include/mach/system.h +0 -10
index d0c66ef..7f798dc 100644
@@ -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(;;);
 }
arch/arm/mach-iop13xx/iq81340mc.c +1 -0
index 4cf2cc4..abaee88 100644
@@ -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
arch/arm/mach-iop13xx/iq81340sc.c +1 -0
index cd9e274..690916a 100644
@@ -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
arch/arm/mach-iop13xx/setup.c +11 -0
index a5b9897..daabb1f 100644
@@ -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);
+}
Signature · 7 lines
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
#84 lore raw

PATCH 15/41 ARM: restart: iop13xx: use new restart hook

Quoted 5 lines · Russell King - ARM Linux

Ack?

Quoted 2 lines · Russell King - ARM Linux

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

#85 lore raw

PATCH 16/41 ARM: restart: ixp2000: use new restart hook

In reply to Russell King - ARM Linux

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.

---
 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(-)
arch/arm/mach-ixp2000/core.c +4 -0
index 59a5126..e5916b7 100644
@@ -514,3 +514,7 @@ void __init ixp2000_init_irq(void)
 	}
 }
 
+void ixp2000_restart(char mode, const char *cmd)
+{
+	ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
+}
arch/arm/mach-ixp2000/enp2611.c +1 -0
index af99945..ee52541 100644
@@ -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
 
 
arch/arm/mach-ixp2000/include/mach/platform.h +1 -0
index 42182c79..bb0f8dc 100644
@@ -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;
arch/arm/mach-ixp2000/include/mach/system.h +0 -29
index 810df7b..e981fd2 100644
@@ -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);
 }
arch/arm/mach-ixp2000/ixdp2400.c +1 -0
index f7dfd97..f53e911 100644
@@ -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
 
arch/arm/mach-ixp2000/ixdp2800.c +1 -0
index d33bcac..a2e7c39 100644
@@ -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
 
arch/arm/mach-ixp2000/ixdp2x01.c +32 -0
index 61a2867..7632bea 100644
@@ -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
 
Signature · 1 line
1.7.4.4
#86 lore raw

PATCH 16/41 ARM: restart: ixp2000: use new restart hook

Ack?

Quoted 192 lines · Russell King - ARM Linux

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.

---
 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(-)
arch/arm/mach-ixp2000/core.c +4 -0
index 59a5126..e5916b7 100644
@@ -514,3 +514,7 @@ void __init ixp2000_init_irq(void)
 	}
 }
 
+void ixp2000_restart(char mode, const char *cmd)
+{
+	ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
+}
arch/arm/mach-ixp2000/enp2611.c +1 -0
index af99945..ee52541 100644
@@ -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
 
 
arch/arm/mach-ixp2000/include/mach/platform.h +1 -0
index 42182c79..bb0f8dc 100644
@@ -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;
arch/arm/mach-ixp2000/include/mach/system.h +0 -29
index 810df7b..e981fd2 100644
@@ -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);
 }
arch/arm/mach-ixp2000/ixdp2400.c +1 -0
index f7dfd97..f53e911 100644
@@ -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
 
arch/arm/mach-ixp2000/ixdp2800.c +1 -0
index d33bcac..a2e7c39 100644
@@ -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
 
arch/arm/mach-ixp2000/ixdp2x01.c +32 -0
index 61a2867..7632bea 100644
@@ -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
 
Signature · 7 lines
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
#87 lore raw

PATCH 16/41 ARM: restart: ixp2000: use new restart hook

Quoted 8 lines · Russell King - ARM Linux

Ack?

Quoted 5 lines · Russell King - ARM Linux

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.

#88 lore raw

PATCH 17/41 ARM: restart: ixp23xx: use new restart hook

In reply to Russell King - ARM Linux

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.

---
 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(-)
arch/arm/mach-ixp23xx/core.c +6 -0
index a1bee33..0923bb9 100644
@@ -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;
+}
arch/arm/mach-ixp23xx/espresso.c +1 -0
index 30dd316..8f2487e 100644
@@ -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
arch/arm/mach-ixp23xx/include/mach/platform.h +1 -0
index db9d941..50de558 100644
@@ -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*);
arch/arm/mach-ixp23xx/include/mach/system.h +0 -13
index 8920ff2..7a1b96a 100644
@@ -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;
 }
arch/arm/mach-ixp23xx/ixdp2351.c +12 -0
index b3a57e0..5d5dd3e 100644
@@ -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
arch/arm/mach-ixp23xx/roadrunner.c +1 -0
index 8f4dcbb..377283f 100644
@@ -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
Signature · 1 line
1.7.4.4
#89 lore raw

PATCH 17/41 ARM: restart: ixp23xx: use new restart hook

Ack?

Quoted 127 lines · Russell King - ARM Linux

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.

---
 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(-)
arch/arm/mach-ixp23xx/core.c +6 -0
index a1bee33..0923bb9 100644
@@ -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;
+}
arch/arm/mach-ixp23xx/espresso.c +1 -0
index 30dd316..8f2487e 100644
@@ -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
arch/arm/mach-ixp23xx/include/mach/platform.h +1 -0
index db9d941..50de558 100644
@@ -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*);
arch/arm/mach-ixp23xx/include/mach/system.h +0 -13
index 8920ff2..7a1b96a 100644
@@ -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;
 }
arch/arm/mach-ixp23xx/ixdp2351.c +12 -0
index b3a57e0..5d5dd3e 100644
@@ -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
arch/arm/mach-ixp23xx/roadrunner.c +1 -0
index 8f4dcbb..377283f 100644
@@ -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
Signature · 7 lines
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
#91 lore raw

PATCH 18/41 ARM: restart: ixp4xx: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-ixp4xx/avila-setup.c +2 -0
index 37609a2..a7277ad 100644
@@ -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
 
arch/arm/mach-ixp4xx/common.c +20 -0
index 0777257..4a02619 100644
@@ -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;
+	}
+}
arch/arm/mach-ixp4xx/coyote-setup.c +2 -0
index 81dfec3..a74f86c 100644
@@ -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
 
arch/arm/mach-ixp4xx/dsmg600-setup.c +1 -0
index 8837fbc..67be177 100644
@@ -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
arch/arm/mach-ixp4xx/fsg-setup.c +1 -0
index 2887c35..6d58182 100644
@@ -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
 
arch/arm/mach-ixp4xx/gateway7001-setup.c +1 -0
index d69d1b0..7ecf9b2 100644
@@ -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
arch/arm/mach-ixp4xx/goramo_mlr.c +1 -0
index bf6678d..c0e3d69 100644
@@ -504,4 +504,5 @@ MACHINE_START(GORAMO_MLR, "MultiLink")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
arch/arm/mach-ixp4xx/gtwx5715-setup.c +1 -0
index aa029fc..a23f893 100644
@@ -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
 
 
arch/arm/mach-ixp4xx/include/mach/platform.h +1 -0
index e824c02..df9250b 100644
@@ -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);
arch/arm/mach-ixp4xx/include/mach/system.h +0 -21
index 24337d9..72db2bb 100644
@@ -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;
-	}
 }
-
arch/arm/mach-ixp4xx/ixdp425-setup.c +1 -0
index f235f82..8a38b39 100644
@@ -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
 
arch/arm/mach-ixp4xx/nas100d-setup.c +1 -0
index de716fa..1010eb7 100644
@@ -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
arch/arm/mach-ixp4xx/nslu2-setup.c +1 -0
index ac81ccb..aa355c3 100644
@@ -307,4 +307,5 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
arch/arm/mach-ixp4xx/omixp-setup.c +3 -0
index 3b6a81a..0940869 100644
@@ -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
arch/arm/mach-ixp4xx/vulcan-setup.c +1 -0
index 27e469e..9dec206 100644
@@ -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
arch/arm/mach-ixp4xx/wg302v2-setup.c +1 -0
index b14144b..5ac0f0a 100644
@@ -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
Signature · 1 line
1.7.4.4
#92 lore raw

PATCH 18/41 ARM: restart: ixp4xx: use new restart hook

Ack?

Quoted 284 lines · Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-ixp4xx/avila-setup.c +2 -0
index 37609a2..a7277ad 100644
@@ -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
 
arch/arm/mach-ixp4xx/common.c +20 -0
index 0777257..4a02619 100644
@@ -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;
+	}
+}
arch/arm/mach-ixp4xx/coyote-setup.c +2 -0
index 81dfec3..a74f86c 100644
@@ -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
 
arch/arm/mach-ixp4xx/dsmg600-setup.c +1 -0
index 8837fbc..67be177 100644
@@ -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
arch/arm/mach-ixp4xx/fsg-setup.c +1 -0
index 2887c35..6d58182 100644
@@ -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
 
arch/arm/mach-ixp4xx/gateway7001-setup.c +1 -0
index d69d1b0..7ecf9b2 100644
@@ -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
arch/arm/mach-ixp4xx/goramo_mlr.c +1 -0
index bf6678d..c0e3d69 100644
@@ -504,4 +504,5 @@ MACHINE_START(GORAMO_MLR, "MultiLink")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
arch/arm/mach-ixp4xx/gtwx5715-setup.c +1 -0
index aa029fc..a23f893 100644
@@ -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
 
 
arch/arm/mach-ixp4xx/include/mach/platform.h +1 -0
index e824c02..df9250b 100644
@@ -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);
arch/arm/mach-ixp4xx/include/mach/system.h +0 -21
index 24337d9..72db2bb 100644
@@ -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;
-	}
 }
-
arch/arm/mach-ixp4xx/ixdp425-setup.c +1 -0
index f235f82..8a38b39 100644
@@ -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
 
arch/arm/mach-ixp4xx/nas100d-setup.c +1 -0
index de716fa..1010eb7 100644
@@ -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
arch/arm/mach-ixp4xx/nslu2-setup.c +1 -0
index ac81ccb..aa355c3 100644
@@ -307,4 +307,5 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
 #if defined(CONFIG_PCI)
 	.dma_zone_size	= SZ_64M,
 #endif
+	.restart	= ixp4xx_restart,
 MACHINE_END
arch/arm/mach-ixp4xx/omixp-setup.c +3 -0
index 3b6a81a..0940869 100644
@@ -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
arch/arm/mach-ixp4xx/vulcan-setup.c +1 -0
index 27e469e..9dec206 100644
@@ -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
arch/arm/mach-ixp4xx/wg302v2-setup.c +1 -0
index b14144b..5ac0f0a 100644
@@ -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
Signature · 7 lines
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
#93 lore raw

PATCH 18/41 ARM: restart: ixp4xx: use new restart hook

Quoted 2 lines · Russell King - ARM Linux
Quoted 2 lines

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

Looks good basically, except a detail:

Quoted 10 lines

arch/arm/mach-ixp4xx/common.c static void __init ixp4xx_clockevent_init(void) · line 506

Quoted 10 lines
arch/arm/mach-ixp4xx/common.c +4 -0
@@ -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,

Quoted 2 lines

arch/arm/mach-ixp4xx/common.c static void __init ixp4xx_clockevent_init(void) · line 508

Quoted 2 lines
arch/arm/mach-ixp4xx/common.c +2 -0
+		/* 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.

Signature · 1 line
Krzysztof Halasa
#94 lore raw

PATCH 18/41 ARM: restart: ixp4xx: use new restart hook

Quoted 11 lines · Krzysztof Halasa
Quoted 2 lines · Russell King - ARM Linux
Quoted 2 lines

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

Looks good basically, except a detail:

Quoted 4 lines
Quoted 4 lines
arch/arm/mach-ixp4xx/common.c +0 -0
@@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)
 
Quoted 8 lines
Quoted 6 lines

arch/arm/mach-ixp4xx/common.c static void __init ixp4xx_clockevent_init(void) · line 506

Quoted 6 lines
arch/arm/mach-ixp4xx/common.c +4 -0
 	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.

Quoted 2 lines

Otherwise,

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

Quoted 7 lines
Quoted 2 lines

arch/arm/mach-ixp4xx/common.c static void __init ixp4xx_clockevent_init(void) · line 508

Quoted 2 lines
arch/arm/mach-ixp4xx/common.c +2 -0
+		/* 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.

Signature · 1 line
Krzysztof Halasa
#95 lore raw

PATCH 18/41 ARM: restart: ixp4xx: use new restart hook

Quoted 4 lines · Russell King - ARM Linux
Quoted 1 line

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.

Signature · 1 line
Krzysztof Halasa
#96 lore raw

PATCH 19/41 ARM: restart: kirkwood: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-kirkwood/common.c +16 -0
index f3248cf..0bff4a9 100644
@@ -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)
+		;
+}
arch/arm/mach-kirkwood/common.h +1 -0
index b9b0f09..1529280 100644
@@ -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;
arch/arm/mach-kirkwood/d2net_v2-setup.c +1 -0
index f457e07..6e1bac9 100644
@@ -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
arch/arm/mach-kirkwood/db88f6281-bp-setup.c +1 -0
index ff4c21c..d933593 100644
@@ -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
arch/arm/mach-kirkwood/dockstar-setup.c +1 -0
index e4d199b..61d9a55 100644
@@ -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
arch/arm/mach-kirkwood/guruplug-setup.c +1 -0
index 6c40f78..bdaed38 100644
@@ -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
arch/arm/mach-kirkwood/include/mach/system.h +0 -15
index 7568e95..8a94d97 100644
@@ -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
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1 -0
index 9a1e917..85f6169 100644
@@ -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
arch/arm/mach-kirkwood/netspace_v2-setup.c +3 -0
index 8849bcc..e6bba01 100644
@@ -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
arch/arm/mach-kirkwood/netxbig_v2-setup.c +2 -0
index 1ba12c4..31ae8de 100644
@@ -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
arch/arm/mach-kirkwood/openrd-setup.c +3 -0
index 5660ca6..01f8c89 100644
@@ -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
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1 -0
index 6663869..fd2c9c8 100644
@@ -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
arch/arm/mach-kirkwood/rd88f6281-setup.c +1 -0
index 66b3c05..ef92207 100644
@@ -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
arch/arm/mach-kirkwood/sheevaplug-setup.c +2 -0
index 8b102d6..85bff6b 100644
@@ -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
arch/arm/mach-kirkwood/t5325-setup.c +1 -0
index ea104fb..966b2b3 100644
@@ -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
arch/arm/mach-kirkwood/ts219-setup.c +1 -0
index 262c034..73e2b6c 100644
@@ -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
arch/arm/mach-kirkwood/ts41x-setup.c +1 -0
index b68f5b4..5bbca26 100644
@@ -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
Signature · 1 line
1.7.4.4
#97 lore raw

PATCH 19/41 ARM: restart: kirkwood: use new restart hook

Quoted 4 lines · Russell King - ARM Linux

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

Quoted 290 lines
---
 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(-)
arch/arm/mach-kirkwood/common.c +16 -0
index f3248cf..0bff4a9 100644
@@ -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)
+		;
+}
arch/arm/mach-kirkwood/common.h +1 -0
index b9b0f09..1529280 100644
@@ -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;
arch/arm/mach-kirkwood/d2net_v2-setup.c +1 -0
index f457e07..6e1bac9 100644
@@ -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
arch/arm/mach-kirkwood/db88f6281-bp-setup.c +1 -0
index ff4c21c..d933593 100644
@@ -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
arch/arm/mach-kirkwood/dockstar-setup.c +1 -0
index e4d199b..61d9a55 100644
@@ -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
arch/arm/mach-kirkwood/guruplug-setup.c +1 -0
index 6c40f78..bdaed38 100644
@@ -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
arch/arm/mach-kirkwood/include/mach/system.h +0 -15
index 7568e95..8a94d97 100644
@@ -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
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1 -0
index 9a1e917..85f6169 100644
@@ -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
arch/arm/mach-kirkwood/netspace_v2-setup.c +3 -0
index 8849bcc..e6bba01 100644
@@ -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
arch/arm/mach-kirkwood/netxbig_v2-setup.c +2 -0
index 1ba12c4..31ae8de 100644
@@ -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
arch/arm/mach-kirkwood/openrd-setup.c +3 -0
index 5660ca6..01f8c89 100644
@@ -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
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1 -0
index 6663869..fd2c9c8 100644
@@ -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
arch/arm/mach-kirkwood/rd88f6281-setup.c +1 -0
index 66b3c05..ef92207 100644
@@ -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
arch/arm/mach-kirkwood/sheevaplug-setup.c +2 -0
index 8b102d6..85bff6b 100644
@@ -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
arch/arm/mach-kirkwood/t5325-setup.c +1 -0
index ea104fb..966b2b3 100644
@@ -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
arch/arm/mach-kirkwood/ts219-setup.c +1 -0
index 262c034..73e2b6c 100644
@@ -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
arch/arm/mach-kirkwood/ts41x-setup.c +1 -0
index b68f5b4..5bbca26 100644
@@ -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
Signature · 7 lines
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
#98 lore raw

PATCH 20/41 ARM: restart: lpc32xx: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-lpc32xx/common.c +21 -1
index 205b2db..b049fd1 100644
@@ -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)
+		;
+}
arch/arm/mach-lpc32xx/common.h +2 -0
index 5583f52..4b4e700 100644
@@ -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
arch/arm/mach-lpc32xx/include/mach/system.h +0 -18
index d47f3b1..9c6cc0c 100644
@@ -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
arch/arm/mach-lpc32xx/phy3250.c +1 -0
index 6d2f0d1..ecb9411 100644
@@ -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
Signature · 1 line
1.7.4.4
#99 lore raw

PATCH 21/41 ARM: restart: mmp: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-mmp/aspenite.c +2 -0
index 06b5ad7..45d21e8 100644
@@ -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
arch/arm/mach-mmp/avengers_lite.c +1 -0
index 39f0878..8de3dc6 100644
@@ -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
arch/arm/mach-mmp/brownstone.c +1 -0
index 983cfb1..e16f04b 100644
@@ -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
arch/arm/mach-mmp/common.c +5 -0
index 5720674..062b5b9 100644
@@ -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);
+}
arch/arm/mach-mmp/common.h +1 -0
index ec8d65d..1c9d6c1 100644
@@ -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 *);
arch/arm/mach-mmp/flint.c +1 -0
index c4fd806..5a6a27a 100644
@@ -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
arch/arm/mach-mmp/gplugd.c +1 -0
index 6915656..a87f2f5 100644
@@ -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
arch/arm/mach-mmp/include/mach/pxa168.h +1 -0
index 7fb568d..a677aa7 100644
@@ -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>
arch/arm/mach-mmp/include/mach/system.h +0 -6
index cb06379..c434f3a 100644
@@ -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 */
arch/arm/mach-mmp/jasper.c +1 -0
index 8bfac66..96cf5c8 100644
@@ -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
arch/arm/mach-mmp/pxa168.c +5 -0
index 76ca15c..13f2386 100644
@@ -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);
+}
arch/arm/mach-mmp/tavorevb.c +1 -0
index eb5be87..257a212 100644
@@ -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
arch/arm/mach-mmp/teton_bga.c +1 -0
index bbe4727..8ac22a6 100644
@@ -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
arch/arm/mach-mmp/ttc_dkb.c +1 -0
index 176515a..f026588 100644
@@ -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
Signature · 1 line
1.7.4.4
#100 lore raw

PATCH 22/41 ARM: restart: mv78xx0: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +1 -0
index 0e94268..ee74ec9 100644
@@ -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
arch/arm/mach-mv78xx0/common.c +16 -0
index 23d3980..5b9632b 100644
@@ -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)
+		;
+}
arch/arm/mach-mv78xx0/common.h +1 -0
index 632e63d..07d5f8f 100644
@@ -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;
 
arch/arm/mach-mv78xx0/db78x00-bp-setup.c +1 -0
index 50b85ae..4d6d48b 100644
@@ -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
arch/arm/mach-mv78xx0/include/mach/system.h +0 -14
index 66e7ce4..1ae3585 100644
@@ -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)
-		;
 }
 
 
arch/arm/mach-mv78xx0/rd78x00-masa-setup.c +1 -0
index e85222e..9a88270 100644
@@ -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
Signature · 1 line
1.7.4.4
#101 lore raw

PATCH 22/41 ARM: restart: mv78xx0: use new restart hook

Quoted 4 lines · Russell King - ARM Linux

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

(missed the non Kirkwood ones before)

Quoted 116 lines
---
 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(-)
arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +1 -0
index 0e94268..ee74ec9 100644
@@ -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
arch/arm/mach-mv78xx0/common.c +16 -0
index 23d3980..5b9632b 100644
@@ -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)
+		;
+}
arch/arm/mach-mv78xx0/common.h +1 -0
index 632e63d..07d5f8f 100644
@@ -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;
 
arch/arm/mach-mv78xx0/db78x00-bp-setup.c +1 -0
index 50b85ae..4d6d48b 100644
@@ -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
arch/arm/mach-mv78xx0/include/mach/system.h +0 -14
index 66e7ce4..1ae3585 100644
@@ -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)
-		;
 }
 
 
arch/arm/mach-mv78xx0/rd78x00-masa-setup.c +1 -0
index e85222e..9a88270 100644
@@ -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
Signature · 7 lines
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
#102 lore raw

PATCH 23/41 ARM: restart: mxc: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-imx/mach-apf9328.c +1 -0
index 1e486e6..146a4f0 100644
@@ -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
arch/arm/mach-imx/mach-armadillo5x0.c +1 -0
index c9a9cf6..e4f426a 100644
@@ -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
arch/arm/mach-imx/mach-bug.c +1 -0
index 313f62d..9a98977 100644
@@ -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
arch/arm/mach-imx/mach-cpuimx27.c +1 -0
index edb3730..d085aea 100644
@@ -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
arch/arm/mach-imx/mach-cpuimx35.c +1 -0
index 66af2e8..012e120 100644
@@ -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
arch/arm/mach-imx/mach-eukrea_cpuimx25.c +1 -0
index ab8fbcc..76a97a5 100644
@@ -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
arch/arm/mach-imx/mach-imx27_visstrim_m10.c +1 -0
index 38eb9e4..c2766ae 100644
@@ -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
arch/arm/mach-imx/mach-imx27ipcam.c +1 -0
index 7052155..c9d350c 100644
@@ -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
arch/arm/mach-imx/mach-imx27lite.c +1 -0
index 8d6a635..1f45b91 100644
@@ -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
arch/arm/mach-imx/mach-imx6q.c +1 -0
index 8bf5fa3..dc8b6e2 100644
@@ -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
arch/arm/mach-imx/mach-kzm_arm11_01.c +1 -0
index 5f37f89..fc78e80 100644
@@ -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
arch/arm/mach-imx/mach-mx1ads.c +2 -0
index fc49785..9704608 100644
@@ -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
arch/arm/mach-imx/mach-mx21ads.c +1 -0
index 25f8402..8d9f955 100644
@@ -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
arch/arm/mach-imx/mach-mx25_3ds.c +1 -0
index 88dccf1..f267342 100644
@@ -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
arch/arm/mach-imx/mach-mx27_3ds.c +1 -0
index ba232d7..18f3581 100644
@@ -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
arch/arm/mach-imx/mach-mx27ads.c +1 -0
index 74dd573..0228d2e 100644
@@ -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
arch/arm/mach-imx/mach-mx31_3ds.c +1 -0
index b8c54b8..2b565c3 100644
@@ -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
arch/arm/mach-imx/mach-mx31ads.c +1 -0
index 9cc1a49..4917aab 100644
@@ -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
arch/arm/mach-imx/mach-mx31lilly.c +1 -0
index 5defd8e..1e0db94 100644
@@ -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
arch/arm/mach-imx/mach-mx31lite.c +1 -0
index 05f1c71..67e538d 100644
@@ -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
arch/arm/mach-imx/mach-mx31moboard.c +1 -0
index 07034f4..f1e1b7d 100644
@@ -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
arch/arm/mach-imx/mach-mx35_3ds.c +1 -0
index 7a46202..0af6c9c 100644
@@ -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
arch/arm/mach-imx/mach-mxt_td60.c +1 -0
index 125c196..8b3d3f0 100644
@@ -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
arch/arm/mach-imx/mach-pca100.c +1 -0
index 26072f4..d3b9c6b 100644
@@ -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
arch/arm/mach-imx/mach-pcm037.c +1 -0
index efd6b53..d7e1516 100644
@@ -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
arch/arm/mach-imx/mach-pcm038.c +1 -0
index a17e9c7..16f126d 100644
@@ -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
arch/arm/mach-imx/mach-pcm043.c +1 -0
index 7366c2a..06dc106 100644
@@ -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
arch/arm/mach-imx/mach-qong.c +1 -0
index 4ff5faf..2606210 100644
@@ -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
arch/arm/mach-imx/mach-scb9328.c +1 -0
index bb6e5b2..cb9ceae 100644
@@ -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
arch/arm/mach-imx/mach-vpr200.c +1 -0
index 6909245..033257e 100644
@@ -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
arch/arm/mach-mx5/board-cpuimx51.c +1 -0
index 1fc1103..944025d 100644
@@ -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
arch/arm/mach-mx5/board-cpuimx51sd.c +1 -0
index 52a11c1..9fbe923 100644
@@ -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
arch/arm/mach-mx5/board-mx50_rdp.c +1 -0
index fc3621d..42b66e8 100644
@@ -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
arch/arm/mach-mx5/board-mx51_3ds.c +1 -0
index 0578390..83eab41 100644
@@ -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
arch/arm/mach-mx5/board-mx51_babbage.c +1 -0
index 5c83760..68cdfda 100644
@@ -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
arch/arm/mach-mx5/board-mx51_efikamx.c +2 -1
index a9e4866..3a5ed2d 100644
@@ -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
arch/arm/mach-mx5/board-mx51_efikasb.c +1 -0
index 38c4a3e..ea5f65b 100644
@@ -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
arch/arm/mach-mx5/board-mx53_ard.c +1 -0
index 0d7f0ff..5f224f1 100644
@@ -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
arch/arm/mach-mx5/board-mx53_evk.c +1 -0
index 6bea31a..c2d27cf 100644
@@ -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
arch/arm/mach-mx5/board-mx53_loco.c +1 -0
index 7678f77..62f4aa3 100644
@@ -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
arch/arm/mach-mx5/board-mx53_smd.c +1 -0
index 59c0845..2a78e62 100644
@@ -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
arch/arm/mach-mx5/imx51-dt.c +1 -0
index ccc6158..edf2c4c 100644
@@ -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
arch/arm/mach-mx5/imx53-dt.c +1 -0
index ccaa0b8..106070a 100644
@@ -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
arch/arm/plat-mxc/include/mach/common.h +1 -1
index 83b745a..4ee98d5 100644
@@ -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);
 
arch/arm/plat-mxc/include/mach/system.h +3 -1
index cf88b35..22b8911 100644
@@ -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__ */
arch/arm/plat-mxc/system.c +1 -8
index b1cfc6a..80de9e2 100644
@@ -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 {
Signature · 1 line
1.7.4.4
#103 lore raw

PATCH 23/41 ARM: restart: mxc: use new restart hook

Ack?

Quoted 559 lines · Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-imx/mach-apf9328.c +1 -0
index 1e486e6..146a4f0 100644
@@ -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
arch/arm/mach-imx/mach-armadillo5x0.c +1 -0
index c9a9cf6..e4f426a 100644
@@ -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
arch/arm/mach-imx/mach-bug.c +1 -0
index 313f62d..9a98977 100644
@@ -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
arch/arm/mach-imx/mach-cpuimx27.c +1 -0
index edb3730..d085aea 100644
@@ -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
arch/arm/mach-imx/mach-cpuimx35.c +1 -0
index 66af2e8..012e120 100644
@@ -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
arch/arm/mach-imx/mach-eukrea_cpuimx25.c +1 -0
index ab8fbcc..76a97a5 100644
@@ -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
arch/arm/mach-imx/mach-imx27_visstrim_m10.c +1 -0
index 38eb9e4..c2766ae 100644
@@ -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
arch/arm/mach-imx/mach-imx27ipcam.c +1 -0
index 7052155..c9d350c 100644
@@ -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
arch/arm/mach-imx/mach-imx27lite.c +1 -0
index 8d6a635..1f45b91 100644
@@ -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
arch/arm/mach-imx/mach-imx6q.c +1 -0
index 8bf5fa3..dc8b6e2 100644
@@ -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
arch/arm/mach-imx/mach-kzm_arm11_01.c +1 -0
index 5f37f89..fc78e80 100644
@@ -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
arch/arm/mach-imx/mach-mx1ads.c +2 -0
index fc49785..9704608 100644
@@ -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
arch/arm/mach-imx/mach-mx21ads.c +1 -0
index 25f8402..8d9f955 100644
@@ -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
arch/arm/mach-imx/mach-mx25_3ds.c +1 -0
index 88dccf1..f267342 100644
@@ -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
arch/arm/mach-imx/mach-mx27_3ds.c +1 -0
index ba232d7..18f3581 100644
@@ -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
arch/arm/mach-imx/mach-mx27ads.c +1 -0
index 74dd573..0228d2e 100644
@@ -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
arch/arm/mach-imx/mach-mx31_3ds.c +1 -0
index b8c54b8..2b565c3 100644
@@ -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
arch/arm/mach-imx/mach-mx31ads.c +1 -0
index 9cc1a49..4917aab 100644
@@ -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
arch/arm/mach-imx/mach-mx31lilly.c +1 -0
index 5defd8e..1e0db94 100644
@@ -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
arch/arm/mach-imx/mach-mx31lite.c +1 -0
index 05f1c71..67e538d 100644
@@ -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
arch/arm/mach-imx/mach-mx31moboard.c +1 -0
index 07034f4..f1e1b7d 100644
@@ -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
arch/arm/mach-imx/mach-mx35_3ds.c +1 -0
index 7a46202..0af6c9c 100644
@@ -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
arch/arm/mach-imx/mach-mxt_td60.c +1 -0
index 125c196..8b3d3f0 100644
@@ -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
arch/arm/mach-imx/mach-pca100.c +1 -0
index 26072f4..d3b9c6b 100644
@@ -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
arch/arm/mach-imx/mach-pcm037.c +1 -0
index efd6b53..d7e1516 100644
@@ -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
arch/arm/mach-imx/mach-pcm038.c +1 -0
index a17e9c7..16f126d 100644
@@ -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
arch/arm/mach-imx/mach-pcm043.c +1 -0
index 7366c2a..06dc106 100644
@@ -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
arch/arm/mach-imx/mach-qong.c +1 -0
index 4ff5faf..2606210 100644
@@ -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
arch/arm/mach-imx/mach-scb9328.c +1 -0
index bb6e5b2..cb9ceae 100644
@@ -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
arch/arm/mach-imx/mach-vpr200.c +1 -0
index 6909245..033257e 100644
@@ -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
arch/arm/mach-mx5/board-cpuimx51.c +1 -0
index 1fc1103..944025d 100644
@@ -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
arch/arm/mach-mx5/board-cpuimx51sd.c +1 -0
index 52a11c1..9fbe923 100644
@@ -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
arch/arm/mach-mx5/board-mx50_rdp.c +1 -0
index fc3621d..42b66e8 100644
@@ -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
arch/arm/mach-mx5/board-mx51_3ds.c +1 -0
index 0578390..83eab41 100644
@@ -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
arch/arm/mach-mx5/board-mx51_babbage.c +1 -0
index 5c83760..68cdfda 100644
@@ -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
arch/arm/mach-mx5/board-mx51_efikamx.c +2 -1
index a9e4866..3a5ed2d 100644
@@ -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
arch/arm/mach-mx5/board-mx51_efikasb.c +1 -0
index 38c4a3e..ea5f65b 100644
@@ -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
arch/arm/mach-mx5/board-mx53_ard.c +1 -0
index 0d7f0ff..5f224f1 100644
@@ -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
arch/arm/mach-mx5/board-mx53_evk.c +1 -0
index 6bea31a..c2d27cf 100644
@@ -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
arch/arm/mach-mx5/board-mx53_loco.c +1 -0
index 7678f77..62f4aa3 100644
@@ -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
arch/arm/mach-mx5/board-mx53_smd.c +1 -0
index 59c0845..2a78e62 100644
@@ -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
arch/arm/mach-mx5/imx51-dt.c +1 -0
index ccc6158..edf2c4c 100644
@@ -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
arch/arm/mach-mx5/imx53-dt.c +1 -0
index ccaa0b8..106070a 100644
@@ -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
arch/arm/plat-mxc/include/mach/common.h +1 -1
index 83b745a..4ee98d5 100644
@@ -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);
 
arch/arm/plat-mxc/include/mach/system.h +3 -1
index cf88b35..22b8911 100644
@@ -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__ */
arch/arm/plat-mxc/system.c +1 -8
index b1cfc6a..80de9e2 100644
@@ -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 {
Signature · 7 lines
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
maintainer
#104 lore raw

PATCH 23/41 ARM: restart: mxc: use new restart hook

Quoted 1 line · Russell King - ARM Linux

Ack?

Yes:

Signature · 4 lines
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 |
#105 lore raw

PATCH 24/41 ARM: restart: mxs: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-mxs/include/mach/common.h +1 -0
index 635bb5d..1388485 100644
@@ -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);
arch/arm/mach-mxs/include/mach/system.h +3 -1
index 0e42823..bcd8989 100644
@@ -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__ */
arch/arm/mach-mxs/mach-m28evk.c +1 -0
index 3b1681e..7799cd9 100644
@@ -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
arch/arm/mach-mxs/mach-mx23evk.c +1 -0
index c325fbe..5ea1c57 100644
@@ -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
arch/arm/mach-mxs/mach-mx28evk.c +1 -0
index ac2316d..1d2548f 100644
@@ -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
arch/arm/mach-mxs/mach-stmp378x_devb.c +1 -0
index 177e531..857e857 100644
@@ -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
arch/arm/mach-mxs/mach-tx28.c +1 -0
index 9a1f0e7..2c0862e 100644
@@ -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
arch/arm/mach-mxs/system.c +1 -1
index cab8836..b936633 100644
@@ -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);
Signature · 1 line
1.7.4.4
#106 lore raw

PATCH 24/41 ARM: restart: mxs: use new restart hook

Quoted 4 lines · Russell King - ARM Linux

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

Regards,
Shawn

Quoted 109 lines
---
 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(-)
arch/arm/mach-mxs/include/mach/common.h +1 -0
index 635bb5d..1388485 100644
@@ -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);
arch/arm/mach-mxs/include/mach/system.h +3 -1
index 0e42823..bcd8989 100644
@@ -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__ */
arch/arm/mach-mxs/mach-m28evk.c +1 -0
index 3b1681e..7799cd9 100644
@@ -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
arch/arm/mach-mxs/mach-mx23evk.c +1 -0
index c325fbe..5ea1c57 100644
@@ -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
arch/arm/mach-mxs/mach-mx28evk.c +1 -0
index ac2316d..1d2548f 100644
@@ -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
arch/arm/mach-mxs/mach-stmp378x_devb.c +1 -0
index 177e531..857e857 100644
@@ -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
arch/arm/mach-mxs/mach-tx28.c +1 -0
index 9a1f0e7..2c0862e 100644
@@ -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
arch/arm/mach-mxs/system.c +1 -1
index cab8836..b936633 100644
@@ -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);
Signature · 7 lines
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
#107 lore raw

PATCH 25/41 ARM: restart: orion5x: use new restart hook

In reply to Russell King - ARM Linux

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.

---
 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(-)
arch/arm/mach-orion5x/common.c +12 -0
index 22ace0b..41127e8 100644
@@ -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.
arch/arm/mach-orion5x/common.h +1 -0
index 909489f..37ef18d 100644
@@ -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.
arch/arm/mach-orion5x/d2net-setup.c +2 -0
index 8c83009..d75dcfa 100644
@@ -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
 
arch/arm/mach-orion5x/db88f5281-setup.c +1 -0
index 4b79a80..a104d5a 100644
@@ -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
arch/arm/mach-orion5x/dns323-setup.c +1 -0
index 343f60e..91b0f47 100644
@@ -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
arch/arm/mach-orion5x/edmini_v2-setup.c +1 -0
index 70a4e92..355e962 100644
@@ -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
arch/arm/mach-orion5x/include/mach/system.h +0 -10
index a1d6e46..6677677 100644
@@ -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
arch/arm/mach-orion5x/kurobox_pro-setup.c +2 -0
index d3cd3f6..47587b8 100644
@@ -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
arch/arm/mach-orion5x/ls-chl-setup.c +2 -1
index 9503fff..5272131 100644
@@ -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
arch/arm/mach-orion5x/ls_hgl-setup.c +2 -1
index ed6d772..9a8697b 100644
@@ -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
arch/arm/mach-orion5x/lsmini-setup.c +2 -1
index 743f7f1..09c7365 100644
@@ -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
arch/arm/mach-orion5x/mss2-setup.c +2 -1
index 6020e26..65faaa3 100644
@@ -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
arch/arm/mach-orion5x/mv2120-setup.c +2 -1
index 201ae36..c87fde4 100644
@@ -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
arch/arm/mach-orion5x/net2big-setup.c +1 -0
index 6197c79..0180c39 100644
@@ -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
 
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +1 -0
index ebd6767..292038f 100644
@@ -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
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +1 -0
index 05db2d3..c44eaba 100644
@@ -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
arch/arm/mach-orion5x/rd88f5182-setup.c +1 -0
index e47fa05..96438b6 100644
@@ -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
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1 -0
index 6431725..2c5fab0 100644
@@ -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
arch/arm/mach-orion5x/terastation_pro2-setup.c +1 -0
index 29f1526..632a861 100644
@@ -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
arch/arm/mach-orion5x/ts209-setup.c +1 -0
index 31e51f9..62c156b 100644
@@ -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
arch/arm/mach-orion5x/ts409-setup.c +1 -0
index 0fbcc14..4e6ff75 100644
@@ -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
arch/arm/mach-orion5x/ts78xx-setup.c +1 -0
index 6c75cd3..0a236dd 100644
@@ -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
arch/arm/mach-orion5x/wnr854t-setup.c +1 -0
index b8be7d8..078c03f 100644
@@ -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
arch/arm/mach-orion5x/wrt350n-v2-setup.c +1 -0
index faf81a0..46a9778 100644
@@ -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
Signature · 1 line
1.7.4.4
#108 lore raw

PATCH 25/41 ARM: restart: orion5x: use new restart hook

Quoted 7 lines · Russell King - ARM Linux

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.

Quoted 368 lines
---
 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(-)
arch/arm/mach-orion5x/common.c +12 -0
index 22ace0b..41127e8 100644
@@ -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.
arch/arm/mach-orion5x/common.h +1 -0
index 909489f..37ef18d 100644
@@ -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.
arch/arm/mach-orion5x/d2net-setup.c +2 -0
index 8c83009..d75dcfa 100644
@@ -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
 
arch/arm/mach-orion5x/db88f5281-setup.c +1 -0
index 4b79a80..a104d5a 100644
@@ -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
arch/arm/mach-orion5x/dns323-setup.c +1 -0
index 343f60e..91b0f47 100644
@@ -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
arch/arm/mach-orion5x/edmini_v2-setup.c +1 -0
index 70a4e92..355e962 100644
@@ -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
arch/arm/mach-orion5x/include/mach/system.h +0 -10
index a1d6e46..6677677 100644
@@ -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
arch/arm/mach-orion5x/kurobox_pro-setup.c +2 -0
index d3cd3f6..47587b8 100644
@@ -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
arch/arm/mach-orion5x/ls-chl-setup.c +2 -1
index 9503fff..5272131 100644
@@ -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
arch/arm/mach-orion5x/ls_hgl-setup.c +2 -1
index ed6d772..9a8697b 100644
@@ -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
arch/arm/mach-orion5x/lsmini-setup.c +2 -1
index 743f7f1..09c7365 100644
@@ -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
arch/arm/mach-orion5x/mss2-setup.c +2 -1
index 6020e26..65faaa3 100644
@@ -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
arch/arm/mach-orion5x/mv2120-setup.c +2 -1
index 201ae36..c87fde4 100644
@@ -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
arch/arm/mach-orion5x/net2big-setup.c +1 -0
index 6197c79..0180c39 100644
@@ -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
 
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +1 -0
index ebd6767..292038f 100644
@@ -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
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +1 -0
index 05db2d3..c44eaba 100644
@@ -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
arch/arm/mach-orion5x/rd88f5182-setup.c +1 -0
index e47fa05..96438b6 100644
@@ -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
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1 -0
index 6431725..2c5fab0 100644
@@ -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
arch/arm/mach-orion5x/terastation_pro2-setup.c +1 -0
index 29f1526..632a861 100644
@@ -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
arch/arm/mach-orion5x/ts209-setup.c +1 -0
index 31e51f9..62c156b 100644
@@ -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
arch/arm/mach-orion5x/ts409-setup.c +1 -0
index 0fbcc14..4e6ff75 100644
@@ -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
arch/arm/mach-orion5x/ts78xx-setup.c +1 -0
index 6c75cd3..0a236dd 100644
@@ -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
arch/arm/mach-orion5x/wnr854t-setup.c +1 -0
index b8be7d8..078c03f 100644
@@ -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
arch/arm/mach-orion5x/wrt350n-v2-setup.c +1 -0
index faf81a0..46a9778 100644
@@ -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
Signature · 7 lines
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
#109 lore raw

PATCH 26/41 ARM: restart: pnx4008: use new restart hook

In reply to Russell King - ARM Linux

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

---
 arch/arm/mach-pnx4008/core.c                |    6 ++++++
 arch/arm/mach-pnx4008/include/mach/system.h |    5 -----
 2 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-pnx4008/core.c +6 -0
index cdb95e7..4cfb40b 100644
@@ -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
arch/arm/mach-pnx4008/include/mach/system.h +0 -5
index 5d6384a..6710ed3 100644
@@ -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
Signature · 1 line
1.7.4.4
#110 lore raw

PATCH 27/41 ARM: restart: prima2: use new restart hook

In reply to Russell King - ARM Linux

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

---
 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(-)
arch/arm/mach-prima2/common.h +1 -0
index 83e5d21..b28a930 100644
@@ -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)  {}
arch/arm/mach-prima2/include/mach/system.h +0 -8
index 0dbd257..eb16b4b 100644
@@ -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
arch/arm/mach-prima2/prima2.c +1 -0
index ef555c0..8609aad 100644
@@ -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
arch/arm/mach-prima2/rstc.c +7 -0
index 492cfa8..762adb7 100644
@@ -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);
+}
Signature · 1 line
1.7.4.4