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

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

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

In reply to Russell King - ARM Linux

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

Quoted 4 lines

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

Quoted 72 lines

---

?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 -0
index 0dbd257..eb16b4b 100644
@@ -9,13 +9,6 @@

?#ifndef __MACH_SYSTEM_H__
?#define __MACH_SYSTEM_H__

arch/arm/mach-prima2/include/mach/system.h +0 -7
-#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();

arch/arm/mach-prima2/include/mach/system.h +0 -1
@@ -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 -1
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);
+}
--

1.7.4.4

#112 lore raw

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

PATCH 28/41 ARM: restart: pxa: use new restart hook

Ack?

Quoted 899 lines · Russell King - ARM Linux

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

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

PATCH 28/41 ARM: restart: pxa: use new restart hook

Quoted 7 lines · Russell King - ARM Linux

Ack?

Quoted 4 lines · Russell King - ARM Linux

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

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

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

PATCH 30/41 ARM: restart: riscpc: use new restart hook

In reply to Russell King - ARM Linux

Hook the RiscPC restart code into the new restart hook.

---
 arch/arm/mach-rpc/include/mach/system.h |   10 ----------
 arch/arm/mach-rpc/riscpc.c              |   12 ++++++++++++
 2 files changed, 12 insertions(+), 10 deletions(-)
arch/arm/mach-rpc/include/mach/system.h +0 -10
index a354f4d..e9fb593 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 <linux/io.h>
-#include <mach/hardware.h>
-#include <asm/hardware/iomd.h>
-
 static inline void arch_idle(void)
 {
 	cpu_do_idle();
@@ -18,10 +14,4 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-	iomd_writeb(0, IOMD_ROMCR0);
-
-	/*
-	 * Jump into the ROM
-	 */
-	soft_restart(0);
 }
arch/arm/mach-rpc/riscpc.c +12 -0
index 8559598..3d44a59 100644
@@ -24,6 +24,7 @@
 #include <asm/elf.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
+#include <asm/hardware/iomd.h>
 #include <asm/page.h>
 #include <asm/domain.h>
 #include <asm/setup.h>
@@ -214,6 +215,16 @@ static int __init rpc_init(void)
 
 arch_initcall(rpc_init);
 
+static void rpc_restart(char mode, const char *cmd)
+{
+	iomd_writeb(0, IOMD_ROMCR0);
+
+	/*
+	 * Jump into the ROM
+	 */
+	soft_restart(0);
+}
+
 extern struct sys_timer ioc_timer;
 
 MACHINE_START(RISCPC, "Acorn-RiscPC")
@@ -224,4 +235,5 @@ MACHINE_START(RISCPC, "Acorn-RiscPC")
 	.map_io		= rpc_map_io,
 	.init_irq	= rpc_init_irq,
 	.timer		= &ioc_timer,
+	.restart	= rpc_restart,
 MACHINE_END
Signature · 1 line
1.7.4.4
#117 lore raw

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

PATCH 32/41 ARM: restart: shark: 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-shark/core.c                |    3 ++-
 arch/arm/mach-shark/include/mach/system.h |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)
arch/arm/mach-shark/core.c +2 -1
index f4b25d8..a851c25 100644
@@ -26,7 +26,7 @@
 #define ROMCARD_SIZE            0x08000000
 #define ROMCARD_START           0x10000000
 
-void arch_reset(char mode, const char *cmd)
+static void shark_restart(char mode, const char *cmd)
 {
         short temp;
         /* Reset the Machine via pc[3] of the sequoia chipset */
@@ -156,4 +156,5 @@ MACHINE_START(SHARK, "Shark")
 	.init_irq	= shark_init_irq,
 	.timer		= &shark_timer,
 	.dma_zone_size	= SZ_4M,
+	.restart	= shark_restart,
 MACHINE_END
arch/arm/mach-shark/include/mach/system.h +3 -2
index 21c373b..2cc363a 100644
@@ -6,8 +6,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-/* Found in arch/mach-shark/core.c */
-extern void arch_reset(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 static inline void arch_idle(void)
 {
Signature · 1 line
1.7.4.4
#119 lore raw

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

PATCH 33/41 ARM: restart: spear: use new restart hook

Ack?

Quoted 165 lines · Russell King - ARM Linux

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

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

PATCH 33/41 ARM: restart: spear: use new restart hook

Quoted 20 lines · Russell King - ARM Linux

Ack?

Quoted 17 lines · Russell King - ARM Linux

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

---
 arch/arm/mach-spear3xx/include/mach/generic.h |    2 +
 arch/arm/mach-spear3xx/spear300_evb.c         |    1 +
 arch/arm/mach-spear3xx/spear310_evb.c         |    1 +
 arch/arm/mach-spear3xx/spear320_evb.c         |    1 +
 arch/arm/mach-spear6xx/include/mach/generic.h |    2 +
 arch/arm/mach-spear6xx/spear600_evb.c         |    1 +
 arch/arm/plat-spear/Makefile                  |    2 +-
 arch/arm/plat-spear/include/plat/system.h     |   11 ----------
 arch/arm/plat-spear/restart.c                 |   27 +++++++++++++++++++++++++
 9 files changed, 36 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/plat-spear/restart.c

Sorry for missing it earlier.

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

PATCH 34/41 ARM: restart: tegra: 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-tegra/common.c              |    5 ++---
 arch/arm/mach-tegra/include/mach/system.h |    6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)
arch/arm/mach-tegra/common.c +2 -3
index 690b888..1374d10 100644
@@ -31,9 +31,7 @@
 #include "clock.h"
 #include "fuse.h"
 
-void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset;
-
-void tegra_assert_system_reset(char mode, const char *cmd)
+static void tegra_assert_system_reset(char mode, const char *cmd)
 {
 	void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
 	u32 reg;
@@ -76,6 +74,7 @@ static void __init tegra_init_cache(void)
 
 void __init tegra_init_early(void)
 {
+	arm_pm_restart = tegra_assert_system_reset;
 	tegra_init_fuse();
 	tegra_init_clock();
 	tegra_clk_init_from_table(common_clk_init_table);
arch/arm/mach-tegra/include/mach/system.h +3 -3
index 027c421..b87b8a4 100644
@@ -21,9 +21,9 @@
 #ifndef __MACH_TEGRA_SYSTEM_H
 #define __MACH_TEGRA_SYSTEM_H
 
-#include <mach/iomap.h>
-
-extern void (*arch_reset)(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
 
 static inline void arch_idle(void)
 {
Signature · 1 line
1.7.4.4
#123 lore raw

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

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

PATCH 37/41 ARM: restart: Versatile Express: use new restart hook

In reply to Russell King - ARM Linux

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

---
 arch/arm/mach-vexpress/v2m.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-vexpress/v2m.c +1 -1
index 1fafc32..b9a465b 100644
@@ -437,7 +437,6 @@ static void __init v2m_init(void)
 		amba_device_register(v2m_amba_devs[i], &iomem_resource);
 
 	pm_power_off = v2m_power_off;
-	arm_pm_restart = v2m_restart;
 
 	ct_desc->init_tile();
 }
@@ -449,4 +448,5 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express")
 	.init_irq	= v2m_init_irq,
 	.timer		= &v2m_timer,
 	.init_machine	= v2m_init,
+	.restart	= v2m_restart,
 MACHINE_END
Signature · 1 line
1.7.4.4
#127 lore raw

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

PATCH 38/41 ARM: restart: w90x900: 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().

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

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

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

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

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

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

PATCH 39/41 ARM: restart: lpc32xx & u300: remove unnecessary printk

In reply to Russell King - ARM Linux

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

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

KERN_EMERG "Restarting system.\n"

so this is unnecessary.

---
 arch/arm/mach-lpc32xx/common.c |    2 --
 arch/arm/mach-u300/core.c      |    1 -
 2 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/mach-lpc32xx/common.c +0 -2
index b049fd1..369b152 100644
@@ -317,8 +317,6 @@ void lpc23xx_restart(char mode, const char *cmd)
 	switch (mode) {
 	case 's':
 	case 'h':
-		printk(KERN_CRIT "RESET: Rebooting system\n");
-
 		lpc32xx_watchdog_reset();
 		break;
 
arch/arm/mach-u300/core.c +0 -1
index 27be5a7..6979307 100644
@@ -1897,7 +1897,6 @@ void u300_restart(char mode, const char *cmd)
 	switch (mode) {
 	case 's':
 	case 'h':
-		printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
 #ifdef CONFIG_COH901327_WATCHDOG
 		coh901327_watchdog_reset();
 #endif
Signature · 1 line
1.7.4.4
#130 lore raw

PATCH 39/41 ARM: restart: lpc32xx & u300: remove unnecessary printk

Quoted 4 lines · Russell King - ARM Linux

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

Quoted 8 lines

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

? ? ? ?KERN_EMERG "Restarting system.\n"

so this is unnecessary.

Thanks Russell,
Linus Walleij

#131 lore raw

PATCH 39/41 ARM: restart: lpc32xx & u300: remove unnecessary printk

Quoted 10 lines · Linus Walleij
Quoted 7 lines · Russell King - ARM Linux

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

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

Quoted 7 lines
Quoted 5 lines

? ? ? ?KERN_EMERG "Restarting system.\n"

so this is unnecessary.

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

#132 lore raw

PATCH 39/41 ARM: restart: lpc32xx & u300: remove unnecessary printk

Quoted 3 lines · Russell King - ARM Linux

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

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

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

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

Feel free to fold in the below at your convenience:

Quoted 1 line

From b0f26c142e5fbc75d10e75c96f2c753b3fe7c2d9 Mon Sep 17 00:00:00 2001

From: Linus Walleij <[email protected]>
Date: Fri, 11 Nov 2011 20:30:32 +0100
Subject: [PATCH] ARM: nomadik: localize cpu-8815 header

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

---
 arch/arm/mach-nomadik/board-nhk8815.c      |    2 ++
 arch/arm/mach-nomadik/cpu-8815.c           |    1 +
 arch/arm/mach-nomadik/cpu-8815.h           |    3 +++
 arch/arm/mach-nomadik/include/mach/setup.h |    3 ---
 4 files changed, 6 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/mach-nomadik/cpu-8815.h
(quoted diff) +0 -0

b/arch/arm/mach-nomadik/board-nhk8815.c
index 0cbb74c..4518050 100644

arch/arm/mach-nomadik/board-nhk8815.c +2 -0
@@ -34,6 +34,8 @@
 #include <mach/nand.h>
 #include <mach/fsmc.h>
 
+#include "cpu-8815.h"
+
 /* Initial value for SRC control register: all timers use MXTAL/8 source */
 #define SRC_CR_INIT_MASK	0x00007fff
 #define SRC_CR_INIT_VAL		0x2aaa8000
arch/arm/mach-nomadik/cpu-8815.c +1 -0
index dc67717..c087ea9 100644
@@ -32,6 +32,7 @@
 #include <asm/hardware/cache-l2x0.h>
 
 #include "clock.h"
+#include "cpu-8815.h"
 
 #define __MEM_4K_RESOURCE(x) \
 	.res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
arch/arm/mach-nomadik/cpu-8815.h new file +3 -0
new file mode 100644
index 0000000..e041794
@@ -0,0 +1,3 @@
+extern void cpu8815_map_io(void);
+extern void cpu8815_platform_init(void);
+extern void cpu8815_init_irq(void);
(quoted diff) +0 -0

b/arch/arm/mach-nomadik/include/mach/setup.h
index b7897ed..bcaeaf4 100644

arch/arm/mach-nomadik/include/mach/setup.h +0 -3
@@ -12,9 +12,6 @@
 
 #ifdef CONFIG_NOMADIK_8815
 
-extern void cpu8815_map_io(void);
-extern void cpu8815_platform_init(void);
-extern void cpu8815_init_irq(void);
 extern void nmdk_timer_init(void);
 
 #endif /* NOMADIK_8815 */
Signature · 4 lines
1.7.3.2

Yours,
Linus Walleij
#133 lore raw

PATCH 40/41 ARM: restart: remove comments about adding code to arch_reset()

In reply to Russell King - ARM Linux

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

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

PATCH 40/41 ARM: restart: remove comments about adding code to arch_reset()

Quoted 4 lines · Russell King - ARM Linux

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

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

PATCH 41/41 ARM: restart: remove the now empty arch_reset()

In reply to Russell King - ARM Linux

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

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

PATCH 41/41 ARM: restart: remove the now empty arch_reset()

Quoted 5 lines · Russell King - ARM Linux

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

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

PATCH 41/41 ARM: restart: remove the now empty arch_reset()

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

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

---
 arch/arm/include/asm/system.h                  |    1 -
 arch/arm/kernel/process.c                      |   10 ++--------

[...]

Quoted 1 line
 arch/arm/mach-ep93xx/include/mach/system.h     |    4 ----

[...]

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

[...]

arch/arm/mach-ep93xx/include/mach/system.h static inline void arch_idle(void) · line 11

Quoted 12 lines
arch/arm/mach-ep93xx/include/mach/system.h +0 -4
index b27a654..b5bec7c 100644
@@ -5,7 +5,3 @@ static inline void arch_idle(void)
 {
 	cpu_do_idle();
 }
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}

For ep93xx...

Thanks!

maintainer
#141 lore raw

PATCH 41/41 ARM: restart: remove the now empty arch_reset()

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

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

Assuming arch_reset can now also be removed for omaps:

#143 lore raw

cover Preparation for arch_reset changes

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

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.

Quoted 3 lines

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

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

Nicolas

#144 lore raw

cover Preparation for arch_reset changes

In reply to Russell King - ARM Linux

Hi Russell,

Quoted 18 lines · Russell King - ARM Linux

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.

Quoted 3 lines

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

For the seven patches,

Thanks,

Will

#145 lore raw

cover Preparation for arch_reset changes

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

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.

Quoted 3 lines

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

Russell,

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

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

#146 lore raw

cover Preparation for arch_reset changes

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

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.

Quoted 8 lines

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

++++++++++++-----

Quoted 26 lines
---
 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 -
Quoted 8 lines
 arch/arm/mach-shmobile/include/mach/system.h      |    2 +-
 arch/arm/mach-u300/include/mach/system.h          |    2 -
 arch/arm/mach-w90x900/include/mach/system.h       |    2 +-
 arch/arm/mm/idmap.c                               |    2 +-
 arch/arm/mm/nommu.c                               |    2 +-
 arch/arm/plat-mxc/system.c                        |    2 +-
 arch/arm/plat-spear/include/plat/system.h         |    2 +-
 36 files changed, 64 insertions(+), 59 deletions(-)

For Samsung stuff,

Thanks.

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

#148 lore raw

cover Preparation for arch_reset changes

In reply to Russell King - ARM Linux

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

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

The base set of changes are:

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

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

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

#149 lore raw

cover Preparation for arch_reset changes

Hi Russell,

Quoted 8 lines · Russell King - ARM Linux

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

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

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

Thanks,

Will

#150 lore raw

cover Preparation for arch_reset changes

Quoted 8 lines · Will Deacon

Hi Russell,

Quoted 5 lines · Russell King - ARM Linux

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

Quoted 7 lines
Quoted 3 lines

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

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

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

#151 lore raw

cover Preparation for arch_reset changes

Quoted 9 lines · Russell King - ARM Linux
Quoted 3 lines · Will Deacon

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

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

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

Thanks,

Will