Preparation for arch_reset changes
Subsystems (27)
cover Preparation for arch_reset changes
This series lays down the ground work for changing the way we handle the reset (now called restart) handling on ARM.
As a result of these patches, we provide a new hook in the machine_desc record called 'restart' which is pointed at a function to perform the appropriate restart actions for the platform. This is called directly from machine_restart() with IRQs and caches on.
The 'soft_reboot' flag is changed to a more generic 'restart_mode' character - which is used to initialize the default reboot mode (which can be changed via the 'reboot=' command line parameter.)
'soft_restart(addr)' is added which performs a soft restart (iow, orderly shutdown of caches and MMU and a jump to the passed address), rather than the old way which separated the tear-down of the caches and MMU from the code doing the jump. This will be necessary to resolve the ARMv6 and ARMv7 CPU restarting problems.
Finally, appropriate 'restart_mode' values are added to several platforms which were hard-coding the restart mode by intercepting the restarting via arm_pm_restart.
arch/arm/include/asm/mach/arch.h | 9 +++-- arch/arm/include/asm/system.h | 1 + arch/arm/kernel/machine_kexec.c | 4 +- arch/arm/kernel/process.c | 35 ++++++++++++-------- arch/arm/kernel/setup.c | 7 +++- arch/arm/mach-clps711x/include/mach/system.h | 2 +- arch/arm/mach-ebsa110/core.c | 2 +- arch/arm/mach-ebsa110/include/mach/system.h | 2 +- arch/arm/mach-ep93xx/include/mach/system.h | 2 - arch/arm/mach-footbridge/cats-hw.c | 2 +- arch/arm/mach-footbridge/include/mach/system.h | 2 +- arch/arm/mach-iop32x/include/mach/system.h | 4 +-- arch/arm/mach-iop33x/include/mach/system.h | 2 +- arch/arm/mach-ixp2000/include/mach/system.h | 2 - arch/arm/mach-ixp4xx/include/mach/system.h | 2 +- arch/arm/mach-ks8695/include/mach/system.h | 2 +- arch/arm/mach-lpc32xx/include/mach/system.h | 3 -- arch/arm/mach-mmp/include/mach/system.h | 4 +- arch/arm/mach-mxs/system.c | 2 +- arch/arm/mach-pnx4008/include/mach/system.h | 2 +- arch/arm/mach-pxa/mioa701.c | 1 + arch/arm/mach-pxa/reset.c | 2 +- arch/arm/mach-pxa/spitz.c | 3 ++ arch/arm/mach-pxa/tosa.c | 1 + arch/arm/mach-rpc/include/mach/system.h | 2 +- arch/arm/mach-s3c2410/include/mach/system-reset.h | 4 +- arch/arm/mach-s3c64xx/include/mach/system.h | 2 +- arch/arm/mach-sa1100/include/mach/system.h | 2 +- arch/arm/mach-shark/core.c | 1 - arch/arm/mach-shmobile/include/mach/system.h | 2 +- arch/arm/mach-u300/include/mach/system.h | 2 - arch/arm/mach-w90x900/include/mach/system.h | 2 +- arch/arm/mm/idmap.c | 2 +- arch/arm/mm/nommu.c | 2 +- arch/arm/plat-mxc/system.c | 2 +- arch/arm/plat-spear/include/plat/system.h | 2 +- 36 files changed, 64 insertions(+), 59 deletions(-)
PATCH 1/7 ARM: restart: add restart hook to machine_desc record
Add a restart hook to the machine_desc record so we don't have to populate all platforms with init_early methods to initialize the arm_pm_restart function pointer.
--- arch/arm/include/asm/mach/arch.h | 1 + arch/arm/kernel/setup.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/include/asm/mach/arch.h +1 -0
@@ -45,6 +45,7 @@ struct machine_desc {#ifdef CONFIG_MULTI_IRQ_HANDLER void (*handle_irq)(struct pt_regs *);#endif +void (*restart)(char ,const char *); };/*
arch/arm/kernel/setup.c +3 -0
@@ -922,6 +922,9 @@ void __init setup_arch(char **cmdline_p)paging_init (mdesc);request_standard_resources (mdesc); +if (mdesc->restart) + arm_pm_restart = mdesc->restart; +unflatten_device_tree ();#ifdef CONFIG_SMP
Signature · 1 line
1.7.4.4
Tony Lindgren
maintainerPATCH 1/7 ARM: restart: add restart hook to machine_desc record
Quoted 27 lines · Russell King - ARM Linux
Add a restart hook to the
machine_descrecord so we don't have to populate all platforms withinit_earlymethods to initialize thearm_pm_restartfunction pointer.Signed-off-by Russell King <[email protected]>--- arch/arm/include/asm/mach/arch.h | 1 + arch/arm/kernel/setup.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)arch/arm/include/asm/mach/arch.h +1
-0@@ -45,6 +45,7 @@ struct machine_desc {#ifdef CONFIG_MULTI_IRQ_HANDLER void (*handle_irq)(struct pt_regs *);#endif +void (*restart)(char ,const char *); };/* arch/arm/kernel/setup.c +0
-0
arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 930
Quoted 9 lines
arch/arm/kernel/setup.c +3
-0@@ -922,6 +922,9 @@ void __init setup_arch(char **cmdline_p)paging_init (mdesc);request_standard_resources (mdesc); +if (mdesc->restart) + arm_pm_restart = mdesc->restart; +unflatten_device_tree ();#ifdef CONFIG_SMP
Good to see this happening:
PATCH 1/7 ARM: restart: add restart hook to machine_desc record
In reply to Russell King - ARM LinuxQuoted 5 lines · Russell King - ARM Linux
Add a restart hook to the
machine_descrecord so we don't have to populate all platforms withinit_earlymethods to initialize thearm_pm_restartfunction pointer.Signed-off-by Russell King <[email protected]>
Obviously the right thing to do.
Thanks,
Linus Walleij
PATCH 2/7 ARM: restart: allow platforms more flexibility specifying restart mode
In reply to Russell King - ARM LinuxChange 'soft_reboot' into a more generic 'restart_mode' variable, allowing the default restart mode to be specified.
--- arch/arm/include/asm/mach/arch.h | 8 ++++---- arch/arm/kernel/setup.c | 4 ++-- arch/arm/mach-ebsa110/core.c | 2 +- arch/arm/mach-footbridge/cats-hw.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/include/asm/mach/arch.h +4 -4
@@ -30,10 +30,10 @@ struct machine_desc {unsigned int video_start;/* start of video RAM */ unsigned int video_end;/* end of video RAM */ - unsigned int reserve_lp0 :1; /* never has lp0 */ - unsigned int reserve_lp1 :1; /* never has lp1 */ - unsigned int reserve_lp2 :1; /* never has lp2 */ - unsigned int soft_reboot :1; /* soft reboot */ + unsigned char reserve_lp0 :1; /* never has lp0 */ + unsigned char reserve_lp1 :1; /* never has lp1 */ + unsigned char reserve_lp2 :1; /* never has lp2 */ +char restart_mode;/* default restart mode */ void (*fixup)(struct tag *,char **,struct meminfo *);void (*reserve)(void );/* reserve mem blocks */
arch/arm/kernel/setup.c +2 -2
@@ -902,8 +902,8 @@ void __init setup_arch(char **cmdline_p) machine_desc = mdesc; machine_name = mdesc->name; -if (mdesc->soft_reboot) -reboot_setup ("s" ); +if (mdesc->restart_mode) +reboot_setup (&mdesc->restart_mode); init_mm.start_code = (unsigned long ) _text; init_mm.end_code = (unsigned long ) _etext;
arch/arm/mach-ebsa110/core.c +1 -1
@@ -283,7 +283,7 @@ MACHINE_START(EBSA110, "EBSA110") .atag_offset = 0x400, .reserve_lp0 = 1, .reserve_lp2 = 1, - .soft_reboot = 1, + .restart_mode = 's', .map_io = ebsa110_map_io, .init_irq = ebsa110_init_irq, .timer = &ebsa110_timer,
arch/arm/mach-footbridge/cats-hw.c +1 -1
@@ -86,7 +86,7 @@ fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)MACHINE_START (CATS ,"Chalice-CATS" )/* Maintainer: Philip Blundell */ .atag_offset = 0x100, - .soft_reboot = 1, + .restart_mode = 's', .fixup = fixup_cats, .map_io = footbridge_map_io, .init_irq = footbridge_init_irq,
Signature · 1 line
1.7.4.4
PATCH 3/7 ARM: restart: add default restart modes for PXA mioa701, spitz and tosa
In reply to Russell King - ARM LinuxAdd a default restart mode to reflect the hard-coded restart mode found in these files.
--- arch/arm/mach-pxa/mioa701.c | 1 + arch/arm/mach-pxa/spitz.c | 3 +++ arch/arm/mach-pxa/tosa.c | 1 + 3 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/mioa701.c +1 -0
@@ -752,6 +752,7 @@ static void mioa701_machine_exit(void)MACHINE_START (MIOA701 ,"MIO A701" ) .atag_offset = 0x100, + .restart_mode = 's', .map_io = &pxa27x_map_io, .init_irq = &pxa27x_init_irq, .handle_irq = &pxa27x_handle_irq,
arch/arm/mach-pxa/spitz.c +3 -0
@@ -981,6 +981,7 @@ static void __init spitz_fixup(struct tag *tags, char **cmdline,#ifdef CONFIG_MACH_SPITZ MACHINE_START (SPITZ ,"SHARP Spitz" ) + .restart_mode = 'g', .fixup = spitz_fixup, .map_io = pxa27x_map_io, .init_irq = pxa27x_init_irq,
@@ -992,6 +993,7 @@ MACHINE_END#ifdef CONFIG_MACH_BORZOI MACHINE_START (BORZOI ,"SHARP Borzoi" ) + .restart_mode = 'g', .fixup = spitz_fixup, .map_io = pxa27x_map_io, .init_irq = pxa27x_init_irq,
@@ -1003,6 +1005,7 @@ MACHINE_END#ifdef CONFIG_MACH_AKITA MACHINE_START (AKITA ,"SHARP Akita" ) + .restart_mode = 'g', .fixup = spitz_fixup, .map_io = pxa27x_map_io, .init_irq = pxa27x_init_irq,
arch/arm/mach-pxa/tosa.c +1 -0
@@ -970,6 +970,7 @@ static void __init fixup_tosa(struct tag *tags, char **cmdline, }MACHINE_START (TOSA ,"SHARP Tosa" ) + .restart_mode = 'g', .fixup = fixup_tosa, .map_io = pxa25x_map_io, .nr_irqs = TOSA_NR_IRQS,
Signature · 1 line
1.7.4.4
Robert Jarzmik
maintainerPATCH 3/7 ARM: restart: add default restart modes for PXA mioa701, spitz and tosa
Quoted 2 lines · Russell King - ARM Linux
Add a default restart mode to reflect the hard-coded restart mode found in these files.
For mioa701:
Cheers.
--
Robert
PATCH 4/7 ARM: restart: move reboot failure handing into machine_restart()
In reply to Russell King - ARM LinuxMove the failure to reboot into machine_restart() to always catch this condition, even if a platform decides to hook the restarting via arm_pm_restart().
--- arch/arm/kernel/process.c | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-)
arch/arm/kernel/process.c +9 -11
@@ -114,18 +114,8 @@ void arm_machine_restart(char mode, const char *cmd)/* Push out any further dirty data, and ensure cache is empty */ flush_cache_all (); -/* -* Now call the architecture specific reboot code. -*/ +/* Now call the architecture specific reboot code. */ arch_reset (mode, cmd); - -/* -* Whoops - the architecture was unable to reboot. -* Tell the user! -*/ -mdelay (1000 ); -printk ("Reboot failed -- System halted\n" ); -while (1 ); }/*
@@ -250,7 +240,15 @@ void machine_power_off(void)void machine_restart (char *cmd) {machine_shutdown (); +arm_pm_restart (reboot_mode, cmd); + +/* Give a grace period for failure to restart of 1s */ +mdelay (1000 ); + +/* Whoops - the platform was unable to reboot. Tell the user! */ +printk ("Reboot failed -- System halted\n" ); +while (1 ); }void __show_regs (struct pt_regs *regs)
Signature · 1 line
1.7.4.4
Tony Lindgren
maintainerPATCH 4/7 ARM: restart: move reboot failure handing into machine_restart()
Quoted 5 lines · Russell King - ARM Linux
Move the failure to reboot into
machine_restart()to always catch this condition, even if a platform decides to hook the restarting viaarm_pm_restart().Signed-off-by Russell King <[email protected]>
PATCH 5/7 ARM: restart: remove argument to setup_mm_for_reboot()
In reply to Russell King - ARM Linuxsetup_mm_for_reboot() doesn't make use of its argument, so remove it.
--- arch/arm/kernel/machine_kexec.c | 4 ++-- arch/arm/kernel/process.c | 4 ++-- arch/arm/mm/idmap.c | 2 +- arch/arm/mm/nommu.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/kernel/machine_kexec.c +2 -2
@@ -16,7 +16,7 @@extern const unsigned char relocate_new_kernel[];extern const unsigned int relocate_new_kernel_size; -extern void setup_mm_for_reboot (char mode); +extern void setup_mm_for_reboot (void );extern unsigned long kexec_start_address;extern unsigned long kexec_indirection_page;
@@ -114,7 +114,7 @@ void machine_kexec(struct kimage *image)kexec_reinit ();local_irq_disable ();local_fiq_disable (); -setup_mm_for_reboot (0 );/* mode is not used, so just pass 0*/ +setup_mm_for_reboot ();flush_cache_all ();outer_flush_all ();outer_disable ();
arch/arm/kernel/process.c +2 -2
@@ -57,7 +57,7 @@ static const char *isa_modes[] = { "ARM" , "Thumb" , "Jazelle", "ThumbEE" }; -extern void setup_mm_for_reboot (char mode); +extern void setup_mm_for_reboot (void );static volatile int hlt_counter;
@@ -103,7 +103,7 @@ void arm_machine_restart(char mode, const char *cmd)* we may need it to insert some 1:1 mappings so that * soft boot works. */ -setup_mm_for_reboot (mode); +setup_mm_for_reboot ();/* Clean and invalidate caches */ flush_cache_all ();
arch/arm/mm/idmap.c +1 -1
@@ -78,7 +78,7 @@ void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end)* the user-mode pages. This will then ensure that we have predictable * results when turning the mmu off */ -void setup_mm_for_reboot (char mode) +void setup_mm_for_reboot (void ) {/* * We need to access to user-mode page tables here. For kernel threads
arch/arm/mm/nommu.c +1 -1
@@ -43,7 +43,7 @@ void __init paging_init(struct machine_desc *mdesc)/* * We don't need to do anything here for nommu machines. */ -void setup_mm_for_reboot (char mode) +void setup_mm_for_reboot (void ) { }
Signature · 1 line
1.7.4.4
Tony Lindgren
maintainerPATCH 5/7 ARM: restart: remove argument to setup_mm_for_reboot()
Quoted 3 lines · Russell King - ARM Linux
setup_mm_for_reboot()doesn't make use of its argument, so remove it.Signed-off-by Russell King <[email protected]>
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM LinuxWe only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call to setup_restart() from the default handler.
This means that platforms arch_reset() function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.
--- arch/arm/include/asm/system.h | 1 + arch/arm/kernel/process.c | 13 +++++++++++-- arch/arm/mach-clps711x/include/mach/system.h | 2 +- arch/arm/mach-ebsa110/include/mach/system.h | 2 +- arch/arm/mach-footbridge/include/mach/system.h | 2 +- arch/arm/mach-iop32x/include/mach/system.h | 2 +- arch/arm/mach-iop33x/include/mach/system.h | 2 +- arch/arm/mach-ixp4xx/include/mach/system.h | 2 +- arch/arm/mach-ks8695/include/mach/system.h | 2 +- arch/arm/mach-mmp/include/mach/system.h | 4 ++-- arch/arm/mach-mxs/system.c | 2 +- arch/arm/mach-pnx4008/include/mach/system.h | 2 +- arch/arm/mach-pxa/reset.c | 2 +- arch/arm/mach-rpc/include/mach/system.h | 2 +- arch/arm/mach-s3c2410/include/mach/system-reset.h | 4 ++-- arch/arm/mach-s3c64xx/include/mach/system.h | 2 +- arch/arm/mach-sa1100/include/mach/system.h | 2 +- arch/arm/mach-shmobile/include/mach/system.h | 2 +- arch/arm/mach-w90x900/include/mach/system.h | 2 +- arch/arm/plat-mxc/system.c | 2 +- arch/arm/plat-spear/include/plat/system.h | 2 +- 21 files changed, 33 insertions(+), 23 deletions(-)
arch/arm/include/asm/system.h +1 -0
@@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);extern void cpu_init (void );void arm_machine_restart (char mode,const char *cmd); +void soft_restart (unsigned long );extern void (*arm_pm_restart)(char str,const char *cmd);#define UDBG_UNDEFINED (1 << 0)
arch/arm/kernel/process.c +11 -2
@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)__setup ("nohlt" , nohlt_setup);__setup ("hlt" , hlt_setup); -void arm_machine_restart (char mode,const char *cmd) +void soft_restart (unsigned long addr) {/* Disable interrupts first */ local_irq_disable ();
@@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)/* Push out any further dirty data, and ensure cache is empty */ flush_cache_all (); -/* Now call the architecture specific reboot code. */ +cpu_reset (addr); +} + +void arm_machine_restart (char mode,const char *cmd) +{ +/* Disable interrupts first */ +local_irq_disable (); +local_fiq_disable (); + +/* Call the architecture specific reboot code. */ arch_reset (mode, cmd); }
arch/arm/mach-clps711x/include/mach/system.h +1 -1
@@ -34,7 +34,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif
arch/arm/mach-ebsa110/include/mach/system.h +1 -1
@@ -34,6 +34,6 @@ static inline void arch_idle(void) asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc"); } -#define arch_reset (mode, cmd) cpu_reset(0x80000000) +#define arch_reset (mode, cmd) soft_restart(0x80000000)#endif
arch/arm/mach-footbridge/include/mach/system.h +1 -1
@@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)/* * Jump into the ROM */ -cpu_reset (0x41000000 ); +soft_restart (0x41000000 ); }else {if (machine_is_netwinder ()) {/* open up the SuperIO chip
arch/arm/mach-iop32x/include/mach/system.h +1 -1
@@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd) *IOP3XX_PCSR =0x30 ;/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }
arch/arm/mach-iop33x/include/mach/system.h +1 -1
@@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd) *IOP3XX_PCSR =0x30 ;/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }
arch/arm/mach-ixp4xx/include/mach/system.h +1 -1
@@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (1 && mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* Use on-chip reset capability */
arch/arm/mach-ks8695/include/mach/system.h +1 -1
@@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)unsigned int reg;if (mode =='s' ) -cpu_reset (0 ); +soft_restart (0 );/* disable timer0 */ reg =__raw_readl (KS8695_TMR_VA +KS8695_TMCON );
arch/arm/mach-mmp/include/mach/system.h +2 -2
@@ -19,8 +19,8 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) {if (cpu_is_pxa168 ()) -cpu_reset (0xffff0000 ); +soft_restart (0xffff0000 );else -cpu_reset (0 ); +soft_restart (0 ); }#endif /* __ASM_MACH_SYSTEM_H */
arch/arm/mach-mxs/system.c +1 -1
@@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)mdelay (50 );/* We'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }static int __init mxs_arch_reset_init (void )
arch/arm/mach-pnx4008/include/mach/system.h +1 -1
@@ -32,7 +32,7 @@ static void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif
arch/arm/mach-pxa/reset.c +1 -1
@@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)switch (mode) {case 's' :/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 );break ;case 'g' :do_gpio_reset ();
arch/arm/mach-rpc/include/mach/system.h +1 -1
@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)/* * Jump into the ROM */ -cpu_reset (0 ); +soft_restart (0 ); }
arch/arm/mach-s3c2410/include/mach/system-reset.h +2 -2
@@ -19,7 +19,7 @@ static void arch_reset(char mode, const char *cmd) {if (mode =='s' ) { -cpu_reset (0 ); +soft_restart (0 ); }if (s3c24xx_reset_hook)
@@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)arch_wdt_reset ();/* we'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }
arch/arm/mach-s3c64xx/include/mach/system.h +1 -1
@@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)arch_wdt_reset ();/* if all else fails, or mode was for soft, jump to 0 */ - cpu_reset(0); + soft_restart(0); }#endif /* __ASM_ARCH_IRQ_H */
arch/arm/mach-sa1100/include/mach/system.h +1 -1
@@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* Use on-chip reset capability */ RSRR =RSRR_SWR ;
arch/arm/mach-shmobile/include/mach/system.h +1 -1
@@ -8,7 +8,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif
arch/arm/mach-w90x900/include/mach/system.h +1 -1
@@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {__raw_writel (WTE |WTRE |WTCLK ,WTCR ); }
arch/arm/plat-mxc/system.c +1 -1
@@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)mdelay (50 );/* we'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }void mxc_arch_reset_init (void __iomem *base)
arch/arm/plat-spear/include/plat/system.h +1 -1
@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* software reset, Jump into ROM@address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* hardware reset, Use on-chip reset capability */ sysctl_soft_reset ((void __iomem *)VA_SPEAR_SYS_CTRL_BASE );
Signature · 1 line
1.7.4.4
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
Ack?
(If you're in the To: list I'm expecting a reply because this patch is touching something you're responsible for. Thanks.)
Quoted 334 lines · Russell King - ARM Linux
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.Signed-off-by Russell King <[email protected]>--- arch/arm/include/asm/system.h | 1 + arch/arm/kernel/process.c | 13 +++++++++++-- arch/arm/mach-clps711x/include/mach/system.h | 2 +- arch/arm/mach-ebsa110/include/mach/system.h | 2 +- arch/arm/mach-footbridge/include/mach/system.h | 2 +- arch/arm/mach-iop32x/include/mach/system.h | 2 +- arch/arm/mach-iop33x/include/mach/system.h | 2 +- arch/arm/mach-ixp4xx/include/mach/system.h | 2 +- arch/arm/mach-ks8695/include/mach/system.h | 2 +- arch/arm/mach-mmp/include/mach/system.h | 4 ++-- arch/arm/mach-mxs/system.c | 2 +- arch/arm/mach-pnx4008/include/mach/system.h | 2 +- arch/arm/mach-pxa/reset.c | 2 +- arch/arm/mach-rpc/include/mach/system.h | 2 +- arch/arm/mach-s3c2410/include/mach/system-reset.h | 4 ++-- arch/arm/mach-s3c64xx/include/mach/system.h | 2 +- arch/arm/mach-sa1100/include/mach/system.h | 2 +- arch/arm/mach-shmobile/include/mach/system.h | 2 +- arch/arm/mach-w90x900/include/mach/system.h | 2 +- arch/arm/plat-mxc/system.c | 2 +- arch/arm/plat-spear/include/plat/system.h | 2 +- 21 files changed, 33 insertions(+), 23 deletions(-)arch/arm/include/asm/system.h +1
-0@@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);extern void cpu_init (void );void arm_machine_restart (char mode,const char *cmd); +void soft_restart (unsigned long );extern void (*arm_pm_restart)(char str,const char *cmd);#define UDBG_UNDEFINED (1 << 0)arch/arm/kernel/process.c +11
-2@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)__setup ("nohlt" , nohlt_setup);__setup ("hlt" , hlt_setup); -void arm_machine_restart (char mode,const char *cmd) +void soft_restart (unsigned long addr) {/* Disable interrupts first */ local_irq_disable ();@@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)/* Push out any further dirty data, and ensure cache is empty */ flush_cache_all (); -/* Now call the architecture specific reboot code. */ +cpu_reset (addr); +} + +void arm_machine_restart (char mode,const char *cmd) +{ +/* Disable interrupts first */ +local_irq_disable (); +local_fiq_disable (); + +/* Call the architecture specific reboot code. */ arch_reset (mode, cmd); }arch/arm/mach-clps711x/include/mach/system.h +1
-1@@ -34,7 +34,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif arch/arm/mach-ebsa110/include/mach/system.h +1
-1@@ -34,6 +34,6 @@ static inline void arch_idle(void) asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc"); } -#define arch_reset (mode, cmd) cpu_reset(0x80000000) +#define arch_reset (mode, cmd) soft_restart(0x80000000)#endif arch/arm/mach-footbridge/include/mach/system.h +1
-1@@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)/* * Jump into the ROM */ -cpu_reset (0x41000000 ); +soft_restart (0x41000000 ); }else {if (machine_is_netwinder ()) {/* open up the SuperIO chip arch/arm/mach-iop32x/include/mach/system.h +1
-1@@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd) *IOP3XX_PCSR =0x30 ;/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach-iop33x/include/mach/system.h +1
-1@@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd) *IOP3XX_PCSR =0x30 ;/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach-ixp4xx/include/mach/system.h +1
-1@@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (1 && mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* Use on-chip reset capability */ arch/arm/mach-ks8695/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)unsigned int reg;if (mode =='s' ) -cpu_reset (0 ); +soft_restart (0 );/* disable timer0 */ reg =__raw_readl (KS8695_TMR_VA +KS8695_TMCON );arch/arm/mach-mmp/include/mach/system.h +2
-2@@ -19,8 +19,8 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) {if (cpu_is_pxa168 ()) -cpu_reset (0xffff0000 ); +soft_restart (0xffff0000 );else -cpu_reset (0 ); +soft_restart (0 ); }#endif /* __ASM_MACH_SYSTEM_H */ arch/arm/mach-mxs/system.c +1
-1@@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)mdelay (50 );/* We'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }static int __init mxs_arch_reset_init (void )arch/arm/mach-pnx4008/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif arch/arm/mach-pxa/reset.c +1
-1@@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)switch (mode) {case 's' :/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 );break ;case 'g' :do_gpio_reset ();arch/arm/mach-rpc/include/mach/system.h +1
-1@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)/* * Jump into the ROM */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach-s3c2410/include/mach/system-reset.h +2
-2@@ -19,7 +19,7 @@ static void arch_reset(char mode, const char *cmd) {if (mode =='s' ) { -cpu_reset (0 ); +soft_restart (0 ); }if (s3c24xx_reset_hook)@@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)arch_wdt_reset ();/* we'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach-s3c64xx/include/mach/system.h +1
-1@@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)arch_wdt_reset ();/* if all else fails, or mode was for soft, jump to 0 */ - cpu_reset(0); + soft_restart(0); }#endif /* __ASM_ARCH_IRQ_H */ arch/arm/mach-sa1100/include/mach/system.h +1
-1@@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* Use on-chip reset capability */ RSRR =RSRR_SWR ;arch/arm/mach-shmobile/include/mach/system.h +1
-1@@ -8,7 +8,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif arch/arm/mach-w90x900/include/mach/system.h +1
-1@@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {__raw_writel (WTE |WTRE |WTCLK ,WTCR ); }arch/arm/plat-mxc/system.c +1
-1@@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)mdelay (50 );/* we'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }void mxc_arch_reset_init (void __iomem *base)arch/arm/plat-spear/include/plat/system.h +1
-1@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* software reset, Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* hardware reset, Use on-chip reset capability */ sysctl_soft_reset ((void __iomem *)VA_SPEAR_SYS_CTRL_BASE );Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Sascha Hauer
maintainerPATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
Quoted 4 lines · Russell King - ARM Linux
Ack?
(If you're in the To: list I'm expecting a reply because this patch is touching something you're responsible for. Thanks.)
Quoted 337 lines · Russell King - ARM Linux
Quoted 334 lines
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.Signed-off-by Russell King <[email protected]>--- arch/arm/include/asm/system.h | 1 + arch/arm/kernel/process.c | 13 +++++++++++-- arch/arm/mach-clps711x/include/mach/system.h | 2 +- arch/arm/mach-ebsa110/include/mach/system.h | 2 +- arch/arm/mach-footbridge/include/mach/system.h | 2 +- arch/arm/mach-iop32x/include/mach/system.h | 2 +- arch/arm/mach-iop33x/include/mach/system.h | 2 +- arch/arm/mach-ixp4xx/include/mach/system.h | 2 +- arch/arm/mach-ks8695/include/mach/system.h | 2 +- arch/arm/mach-mmp/include/mach/system.h | 4 ++-- arch/arm/mach-mxs/system.c | 2 +- arch/arm/mach-pnx4008/include/mach/system.h | 2 +- arch/arm/mach-pxa/reset.c | 2 +- arch/arm/mach-rpc/include/mach/system.h | 2 +- arch/arm/mach-s3c2410/include/mach/system-reset.h | 4 ++-- arch/arm/mach-s3c64xx/include/mach/system.h | 2 +- arch/arm/mach-sa1100/include/mach/system.h | 2 +- arch/arm/mach-shmobile/include/mach/system.h | 2 +- arch/arm/mach-w90x900/include/mach/system.h | 2 +- arch/arm/plat-mxc/system.c | 2 +- arch/arm/plat-spear/include/plat/system.h | 2 +- 21 files changed, 33 insertions(+), 23 deletions(-)arch/arm/include/asm/system.h +1
-0@@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);extern void cpu_init (void );void arm_machine_restart (char mode,const char *cmd); +void soft_restart (unsigned long );extern void (*arm_pm_restart)(char str,const char *cmd);#define UDBG_UNDEFINED (1 << 0)arch/arm/kernel/process.c +11
-2@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)__setup ("nohlt" , nohlt_setup);__setup ("hlt" , hlt_setup); -void arm_machine_restart (char mode,const char *cmd) +void soft_restart (unsigned long addr) {/* Disable interrupts first */ local_irq_disable ();@@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)/* Push out any further dirty data, and ensure cache is empty */ flush_cache_all (); -/* Now call the architecture specific reboot code. */ +cpu_reset (addr); +} + +void arm_machine_restart (char mode,const char *cmd) +{ +/* Disable interrupts first */ +local_irq_disable (); +local_fiq_disable (); + +/* Call the architecture specific reboot code. */ arch_reset (mode, cmd); }arch/arm/mach-clps711x/include/mach/system.h +1
-1@@ -34,7 +34,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif arch/arm/mach-ebsa110/include/mach/system.h +1
-1@@ -34,6 +34,6 @@ static inline void arch_idle(void) asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc"); } -#define arch_reset (mode, cmd) cpu_reset(0x80000000) +#define arch_reset (mode, cmd) soft_restart(0x80000000)#endif arch/arm/mach-footbridge/include/mach/system.h +1
-1@@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)/* * Jump into the ROM */ -cpu_reset (0x41000000 ); +soft_restart (0x41000000 ); }else {if (machine_is_netwinder ()) {/* open up the SuperIO chip arch/arm/mach-iop32x/include/mach/system.h +1
-1@@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd) *IOP3XX_PCSR =0x30 ;/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach-iop33x/include/mach/system.h +1
-1@@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd) *IOP3XX_PCSR =0x30 ;/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach-ixp4xx/include/mach/system.h +1
-1@@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (1 && mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* Use on-chip reset capability */ arch/arm/mach-ks8695/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)unsigned int reg;if (mode =='s' ) -cpu_reset (0 ); +soft_restart (0 );/* disable timer0 */ reg =__raw_readl (KS8695_TMR_VA +KS8695_TMCON );arch/arm/mach-mmp/include/mach/system.h +2
-2@@ -19,8 +19,8 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) {if (cpu_is_pxa168 ()) -cpu_reset (0xffff0000 ); +soft_restart (0xffff0000 );else -cpu_reset (0 ); +soft_restart (0 ); }#endif /* __ASM_MACH_SYSTEM_H */ arch/arm/mach-mxs/system.c +1
-1@@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)mdelay (50 );/* We'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }static int __init mxs_arch_reset_init (void )arch/arm/mach-pnx4008/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif arch/arm/mach-pxa/reset.c +1
-1@@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)switch (mode) {case 's' :/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 );break ;case 'g' :do_gpio_reset ();arch/arm/mach-rpc/include/mach/system.h +1
-1@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)/* * Jump into the ROM */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach-s3c2410/include/mach/system-reset.h +2
-2@@ -19,7 +19,7 @@ static void arch_reset(char mode, const char *cmd) {if (mode =='s' ) { -cpu_reset (0 ); +soft_restart (0 ); }if (s3c24xx_reset_hook)@@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)arch_wdt_reset ();/* we'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach-s3c64xx/include/mach/system.h +1
-1@@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)arch_wdt_reset ();/* if all else fails, or mode was for soft, jump to 0 */ - cpu_reset(0); + soft_restart(0); }#endif /* __ASM_ARCH_IRQ_H */ arch/arm/mach-sa1100/include/mach/system.h +1
-1@@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* Use on-chip reset capability */ RSRR =RSRR_SWR ;arch/arm/mach-shmobile/include/mach/system.h +1
-1@@ -8,7 +8,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif arch/arm/mach-w90x900/include/mach/system.h +1
-1@@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {__raw_writel (WTE |WTRE |WTCLK ,WTCR ); }arch/arm/plat-mxc/system.c +1
-1@@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)mdelay (50 );/* we'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }void mxc_arch_reset_init (void __iomem *base)arch/arm/plat-spear/include/plat/system.h +1
-1@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* software reset, Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* hardware reset, Use on-chip reset capability */ sysctl_soft_reset ((void __iomem *)VA_SPEAR_SYS_CTRL_BASE );Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM LinuxQuoted 17 lines · Russell King - ARM Linux
Quoted 11 lines
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.Signed-off-by Russell King <[email protected]>---
arch/arm/plat-spear/include/plat/system.h +0
-0Quoted 4 lines
index a235fa0..1171f22 100644
arch/arm/plat-spear/include/plat/system.h +0
-0@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd)
Quoted 8 lines
arch/arm/plat-spear/include/plat/system.h static inline void arch_reset(char mode, const char *cmd) · line 37
Quoted 8 lines
arch/arm/plat-spear/include/plat/system.h +1
-1{if (mode =='s' ) {/* software reset, Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* hardware reset, Use on-chip reset capability */ sysctl_soft_reset ((void __iomem *)VA_SPEAR_SYS_CTRL_BASE );
For SPEAr:
Signature · 1 line
viresh
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM LinuxQuoted 6 lines · Russell King - ARM Linux
Quoted 6 lines
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.arch/arm/mach-ixp4xx/include/mach/system.h | 2 +-
Signature · 1 line
Krzysztof Halasa
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM LinuxQuoted 4 lines · Russell King - ARM Linux
Ack?
(If you're in the To: list I'm expecting a reply because this patch is touching something you're responsible for. Thanks.)
For the SH-Mobile bits:
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM LinuxQuoted 16 lines · Russell King - ARM Linux
Ack?
(If you're in the To: list I'm expecting a reply because this patch is touching something you're responsible for. Thanks.)
Quoted 10 lines · Russell King - ARM Linux
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.Signed-off-by Russell King <[email protected]>
Quoted 24 lines
Quoted 24 lines
--- arch/arm/include/asm/system.h | 1 + arch/arm/kernel/process.c | 13 +++++++++++-- arch/arm/mach-clps711x/include/mach/system.h | 2 +- arch/arm/mach-ebsa110/include/mach/system.h | 2 +- arch/arm/mach-footbridge/include/mach/system.h | 2 +- arch/arm/mach-iop32x/include/mach/system.h | 2 +- arch/arm/mach-iop33x/include/mach/system.h | 2 +- arch/arm/mach-ixp4xx/include/mach/system.h | 2 +- arch/arm/mach-ks8695/include/mach/system.h | 2 +- arch/arm/mach-mmp/include/mach/system.h | 4 ++-- arch/arm/mach-mxs/system.c | 2 +- arch/arm/mach-pnx4008/include/mach/system.h | 2 +- arch/arm/mach-pxa/reset.c | 2 +- arch/arm/mach-rpc/include/mach/system.h | 2 +- arch/arm/mach-s3c2410/include/mach/system-reset.h | 4 ++-- arch/arm/mach-s3c64xx/include/mach/system.h | 2 +- arch/arm/mach-sa1100/include/mach/system.h | 2 +- arch/arm/mach-shmobile/include/mach/system.h | 2 +- arch/arm/mach-w90x900/include/mach/system.h | 2 +- arch/arm/plat-mxc/system.c | 2 +- arch/arm/plat-spear/include/plat/system.h | 2 +- 21 files changed, 33 insertions(+), 23 deletions(-)
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM LinuxQuoted 16 lines · Russell King - ARM Linux
Ack?
(If you're in the To: list I'm expecting a reply because this patch is touching something you're responsible for. Thanks.)
Quoted 10 lines · Russell King - ARM Linux
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.Signed-off-by Russell King <[email protected]>
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM LinuxQuoted 17 lines · Russell King - ARM Linux
Ack?
(If you're in the To: list I'm expecting a reply because this patch is touching something you're responsible for. Thanks.)
Quoted 10 lines · Russell King - ARM Linux
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.Signed-off-by Russell King <[email protected]>
Sorry for late response...
For Samsung stuff:
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Quoted 45 lines
Quoted 24 lines
--- arch/arm/include/asm/system.h | 1 + arch/arm/kernel/process.c | 13 +++++++++++-- arch/arm/mach-clps711x/include/mach/system.h | 2 +- arch/arm/mach-ebsa110/include/mach/system.h | 2 +- arch/arm/mach-footbridge/include/mach/system.h | 2 +- arch/arm/mach-iop32x/include/mach/system.h | 2 +- arch/arm/mach-iop33x/include/mach/system.h | 2 +- arch/arm/mach-ixp4xx/include/mach/system.h | 2 +- arch/arm/mach-ks8695/include/mach/system.h | 2 +- arch/arm/mach-mmp/include/mach/system.h | 4 ++-- arch/arm/mach-mxs/system.c | 2 +- arch/arm/mach-pnx4008/include/mach/system.h | 2 +- arch/arm/mach-pxa/reset.c | 2 +- arch/arm/mach-rpc/include/mach/system.h | 2 +- arch/arm/mach-s3c2410/include/mach/system-reset.h | 4 ++-- arch/arm/mach-s3c64xx/include/mach/system.h | 2 +- arch/arm/mach-sa1100/include/mach/system.h | 2 +- arch/arm/mach-shmobile/include/mach/system.h | 2 +- arch/arm/mach-w90x900/include/mach/system.h | 2 +- arch/arm/plat-mxc/system.c | 2 +- arch/arm/plat-spear/include/plat/system.h | 2 +- 21 files changed, 33 insertions(+), 23 deletions(-)Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/include/asm/system.hQuoted 19 lines
index 984014b..fe7de75 100644
arch/arm/include/asm/system.h +1
-0@@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);extern void cpu_init (void );void arm_machine_restart (char mode,const char *cmd); +void soft_restart (unsigned long );extern void (*arm_pm_restart)(char str,const char *cmd);#define UDBG_UNDEFINED (1 << 0)arch/arm/kernel/process.c +0
-0@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)__setup ("nohlt" , nohlt_setup);__setup ("hlt" , hlt_setup);
Quoted 6 lines
arch/arm/kernel/process.c void arm_machine_restart(char mode, const char
Quoted 6 lines
arch/arm/kernel/process.c +1
-1-void arm_machine_restart (char mode,const char *cmd) +void soft_restart (unsigned long addr) {/* Disable interrupts first */ local_irq_disable ();@@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char
*cmd)
Quoted 302 lines
Review
Quoted 18 lines
arch/arm/kernel/process.c +10
-1/* Push out any further dirty data, and ensure cache is empty */ flush_cache_all (); -/* Now call the architecture specific reboot code. */ +cpu_reset (addr); +} + +void arm_machine_restart (char mode,const char *cmd) +{ +/* Disable interrupts first */ +local_irq_disable (); +local_fiq_disable (); + +/* Call the architecture specific reboot code. */ arch_reset (mode, cmd); }(quoted diff) +0
-0
b/arch/arm/mach-clps711x/include/mach/system.hReview
Quoted 13 lines
index f916cd7..6c11993 100644
arch/arm/mach-clps711x/include/mach/system.h +1
-1@@ -34,7 +34,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif (quoted diff) +0
-0
b/arch/arm/mach-ebsa110/include/mach/system.hReview
Quoted 12 lines
index 9a26245..0d5df72 100644
arch/arm/mach-ebsa110/include/mach/system.h +1
-1@@ -34,6 +34,6 @@ static inline void arch_idle(void) asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc"); } -#define arch_reset (mode, cmd) cpu_reset(0x80000000) +#define arch_reset (mode, cmd) soft_restart(0x80000000)#endif (quoted diff) +0
-0
b/arch/arm/mach-footbridge/include/mach/system.harch/arm/mach-footbridge/include/mach/system.h static inline void arch_reset(char mode, const char
Quoted 4 lines
index 0b29315..249f895 100644
arch/arm/mach-footbridge/include/mach/system.h +0
-0@@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char*cmd)
arch/arm/mach-
Quoted 9 lines
arch/arm/mach-footbridge/include/mach/system.h +1
-1/* * Jump into the ROM */ -cpu_reset (0x41000000 ); +soft_restart (0x41000000 ); }else {if (machine_is_netwinder ()) {/* open up the SuperIO chip arch/arm/mach- renamed from arch/arm/mach-iop32x/include/mach/system.h +0
-0
iop32x/include/mach/system.harch/arm/mach-iop32x/include/mach/system.h static inline void arch_reset(char mode, const char
Quoted 4 lines
index a4b808f..4865a9b 100644
arch/arm/mach-iop32x/include/mach/system.h +0
-0@@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char*cmd)
arch/arm/mach-
Quoted 7 lines
arch/arm/mach-iop32x/include/mach/system.h +1
-1*IOP3XX_PCSR =0x30 ;/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach- renamed from arch/arm/mach-iop33x/include/mach/system.h +0
-0
iop33x/include/mach/system.harch/arm/mach-iop33x/include/mach/system.h static inline void arch_reset(char mode, const char
Quoted 4 lines
index f192a34..86d1b20 100644
arch/arm/mach-iop33x/include/mach/system.h +0
-0@@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char*cmd)
arch/arm/mach-
Quoted 7 lines
arch/arm/mach-iop33x/include/mach/system.h +1
-1*IOP3XX_PCSR =0x30 ;/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }arch/arm/mach- renamed from arch/arm/mach-ixp4xx/include/mach/system.h +0
-0
ixp4xx/include/mach/system.harch/arm/mach-ixp4xx/include/mach/system.h static inline void arch_reset(char mode, const char
Quoted 4 lines
index 54c0af7..24337d9 100644
arch/arm/mach-ixp4xx/include/mach/system.h +0
-0@@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char*cmd)
arch/arm/mach-
Quoted 9 lines
arch/arm/mach-ixp4xx/include/mach/system.h +1
-1{if (1 && mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* Use on-chip reset capability */ arch/arm/mach- renamed from arch/arm/mach-ks8695/include/mach/system.h +0
-0
ks8695/include/mach/system.harch/arm/mach-
Quoted 13 lines
index fb1dda9..ceb19c9 100644
arch/arm/mach-ks8695/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)unsigned int reg;if (mode =='s' ) -cpu_reset (0 ); +soft_restart (0 );/* disable timer0 */ reg =__raw_readl (KS8695_TMR_VA +KS8695_TMCON );arch/arm/mach- renamed from arch/arm/mach-mmp/include/mach/system.h +0
-0
mmp/include/mach/system.hReview
Quoted 28 lines
index 1a8a25e..cb06379 100644
arch/arm/mach-mmp/include/mach/system.h +2
-2@@ -19,8 +19,8 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) {if (cpu_is_pxa168 ()) -cpu_reset (0xffff0000 ); +soft_restart (0xffff0000 );else -cpu_reset (0 ); +soft_restart (0 ); }#endif /* __ASM_MACH_SYSTEM_H */ arch/arm/mach-mxs/system.c +1
-1@@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd)mdelay (50 );/* We'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }static int __init mxs_arch_reset_init (void )(quoted diff) +0
-0
b/arch/arm/mach-pnx4008/include/mach/system.harch/arm/mach-
Quoted 26 lines
index 5dda2bb..5d6384a 100644
arch/arm/mach-pnx4008/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif arch/arm/mach-pxa/reset.c +1
-1@@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd)switch (mode) {case 's' :/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 );break ;case 'g' :do_gpio_reset ();arch/arm/mach- renamed from arch/arm/mach-rpc/include/mach/system.h +0
-0
rpc/include/mach/system.harch/arm/mach-rpc/include/mach/system.h static inline void arch_reset(char mode, const char
Quoted 4 lines
index 45c7b93..a354f4d 100644
arch/arm/mach-rpc/include/mach/system.h +0
-0@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char*cmd)
Review
Quoted 7 lines
arch/arm/mach-rpc/include/mach/system.h +1
-1/* * Jump into the ROM */ -cpu_reset (0 ); +soft_restart (0 ); }(quoted diff) +0
-0
b/arch/arm/mach-s3c2410/include/mach/system-reset.hReview
Quoted 20 lines
index 6faadce..913893d 100644
arch/arm/mach-s3c2410/include/mach/system-reset.h +2
-2@@ -19,7 +19,7 @@ static void arch_reset(char mode, const char *cmd) {if (mode =='s' ) { -cpu_reset (0 ); +soft_restart (0 ); }if (s3c24xx_reset_hook)@@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd)arch_wdt_reset ();/* we'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }(quoted diff) +0
-0
b/arch/arm/mach-s3c64xx/include/mach/system.harch/arm/mach-
Quoted 13 lines
index 2e58cb7..d8ca578 100644
arch/arm/mach-s3c64xx/include/mach/system.h +1
-1@@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd)arch_wdt_reset ();/* if all else fails, or mode was for soft, jump to 0 */ - cpu_reset(0); + soft_restart(0); }#endif /* __ASM_ARCH_IRQ_H */ arch/arm/mach- renamed from arch/arm/mach-sa1100/include/mach/system.h +0
-0
sa1100/include/mach/system.harch/arm/mach-sa1100/include/mach/system.h static inline void arch_reset(char mode, const char
Quoted 4 lines
index ba9da9f..345d35b 100644
arch/arm/mach-sa1100/include/mach/system.h +0
-0@@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char*cmd)
Review
Quoted 9 lines
arch/arm/mach-sa1100/include/mach/system.h +1
-1{if (mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* Use on-chip reset capability */ RSRR =RSRR_SWR ;(quoted diff) +0
-0
b/arch/arm/mach-shmobile/include/mach/system.hReview
Quoted 13 lines
index 76a687e..956ac18 100644
arch/arm/mach-shmobile/include/mach/system.h +1
-1@@ -8,7 +8,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -cpu_reset (0 ); +soft_restart (0 ); }#endif (quoted diff) +0
-0
b/arch/arm/mach-w90x900/include/mach/system.harch/arm/plat-
Quoted 26 lines
index ce228bd..68875a1 100644
arch/arm/mach-w90x900/include/mach/system.h +1
-1@@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd) {if (mode =='s' ) {/* Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {__raw_writel (WTE |WTRE |WTCLK ,WTCR ); }arch/arm/plat-mxc/system.c +1
-1@@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd)mdelay (50 );/* we'll take a jump through zero as a poor second */ -cpu_reset (0 ); +soft_restart (0 ); }void mxc_arch_reset_init (void __iomem *base)arch/arm/plat- renamed from arch/arm/plat-spear/include/plat/system.h +0
-0
spear/include/plat/system.harch/arm/plat-spear/include/plat/system.h static inline void arch_reset(char mode, const char
Quoted 4 lines
index a235fa0..1171f22 100644
arch/arm/plat-spear/include/plat/system.h +0
-0@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char*cmd)
Quoted 12 lines
arch/arm/plat-spear/include/plat/system.h +1
-2{if (mode =='s' ) {/* software reset, Jump into ROM at address 0 */ -cpu_reset (0 ); +soft_restart (0 ); }else {/* hardware reset, Use on-chip reset capability */ sysctl_soft_reset ((void __iomem *)VA_SPEAR_SYS_CTRL_BASE ); --1.7.4.4
Quoted 4 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
Quoted 17 lines · Kukjin Kim
Quoted 16 lines · Russell King - ARM Linux
Ack?
(If you're in the To: list I'm expecting a reply because this patch is touching something you're responsible for. Thanks.)
Quoted 9 lines · Russell King - ARM Linux
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Russell King <[email protected]>Sorry for late response...
For Samsung stuff:
Acked-by Kukjin Kim <[email protected]>
Too late, it's now part of devel-stable so I can't accept any more acks for this. Sorry.
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
Quoted 26 lines · Russell King - ARM Linux
Quoted 8 lines · Kukjin Kim
Quoted 7 lines · Russell King - ARM Linux
Ack?
(If you're in the To: list I'm expecting a reply because this patch is touching something you're responsible for. Thanks.)
On Sun, Nov 06, 2011 at 05:33:35PM +0000, Russell King - ARM Linux
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
We only need to set the system up for a soft-restart if we're going
to
Quoted 1 line
Quoted 1 line
Quoted 1 line
be doing a soft-restart. Provide a new function (
soft_restart())which
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
does the setup and final call for this, and make platforms use it. Eliminate the call to
setup_restart()from the default handler.This means that platforms
arch_reset()function is no longer calledwith
Quoted 1 line
Quoted 1 line
Quoted 1 line
the page tables prepared for a soft-restart, and caches will still
be
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
enabled.
Signed-off-by Russell King <[email protected]>
Quoted 7 lines
Quoted 4 lines
Sorry for late response...
For Samsung stuff:
Acked-by Kukjin Kim <[email protected]>Too late, it's now part of devel-stable so I can't accept any more acks for this. Sorry.
OK, I see.
But I did send my ack in the beginning of Nov on cover [0/7] like following...
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-November/071800.h
tml
So I didn't send my ack on this...
As a note, I'm sorting out header files, local headers in Samsung stuff as per your suggestion and you can see them in the next week.
Anyway, thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM Linux2011/11/7 Russell King - ARM Linux <[email protected]>
Quoted 321 lines
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. ?Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.Signed-off-by Russell King <[email protected]>---
?arch/arm/include/asm/system.h ? ? ? ? ? ? ? ? ? ? | ? ?1 + ?arch/arm/kernel/process.c ? ? ? ? ? ? ? ? ? ? ? ? | ? 13 +++++++++++-- ?arch/arm/mach-clps711x/include/mach/system.h ? ? ?| ? ?2 +- ?arch/arm/mach-ebsa110/include/mach/system.h ? ? ? | ? ?2 +- ?arch/arm/mach-footbridge/include/mach/system.h ? ?| ? ?2 +- ?arch/arm/mach-iop32x/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-iop33x/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-ixp4xx/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-ks8695/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-mmp/include/mach/system.h ? ? ? ? ? | ? ?4 ++-- ?arch/arm/mach-mxs/system.c ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +- ?arch/arm/mach-pnx4008/include/mach/system.h ? ? ? | ? ?2 +- ?arch/arm/mach-pxa/reset.c ? ? ? ? ? ? ? ? ? ? ? ? | ? ?2 +- ?arch/arm/mach-rpc/include/mach/system.h ? ? ? ? ? | ? ?2 +- ?arch/arm/mach-s3c2410/include/mach/system-reset.h | ? ?4 ++-- ?arch/arm/mach-s3c64xx/include/mach/system.h ? ? ? | ? ?2 +- ?arch/arm/mach-sa1100/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-shmobile/include/mach/system.h ? ? ?| ? ?2 +- ?arch/arm/mach-w90x900/include/mach/system.h ? ? ? | ? ?2 +- ?arch/arm/plat-mxc/system.c ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +- ?arch/arm/plat-spear/include/plat/system.h ? ? ? ? | ? ?2 +-?21 files changed, 33 insertions(+), 23 deletions(-)
arch/arm/include/asm/system.h +1
-0@@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void); ?extern void cpu_init(void); ?void arm_machine_restart(char mode, const char *cmd); +void soft_restart (unsigned long ); ?extern void (*arm_pm_restart)(char str, const char *cmd); ?#define UDBG_UNDEFINED (1 << 0)arch/arm/kernel/process.c +1
-1@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused) ?__setup("nohlt", nohlt_setup); ?__setup("hlt", hlt_setup); -void arm_machine_restart (char mode,const char *cmd) +void soft_restart (unsigned long addr) ?{? ? ? ?/* Disable interrupts first */
? ? ? ?local_irq_disable();arch/arm/kernel/process.c +0
-0@@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)? ? ? ?/* Push out any further dirty data, and ensure cache is empty */ ? ? ? ?flush_cache_all();
- ? ? ? /* Now call the architecture specific reboot code. */
+ ? ? ?cpu_reset(addr);arch/arm/kernel/process.c +9
-0+} + +void arm_machine_restart (char mode,const char *cmd) +{ + ? ? ? /* Disable interrupts first */ + ? ? ? local_irq_disable(); + ? ? ? local_fiq_disable(); + + ? ? ? /* Call the architecture specific reboot code. */? ? ? ?arch_reset(mode, cmd);
?}arch/arm/mach-clps711x/include/mach/system.h +1
-1@@ -34,7 +34,7 @@ static inline void arch_idle(void) ?static inline void arch_reset(char mode, const char *cmd) ?{ - ? ? ? cpu_reset(0); + ? ? ? soft_restart(0); ?}?#endif
arch/arm/mach-ebsa110/include/mach/system.h +1
-1@@ -34,6 +34,6 @@ static inline void arch_idle(void) ? ? ? ?asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc"); ?} -#define arch_reset (mode, cmd) ?cpu_reset(0x80000000) +#define arch_reset (mode, cmd) ?soft_restart(0x80000000)?#endif
arch/arm/mach-footbridge/include/mach/system.h +0
-0@@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)? ? ? ? ? ? ? ?/*
? ? ? ? ? ? ? ? * Jump into the ROM
? ? ? ? ? ? ? ? */
- ? ? ? ? ? ? ?cpu_reset(0x41000000);
+ ? ? ? ? ? ? ?soft_restart(0x41000000); ? ? ? ?} else {
? ? ? ? ? ? ? ?if (machine_is_netwinder()) { ? ? ? ? ? ? ? ? ? ? ? ?/* open up the SuperIO chiparch/arm/mach-iop32x/include/mach/system.h +0
-0@@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd) ? ? ? ?*IOP3XX_PCSR = 0x30;? ? ? ?/* Jump into ROM at address 0 */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}arch/arm/mach-iop33x/include/mach/system.h +0
-0@@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd) ? ? ? ?*IOP3XX_PCSR = 0x30;? ? ? ?/* Jump into ROM at address 0 */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}arch/arm/mach-ixp4xx/include/mach/system.h +0
-0@@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if ( 1 && mode == 's') {? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ?} else {
? ? ? ? ? ? ? ?/* Use on-chip reset capability */arch/arm/mach-ks8695/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd) ? ? ? ?unsigned int reg; ? ? ? ?if (mode == 's') - ? ? ? ? ? ? ? cpu_reset(0); + ? ? ? ? ? ? ? soft_restart(0);? ? ? ?/* disable timer0 */
? ? ? ?reg =__raw_readl(KS8695_TMR_VA + KS8695_TMCON);arch/arm/mach-mmp/include/mach/system.h +1
-1@@ -19,8 +19,8 @@ static inline void arch_idle(void) ?static inline void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (cpu_is_pxa168()) - ? ? ? ? ? ? ? cpu_reset(0xffff0000); + ? ? ? ? ? ? ? soft_restart(0xffff0000);? ? ? ?else
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
?}
?#endif /*__ASM_MACH_SYSTEM_H*/arch/arm/mach-mxs/system.c +0
-0@@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd) ? ? ? ?mdelay(50);? ? ? ?/* We'll take a jump through zero as a poor second */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}?static int
__initmxs_arch_reset_init(void)arch/arm/mach-pnx4008/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_idle(void) ?static inline void arch_reset(char mode, const char *cmd) ?{ - ? ? ? cpu_reset(0); + ? ? ? soft_restart(0); ?}?#endif
arch/arm/mach-pxa/reset.c +0
-0@@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd) ? ? ? ?switch (mode) {? ? ? ?case 's':
? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ? ? ? ? ?break;
? ? ? ?case 'g':
? ? ? ? ? ? ? ?do_gpio_reset();arch/arm/mach-rpc/include/mach/system.h +0
-0@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)? ? ? ?/*
? ? ? ? * Jump into the ROM
? ? ? ? */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}arch/arm/mach-s3c2410/include/mach/system-reset.h +1
-1@@ -19,7 +19,7 @@ static void ?arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (mode == 's') { - ? ? ? ? ? ? ? cpu_reset(0); + ? ? ? ? ? ? ? soft_restart(0); ? ? ? ?} ? ? ? ?if (s3c24xx_reset_hook)@@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd) ? ? ? ?arch_wdt_reset();? ? ? ?/* we'll take a jump through zero as a poor second */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}arch/arm/mach-s3c64xx/include/mach/system.h +0
-0@@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd) ? ? ? ? ? ? ? ?arch_wdt_reset();? ? ? ?/* if all else fails, or mode was for soft, jump to 0 */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}?#endif /*
__ASM_ARCH_IRQ_H*/arch/arm/mach-sa1100/include/mach/system.h +0
-0@@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (mode == 's') {? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ?} else {
? ? ? ? ? ? ? ?/* Use on-chip reset capability */
? ? ? ? ? ? ? ?RSRR =RSRR_SWR;arch/arm/mach-shmobile/include/mach/system.h +1
-1@@ -8,7 +8,7 @@ static inline void arch_idle(void) ?static inline void arch_reset(char mode, const char *cmd) ?{ - ? ? ? cpu_reset(0); + ? ? ? soft_restart(0); ?}?#endif
arch/arm/mach-w90x900/include/mach/system.h +0
-0@@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (mode == 's') {? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ?} else {
? ? ? ? ? ? ? ?__raw_writel(WTE | WTRE | WTCLK, WTCR); ? ? ? ?}arch/arm/plat-mxc/system.c +0
-0@@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd) ? ? ? ?mdelay(50);? ? ? ?/* we'll take a jump through zero as a poor second */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}?void
mxc_arch_reset_init(void __iomem *base)arch/arm/plat-spear/include/plat/system.h +0
-0@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (mode == 's') {
Quoted 6 lines
? ? ? ? ? ? ? ?/* software reset, Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ?} else {
? ? ? ? ? ? ? ?/* hardware reset, Use on-chip reset capability */ ? ? ? ? ? ? ? ?sysctl_soft_reset((void__iomem*)VA_SPEAR_SYS_CTRL_BASE);
For NUC900:
Quoted 8 lines
--
1.7.4.4_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Wan ZongShun.
www.mcuos.com
PATCH 6/7 ARM: restart: only perform setup for restart when soft-restarting
In reply to Russell King - ARM LinuxQuoted 10 lines · Russell King - ARM Linux
We only need to set the system up for a soft-restart if we're going to be doing a soft-restart. ?Provide a new function (
soft_restart()) which does the setup and final call for this, and make platforms use it. Eliminate the call tosetup_restart()from the default handler.This means that platforms
arch_reset()function is no longer called with the page tables prepared for a soft-restart, and caches will still be enabled.Signed-off-by Russell King <[email protected]>
For the part of MMP and PXA,
Quoted 325 lines
---
?arch/arm/include/asm/system.h ? ? ? ? ? ? ? ? ? ? | ? ?1 + ?arch/arm/kernel/process.c ? ? ? ? ? ? ? ? ? ? ? ? | ? 13 +++++++++++-- ?arch/arm/mach-clps711x/include/mach/system.h ? ? ?| ? ?2 +- ?arch/arm/mach-ebsa110/include/mach/system.h ? ? ? | ? ?2 +- ?arch/arm/mach-footbridge/include/mach/system.h ? ?| ? ?2 +- ?arch/arm/mach-iop32x/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-iop33x/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-ixp4xx/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-ks8695/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-mmp/include/mach/system.h ? ? ? ? ? | ? ?4 ++-- ?arch/arm/mach-mxs/system.c ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +- ?arch/arm/mach-pnx4008/include/mach/system.h ? ? ? | ? ?2 +- ?arch/arm/mach-pxa/reset.c ? ? ? ? ? ? ? ? ? ? ? ? | ? ?2 +- ?arch/arm/mach-rpc/include/mach/system.h ? ? ? ? ? | ? ?2 +- ?arch/arm/mach-s3c2410/include/mach/system-reset.h | ? ?4 ++-- ?arch/arm/mach-s3c64xx/include/mach/system.h ? ? ? | ? ?2 +- ?arch/arm/mach-sa1100/include/mach/system.h ? ? ? ?| ? ?2 +- ?arch/arm/mach-shmobile/include/mach/system.h ? ? ?| ? ?2 +- ?arch/arm/mach-w90x900/include/mach/system.h ? ? ? | ? ?2 +- ?arch/arm/plat-mxc/system.c ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +- ?arch/arm/plat-spear/include/plat/system.h ? ? ? ? | ? ?2 +-?21 files changed, 33 insertions(+), 23 deletions(-)
arch/arm/include/asm/system.h +1
-0@@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void); ?extern void cpu_init(void); ?void arm_machine_restart(char mode, const char *cmd); +void soft_restart (unsigned long ); ?extern void (*arm_pm_restart)(char str, const char *cmd); ?#define UDBG_UNDEFINED (1 << 0)arch/arm/kernel/process.c +1
-1@@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused) ?__setup("nohlt", nohlt_setup); ?__setup("hlt", hlt_setup); -void arm_machine_restart (char mode,const char *cmd) +void soft_restart (unsigned long addr) ?{? ? ? ?/* Disable interrupts first */
? ? ? ?local_irq_disable();arch/arm/kernel/process.c +0
-0@@ -114,7 +114,16 @@ void arm_machine_restart(char mode, const char *cmd)? ? ? ?/* Push out any further dirty data, and ensure cache is empty */ ? ? ? ?flush_cache_all();
- ? ? ? /* Now call the architecture specific reboot code. */
+ ? ? ?cpu_reset(addr);arch/arm/kernel/process.c +9
-0+} + +void arm_machine_restart (char mode,const char *cmd) +{ + ? ? ? /* Disable interrupts first */ + ? ? ? local_irq_disable(); + ? ? ? local_fiq_disable(); + + ? ? ? /* Call the architecture specific reboot code. */? ? ? ?arch_reset(mode, cmd);
?}arch/arm/mach-clps711x/include/mach/system.h +1
-1@@ -34,7 +34,7 @@ static inline void arch_idle(void) ?static inline void arch_reset(char mode, const char *cmd) ?{ - ? ? ? cpu_reset(0); + ? ? ? soft_restart(0); ?}?#endif
arch/arm/mach-ebsa110/include/mach/system.h +1
-1@@ -34,6 +34,6 @@ static inline void arch_idle(void) ? ? ? ?asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc"); ?} -#define arch_reset (mode, cmd) ?cpu_reset(0x80000000) +#define arch_reset (mode, cmd) ?soft_restart(0x80000000)?#endif
arch/arm/mach-footbridge/include/mach/system.h +0
-0@@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)? ? ? ? ? ? ? ?/*
? ? ? ? ? ? ? ? * Jump into the ROM
? ? ? ? ? ? ? ? */
- ? ? ? ? ? ? ?cpu_reset(0x41000000);
+ ? ? ? ? ? ? ?soft_restart(0x41000000); ? ? ? ?} else {
? ? ? ? ? ? ? ?if (machine_is_netwinder()) { ? ? ? ? ? ? ? ? ? ? ? ?/* open up the SuperIO chiparch/arm/mach-iop32x/include/mach/system.h +0
-0@@ -30,5 +30,5 @@ static inline void arch_reset(char mode, const char *cmd) ? ? ? ?*IOP3XX_PCSR = 0x30;? ? ? ?/* Jump into ROM at address 0 */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}arch/arm/mach-iop33x/include/mach/system.h +0
-0@@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd) ? ? ? ?*IOP3XX_PCSR = 0x30;? ? ? ?/* Jump into ROM at address 0 */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}arch/arm/mach-ixp4xx/include/mach/system.h +0
-0@@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if ( 1 && mode == 's') {? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ?} else {
? ? ? ? ? ? ? ?/* Use on-chip reset capability */arch/arm/mach-ks8695/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd) ? ? ? ?unsigned int reg; ? ? ? ?if (mode == 's') - ? ? ? ? ? ? ? cpu_reset(0); + ? ? ? ? ? ? ? soft_restart(0);? ? ? ?/* disable timer0 */
? ? ? ?reg =__raw_readl(KS8695_TMR_VA + KS8695_TMCON);arch/arm/mach-mmp/include/mach/system.h +1
-1@@ -19,8 +19,8 @@ static inline void arch_idle(void) ?static inline void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (cpu_is_pxa168()) - ? ? ? ? ? ? ? cpu_reset(0xffff0000); + ? ? ? ? ? ? ? soft_restart(0xffff0000);? ? ? ?else
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
?}
?#endif /*__ASM_MACH_SYSTEM_H*/arch/arm/mach-mxs/system.c +0
-0@@ -53,7 +53,7 @@ void arch_reset(char mode, const char *cmd) ? ? ? ?mdelay(50);? ? ? ?/* We'll take a jump through zero as a poor second */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}?static int
__initmxs_arch_reset_init(void)arch/arm/mach-pnx4008/include/mach/system.h +1
-1@@ -32,7 +32,7 @@ static void arch_idle(void) ?static inline void arch_reset(char mode, const char *cmd) ?{ - ? ? ? cpu_reset(0); + ? ? ? soft_restart(0); ?}?#endif
arch/arm/mach-pxa/reset.c +0
-0@@ -88,7 +88,7 @@ void arch_reset(char mode, const char *cmd) ? ? ? ?switch (mode) {? ? ? ?case 's':
? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ? ? ? ? ?break;
? ? ? ?case 'g':
? ? ? ? ? ? ? ?do_gpio_reset();arch/arm/mach-rpc/include/mach/system.h +0
-0@@ -23,5 +23,5 @@ static inline void arch_reset(char mode, const char *cmd)? ? ? ?/*
? ? ? ? * Jump into the ROM
? ? ? ? */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}arch/arm/mach-s3c2410/include/mach/system-reset.h +1
-1@@ -19,7 +19,7 @@ static void ?arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (mode == 's') { - ? ? ? ? ? ? ? cpu_reset(0); + ? ? ? ? ? ? ? soft_restart(0); ? ? ? ?} ? ? ? ?if (s3c24xx_reset_hook)@@ -28,5 +28,5 @@ arch_reset(char mode, const char *cmd) ? ? ? ?arch_wdt_reset();? ? ? ?/* we'll take a jump through zero as a poor second */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}arch/arm/mach-s3c64xx/include/mach/system.h +0
-0@@ -24,7 +24,7 @@ static void arch_reset(char mode, const char *cmd) ? ? ? ? ? ? ? ?arch_wdt_reset();? ? ? ?/* if all else fails, or mode was for soft, jump to 0 */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}?#endif /*
__ASM_ARCH_IRQ_H*/arch/arm/mach-sa1100/include/mach/system.h +0
-0@@ -14,7 +14,7 @@ static inline void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (mode == 's') {? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ?} else {
? ? ? ? ? ? ? ?/* Use on-chip reset capability */
? ? ? ? ? ? ? ?RSRR =RSRR_SWR;arch/arm/mach-shmobile/include/mach/system.h +1
-1@@ -8,7 +8,7 @@ static inline void arch_idle(void) ?static inline void arch_reset(char mode, const char *cmd) ?{ - ? ? ? cpu_reset(0); + ? ? ? soft_restart(0); ?}?#endif
arch/arm/mach-w90x900/include/mach/system.h +0
-0@@ -33,7 +33,7 @@ static void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (mode == 's') {? ? ? ? ? ? ? ?/* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ?} else {
? ? ? ? ? ? ? ?__raw_writel(WTE | WTRE | WTCLK, WTCR); ? ? ? ?}arch/arm/plat-mxc/system.c +0
-0@@ -70,7 +70,7 @@ void arch_reset(char mode, const char *cmd) ? ? ? ?mdelay(50);? ? ? ?/* we'll take a jump through zero as a poor second */
- ? ? ?cpu_reset(0);
+ ? ? ?soft_restart(0);
?}?void
mxc_arch_reset_init(void __iomem *base)arch/arm/plat-spear/include/plat/system.h +0
-0@@ -31,7 +31,7 @@ static inline void arch_reset(char mode, const char *cmd) ?{ ? ? ? ?if (mode == 's') {? ? ? ? ? ? ? ?/* software reset, Jump into ROM at address 0 */
- ? ? ? ? ? ? ?cpu_reset(0);
+ ? ? ? ? ? ? ?soft_restart(0);
? ? ? ?} else {
? ? ? ? ? ? ? ?/* hardware reset, Use on-chip reset capability */ ? ? ? ? ? ? ? ?sysctl_soft_reset((void__iomem*)VA_SPEAR_SYS_CTRL_BASE); --
1.7.4.4_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 7/7 ARM: restart: remove local_irq_disable() from within arch_reset()
In reply to Russell King - ARM LinuxIRQs are already disabled by the time arch_reset() is called, so these calls to local_irq_disable() instead arch_reset() are redundant. Remove them.
--- arch/arm/mach-ep93xx/include/mach/system.h | 2 -- arch/arm/mach-iop32x/include/mach/system.h | 2 -- arch/arm/mach-ixp2000/include/mach/system.h | 2 -- arch/arm/mach-lpc32xx/include/mach/system.h | 3 --- arch/arm/mach-shark/core.c | 1 - arch/arm/mach-u300/include/mach/system.h | 2 -- 6 files changed, 0 insertions(+), 12 deletions(-)
arch/arm/mach-ep93xx/include/mach/system.h +0 -2
@@ -11,8 +11,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -local_irq_disable (); -/* * Set then clear the SWRST bit to initiate a software reset */
arch/arm/mach-iop32x/include/mach/system.h +0 -2
@@ -18,8 +18,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -local_irq_disable (); -if (machine_is_n2100 ()) {gpio_line_set (N2100_HARDWARE_RESET ,GPIO_LOW );gpio_line_config (N2100_HARDWARE_RESET ,GPIO_OUT );
arch/arm/mach-ixp2000/include/mach/system.h +0 -2
@@ -19,8 +19,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -local_irq_disable (); -/* * Reset flash banking register so that we are pointing at * RedBoot bank.
arch/arm/mach-lpc32xx/include/mach/system.h +0 -3
@@ -33,9 +33,6 @@ static inline void arch_reset(char mode, const char *cmd)case 'h' :printk (KERN_CRIT "RESET: Rebooting system\n" ); -/* Disable interrupts */ -local_irq_disable (); -lpc32xx_watchdog_reset ();break ;
arch/arm/mach-shark/core.c +0 -1
@@ -29,7 +29,6 @@void arch_reset (char mode,const char *cmd) {short temp; -local_irq_disable ();/* Reset the Machine via pc[3] of the sequoia chipset */ outw (0x09 ,0x24 ); temp=inw (0x26 );
arch/arm/mach-u300/include/mach/system.h +0 -2
@@ -27,8 +27,6 @@ static void arch_reset(char mode, const char *cmd)case 's' :case 'h' :printk (KERN_CRIT "RESET: shutting down/rebooting system\n" ); -/* Disable interrupts */ -local_irq_disable ();#ifdef CONFIG_COH901327_WATCHDOG coh901327_watchdog_reset ();#endif
Signature · 1 line
1.7.4.4
cover Platform arch_reset changes
In reply to Russell King - ARM LinuxPart 2. These are the platform updates, so far.
The first patch combines the individual files in mach-clps711x which contain one or two functions or data structures before changing the arch_reset stuff.
The majority of the remaining patches address each group of platforms individually.
The final patch removes the resulting empty arch_reset() functions, its call site and associated code. XXX NOTE XXX This results in anything left with an arch_reset() function having non-functional restart capability.
arch/arm/include/asm/hardware/iop3xx.h | 1 + arch/arm/include/asm/system.h | 1 - arch/arm/kernel/process.c | 10 +- arch/arm/mach-at91/at91cap9.c | 4 +- arch/arm/mach-at91/at91rm9200.c | 4 +- arch/arm/mach-at91/at91sam9260.c | 2 +- arch/arm/mach-at91/at91sam9261.c | 2 +- arch/arm/mach-at91/at91sam9263.c | 2 +- arch/arm/mach-at91/at91sam9_alt_reset.S | 9 +- arch/arm/mach-at91/at91sam9g45.c | 4 +- arch/arm/mach-at91/at91sam9rl.c | 2 +- arch/arm/mach-at91/generic.h | 3 +- arch/arm/mach-at91/include/mach/system.h | 9 - arch/arm/mach-clps711x/Makefile | 2 +- arch/arm/mach-clps711x/autcpu12.c | 1 + arch/arm/mach-clps711x/cdb89712.c | 1 + arch/arm/mach-clps711x/ceiva.c | 1 + arch/arm/mach-clps711x/clep7312.c | 1 + arch/arm/mach-clps711x/common.c | 227 ++++++++++++++++++++++++ arch/arm/mach-clps711x/edb7211-arch.c | 1 + arch/arm/mach-clps711x/fortunet.c | 1 + arch/arm/mach-clps711x/include/mach/system.h | 5 - arch/arm/mach-clps711x/irq.c | 143 --------------- arch/arm/mach-clps711x/mm.c | 48 ----- arch/arm/mach-clps711x/p720t.c | 1 + arch/arm/mach-clps711x/time.c | 84 --------- arch/arm/mach-cns3xxx/cns3420vb.c | 1 + arch/arm/mach-cns3xxx/core.h | 1 + arch/arm/mach-cns3xxx/include/mach/system.h | 3 - arch/arm/mach-cns3xxx/pm.c | 2 +- arch/arm/mach-dove/cm-a510.c | 1 + arch/arm/mach-dove/common.c | 16 ++ arch/arm/mach-dove/common.h | 1 + arch/arm/mach-dove/dove-db-setup.c | 1 + arch/arm/mach-dove/include/mach/system.h | 19 -- arch/arm/mach-ebsa110/core.c | 6 + arch/arm/mach-ebsa110/include/mach/system.h | 2 - arch/arm/mach-ep93xx/adssphere.c | 1 + arch/arm/mach-ep93xx/core.c | 12 ++ arch/arm/mach-ep93xx/edb93xx.c | 8 + arch/arm/mach-ep93xx/gesbc9312.c | 1 + arch/arm/mach-ep93xx/include/mach/platform.h | 2 + arch/arm/mach-ep93xx/include/mach/system.h | 15 -- arch/arm/mach-ep93xx/micro9.c | 4 + arch/arm/mach-ep93xx/simone.c | 1 + arch/arm/mach-ep93xx/snappercl15.c | 1 + arch/arm/mach-ep93xx/ts72xx.c | 1 + arch/arm/mach-ep93xx/vision_ep9307.c | 1 + arch/arm/mach-footbridge/cats-hw.c | 1 + arch/arm/mach-footbridge/common.c | 27 +++ arch/arm/mach-footbridge/common.h | 1 + arch/arm/mach-footbridge/ebsa285.c | 1 + arch/arm/mach-footbridge/include/mach/system.h | 56 ------ arch/arm/mach-footbridge/netwinder-hw.c | 27 +++ arch/arm/mach-footbridge/personal.c | 1 + arch/arm/mach-h720x/common.c | 5 + arch/arm/mach-h720x/common.h | 1 + arch/arm/mach-h720x/h7201-eval.c | 1 + arch/arm/mach-h720x/h7202-eval.c | 1 + arch/arm/mach-h720x/include/mach/system.h | 6 - arch/arm/mach-highbank/core.h | 1 + arch/arm/mach-highbank/highbank.c | 1 + arch/arm/mach-highbank/include/mach/system.h | 2 - arch/arm/mach-highbank/system.c | 2 +- arch/arm/mach-imx/mach-apf9328.c | 1 + arch/arm/mach-imx/mach-armadillo5x0.c | 1 + arch/arm/mach-imx/mach-bug.c | 1 + arch/arm/mach-imx/mach-cpuimx27.c | 1 + arch/arm/mach-imx/mach-cpuimx35.c | 1 + arch/arm/mach-imx/mach-eukrea_cpuimx25.c | 1 + arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 1 + arch/arm/mach-imx/mach-imx27ipcam.c | 1 + arch/arm/mach-imx/mach-imx27lite.c | 1 + arch/arm/mach-imx/mach-imx6q.c | 1 + arch/arm/mach-imx/mach-kzm_arm11_01.c | 1 + arch/arm/mach-imx/mach-mx1ads.c | 2 + arch/arm/mach-imx/mach-mx21ads.c | 1 + arch/arm/mach-imx/mach-mx25_3ds.c | 1 + arch/arm/mach-imx/mach-mx27_3ds.c | 1 + arch/arm/mach-imx/mach-mx27ads.c | 1 + arch/arm/mach-imx/mach-mx31_3ds.c | 1 + arch/arm/mach-imx/mach-mx31ads.c | 1 + arch/arm/mach-imx/mach-mx31lilly.c | 1 + arch/arm/mach-imx/mach-mx31lite.c | 1 + arch/arm/mach-imx/mach-mx31moboard.c | 1 + arch/arm/mach-imx/mach-mx35_3ds.c | 1 + arch/arm/mach-imx/mach-mxt_td60.c | 1 + arch/arm/mach-imx/mach-pca100.c | 1 + arch/arm/mach-imx/mach-pcm037.c | 1 + arch/arm/mach-imx/mach-pcm038.c | 1 + arch/arm/mach-imx/mach-pcm043.c | 1 + arch/arm/mach-imx/mach-qong.c | 1 + arch/arm/mach-imx/mach-scb9328.c | 1 + arch/arm/mach-imx/mach-vpr200.c | 1 + arch/arm/mach-integrator/common.h | 1 + arch/arm/mach-integrator/core.c | 8 + arch/arm/mach-integrator/include/mach/system.h | 11 -- arch/arm/mach-integrator/integrator_ap.c | 1 + arch/arm/mach-integrator/integrator_cp.c | 1 + arch/arm/mach-iop13xx/include/mach/iop13xx.h | 1 + arch/arm/mach-iop13xx/include/mach/system.h | 14 -- arch/arm/mach-iop13xx/iq81340mc.c | 1 + arch/arm/mach-iop13xx/iq81340sc.c | 1 + arch/arm/mach-iop13xx/setup.c | 11 ++ arch/arm/mach-iop32x/em7210.c | 1 + arch/arm/mach-iop32x/glantank.c | 1 + arch/arm/mach-iop32x/include/mach/system.h | 19 -- arch/arm/mach-iop32x/iq31244.c | 2 + arch/arm/mach-iop32x/iq80321.c | 1 + arch/arm/mach-iop32x/n2100.c | 9 + arch/arm/mach-iop33x/include/mach/system.h | 10 - arch/arm/mach-iop33x/iq80331.c | 1 + arch/arm/mach-iop33x/iq80332.c | 1 + arch/arm/mach-ixp2000/core.c | 4 + arch/arm/mach-ixp2000/enp2611.c | 1 + arch/arm/mach-ixp2000/include/mach/platform.h | 1 + arch/arm/mach-ixp2000/include/mach/system.h | 33 ---- arch/arm/mach-ixp2000/ixdp2400.c | 1 + arch/arm/mach-ixp2000/ixdp2800.c | 1 + arch/arm/mach-ixp2000/ixdp2x01.c | 32 ++++ arch/arm/mach-ixp23xx/core.c | 6 + arch/arm/mach-ixp23xx/espresso.c | 1 + arch/arm/mach-ixp23xx/include/mach/platform.h | 1 + arch/arm/mach-ixp23xx/include/mach/system.h | 17 -- arch/arm/mach-ixp23xx/ixdp2351.c | 12 ++ arch/arm/mach-ixp23xx/roadrunner.c | 1 + arch/arm/mach-ixp4xx/avila-setup.c | 2 + arch/arm/mach-ixp4xx/common.c | 20 ++ arch/arm/mach-ixp4xx/coyote-setup.c | 2 + arch/arm/mach-ixp4xx/dsmg600-setup.c | 1 + arch/arm/mach-ixp4xx/fsg-setup.c | 1 + arch/arm/mach-ixp4xx/gateway7001-setup.c | 1 + arch/arm/mach-ixp4xx/goramo_mlr.c | 1 + arch/arm/mach-ixp4xx/gtwx5715-setup.c | 1 + arch/arm/mach-ixp4xx/include/mach/platform.h | 1 + arch/arm/mach-ixp4xx/include/mach/system.h | 25 --- arch/arm/mach-ixp4xx/ixdp425-setup.c | 1 + arch/arm/mach-ixp4xx/nas100d-setup.c | 1 + arch/arm/mach-ixp4xx/nslu2-setup.c | 1 + arch/arm/mach-ixp4xx/omixp-setup.c | 3 + arch/arm/mach-ixp4xx/vulcan-setup.c | 1 + arch/arm/mach-ixp4xx/wg302v2-setup.c | 1 + arch/arm/mach-kirkwood/common.c | 16 ++ arch/arm/mach-kirkwood/common.h | 1 + arch/arm/mach-kirkwood/d2net_v2-setup.c | 1 + arch/arm/mach-kirkwood/db88f6281-bp-setup.c | 1 + arch/arm/mach-kirkwood/dockstar-setup.c | 1 + arch/arm/mach-kirkwood/guruplug-setup.c | 1 + arch/arm/mach-kirkwood/include/mach/system.h | 19 -- arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | 1 + arch/arm/mach-kirkwood/netspace_v2-setup.c | 3 + arch/arm/mach-kirkwood/netxbig_v2-setup.c | 2 + arch/arm/mach-kirkwood/openrd-setup.c | 3 + arch/arm/mach-kirkwood/rd88f6192-nas-setup.c | 1 + arch/arm/mach-kirkwood/rd88f6281-setup.c | 1 + arch/arm/mach-kirkwood/sheevaplug-setup.c | 2 + arch/arm/mach-kirkwood/t5325-setup.c | 1 + arch/arm/mach-kirkwood/ts219-setup.c | 1 + arch/arm/mach-kirkwood/ts41x-setup.c | 1 + arch/arm/mach-lpc32xx/common.c | 20 ++- arch/arm/mach-lpc32xx/common.h | 2 + arch/arm/mach-lpc32xx/include/mach/system.h | 22 --- arch/arm/mach-lpc32xx/phy3250.c | 1 + arch/arm/mach-mmp/aspenite.c | 2 + arch/arm/mach-mmp/avengers_lite.c | 1 + arch/arm/mach-mmp/brownstone.c | 1 + arch/arm/mach-mmp/common.c | 5 + arch/arm/mach-mmp/common.h | 1 + arch/arm/mach-mmp/flint.c | 1 + arch/arm/mach-mmp/gplugd.c | 1 + arch/arm/mach-mmp/include/mach/pxa168.h | 1 + arch/arm/mach-mmp/include/mach/system.h | 10 - arch/arm/mach-mmp/jasper.c | 1 + arch/arm/mach-mmp/pxa168.c | 5 + arch/arm/mach-mmp/tavorevb.c | 1 + arch/arm/mach-mmp/teton_bga.c | 1 + arch/arm/mach-mmp/ttc_dkb.c | 1 + arch/arm/mach-msm/include/mach/system.h | 8 - arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 1 + arch/arm/mach-mv78xx0/common.c | 16 ++ arch/arm/mach-mv78xx0/common.h | 1 + arch/arm/mach-mv78xx0/db78x00-bp-setup.c | 1 + arch/arm/mach-mv78xx0/include/mach/system.h | 19 -- arch/arm/mach-mv78xx0/rd78x00-masa-setup.c | 1 + arch/arm/mach-mx5/board-cpuimx51.c | 1 + arch/arm/mach-mx5/board-cpuimx51sd.c | 1 + arch/arm/mach-mx5/board-mx50_rdp.c | 1 + arch/arm/mach-mx5/board-mx51_3ds.c | 1 + arch/arm/mach-mx5/board-mx51_babbage.c | 1 + arch/arm/mach-mx5/board-mx51_efikamx.c | 3 +- arch/arm/mach-mx5/board-mx51_efikasb.c | 1 + arch/arm/mach-mx5/board-mx53_ard.c | 1 + arch/arm/mach-mx5/board-mx53_evk.c | 1 + arch/arm/mach-mx5/board-mx53_loco.c | 1 + arch/arm/mach-mx5/board-mx53_smd.c | 1 + arch/arm/mach-mx5/imx51-dt.c | 1 + arch/arm/mach-mx5/imx53-dt.c | 1 + arch/arm/mach-mxs/include/mach/common.h | 1 + arch/arm/mach-mxs/include/mach/system.h | 2 - arch/arm/mach-mxs/mach-m28evk.c | 1 + arch/arm/mach-mxs/mach-mx23evk.c | 1 + arch/arm/mach-mxs/mach-mx28evk.c | 1 + arch/arm/mach-mxs/mach-stmp378x_devb.c | 1 + arch/arm/mach-mxs/mach-tx28.c | 1 + arch/arm/mach-mxs/system.c | 2 +- arch/arm/mach-orion5x/common.c | 12 ++ arch/arm/mach-orion5x/common.h | 1 + arch/arm/mach-orion5x/d2net-setup.c | 2 + arch/arm/mach-orion5x/db88f5281-setup.c | 1 + arch/arm/mach-orion5x/dns323-setup.c | 1 + arch/arm/mach-orion5x/edmini_v2-setup.c | 1 + arch/arm/mach-orion5x/include/mach/system.h | 14 -- arch/arm/mach-orion5x/kurobox_pro-setup.c | 2 + arch/arm/mach-orion5x/ls-chl-setup.c | 3 +- arch/arm/mach-orion5x/ls_hgl-setup.c | 3 +- arch/arm/mach-orion5x/lsmini-setup.c | 3 +- arch/arm/mach-orion5x/mss2-setup.c | 3 +- arch/arm/mach-orion5x/mv2120-setup.c | 3 +- arch/arm/mach-orion5x/net2big-setup.c | 1 + arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 1 + arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 1 + arch/arm/mach-orion5x/rd88f5182-setup.c | 1 + arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 1 + arch/arm/mach-orion5x/terastation_pro2-setup.c | 1 + arch/arm/mach-orion5x/ts209-setup.c | 1 + arch/arm/mach-orion5x/ts409-setup.c | 1 + arch/arm/mach-orion5x/ts78xx-setup.c | 1 + arch/arm/mach-orion5x/wnr854t-setup.c | 1 + arch/arm/mach-orion5x/wrt350n-v2-setup.c | 1 + arch/arm/mach-picoxcell/include/mach/system.h | 5 - arch/arm/mach-pnx4008/core.c | 6 + arch/arm/mach-pnx4008/include/mach/system.h | 9 - arch/arm/mach-prima2/common.h | 1 + arch/arm/mach-prima2/include/mach/system.h | 12 -- arch/arm/mach-prima2/prima2.c | 1 + arch/arm/mach-prima2/rstc.c | 7 + arch/arm/mach-pxa/balloon3.c | 1 + arch/arm/mach-pxa/capc7117.c | 3 +- arch/arm/mach-pxa/cm-x2xx.c | 1 + arch/arm/mach-pxa/cm-x300.c | 1 + arch/arm/mach-pxa/colibri-pxa270.c | 2 + arch/arm/mach-pxa/colibri-pxa300.c | 1 + arch/arm/mach-pxa/colibri-pxa320.c | 1 + arch/arm/mach-pxa/corgi.c | 8 +- arch/arm/mach-pxa/csb726.c | 1 + arch/arm/mach-pxa/em-x270.c | 2 + arch/arm/mach-pxa/eseries.c | 6 + arch/arm/mach-pxa/ezx.c | 6 + arch/arm/mach-pxa/generic.h | 2 + arch/arm/mach-pxa/gumstix.c | 1 + arch/arm/mach-pxa/h5000.c | 1 + arch/arm/mach-pxa/himalaya.c | 1 + arch/arm/mach-pxa/hx4700.c | 1 + arch/arm/mach-pxa/icontrol.c | 3 +- arch/arm/mach-pxa/idp.c | 1 + arch/arm/mach-pxa/include/mach/system.h | 8 - arch/arm/mach-pxa/littleton.c | 1 + arch/arm/mach-pxa/lpd270.c | 1 + arch/arm/mach-pxa/lubbock.c | 1 + arch/arm/mach-pxa/magician.c | 1 + arch/arm/mach-pxa/mainstone.c | 1 + arch/arm/mach-pxa/mioa701.c | 6 +- arch/arm/mach-pxa/mp900.c | 1 + arch/arm/mach-pxa/palmld.c | 3 +- arch/arm/mach-pxa/palmt5.c | 3 +- arch/arm/mach-pxa/palmtc.c | 3 +- arch/arm/mach-pxa/palmte2.c | 3 +- arch/arm/mach-pxa/palmtreo.c | 2 + arch/arm/mach-pxa/palmtx.c | 3 +- arch/arm/mach-pxa/palmz72.c | 3 +- arch/arm/mach-pxa/pcm027.c | 1 + arch/arm/mach-pxa/poodle.c | 9 +- arch/arm/mach-pxa/raumfeld.c | 3 + arch/arm/mach-pxa/reset.c | 5 +- arch/arm/mach-pxa/saar.c | 1 + arch/arm/mach-pxa/saarb.c | 1 + arch/arm/mach-pxa/spitz.c | 6 +- arch/arm/mach-pxa/stargate2.c | 2 + arch/arm/mach-pxa/tavorevb.c | 1 + arch/arm/mach-pxa/tavorevb3.c | 1 + arch/arm/mach-pxa/tosa.c | 4 +- arch/arm/mach-pxa/trizeps4.c | 2 + arch/arm/mach-pxa/viper.c | 1 + arch/arm/mach-pxa/vpac270.c | 3 +- arch/arm/mach-pxa/xcep.c | 1 + arch/arm/mach-pxa/z2.c | 1 + arch/arm/mach-pxa/zeus.c | 1 + arch/arm/mach-pxa/zylonite.c | 1 + arch/arm/mach-realview/core.h | 1 - arch/arm/mach-realview/include/mach/system.h | 17 -- arch/arm/mach-realview/realview_eb.c | 5 +- arch/arm/mach-realview/realview_pb1176.c | 5 +- arch/arm/mach-realview/realview_pb11mp.c | 5 +- arch/arm/mach-realview/realview_pba8.c | 5 +- arch/arm/mach-realview/realview_pbx.c | 5 +- arch/arm/mach-rpc/include/mach/system.h | 14 -- arch/arm/mach-rpc/riscpc.c | 12 ++ arch/arm/mach-sa1100/assabet.c | 1 + arch/arm/mach-sa1100/badge4.c | 1 + arch/arm/mach-sa1100/cerf.c | 1 + arch/arm/mach-sa1100/collie.c | 1 + arch/arm/mach-sa1100/generic.c | 11 ++ arch/arm/mach-sa1100/generic.h | 1 + arch/arm/mach-sa1100/h3100.c | 1 + arch/arm/mach-sa1100/h3600.c | 1 + arch/arm/mach-sa1100/hackkit.c | 1 + arch/arm/mach-sa1100/include/mach/system.h | 13 -- arch/arm/mach-sa1100/jornada720.c | 1 + arch/arm/mach-sa1100/lart.c | 1 + arch/arm/mach-sa1100/nanoengine.c | 1 + arch/arm/mach-sa1100/pleb.c | 1 + arch/arm/mach-sa1100/shannon.c | 1 + arch/arm/mach-sa1100/simpad.c | 1 + arch/arm/mach-shark/core.c | 3 +- arch/arm/mach-shark/include/mach/system.h | 3 - arch/arm/mach-spear3xx/include/mach/generic.h | 2 + arch/arm/mach-spear3xx/spear300_evb.c | 1 + arch/arm/mach-spear3xx/spear310_evb.c | 1 + arch/arm/mach-spear3xx/spear320_evb.c | 1 + arch/arm/mach-spear6xx/include/mach/generic.h | 2 + arch/arm/mach-spear6xx/spear600_evb.c | 1 + arch/arm/mach-tegra/common.c | 5 +- arch/arm/mach-tegra/include/mach/system.h | 4 - arch/arm/mach-u300/core.c | 20 ++ arch/arm/mach-u300/include/mach/platform.h | 1 + arch/arm/mach-u300/include/mach/system.h | 26 --- arch/arm/mach-u300/u300.c | 1 + arch/arm/mach-ux500/include/mach/system.h | 5 - arch/arm/mach-versatile/core.c | 13 ++ arch/arm/mach-versatile/core.h | 1 + arch/arm/mach-versatile/include/mach/system.h | 16 -- arch/arm/mach-versatile/versatile_ab.c | 1 + arch/arm/mach-versatile/versatile_dt.c | 1 + arch/arm/mach-versatile/versatile_pb.c | 1 + arch/arm/mach-vexpress/include/mach/system.h | 4 - arch/arm/mach-vexpress/v2m.c | 2 +- arch/arm/mach-w90x900/cpu.c | 15 ++ arch/arm/mach-w90x900/cpu.h | 1 + arch/arm/mach-w90x900/include/mach/system.h | 22 --- arch/arm/mach-w90x900/mach-nuc910evb.c | 1 + arch/arm/mach-w90x900/mach-nuc950evb.c | 1 + arch/arm/mach-w90x900/mach-nuc960evb.c | 1 + arch/arm/mach-zynq/include/mach/system.h | 5 - arch/arm/plat-iop/Makefile | 2 + arch/arm/plat-iop/restart.c | 19 ++ arch/arm/plat-mxc/include/mach/common.h | 2 +- arch/arm/plat-mxc/include/mach/system.h | 2 - arch/arm/plat-mxc/system.c | 9 +- arch/arm/plat-s3c24xx/cpu.c | 23 --- arch/arm/plat-spear/Makefile | 2 +- arch/arm/plat-spear/include/plat/system.h | 15 -- arch/arm/plat-spear/restart.c | 27 +++ 352 files changed, 995 insertions(+), 910 deletions(-) create mode 100644 arch/arm/mach-clps711x/common.c delete mode 100644 arch/arm/mach-clps711x/irq.c delete mode 100644 arch/arm/mach-clps711x/mm.c delete mode 100644 arch/arm/mach-clps711x/time.c create mode 100644 arch/arm/plat-iop/restart.c create mode 100644 arch/arm/plat-spear/restart.c
cover The remaining stuff
Part 3 - the remaining stuff
These are patches which I've managed to get half way through before getting - to be honest - totally hacked off with the code found in various platforms (as mentioned in previous mails).
These platforms are broken as a result of the final patch in part 2, and these patches move these platforms _towards_ a solution. They are not a complete solution though, but the start of the solution.
For instance, the Exynos4 and S5PV210 patches both consist of almost a full solution -but- with the new function prototype missing because there is _no_ local header file to put it in, and I'm damned well not putting it in the remote plat-samsung/include/plat headers.
The final set of platforms - touched neither by part 3 nor 4, are broken by the final patch in part 2, and at present I have no plans to fix them. I would welcome patches to fix these which address the issues raised in the "pet peaves" email (which is why I have no plans to fix them.)
arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + arch/arm/mach-omap1/board-voiceblue.c | 5 ++--- arch/arm/mach-omap1/include/mach/system.h | 6 ++++++ arch/arm/mach-omap1/reset.c | 4 +--- arch/arm/mach-omap2/include/mach/system.h | 6 ++++++ arch/arm/mach-omap2/prcm.c | 4 +--- arch/arm/mach-s5pv210/cpu.c | 6 +----- arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/mach-s5pv210/mach-smdkc110.c | 1 + arch/arm/mach-s5pv210/mach-smdkv210.c | 1 + arch/arm/mach-s5pv210/mach-torbreck.c | 1 + arch/arm/plat-omap/include/plat/system.h | 2 -- arch/arm/plat-samsung/include/plat/reset.h | 16 ---------------- arch/arm/plat-samsung/include/plat/system-reset.h | 11 ----------- arch/arm/plat-tcc/include/mach/system.h | 4 ++-- arch/arm/plat-tcc/system.c | 2 +- 23 files changed, 34 insertions(+), 51 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h
PATCH 1/5 XXX: tcc8k
--- arch/arm/plat-tcc/include/mach/system.h | 4 ++-- arch/arm/plat-tcc/system.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-tcc/include/mach/system.h +2 -2
@@ -16,7 +16,7 @@#include <asm/mach-types.h> #include <mach/hardware.h> -extern void plat_tcc_reboot (void ); +extern void plat_tcc_restart (char mode,const char *cmd);static inline void arch_idle (void ) {
@@ -25,7 +25,7 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -plat_tcc_reboot (); +plat_tcc_restart (mode, cmd); }#endif
arch/arm/plat-tcc/system.c +1 -1
@@ -12,7 +12,7 @@#include <mach/tcc8k-regs.h> /* System reboot */ -void plat_tcc_reboot (void ) +void plat_tcc_restart (char mode,const char *cmd) {/* Make sure clocks are on */ __raw_writel (0xffffffff ,CKC_BASE +BCLKCTR0_OFFS );
Signature · 1 line
1.7.4.4
PATCH 2/5 ARM: restart: omap: use new restart hook XXX WIP XXX
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-omap1/board-voiceblue.c | 5 ++--- arch/arm/mach-omap1/include/mach/system.h | 6 ++++++ arch/arm/mach-omap1/reset.c | 4 +--- arch/arm/mach-omap2/include/mach/system.h | 6 ++++++ arch/arm/mach-omap2/prcm.c | 4 +--- arch/arm/plat-omap/include/plat/system.h | 2 -- 6 files changed, 16 insertions(+), 11 deletions(-)
arch/arm/mach-omap1/board-voiceblue.c +2 -3
@@ -220,7 +220,7 @@ void voiceblue_wdt_ping(void)gpio_set_value (0 , wdt_gpio_state); } -static void voiceblue_reset (char mode,const char *cmd) +static void voiceblue_restart (char mode,const char *cmd) {/* * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
@@ -284,8 +284,6 @@ static void __init voiceblue_init(void)* (it is connected through invertor) */ omap_writeb (0x00 ,OMAP_LPG1_LCR );omap_writeb (0x00 ,OMAP_LPG1_PMR );/* Disable clock */ - - arch_reset = voiceblue_reset; }MACHINE_START (VOICEBLUE ,"VoiceBlue OMAP5910" )
@@ -297,4 +295,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") .init_irq = omap1_init_irq, .init_machine = voiceblue_init, .timer = &omap1_timer, + .restart = voiceblue_restart,MACHINE_END
arch/arm/mach-omap1/include/mach/system.h +6 -0
@@ -1,5 +1,11 @@/* * arch/arm/mach-omap1/include/mach/system.h */ +void omap1_restart (char mode,const char *cmd); + +static inline void arch_reset (char mode,const char *cmd) +{ +omap1_restart (mode, cmd); +}#include <plat/system.h>
arch/arm/mach-omap1/reset.c +1 -3
@@ -8,7 +8,7 @@#include <mach/system.h> #include <plat/prcm.h> -void omap1_arch_reset (char mode,const char *cmd) +void omap1_restart (char mode,const char *cmd) {/* * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
@@ -21,5 +21,3 @@ void omap1_arch_reset(char mode, const char *cmd)omap_writew (1 ,ARM_RSTCT1 ); } - -void (*arch_reset)(char ,const char *) = omap1_arch_reset;
arch/arm/mach-omap2/include/mach/system.h +6 -0
@@ -1,5 +1,11 @@/* * arch/arm/mach-omap2/include/mach/system.h */ +void omap_prcm_restart (char mode,const char *cmd); + +static inline void arch_reset (char mode,const char *cmd) +{ +omap_prcm_restart (mode, cmd); +}#include <plat/system.h>
arch/arm/mach-omap2/prcm.c +1 -3
@@ -58,7 +58,7 @@ u32 omap_prcm_get_reset_sources(void)EXPORT_SYMBOL (omap_prcm_get_reset_sources);/* Resets clock rates and reboots the system. Only called from system.h */ -static void omap_prcm_arch_reset (char mode,const char *cmd) +void omap_prcm_restart (char mode,const char *cmd) {s16 prcm_offs =0 ;
@@ -109,8 +109,6 @@ static void omap_prcm_arch_reset(char mode, const char *cmd)omap2_prm_read_mod_reg (prcm_offs,OMAP2_RM_RSTCTRL );/* OCP barrier */ } -void (*arch_reset)(char ,const char *) = omap_prcm_arch_reset; -/** * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness * @reg: physical address of module IDLEST register
arch/arm/plat-omap/include/plat/system.h +0 -2
@@ -12,6 +12,4 @@ static inline void arch_idle(void) cpu_do_idle(); } -extern void (*arch_reset)(char ,const char *); -#endif
Signature · 1 line
1.7.4.4
Tony Lindgren
maintainerPATCH 2/5 ARM: restart: omap: use new restart hook XXX WIP XXX
Quoted 36 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-omap1/board-voiceblue.c | 5 ++--- arch/arm/mach-omap1/include/mach/system.h | 6 ++++++ arch/arm/mach-omap1/reset.c | 4 +--- arch/arm/mach-omap2/include/mach/system.h | 6 ++++++ arch/arm/mach-omap2/prcm.c | 4 +--- arch/arm/plat-omap/include/plat/system.h | 2 -- 6 files changed, 16 insertions(+), 11 deletions(-)arch/arm/mach-omap1/board-voiceblue.c +1
-3@@ -220,7 +220,7 @@ void voiceblue_wdt_ping(void)gpio_set_value (0 , wdt_gpio_state); } -static void voiceblue_reset (char mode,const char *cmd) +static void voiceblue_restart (char mode,const char *cmd) {/* * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 @@ -284,8 +284,6 @@ static void __init voiceblue_init(void)* (it is connected through invertor) */ omap_writeb (0x00 ,OMAP_LPG1_LCR );omap_writeb (0x00 ,OMAP_LPG1_PMR );/* Disable clock */ - - arch_reset = voiceblue_reset; }MACHINE_START (VOICEBLUE ,"VoiceBlue OMAP5910" )
arch/arm/mach-omap1/board-voiceblue.c MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") · line 299
Quoted 5 lines
arch/arm/mach-omap1/board-voiceblue.c +1
-0@@ -297,4 +295,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") .init_irq = omap1_init_irq, .init_machine = voiceblue_init, .timer = &omap1_timer, + .restart = voiceblue_restart,MACHINE_END
I guess we want the rest of the board files to set .restart to omap1_restart or omap_prcm_restart? Do you already have some script doing that or do you need some help there?
Regards,
Tony
PATCH 2/5 ARM: restart: omap: use new restart hook XXX WIP XXX
Quoted 3 lines · Tony Lindgren
I guess we want the rest of the board files to set .restart to
omap1_restartoromap_prcm_restart? Do you already have some script doing that or do you need some help there?
It's fairly easy to do using my editor and grep to find the files needing editing. As you'll notice from the previous message, I've already fixed this up.
It passes both my OMAP3 and OMAP4 build checks, but I've not yet booted the results.
PATCH 3/5 ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + 7 files changed, 9 insertions(+), 5 deletions(-)
arch/arm/mach-exynos4/cpu.c +1 -5
@@ -27,7 +27,6 @@#include <plat/fb-core.h> #include <plat/fimc-core.h> #include <plat/iic-core.h> -#include <plat/reset.h> #include <plat/tv-core.h> #include <mach/regs-irq.h>
@@ -145,7 +144,7 @@ static void exynos4_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }
@@ -286,8 +285,5 @@ int __init exynos4_init(void)/* set idle function */ pm_idle = exynos4_idle; -/* set sw_reset function */ - s5p_reset_hook = exynos4_sw_reset; -return sysdev_register (&exynos4_sysdev); }
arch/arm/mach-exynos4/mach-armlex4210.c +1 -0
@@ -212,4 +212,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") .map_io = armlex4210_map_io, .init_machine = armlex4210_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos4/mach-nuri.c +1 -0
@@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI") .init_machine = nuri_machine_init, .timer = &exynos4_timer, .reserve = &nuri_reserve, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos4/mach-origen.c +1 -0
@@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN") .init_machine = origen_machine_init, .timer = &exynos4_timer, .reserve = &origen_reserve, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos4/mach-smdk4x12.c +2 -0
@@ -289,6 +289,7 @@ MACHINE_START(SMDK4212, "SMDK4212") .map_io = smdk4x12_map_io, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDK4412 ,"SMDK4412" )
@@ -299,4 +300,5 @@ MACHINE_START(SMDK4412, "SMDK4412") .map_io = smdk4x12_map_io, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos4/mach-smdkv310.c +2 -0
@@ -378,6 +378,7 @@ MACHINE_START(SMDKV310, "SMDKV310") .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, .reserve = &smdkv310_reserve, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" )
@@ -387,4 +388,5 @@ MACHINE_START(SMDKC210, "SMDKC210") .map_io = smdkv310_map_io, .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos4/mach-universal_c210.c +1 -0
@@ -1061,4 +1061,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") .init_machine = universal_machine_init, .timer = &exynos4_timer, .reserve = &universal_reserve, + .restart = exynos4_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 3/5 ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
Quoted 36 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + 7 files changed, 9 insertions(+), 5 deletions(-)arch/arm/mach-exynos4/cpu.c +1
-2@@ -27,7 +27,6 @@#include <plat/fb-core.h> #include <plat/fimc-core.h> #include <plat/iic-core.h> -#include <plat/reset.h> #include <plat/tv-core.h> #include <mach/regs-irq.h> @@ -145,7 +144,7 @@ static void exynos4_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }
arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291
Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0
-3@@ -286,8 +285,5 @@ int __init exynos4_init(void)/* set idle function */ pm_idle = exynos4_idle; -/* set sw_reset function */ - s5p_reset_hook = exynos4_sw_reset; -
I notice in last nights merge of the Samsung stuff, this has become less trivial - it's now:
/* set sw_reset function */
if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412())
s5p_reset_hook = exynos4_sw_reset;So which of the boards should be converted and which shouldn't ? In other words, which exynos4210, 4212 or 4412 platforms?
Quoted 86 lines
arch/arm/mach-exynos4/cpu.c +0
-0return sysdev_register (&exynos4_sysdev); }arch/arm/mach-exynos4/mach-armlex4210.c +1
-0@@ -212,4 +212,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") .map_io = armlex4210_map_io, .init_machine = armlex4210_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-nuri.c +1
-0@@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI") .init_machine = nuri_machine_init, .timer = &exynos4_timer, .reserve = &nuri_reserve, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-origen.c +1
-0@@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN") .init_machine = origen_machine_init, .timer = &exynos4_timer, .reserve = &origen_reserve, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-smdk4x12.c +2
-0@@ -289,6 +289,7 @@ MACHINE_START(SMDK4212, "SMDK4212") .map_io = smdk4x12_map_io, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDK4412 ,"SMDK4412" )@@ -299,4 +300,5 @@ MACHINE_START(SMDK4412, "SMDK4412") .map_io = smdk4x12_map_io, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-smdkv310.c +2
-0@@ -378,6 +378,7 @@ MACHINE_START(SMDKV310, "SMDKV310") .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, .reserve = &smdkv310_reserve, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" )@@ -387,4 +388,5 @@ MACHINE_START(SMDKC210, "SMDKC210") .map_io = smdkv310_map_io, .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-universal_c210.c +1
-0@@ -1061,4 +1061,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") .init_machine = universal_machine_init, .timer = &exynos4_timer, .reserve = &universal_reserve, + .restart = exynos4_restart,MACHINE_END Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 3/5 ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
Quoted 46 lines · Russell King - ARM Linux
Quoted 36 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + 7 files changed, 9 insertions(+), 5 deletions(-)arch/arm/mach-exynos4/cpu.c +1
-2@@ -27,7 +27,6 @@#include <plat/fb-core.h> #include <plat/fimc-core.h> #include <plat/iic-core.h> -#include <plat/reset.h> #include <plat/tv-core.h> #include <mach/regs-irq.h> @@ -145,7 +144,7 @@ static void exynos4_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291
Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0
-3@@ -286,8 +285,5 @@ int __init exynos4_init(void)/* set idle function */ pm_idle = exynos4_idle; -/* set sw_reset function */ - s5p_reset_hook = exynos4_sw_reset; -I notice in last nights merge of the Samsung stuff, this has become less trivial - it's now:
Quoted 7 lines
/* set sw_reset function */ if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) s5p_reset_hook = exynos4_sw_reset;So which of the boards should be converted and which shouldn't ? In other words, which exynos4210, 4212 or 4412 platforms?
except the arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is used. currently all exynos4 series has same reset function. it's preparation for exynos5 series maybe.
you can use the exynos4_sw_reset for all boards.
Thank you,
Kyungmin Park
Quoted 99 lines
Quoted 89 lines
arch/arm/mach-exynos4/cpu.c +0
-0return sysdev_register (&exynos4_sysdev); }arch/arm/mach-exynos4/mach-armlex4210.c +1
-0@@ -212,4 +212,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") .map_io = armlex4210_map_io, .init_machine = armlex4210_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-nuri.c +1
-0@@ -1336,4 +1336,5 @@ MACHINE_START(NURI, "NURI") .init_machine = nuri_machine_init, .timer = &exynos4_timer, .reserve = &nuri_reserve, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-origen.c +1
-0@@ -697,4 +697,5 @@ MACHINE_START(ORIGEN, "ORIGEN") .init_machine = origen_machine_init, .timer = &exynos4_timer, .reserve = &origen_reserve, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-smdk4x12.c +2
-0@@ -289,6 +289,7 @@ MACHINE_START(SMDK4212, "SMDK4212") .map_io = smdk4x12_map_io, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDK4412 ,"SMDK4412" )@@ -299,4 +300,5 @@ MACHINE_START(SMDK4412, "SMDK4412") .map_io = smdk4x12_map_io, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-smdkv310.c +2
-0@@ -378,6 +378,7 @@ MACHINE_START(SMDKV310, "SMDKV310") .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, .reserve = &smdkv310_reserve, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" )@@ -387,4 +388,5 @@ MACHINE_START(SMDKC210, "SMDKC210") .map_io = smdkv310_map_io, .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos4/mach-universal_c210.c +1
-1@@ -1061,4 +1061,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") .init_machine = universal_machine_init, .timer = &exynos4_timer, .reserve = &universal_reserve, + .restart = exynos4_restart,MACHINE_END --1.7.4.4
Quoted 4 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 3/5 ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
Quoted 52 lines · Kyungmin Park
Quoted 51 lines · Russell King - ARM Linux
Quoted 36 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + 7 files changed, 9 insertions(+), 5 deletions(-)arch/arm/mach-exynos4/cpu.c +1
-2@@ -27,7 +27,6 @@#include <plat/fb-core.h> #include <plat/fimc-core.h> #include <plat/iic-core.h> -#include <plat/reset.h> #include <plat/tv-core.h> #include <mach/regs-irq.h> @@ -145,7 +144,7 @@ static void exynos4_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291
Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0
-3@@ -286,8 +285,5 @@ int __init exynos4_init(void)/* set idle function */ pm_idle = exynos4_idle; -/* set sw_reset function */ - s5p_reset_hook = exynos4_sw_reset; -I notice in last nights merge of the Samsung stuff, this has become less trivial - it's now:
/* set sw_reset function */ if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) s5p_reset_hook = exynos4_sw_reset;
Quoted 8 lines
Quoted 2 lines
So which of the boards should be converted and which shouldn't ? In other words, which exynos4210, 4212 or 4412 platforms?
except the
arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is used. currently all exynos4 series has same reset function. it's preparation for exynos5 series maybe.you can use the
exynos4_sw_resetfor all boards.
Thanks, that gets me back to where I was with the patch before the exynos4 move.
PATCH 3/5 ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
Quoted 4 lines · Russell King - ARM Linux
Quoted 2 lines · Kyungmin Park
Quoted 1 line · Russell King - ARM Linux
On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux
Quoted 14 lines · wrote:
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + 7 files changed, 9 insertions(+), 5 deletions(-)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/mach-exynos4/cpu.c
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 21 lines
index 5b1765b..5b1ee56 100644
arch/arm/mach-exynos4/cpu.c +1
-2@@ -27,7 +27,6 @@#include <plat/fb-core.h> #include <plat/fimc-core.h> #include <plat/iic-core.h> -#include <plat/reset.h> #include <plat/tv-core.h> #include <mach/regs-irq.h> @@ -145,7 +144,7 @@ static void exynos4_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291
Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0
-3@@ -286,8 +285,5 @@ int __init exynos4_init(void)/* set idle function */ pm_idle = exynos4_idle; -/* set sw_reset function */ - s5p_reset_hook = exynos4_sw_reset; -I notice in last nights merge of the Samsung stuff, this has become less trivial - it's now:
/* set sw_reset function */ if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) s5p_reset_hook = exynos4_sw_reset;
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
So which of the boards should be converted and which shouldn't ? In other words, which exynos4210, 4212 or 4412 platforms?
except the
arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is used. currently all exynos4 series has same reset function. it's preparation for exynos5 series maybe.you can use the
exynos4_sw_resetfor all boards.
Thanks, Kyungmin.
Quoted 3 lines
Thanks, that gets me back to where I was with the patch before the exynos4 move.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 3/5 ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
Quoted 66 lines · Kukjin Kim
Quoted 4 lines · Russell King - ARM Linux
Quoted 2 lines · Kyungmin Park
Quoted 1 line · Russell King - ARM Linux
On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux
Quoted 14 lines · wrote:
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + 7 files changed, 9 insertions(+), 5 deletions(-)Quoted 1 line
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/mach-exynos4/cpu.cQuoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 21 lines
index 5b1765b..5b1ee56 100644
arch/arm/mach-exynos4/cpu.c +1
-2@@ -27,7 +27,6 @@#include <plat/fb-core.h> #include <plat/fimc-core.h> #include <plat/iic-core.h> -#include <plat/reset.h> #include <plat/tv-core.h> #include <mach/regs-irq.h> @@ -145,7 +144,7 @@ static void exynos4_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291
Quoted 6 lines
arch/arm/mach-exynos4/cpu.c +0
-3@@ -286,8 +285,5 @@ int __init exynos4_init(void)/* set idle function */ pm_idle = exynos4_idle; -/* set sw_reset function */ - s5p_reset_hook = exynos4_sw_reset; -I notice in last nights merge of the Samsung stuff, this has become less trivial - it's now:
/* set sw_reset function */ if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) s5p_reset_hook = exynos4_sw_reset;Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
So which of the boards should be converted and which shouldn't ? In other words, which exynos4210, 4212 or 4412 platforms?
except the
arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is used. currently all exynos4 series has same reset function. it's preparation for exynos5 series maybe.you can use the
exynos4_sw_resetfor all boards.
Quoted 7 lines
Thanks, Kyungmin.
Quoted 3 lines
Thanks, that gets me back to where I was with the patch before the exynos4 move.
Thanks.
I have to point out that even so, this patch as it stands will break the exynos build (that's why the subject line contains the XXX WIP XXX stuff.)
As I said in my pet peaves mail, there should be a header in arch/arm/mach-exynos for the data and function declarations which are only used by and only provided by files in this directory. Such things as:
struct sys_timer exynos4_timer;
void exynos4_init_irq(void);
etc. This stuff should not be inappropriately placed:
arch/arm/plat-samsung/include/plat/exynos4.h:extern struct sys_timer exynos4_timer; arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4_init_irq(void);
(e.g.,
$ grep exynos4_init_irq\\\> arch/arm -r
arch/arm/mach-exynos/mach-nuri.c: .init_irq = exynos4_init_irq,
arch/arm/mach-exynos/mach-origen.c: .init_irq = exynos4_init_irq,
arch/arm/mach-exynos/mach-armlex4210.c: .init_irq = exynos4_init_irq,
arch/arm/mach-exynos/mach-smdkv310.c: .init_irq = exynos4_init_irq,
arch/arm/mach-exynos/mach-smdkv310.c: .init_irq = exynos4_init_irq,
arch/arm/mach-exynos/mach-smdk4x12.c: .init_irq = exynos4_init_irq,
arch/arm/mach-exynos/mach-smdk4x12.c: .init_irq = exynos4_init_irq,
arch/arm/mach-exynos/cpu.c:void __init exynos4_init_irq(void)
arch/arm/mach-exynos/mach-universal_c210.c: .init_irq = exynos4_init_irq,
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4_init_irq(void);
$ grep exynos4_timer arch/arm -r
arch/arm/mach-exynos/mach-nuri.c: .timer = &exynos4_timer,
arch/arm/mach-exynos/mach-origen.c: .timer = &exynos4_timer,
arch/arm/mach-exynos/mach-armlex4210.c: .timer = &exynos4_timer,
arch/arm/mach-exynos/mach-smdkv310.c: .timer = &exynos4_timer,
arch/arm/mach-exynos/mach-smdkv310.c: .timer = &exynos4_timer,
arch/arm/mach-exynos/mach-smdk4x12.c: .timer = &exynos4_timer,
arch/arm/mach-exynos/mach-smdk4x12.c: .timer = &exynos4_timer,
arch/arm/mach-exynos/mct.c:struct sys_timer exynos4_timer = {
arch/arm/mach-exynos/mach-universal_c210.c: .timer = &exynos4_timer,
arch/arm/plat-samsung/include/plat/exynos4.h:extern struct sys_timer exynos4_timer;
$ grep exynos4_register_clocks arch/arm -r
arch/arm/mach-exynos/clock.c:void __init exynos4_register_clocks(void)
arch/arm/mach-exynos/cpu.c: exynos4_register_clocks();
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4_register_clock(void);
$ grep exynos421._register_clocks arch/arm -r
arch/arm/mach-exynos/clock-exynos4212.c:void __init exynos4212_register_clocks(void)
arch/arm/mach-exynos/cpu.c: exynos4210_register_clocks();
arch/arm/mach-exynos/cpu.c: exynos4212_register_clocks();
arch/arm/mach-exynos/clock-exynos4210.c:void __init exynos4210_register_clocks(void)
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4210_register_clocks(void);
arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4212_register_clocks(void);
)I suspect a sizeable proportion of plat/exynos4.h could move into arch/arm/mach-exynos.
PATCH 3/5 ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
Quoted 9 lines · Russell King - ARM Linux
Quoted 7 lines · Kukjin Kim
Quoted 4 lines · Russell King - ARM Linux
Quoted 2 lines · Kyungmin Park
Quoted 1 line · Russell King - ARM Linux
On Sun, Nov 06, 2011 at 05:56:08PM +0000, Russell King - ARM Linux
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Hook these platforms restart code into the new restart hook
rather
Quoted 39 lines
Quoted 39 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + 7 files changed, 9 insertions(+), 5 deletions(-)Quoted 1 line
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/mach-exynos4/cpu.cQuoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
index 5b1765b..5b1ee56 100644
arch/arm/mach-exynos4/cpu.c +1
-2@@ -27,7 +27,6 @@#include <plat/fb-core.h> #include <plat/fimc-core.h> #include <plat/iic-core.h> -#include <plat/reset.h> #include <plat/tv-core.h> #include <mach/regs-irq.h> @@ -145,7 +144,7 @@ static void exynos4_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }@@ -286,8 +285,5 @@ int __init exynos4_init(void)/* set idle function */ pm_idle = exynos4_idle;
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-exynos4/cpu.c int __init exynos4_init(void) · line 291
Quoted 3 lines
arch/arm/mach-exynos4/cpu.c +0
-3-/* set sw_reset function */ - s5p_reset_hook = exynos4_sw_reset; -I notice in last nights merge of the Samsung stuff, this has
become
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 8 lines
less trivial - it's now:
/* set sw_reset function */ if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) s5p_reset_hook = exynos4_sw_reset;So which of the boards should be converted and which shouldn't ? In other words, which exynos4210, 4212 or 4412 platforms?
except the
arch/arm/mach-exynos4/mach-smdk4x12.c, exynos4210 is
used.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
currently all exynos4 series has same reset function. it's
preparation
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
Quoted 3 lines
for exynos5 series maybe.
you can use the
exynos4_sw_resetfor all boards.Thanks, Kyungmin.
Quoted 3 lines
Thanks, that gets me back to where I was with the patch before the exynos4 move.
Quoted 8 lines
Quoted 1 line
Thanks.
I have to point out that even so, this patch as it stands will break the exynos build (that's why the subject line contains the XXX WIP XXX stuff.)
As I said in my pet peaves mail, there should be a header in
arch/arm/mach-exynosfor the data and function declarations which are
OK, I see.
Quoted 11 lines
only used by and only provided by files in this directory. Such things as:
struct
sys_timerexynos4_timer;
voidexynos4_init_irq(void);etc. This stuff should not be inappropriately placed:
arch/arm/plat-samsung/include/plat/exynos4.h:extern struct
sys_timerexynos4_timer; arch/arm/plat-samsung/include/plat/exynos4.h:extern void
exynos4_init_irq(void);
Quoted 6 lines
(e.g.,
$ grep exynos4_init_irq\\\> arch/arm -r arch/arm/mach-exynos/mach-nuri.c: .init_irq = exynos4_init_irq, arch/arm/mach-exynos/mach-origen.c: .init_irq = exynos4_init_irq, arch/arm/mach-exynos/mach-armlex4210.c: .init_irq =
exynos4_init_irq,
Quoted 10 lines
arch/arm/mach-exynos/mach-smdkv310.c: .init_irq =exynos4_init_irq,arch/arm/mach-exynos/mach-smdkv310.c: .init_irq =exynos4_init_irq,arch/arm/mach-exynos/mach-smdk4x12.c: .init_irq =exynos4_init_irq,arch/arm/mach-exynos/mach-smdk4x12.c: .init_irq =exynos4_init_irq,
arch/arm/mach-exynos/cpu.c:void__initexynos4_init_irq(void)arch/arm/mach-exynos/mach-universal_c210.c: .init_irq =
exynos4_init_irq,
Quoted 1 line
arch/arm/plat-samsung/include/plat/exynos4.h:extern void
exynos4_init_irq(void);
Quoted 7 lines
$ grep exynos4_timer arch/arm -r arch/arm/mach-exynos/mach-nuri.c: .timer = &exynos4_timer, arch/arm/mach-exynos/mach-origen.c: .timer = &exynos4_timer, arch/arm/mach-exynos/mach-armlex4210.c: .timer = &exynos4_timer, arch/arm/mach-exynos/mach-smdkv310.c: .timer = &exynos4_timer,
Quoted 8 lines
arch/arm/mach-exynos/mach-smdkv310.c: .timer =
&exynos4_timer,
arch/arm/mach-exynos/mach-smdk4x12.c: .timer =
&exynos4_timer,
arch/arm/mach-exynos/mach-smdk4x12.c: .timer =
&exynos4_timer,
arch/arm/mach-exynos/mct.c:struct sys_timer exynos4_timer = {
arch/arm/mach-exynos/mach-universal_c210.c: .timer =&exynos4_timer,
Quoted 20 lines
arch/arm/plat-samsung/include/plat/exynos4.h:extern struct
sys_timerexynos4_timer;$ grep exynos4_register_clocks arch/arm -r arch/arm/mach-exynos/clock.c:void __init exynos4_register_clocks(void) arch/arm/mach-exynos/cpu.c: exynos4_register_clocks(); arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4_register_clock(void); $ grep exynos421._register_clocks arch/arm -r arch/arm/mach-exynos/clock-exynos4212.c:void __init exynos4212_register_clocks(void) arch/arm/mach-exynos/cpu.c: exynos4210_register_clocks(); arch/arm/mach-exynos/cpu.c: exynos4212_register_clocks(); arch/arm/mach-exynos/clock-exynos4210.c:void __init exynos4210_register_clocks(void) arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4210_register_clocks(void); arch/arm/plat-samsung/include/plat/exynos4.h:extern void exynos4212_register_clocks(void); )
Quoted 2 lines
I suspect a sizeable proportion of
plat/exynos4.hcould move intoarch/arm/mach-exynos.
OK, as I replied previous, I agree with you and I will sort them out as per your suggestion.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 4/5 ARM: restart: s5pv210: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-s5pv210/cpu.c | 6 +----- arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/mach-s5pv210/mach-smdkc110.c | 1 + arch/arm/mach-s5pv210/mach-smdkv210.c | 1 + arch/arm/mach-s5pv210/mach-torbreck.c | 1 + 6 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-s5pv210/cpu.c +1 -5
@@ -41,7 +41,6 @@#include <plat/iic-core.h> #include <plat/keypad-core.h> #include <plat/sdhci.h> -#include <plat/reset.h> #include <plat/tv-core.h> /* Initial IO mappings */
@@ -108,7 +107,7 @@ static void s5pv210_idle(void)local_irq_enable (); } -static void s5pv210_sw_reset (void ) +void s5pv210_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }
@@ -196,8 +195,5 @@ int __init s5pv210_init(void)/* set idle function */ pm_idle = s5pv210_idle; -/* set sw_reset function */ - s5p_reset_hook = s5pv210_sw_reset; -return sysdev_register (&s5pv210_sysdev); }
arch/arm/mach-s5pv210/mach-aquila.c +1 -0
@@ -683,4 +683,5 @@ MACHINE_START(AQUILA, "Aquila") .map_io = aquila_map_io, .init_machine = aquila_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-goni.c +1 -0
@@ -960,4 +960,5 @@ MACHINE_START(GONI, "GONI") .init_machine = goni_machine_init, .timer = &s5p_timer, .reserve = &goni_reserve, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-smdkc110.c +1 -0
@@ -141,4 +141,5 @@ MACHINE_START(SMDKC110, "SMDKC110") .map_io = smdkc110_map_io, .init_machine = smdkc110_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-smdkv210.c +1 -0
@@ -318,4 +318,5 @@ MACHINE_START(SMDKV210, "SMDKV210") .map_io = smdkv210_map_io, .init_machine = smdkv210_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-torbreck.c +1 -0
@@ -130,4 +130,5 @@ MACHINE_START(TORBRECK, "TORBRECK") .map_io = torbreck_map_io, .init_machine = torbreck_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 4/5 ARM: restart: s5pv210: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
Quoted 5 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Review
Quoted 40 lines
--- arch/arm/mach-s5pv210/cpu.c | 6 +----- arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/mach-s5pv210/mach-smdkc110.c | 1 + arch/arm/mach-s5pv210/mach-smdkv210.c | 1 + arch/arm/mach-s5pv210/mach-torbreck.c | 1 + 6 files changed, 6 insertions(+), 5 deletions(-)arch/arm/mach-s5pv210/cpu.c +1
-5@@ -41,7 +41,6 @@#include <plat/iic-core.h> #include <plat/keypad-core.h> #include <plat/sdhci.h> -#include <plat/reset.h> #include <plat/tv-core.h> /* Initial IO mappings */ @@ -108,7 +107,7 @@ static void s5pv210_idle(void)local_irq_enable (); } -static void s5pv210_sw_reset (void ) +void s5pv210_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }@@ -196,8 +195,5 @@ int __init s5pv210_init(void)/* set idle function */ pm_idle = s5pv210_idle; -/* set sw_reset function */ - s5p_reset_hook = s5pv210_sw_reset; -return sysdev_register (&s5pv210_sysdev); }(quoted diff) +0
-0
b/arch/arm/mach-s5pv210/mach-
Review
Quoted 11 lines
aquila.c
index 5811a96..68fd31d 100644arch/arm/mach-s5pv210/mach-aquila.c +1
-0@@ -683,4 +683,5 @@ MACHINE_START(AQUILA, "Aquila") .map_io = aquila_map_io, .init_machine = aquila_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s5pv210/mach-
Quoted 45 lines
goni.c
index 15edcae..1156a5b 100644arch/arm/mach-s5pv210/mach-goni.c +1
-0@@ -960,4 +960,5 @@ MACHINE_START(GONI, "GONI") .init_machine = goni_machine_init, .timer = &s5p_timer, .reserve = &goni_reserve, + .restart = s5pv210_restart,MACHINE_END arch/arm/mach- renamed from arch/arm/mach-s5pv210/mach-smdkc110.c +0
-0
s5pv210/mach-smdkc110.c
index f7266bb..a70fa53 100644arch/arm/mach-s5pv210/mach-smdkc110.c +1
-0@@ -141,4 +141,5 @@ MACHINE_START(SMDKC110, "SMDKC110") .map_io = smdkc110_map_io, .init_machine = smdkc110_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END arch/arm/mach- renamed from arch/arm/mach-s5pv210/mach-smdkv210.c +0
-0
s5pv210/mach-smdkv210.c
index a9106c3..5e8a775 100644arch/arm/mach-s5pv210/mach-smdkv210.c +1
-0@@ -318,4 +318,5 @@ MACHINE_START(SMDKV210, "SMDKV210") .map_io = smdkv210_map_io, .init_machine = smdkv210_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END arch/arm/mach- renamed from arch/arm/mach-s5pv210/mach-torbreck.c +0
-0
s5pv210/mach-torbreck.c
index 97cc066..49e9c6d 100644arch/arm/mach-s5pv210/mach-torbreck.c +1
-1@@ -130,4 +130,5 @@ MACHINE_START(TORBRECK, "TORBRECK") .map_io = torbreck_map_io, .init_machine = torbreck_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END --1.7.4.4
PATCH 4/5 ARM: restart: s5pv210: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX
Quoted 8 lines · Kukjin Kim
Quoted 5 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>Acked-by Kukjin Kim <[email protected]>
I'm not going to accept that for a patch which will cause a build error.
The purpose of throwing this set of patches out is not to get acks, but to get people to think about the code that they already have in the tree which is making the task of others unnecessarily more difficult because of the way it is structured.
Let me repeat: anything in the list below _will_ be broken by this patch series:arch/arm/mach-bcmring/include/mach/system.h arch/arm/mach-davinci/include/mach/system.h arch/arm/mach-gemini/include/mach/system.h arch/arm/mach-ks8695/include/mach/system.h arch/arm/mach-netx/include/mach/system.h arch/arm/mach-nomadik/include/mach/system.h arch/arm/mach-omap1/include/mach/system.h arch/arm/mach-omap2/include/mach/system.h arch/arm/mach-s3c2410/include/mach/system-reset.h arch/arm/mach-s3c64xx/include/mach/system.h arch/arm/mach-shmobile/include/mach/system.h arch/arm/mach-vt8500/include/mach/system.h arch/arm/plat-samsung/include/plat/system-reset.h arch/arm/plat-tcc/include/mach/system.h
and this includes *all* of the Samsung s3* and s5* stuff. Exynos4 at least avoids it because all platforms there use the exynos4_restart() function.
Also note: it's likely that some platform maintainers *will* want to base their code off this series. People submitting new platforms will want at least part 1 of the series so they can use the new feature.
So we owe it to them (and yourselves) to get the remaining problems resolved as soon as possible so that the entire series is sound. So, don't think there's three months to work on this.
PATCH 5/5 ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook
In reply to Russell King - ARM LinuxNow that s5p_reset_hook is unused, we can get rid of plat/reset.h and the s5p_reset_hook code in plat/system-reset.h.
--- arch/arm/plat-samsung/include/plat/reset.h | 16 ---------------- arch/arm/plat-samsung/include/plat/system-reset.h | 11 ----------- 2 files changed, 0 insertions(+), 27 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h
arch/arm/plat-samsung/include/plat/reset.h deleted +0 -16
@@ -1,16 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/reset.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __PLAT_SAMSUNG_RESET_H -#define __PLAT_SAMSUNG_RESET_H __FILE__ - -extern void (*s5p_reset_hook)(void ); - -#endif /* __PLAT_SAMSUNG_RESET_H */
arch/arm/plat-samsung/include/plat/system-reset.h +0 -11
@@ -14,18 +14,7 @@#include <plat/watchdog-reset.h> -void (*s5p_reset_hook)(void ); -static void arch_reset (char mode,const char *cmd) { -/* SWRESET support in s5p_reset_hook() */ - -if (s5p_reset_hook) -s5p_reset_hook (); - -/* Perform reset using Watchdog reset -* if there is no s5p_reset_hook() -*/ -arch_wdt_reset (); }
Signature · 1 line
1.7.4.4
PATCH 5/5 ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook
Quoted 5 lines · Russell King - ARM Linux
Now that
s5p_reset_hookis unused, we can get rid ofplat/reset.hand thes5p_reset_hookcode inplat/system-reset.h.Signed-off-by Russell King <[email protected]>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Review
Quoted 30 lines
--- arch/arm/plat-samsung/include/plat/reset.h | 16 ---------------- arch/arm/plat-samsung/include/plat/system-reset.h | 11 ----------- 2 files changed, 0 insertions(+), 27 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/reset.harch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/reset.h +0
-0
samsung/include/plat/reset.h
deleted file mode 100644
index 32ca517..0000000arch/arm/plat-samsung/include/plat/reset.h deleted +0
-16@@ -1,16 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/reset.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __PLAT_SAMSUNG_RESET_H -#define __PLAT_SAMSUNG_RESET_H __FILE__ - -extern void (*s5p_reset_hook)(void ); - -#endif /* __PLAT_SAMSUNG_RESET_H */ (quoted diff) +0
-0
b/arch/arm/plat-
Quoted 25 lines
samsung/include/plat/system-reset.h
index a448e99..73d7808 100644arch/arm/plat-samsung/include/plat/system-reset.h +0
-12@@ -14,18 +14,7 @@#include <plat/watchdog-reset.h> -void (*s5p_reset_hook)(void ); -static void arch_reset (char mode,const char *cmd) { -/* SWRESET support in s5p_reset_hook() */ - -if (s5p_reset_hook) -s5p_reset_hook (); - -/* Perform reset using Watchdog reset -* if there is no s5p_reset_hook() -*/ -arch_wdt_reset (); } --1.7.4.4
cover The remaining stuff
In reply to Russell King - ARM LinuxQuoted 7 lines · Russell King - ARM Linux
Part 3 - the remaining stuff
These are patches which I've managed to get half way through before getting - to be honest - totally hacked off with the code found in various platforms (as mentioned in previous mails).
Quoted 9 lines
These platforms are broken as a result of the final patch in part 2, and these patches move these platforms _towards_ a solution. They are not a complete solution though, but the start of the solution.
For instance, the Exynos4 and S5PV210 patches both consist of almost a full solution -but- with the new function prototype missing because there is _no_ local header file to put it in, and I'm damned well not putting it in the remote plat-samsung/include/plat headers.
Russell,
The new restart prototype for s5pv210 and exynos can be placed in their respective<mach/system.h>file. And the board files can include it. Would this place be fine for the new prototype?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Quoted 32 lines
The final set of platforms - touched neither by part 3 nor 4, are broken by the final patch in part 2, and at present I have no plans to fix them. I would welcome patches to fix these which address the issues raised in the "pet peaves" email (which is why I have no plans to fix them.)
arch/arm/mach-exynos4/cpu.c | 6 +----- arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/mach-exynos4/mach-nuri.c | 1 + arch/arm/mach-exynos4/mach-origen.c | 1 + arch/arm/mach-exynos4/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos4/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 1 + arch/arm/mach-omap1/board-voiceblue.c | 5 ++--- arch/arm/mach-omap1/include/mach/system.h | 6 ++++++ arch/arm/mach-omap1/reset.c | 4 +--- arch/arm/mach-omap2/include/mach/system.h | 6 ++++++ arch/arm/mach-omap2/prcm.c | 4 +--- arch/arm/mach-s5pv210/cpu.c | 6 +----- arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/mach-s5pv210/mach-smdkc110.c | 1 + arch/arm/mach-s5pv210/mach-smdkv210.c | 1 + arch/arm/mach-s5pv210/mach-torbreck.c | 1 + arch/arm/plat-omap/include/plat/system.h | 2 -- arch/arm/plat-samsung/include/plat/reset.h | 16 ---------------- arch/arm/plat-samsung/include/plat/system-reset.h | 11 ----------- arch/arm/plat-tcc/include/mach/system.h | 4 ++-- arch/arm/plat-tcc/system.c | 2 +- 23 files changed, 34 insertions(+), 51 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h
cover The remaining stuff
Quoted 17 lines · Kukjin Kim
Quoted 7 lines · Russell King - ARM Linux
Part 3 - the remaining stuff
These are patches which I've managed to get half way through before getting - to be honest - totally hacked off with the code found in various platforms (as mentioned in previous mails).
Quoted 9 lines
These platforms are broken as a result of the final patch in part 2, and these patches move these platforms _towards_ a solution. They are not a complete solution though, but the start of the solution.
For instance, the Exynos4 and S5PV210 patches both consist of almost a full solution -but- with the new function prototype missing because there is _no_ local header file to put it in, and I'm damned well not putting it in the remote plat-samsung/include/plat headers.
Quoted 4 lines
Russell,
The new restart prototype for s5pv210 and exynos can be placed in their respective<mach/system.h>file.
No - mach/system.h will be removed once arch_idle is gone as well. In any case, this should not be in a mach/*.h file. There should be a header in the arch/arm/mach-* directory for functions and data structures local _only_ to the files in that directory.
Please read my 'pet peaves' email, point 4.
cover The remaining stuff
Quoted 21 lines · Russell King - ARM Linux
Quoted 19 lines · Kukjin Kim
Quoted 7 lines · Russell King - ARM Linux
Part 3 - the remaining stuff
These are patches which I've managed to get half way through before getting - to be honest - totally hacked off with the code found in various platforms (as mentioned in previous mails).
Quoted 9 lines
These platforms are broken as a result of the final patch in part 2, and these patches move these platforms _towards_ a solution. They are not a complete solution though, but the start of the solution.
For instance, the Exynos4 and S5PV210 patches both consist of almost a full solution -but- with the new function prototype missing because there is _no_ local header file to put it in, and I'm damned well not putting it in the remote plat-samsung/include/plat headers.
Russell,
Quoted 8 lines
Quoted 2 lines
The new restart prototype for s5pv210 and exynos can be placed in their respective<mach/system.h>file.
No -
mach/system.hwill be removed oncearch_idleis gone as well. In any case, this should not be in a mach/*.h file. There should be a header in thearch/arm/mach-*directory for functions and data structures local _only_ to the files in that directory.
Okay, I agree. So how about mach-xxx/common.h for it?
If required, I will sort out all of Samsung stuff as per your suggestion.
Quoted 1 line
Please read my 'pet peaves' email, point 4.
Okay, I see.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
cover The remaining stuff
In reply to Russell King - ARM LinuxQuoted 15 lines · Russell King - ARM Linux
Part 3 - the remaining stuff
These are patches which I've managed to get half way through before getting - to be honest - totally hacked off with the code found in various platforms (as mentioned in previous mails).
These platforms are broken as a result of the final patch in part 2, and these patches move these platforms _towards_ a solution. They are not a complete solution though, but the start of the solution.
For instance, the Exynos4 and S5PV210 patches both consist of almost a full solution -but- with the new function prototype missing because there is _no_ local header file to put it in, and I'm damned well not putting it in the remote plat-samsung/include/plat headers.
Quoted 5 lines
The final set of platforms - touched neither by part 3 nor 4, are broken by the final patch in part 2, and at present I have no plans to fix them. I would welcome patches to fix these which address the issues raised in the "pet peaves" email (which is why I have no plans to fix them.)
The list of platforms which are still broken (today) by part 2 of this series are:
arch/arm/mach-davinci/include/mach/system.harch/arm/mach-gemini/include/mach/system.harch/arm/mach-nomadik/include/mach/system.harch/arm/mach-s3c2410/include/mach/system-reset.harch/arm/mach-s3c64xx/include/mach/system.harch/arm/mach-shmobile/include/mach/system.harch/arm/mach-vt8500/include/mach/system.harch/arm/plat-samsung/include/plat/system-reset.harch/arm/plat-tcc/include/mach/system.h
which require assistance to get these into shape.
As I've already implied, I'm quite prepared to break these platforms at the next merge window for the greater good if there's no sign of maintainers willing to help sort them out - which will then ultimately result in them being deleted from mainline.
cover The remaining stuff
Hi Russell,
Quoted 35 lines · Russell King - ARM Linux
Quoted 15 lines · Russell King - ARM Linux
Part 3 - the remaining stuff
These are patches which I've managed to get half way through before getting - to be honest - totally hacked off with the code found in various platforms (as mentioned in previous mails).
These platforms are broken as a result of the final patch in part 2, and these patches move these platforms _towards_ a solution. They are not a complete solution though, but the start of the solution.
For instance, the Exynos4 and S5PV210 patches both consist of almost a full solution -but- with the new function prototype missing because there is _no_ local header file to put it in, and I'm damned well not putting it in the remote plat-samsung/include/plat headers.
Quoted 5 lines
The final set of platforms - touched neither by part 3 nor 4, are broken by the final patch in part 2, and at present I have no plans to fix them. I would welcome patches to fix these which address the issues raised in the "pet peaves" email (which is why I have no plans to fix them.)
The list of platforms which are still broken (today) by part 2 of this series are:
arch/arm/mach-davinci/include/mach/system.harch/arm/mach-gemini/include/mach/system.harch/arm/mach-nomadik/include/mach/system.harch/arm/mach-s3c2410/include/mach/system-reset.harch/arm/mach-s3c64xx/include/mach/system.harch/arm/mach-shmobile/include/mach/system.harch/arm/mach-vt8500/include/mach/system.harch/arm/plat-samsung/include/plat/system-reset.harch/arm/plat-tcc/include/mach/system.h
Quoted 6 lines
which require assistance to get these into shape.
As I've already implied, I'm quite prepared to break these platforms at the next merge window for the greater good if there's no sign of maintainers willing to help sort them out - which will then ultimately result in them being deleted from mainline.
I just sent a patch for which gets reboot working on DaVinci. I have used the arm_pm_restart hook for now. I am working on moving the arch/arm/mach-davinci/common.h (and other local headers) to mach-davinci folder but that needs updates to some drivers like USB and GPIO as well. I expect to be finished in about a weeks time.
Thanks,
Sekhar
cover The remaining stuff
In reply to Russell King - ARM LinuxQuoted 3 lines · Russell King - ARM Linux
The list of platforms which are still broken (today) by part 2 of this series are:
(...)
Quoted 1 line
arch/arm/mach-nomadik/include/mach/system.h
(...)
Quoted 2 lines
which require assistance to get these into shape.
Is this about the problem of where to place the hook for restart as described in this message?
http://marc.info/?l=linux-arm-kernel&m=132104005724249&w=2
If you apply that patch I think it's easy to fix that up, if you have some git branch I can base off I can fix it up too.
Or you can just throw it into -next so it breaks and I'll fix from there ASAP, no big deal.
Thanks,
Linus Walleij
cover The remaining stuff
Quoted 10 lines · Linus Walleij
Is this about the problem of where to place the hook for restart as described in this message?
http://marc.info/?l=linux-arm-kernel&m=132104005724249&w=2If you apply that patch I think it's easy to fix that up, if you have some git branch I can base off I can fix it up too.
Or you can just throw it into -next so it breaks and I'll fix from there ASAP, no big deal.
This is about as far as I got with Nomadik. The patch you point out above does appear to fix the problem, and if you put it in the patch system, I'll apply it to the restart-cleanup branch, and fix the patch below.
8<===
ARM: restart: nomadik: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS XXX
Hook the Nomadik NHK platform restart code into the new restart hook.
--- arch/arm/mach-nomadik/board-nhk8815.c | 1 + arch/arm/mach-nomadik/cpu-8815.c | 11 +++++++++++ arch/arm/mach-nomadik/include/mach/system.h | 9 --------- 3 files changed, 12 insertions(+), 9 deletions(-)
arch/arm/mach-nomadik/board-nhk8815.c +1 -0
@@ -282,4 +282,5 @@ MACHINE_START(NOMADIK, "NHK8815") .init_irq = cpu8815_init_irq, .timer = &nomadik_timer, .init_machine = nhk8815_platform_init, + .restart = cpu8815_restart,MACHINE_END
arch/arm/mach-nomadik/cpu-8815.c +11 -0
@@ -21,6 +21,7 @@#include <linux/device.h> #include <linux/amba/bus.h> #include <linux/platform_device.h> +#include <linux/io.h> #include <plat/gpio-nomadik.h> #include <mach/hardware.h>
@@ -164,3 +165,13 @@ void __init cpu8815_init_irq(void)#endif return ; } + +void cpu8815_restart (char mode,const char *cmd) +{ +void __iomem *src_rstsr =io_p2v (NOMADIK_SRC_BASE +0x18 ); + +/* FIXME: use egpio when implemented */ + +/* Write anything to Reset status register */ +writel (1 , src_rstsr); +}
arch/arm/mach-nomadik/include/mach/system.h +0 -9
@@ -20,9 +20,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <linux/io.h> -#include <mach/hardware.h> -static inline void arch_idle (void ) {/*
@@ -34,12 +31,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -void __iomem *src_rstsr =io_p2v (NOMADIK_SRC_BASE +0x18 ); - -/* FIXME: use egpio when implemented */ - -/* Write anything to Reset status register */ -writel (1 , src_rstsr); }#endif
Signature · 1 line
1.7.4.4
cover The remaining stuff
Quoted 3 lines · Russell King - ARM Linux
This is about as far as I got with Nomadik. ?The patch you point out above does appear to fix the problem, and if you put it in the patch system, I'll apply it to the restart-cleanup branch, and fix the patch below.
Thanks, it's in the patch tracker as 7179/1.
Yours,
Linus Walleij
cover Platform arch_reset changes
In reply to Russell King - ARM LinuxRussell,
Quoted 6 lines · Russell King - ARM Linux
Part 2. These are the platform updates, so far.
The first patch combines the individual files in mach-clps711x which contain one or two functions or data structures before changing the
arch_resetstuff.
Quoted 7 lines
The majority of the remaining patches address each group of platforms individually.
The final patch removes the resulting empty
arch_reset()functions, its call site and associated code. XXX NOTE XXX This results in anything left with anarch_reset()function having non-functional restart capability.
I was dreading the thought of having to go digging around in each platform again, so thanks for doing this. Apart from the troublesome platforms (partially addressed in your third series), is there anything else that needs looking at?
I guess I should also ask whether or not the third series is a blocker for merging the other two (given that it would leave those platforms broken).
Cheers,
Will
cover Platform arch_reset changes
Quoted 17 lines · Will Deacon
Russell,
Quoted 6 lines · Russell King - ARM Linux
Part 2. These are the platform updates, so far.
The first patch combines the individual files in mach-clps711x which contain one or two functions or data structures before changing the
arch_resetstuff.Quoted 7 lines
The majority of the remaining patches address each group of platforms individually.
The final patch removes the resulting empty
arch_reset()functions, its call site and associated code. XXX NOTE XXX This results in anything left with anarch_reset()function having non-functional restart capability.
Quoted 4 lines
I was dreading the thought of having to go digging around in each platform again, so thanks for doing this. Apart from the troublesome platforms (partially addressed in your third series), is there anything else that needs looking at?
In direct connection with this - that said, although I've build-tested a number of these (which is why I found things like the trailing , on the previous initializers - and had to rework some of the patches as a result), I've also boot tested the Versatile Express and OMAP3 but not tried a 'reboot' on them yet.
The final removal of mach/system.h depends on getting rid of the arch_idle thing. While going through these headers, I was dismayed to find these:
arch/arm/mach-s3c2410/include/mach/system.h:void (*s3c24xx_idle)(void); arch/arm/plat-mxc/include/mach/system.h:extern void (*imx_idle)(void);
when we have a perfectly good pm_idle hook already in place - so there's no excuse for these especially when other platforms are already using pm_idle to hook their platform specific idle function into. This is something that better be gone at the next merge window!
Quoted 2 lines
I guess I should also ask whether or not the third series is a blocker for merging the other two (given that it would leave those platforms broken).
That depends on your point of view.
My original plan was to see about merging the ground-work (part 1) in this merge window to avoid a dependency problem - but I think it grew too large to contemplate that (I might have a discussion with Linus in private over this, because not doing this could be quite hairy for us.)
Part 2 is fine up until the final patch - if we can get part 1 in, then the individual patches can be carried in the various maintainer trees independently. In any case, patch 41 would have to be scheduled for the end of the merge window.
As for whether patch 41 goes in with or without the remainder fixed up, that depends what kind of a mood I'm in - over the weekend I was feeling very pissed off with the state of the remaining platforms that I was seriously thinking that I'd push it in anyway at the next merge window and to hell with them. (Just like the Greece holding the eurozone to ransom, I don't want a few platforms holding the rest of the ARM tree to ransom over this change!)
I've moderated a little bit over that - but only to the extent that there's going to be something like 12 weeks for other platforms to get their act together and if they don't show willing to address the concerns, then I'm really not going to care about breaking them at the next merge window.
cover Platform arch_reset changes
Quoted 10 lines · Russell King - ARM Linux
The final removal of
mach/system.hdepends on getting rid of thearch_idlething. While going through these headers, I was dismayed to find these:arch/arm/mach-s3c2410/include/mach/system.h:void (*s3c24xx_idle)(void); arch/arm/plat-mxc/include/mach/system.h:extern void (*imx_idle)(void);
when we have a perfectly good
pm_idlehook already in place - so there's no excuse for these especially when other platforms are already usingpm_idleto hook their platform specific idle function into. This is something that better be gone at the next merge window!
I saw those too and intended to get rid of those pointers. I was just waiting for your arch_reset work to settle down before respinning my arch-idle series.
Quoted 11 lines
Quoted 2 lines
I guess I should also ask whether or not the third series is a blocker for merging the other two (given that it would leave those platforms broken).
That depends on your point of view.
My original plan was to see about merging the ground-work (part 1) in this merge window to avoid a dependency problem - but I think it grew too large to contemplate that (I might have a discussion with Linus in private over this, because not doing this could be quite hairy for us.)
Quoted 4 lines
Part 2 is fine up until the final patch - if we can get part 1 in, then the individual patches can be carried in the various maintainer trees independently. In any case, patch 41 would have to be scheduled for the end of the merge window.
I'd recommend publishing all those patches in your tree and pushing them all in the next merge window. The probability for conflicts with subarch trees is still relatively low. If conflicts are unavoidable then using your branch as a base would be the way to go. Whether platform code is then based on 3.2-rc1 or a particular branch in your tree is not much different at that point.
Quoted 7 lines
As for whether patch 41 goes in with or without the remainder fixed up, that depends what kind of a mood I'm in - over the weekend I was feeling very pissed off with the state of the remaining platforms that I was seriously thinking that I'd push it in anyway at the next merge window and to hell with them. (Just like the Greece holding the eurozone to ransom, I don't want a few platforms holding the rest of the ARM tree to ransom over this change!)
I agree with that. However, if you merge those patches (including patch
41) in your tree now, that means people have about 5 months before this change will show up in a released kernel, which should give plenty of time for interested parties to fix their problematic code. The sooner this appears in linux-next the better.
Quoted 5 lines
I've moderated a little bit over that - but only to the extent that there's going to be something like 12 weeks for other platforms to get their act together and if they don't show willing to address the concerns, then I'm really not going to care about breaking them at the next merge window.
Exactly.
Nicolas
PATCH 1/41 ARM: clps711x: consolidate irq/mm/time code into a single file
In reply to Russell King - ARM LinuxThe separate files for clps711x which contain maybe one or two data structures or functions is an inefficient use of files, and encourages further small files as other changes happen. Collapse down these into a single core.c file.
--- arch/arm/mach-clps711x/Makefile | 2 +- arch/arm/mach-clps711x/common.c | 222 +++++++++++++++++++++++++++++++++++++++ arch/arm/mach-clps711x/irq.c | 143 ------------------------- arch/arm/mach-clps711x/mm.c | 48 --------- arch/arm/mach-clps711x/time.c | 84 --------------- 5 files changed, 223 insertions(+), 276 deletions(-) create mode 100644 arch/arm/mach-clps711x/common.c delete mode 100644 arch/arm/mach-clps711x/irq.c delete mode 100644 arch/arm/mach-clps711x/mm.c delete mode 100644 arch/arm/mach-clps711x/time.c
arch/arm/mach-clps711x/Makefile +1 -1
@@ -4,7 +4,7 @@ # Object file lists. -obj-y := irq.o mm.o time.o +obj-y := common.o obj-m := obj-n := obj- :=
arch/arm/mach-clps711x/common.c new file +222 -0
222 lines not on this page · raw message
arch/arm/mach-clps711x/irq.c deleted +0 -143
143 lines not on this page · raw message
arch/arm/mach-clps711x/mm.c deleted +0 -48
48 lines not on this page · raw message
arch/arm/mach-clps711x/time.c deleted +0 -84
84 lines not on this page · raw message
Signature · 1 line
1.7.4.4
PATCH 2/41 ARM: restart: remove poodle restart handler
In reply to Russell King - ARM LinuxThe poodle restart handler was added in 74617fb6b8 (3593/1: Add reboot and shutdown handlers for Zaurus handhelds), and at that time it was necessary to deal with the RCSR register. This commit also forced all restarts to use the 'hard' restart method.
In dc38e2ad53 (pxa: Fix RCSR handling), the RCSR handling was removed, leaving just the forcing to use a 'hard' restart. As hard restarts are the default (in the absense of a reboot= command line argument), this seems pointless. In any case, Richard Purdie says:
Quoted 6 lines
From what I remember that hardware either always reboots or always halts. I think the option was therefore left hardcoded to make it clear it wasn't expected to work. Later Zaurii models could do either but required some manual poking of registers to make it happen iirc.
Regardless, you can probably clean this up as you suggest now.
So, lets remove the unnecessary interception and rely on the default restart mode.
--- arch/arm/mach-pxa/poodle.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-pxa/poodle.c +0 -6
@@ -419,17 +419,11 @@ static void poodle_poweroff(void)arm_machine_restart ('h' ,NULL ); } -static void poodle_restart (char mode,const char *cmd) -{ -arm_machine_restart ('h' , cmd); -} -static void __init poodle_init (void ) {int ret =0 ; pm_power_off = poodle_poweroff; - arm_pm_restart = poodle_restart;PCFR |=PCFR_OPDE ;
Signature · 1 line
1.7.4.4
PATCH 2/41 ARM: restart: remove poodle restart handler
Ack?
Quoted 55 lines · Russell King - ARM Linux
The poodle restart handler was added in
74617fb6b8(3593/1: Add reboot and shutdown handlers for Zaurus handhelds), and at that time it was necessary to deal with the RCSR register. This commit also forced all restarts to use the 'hard' restart method.In
dc38e2ad53(pxa: Fix RCSR handling), the RCSR handling was removed, leaving just the forcing to use a 'hard' restart. As hard restarts are the default (in the absense of a reboot= command line argument), this seems pointless. In any case, Richard Purdie says:Quoted 6 lines
From what I remember that hardware either always reboots or always halts. I think the option was therefore left hardcoded to make it clear it wasn't expected to work. Later Zaurii models could do either but required some manual poking of registers to make it happen iirc.
Regardless, you can probably clean this up as you suggest now.
So, lets remove the unnecessary interception and rely on the default restart mode.
Signed-off-by Russell King <[email protected]>--- arch/arm/mach-pxa/poodle.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)arch/arm/mach-pxa/poodle.c +0
-6@@ -419,17 +419,11 @@ static void poodle_poweroff(void)arm_machine_restart ('h' ,NULL ); } -static void poodle_restart (char mode,const char *cmd) -{ -arm_machine_restart ('h' , cmd); -} -static void __init poodle_init (void ) {int ret =0 ; pm_power_off = poodle_poweroff; - arm_pm_restart = poodle_restart;PCFR |=PCFR_OPDE ;Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 2/41 ARM: restart: remove poodle restart handler
Quoted 24 lines · Russell King - ARM Linux
Ack?
Quoted 21 lines · Russell King - ARM Linux
The poodle restart handler was added in
74617fb6b8(3593/1: Add reboot and shutdown handlers for Zaurus handhelds), and at that time it was necessary to deal with the RCSR register. This commit also forced all restarts to use the 'hard' restart method.In
dc38e2ad53(pxa: Fix RCSR handling), the RCSR handling was removed, leaving just the forcing to use a 'hard' restart. As hard restarts are the default (in the absense of a reboot= command line argument), this seems pointless. In any case, Richard Purdie says:Quoted 6 lines
From what I remember that hardware either always reboots or always halts. I think the option was therefore left hardcoded to make it clear it wasn't expected to work. Later Zaurii models could do either but required some manual poking of registers to make it happen iirc.
Regardless, you can probably clean this up as you suggest now.
So, lets remove the unnecessary interception and rely on the default restart mode.
Signed-off-by Russell King <[email protected]>
Quoted 26 lines
Quoted 26 lines
--- arch/arm/mach-pxa/poodle.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)arch/arm/mach-pxa/poodle.c +0
-6@@ -419,17 +419,11 @@ static void poodle_poweroff(void)arm_machine_restart ('h' ,NULL ); } -static void poodle_restart (char mode,const char *cmd) -{ -arm_machine_restart ('h' , cmd); -} -static void __init poodle_init (void ) {int ret =0 ; pm_power_off = poodle_poweroff; - arm_pm_restart = poodle_restart;PCFR |=PCFR_OPDE ;
PATCH 3/41 ARM: restart: remove s3c24xx restart handler
In reply to Russell King - ARM LinuxRemove the s3c24xx restart handler, which is trying to work around a chip bug by keeping caches on but flushed. As we now only disable caches when performing a soft reboot, there doesn't need to be a work-around to do that.
--- arch/arm/plat-s3c24xx/cpu.c | 23 ----------------------- 1 files changed, 0 insertions(+), 23 deletions(-)
arch/arm/plat-s3c24xx/cpu.c +0 -23
@@ -192,27 +192,6 @@ static unsigned long s3c24xx_read_idcode_v4(void)return __raw_readl (S3C2410_GSTATUS1 ); } -/* Hook for arm_pm_restart to ensure we execute the reset code -* with the caches enabled. It seems at least the S3C2440 has a problem -* resetting if there is bus activity interrupted by the reset. -*/ -static void s3c24xx_pm_restart (char mode,const char *cmd) -{ -if (mode !='s' ) { -unsigned long flags; - -local_irq_save (flags); -__cpuc_flush_kern_all (); -__cpuc_flush_user_all (); - -arch_reset (mode, cmd); -local_irq_restore (flags); - } - -/* fallback, or unhandled */ -arm_machine_restart (mode, cmd); -} -void __init s3c24xx_init_io (struct map_desc *mach_desc,int size) {/* initialise the io descriptors we need for initialisation */
@@ -226,7 +205,5 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) }s3c24xx_init_cpu (); - arm_pm_restart = s3c24xx_pm_restart; -s3c_init_cpu (samsung_cpu_id, cpu_ids,ARRAY_SIZE (cpu_ids)); }
Signature · 1 line
1.7.4.4
PATCH 3/41 ARM: restart: remove s3c24xx restart handler
Quoted 7 lines · Russell King - ARM Linux
Remove the s3c24xx restart handler, which is trying to work around a chip bug by keeping caches on but flushed. As we now only disable caches when performing a soft reboot, there doesn't need to be a work-around to do that.
Signed-off-by Russell King <[email protected]>
Thanks for removing some workaround :)
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
arch/arm/plat-s3c24xx/cpu.c void __init s3c24xx_init_io(struct map_desc
Quoted 37 lines
--- arch/arm/plat-s3c24xx/cpu.c | 23 ----------------------- 1 files changed, 0 insertions(+), 23 deletions(-)arch/arm/plat-s3c24xx/cpu.c +0
-21@@ -192,27 +192,6 @@ static unsigned long s3c24xx_read_idcode_v4(void)return __raw_readl (S3C2410_GSTATUS1 ); } -/* Hook for arm_pm_restart to ensure we execute the reset code -* with the caches enabled. It seems at least the S3C2440 has a problem -* resetting if there is bus activity interrupted by the reset. -*/ -static void s3c24xx_pm_restart (char mode,const char *cmd) -{ -if (mode !='s' ) { -unsigned long flags; - -local_irq_save (flags); -__cpuc_flush_kern_all (); -__cpuc_flush_user_all (); - -arch_reset (mode, cmd); -local_irq_restore (flags); - } - -/* fallback, or unhandled */ -arm_machine_restart (mode, cmd); -} -void __init s3c24xx_init_io (struct map_desc *mach_desc,int size) {/* initialise the io descriptors we need for initialisation */ @@ -226,7 +205,5 @@ void __init s3c24xx_init_io(struct map_desc
*mach_desc,
Quoted 10 lines
arch/arm/plat-s3c24xx/cpu.c +0
-2int size) }s3c24xx_init_cpu (); - arm_pm_restart = s3c24xx_pm_restart; -s3c_init_cpu (samsung_cpu_id, cpu_ids,ARRAY_SIZE (cpu_ids));}
--
1.7.4.4
PATCH 4/41 ARM: restart: at91: use new restart hook
In reply to Russell King - ARM LinuxRather than using a private function pointer, use the existing arm_pm_restart function pointer instead. We no longer need to enable the I-cache in at91sam9_alt_reset() as the caches will now be on when this function is called.
Update the function names to use the 'restart' terminology rather than the 'reboot' terminology.
--- arch/arm/mach-at91/at91cap9.c | 4 ++-- arch/arm/mach-at91/at91rm9200.c | 4 ++-- arch/arm/mach-at91/at91sam9260.c | 2 +- arch/arm/mach-at91/at91sam9261.c | 2 +- arch/arm/mach-at91/at91sam9263.c | 2 +- arch/arm/mach-at91/at91sam9_alt_reset.S | 9 ++------- arch/arm/mach-at91/at91sam9g45.c | 4 ++-- arch/arm/mach-at91/at91sam9rl.c | 2 +- arch/arm/mach-at91/generic.h | 3 +-- arch/arm/mach-at91/include/mach/system.h | 5 ----- 10 files changed, 13 insertions(+), 24 deletions(-)
arch/arm/mach-at91/at91cap9.c +2 -2
@@ -313,7 +313,7 @@ static struct at91_gpio_bank at91cap9_gpio[] = { } }; -static void at91cap9_reset (void ) +static void at91cap9_restart (char mode,const char *cmd) {at91_sys_write (AT91_RSTC_CR ,AT91_RSTC_KEY |AT91_RSTC_PROCRST |AT91_RSTC_PERRST ); }
@@ -335,7 +335,7 @@ static void __init at91cap9_map_io(void)static void __init at91cap9_initialize (void ) { - at91_arch_reset = at91cap9_reset; + arm_pm_restart = at91cap9_restart; pm_power_off = at91cap9_poweroff; at91_extern_irq = (1 <<AT91CAP9_ID_IRQ0 ) | (1 <<AT91CAP9_ID_IRQ1 );
arch/arm/mach-at91/at91rm9200.c +2 -2
@@ -288,7 +288,7 @@ static struct at91_gpio_bank at91rm9200_gpio[] = { } }; -static void at91rm9200_reset (void ) +static void at91rm9200_restart (char mode,const char *cmd) {/* * Perform a hardware reset with the use of the Watchdog timer.
@@ -309,7 +309,7 @@ static void __init at91rm9200_map_io(void)static void __init at91rm9200_initialize (void ) { - at91_arch_reset = at91rm9200_reset; + arm_pm_restart = at91rm9200_restart; at91_extern_irq = (1 <<AT91RM9200_ID_IRQ0 ) | (1 <<AT91RM9200_ID_IRQ1 ) | (1 <<AT91RM9200_ID_IRQ2 ) | (1 <<AT91RM9200_ID_IRQ3 ) | (1 <<AT91RM9200_ID_IRQ4 ) | (1 <<AT91RM9200_ID_IRQ5 )
arch/arm/mach-at91/at91sam9260.c +1 -1
@@ -327,7 +327,7 @@ static void __init at91sam9260_map_io(void)static void __init at91sam9260_initialize (void ) { - at91_arch_reset = at91sam9_alt_reset; + arm_pm_restart = at91sam9_alt_restart; pm_power_off = at91sam9260_poweroff; at91_extern_irq = (1 <<AT91SAM9260_ID_IRQ0 ) | (1 <<AT91SAM9260_ID_IRQ1 ) | (1 <<AT91SAM9260_ID_IRQ2 );
arch/arm/mach-at91/at91sam9261.c +1 -1
@@ -287,7 +287,7 @@ static void __init at91sam9261_map_io(void)static void __init at91sam9261_initialize (void ) { - at91_arch_reset = at91sam9_alt_reset; + arm_pm_restart = at91sam9_alt_restart; pm_power_off = at91sam9261_poweroff; at91_extern_irq = (1 <<AT91SAM9261_ID_IRQ0 ) | (1 <<AT91SAM9261_ID_IRQ1 ) | (1 <<AT91SAM9261_ID_IRQ2 );
arch/arm/mach-at91/at91sam9263.c +1 -1
@@ -305,7 +305,7 @@ static void __init at91sam9263_map_io(void)static void __init at91sam9263_initialize (void ) { - at91_arch_reset = at91sam9_alt_reset; + arm_pm_restart = at91sam9_alt_restart; pm_power_off = at91sam9263_poweroff; at91_extern_irq = (1 <<AT91SAM9263_ID_IRQ0 ) | (1 <<AT91SAM9263_ID_IRQ1 );
arch/arm/mach-at91/at91sam9_alt_reset.S +2 -7
@@ -14,20 +14,15 @@ */ #include <linux/linkage.h> -#include <asm/system.h> #include <mach/hardware.h> #include <mach/at91sam9_sdramc.h> #include <mach/at91_rstc.h> .arm - .globl at91sam9_alt_reset + .globl at91sam9_alt_restart -at91sam9_alt_reset: mrc p15, 0, r0, c1, c0, 0 - orr r0, r0, #CR_I - mcr p15, 0, r0, c1, c0, 0 @ enable I-cache - - ldr r0, .at91_va_base_sdramc @ preload constants +at91sam9_alt_restart: ldr r0, .at91_va_base_sdramc @ preload constants ldr r1, .at91_va_base_rstc_cr mov r2, #1
arch/arm/mach-at91/at91sam9g45.c +2 -2
@@ -317,7 +317,7 @@ static struct at91_gpio_bank at91sam9g45_gpio[] = { } }; -static void at91sam9g45_reset (void ) +static void at91sam9g45_restart (char mode,const char *cmd) {at91_sys_write (AT91_RSTC_CR ,AT91_RSTC_KEY |AT91_RSTC_PROCRST |AT91_RSTC_PERRST ); }
@@ -340,7 +340,7 @@ static void __init at91sam9g45_map_io(void)static void __init at91sam9g45_initialize (void ) { - at91_arch_reset = at91sam9g45_reset; + arm_pm_restart = at91sam9g45_restart; pm_power_off = at91sam9g45_poweroff; at91_extern_irq = (1 <<AT91SAM9G45_ID_IRQ0 );
arch/arm/mach-at91/at91sam9rl.c +1 -1
@@ -292,7 +292,7 @@ static void __init at91sam9rl_map_io(void)static void __init at91sam9rl_initialize (void ) { - at91_arch_reset = at91sam9_alt_reset; + arm_pm_restart = at91sam9_alt_restart; pm_power_off = at91sam9rl_poweroff; at91_extern_irq = (1 <<AT91SAM9RL_ID_IRQ0 );
arch/arm/mach-at91/generic.h +1 -2
@@ -57,7 +57,7 @@ extern void at91_irq_suspend(void);extern void at91_irq_resume (void );/* reset */ -extern void at91sam9_alt_reset (void ); +extern void at91sam9_alt_restart (char ,const char *);/* GPIO */ #define AT91RM9200_PQFP 3/* AT91RM9200 PQFP package has 3 banks */
@@ -71,5 +71,4 @@ struct at91_gpio_bank {extern void __init at91_gpio_init (struct at91_gpio_bank *,int nr_banks);extern void __init at91_gpio_irq_setup (void ); -extern void (*at91_arch_reset)(void );extern int at91_extern_irq;
arch/arm/mach-at91/include/mach/system.h +0 -5
@@ -47,13 +47,8 @@ static inline void arch_idle(void) #endif } -void (*at91_arch_reset)(void ); -static inline void arch_reset (char mode,const char *cmd) { -/* call the CPU-specific reset function */ -if (at91_arch_reset) - (at91_arch_reset)(); }#endif
Signature · 1 line
1.7.4.4
PATCH 4/41 ARM: restart: at91: use new restart hook
Quoted 10 lines · Russell King - ARM Linux
Rather than using a private function pointer, use the existing
arm_pm_restartfunction pointer instead. We no longer need to enable the I-cache inat91sam9_alt_reset()as the caches will now be on when this function is called.Update the function names to use the 'restart' terminology rather than the 'reboot' terminology.
Signed-off-by Russell King <[email protected]>---
I'll appply this one via at91-treee as I've patch that touch this part too in the queue if you do'nt mind
Best Regsards,
J.
PATCH 4/41 ARM: restart: at91: use new restart hook
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines · Russell King - ARM Linux
Rather than using a private function pointer, use the existing
arm_pm_restartfunction pointer instead. We no longer need to enable the I-cache inat91sam9_alt_reset()as the caches will now be on when this function is called.
Quoted 7 lines
Quoted 5 lines
Update the function names to use the 'restart' terminology rather than the 'reboot' terminology.
Signed-off-by Russell King <[email protected]>---
I'll appply this one via at91-treee as I've patch that touch this part too in the queue if you do'nt mind
Which will break my patch queue. As I said to Tony, I'm looking to stabilize this in about a week and a half's time, at which point you'll be able to pull these changes into your tree.
PATCH 4/41 ARM: restart: at91: use new restart hook
Quoted 10 lines · Russell King - ARM Linux
Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 8 lines · Russell King - ARM Linux
Rather than using a private function pointer, use the existing
arm_pm_restartfunction pointer instead. We no longer need to enable the I-cache inat91sam9_alt_reset()as the caches will now be on when this function is called.Update the function names to use the 'restart' terminology rather than the 'reboot' terminology.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Russell King <[email protected]>---
I'll appply this one via at91-treee as I've patch that touch this part too in the queue if you do'nt mind
Which will break my patch queue. As I said to Tony, I'm looking to stabilize this in about a week and a half's time, at which point you'll be able to pull these changes into your tree.
so let do the invert mine is stable will go to the next today
Best Regards,
J.
PATCH 5/41 ARM: restart: clps711x: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-clps711x/autcpu12.c | 1 + arch/arm/mach-clps711x/cdb89712.c | 1 + arch/arm/mach-clps711x/ceiva.c | 1 + arch/arm/mach-clps711x/clep7312.c | 1 + arch/arm/mach-clps711x/common.c | 5 +++++ arch/arm/mach-clps711x/edb7211-arch.c | 1 + arch/arm/mach-clps711x/fortunet.c | 1 + arch/arm/mach-clps711x/include/mach/system.h | 1 - arch/arm/mach-clps711x/p720t.c | 1 + 9 files changed, 12 insertions(+), 1 deletions(-)
arch/arm/mach-clps711x/autcpu12.c +1 -0
@@ -68,5 +68,6 @@ MACHINE_START(AUTCPU12, "autronix autcpu12") .map_io = autcpu12_map_io, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .restart = clps711x_restart,MACHINE_END
arch/arm/mach-clps711x/cdb89712.c +1 -0
@@ -59,4 +59,5 @@ MACHINE_START(CDB89712, "Cirrus-CDB89712") .map_io = cdb89712_map_io, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .restart = clps711x_restart,MACHINE_END
arch/arm/mach-clps711x/ceiva.c +1 -0
@@ -60,4 +60,5 @@ MACHINE_START(CEIVA, "CEIVA/Polaroid Photo MAX Digital Picture Frame") .map_io = ceiva_map_io, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .restart = clps711x_restart,MACHINE_END
arch/arm/mach-clps711x/clep7312.c +1 -0
@@ -41,5 +41,6 @@ MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") .map_io = clps711x_map_io, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .restart = clps711x_restart,MACHINE_END
arch/arm/mach-clps711x/common.c +5 -0
@@ -220,3 +220,8 @@ struct sys_timer clps711x_timer = { .init = clps711x_timer_init, .offset = clps711x_gettimeoffset, }; + +void clps711x_restart (char mode,const char *cmd) +{ +soft_restart (0 ); +}
arch/arm/mach-clps711x/edb7211-arch.c +1 -0
@@ -62,4 +62,5 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") .reserve = edb7211_reserve, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .restart = clps711x_restart,MACHINE_END
arch/arm/mach-clps711x/fortunet.c +1 -0
@@ -78,4 +78,5 @@ MACHINE_START(FORTUNET, "ARM-FortuNet") .map_io = clps711x_map_io, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .restart = clps711x_restart,MACHINE_END
arch/arm/mach-clps711x/include/mach/system.h +0 -1
@@ -34,7 +34,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -soft_restart (0 ); }#endif
arch/arm/mach-clps711x/p720t.c +1 -0
@@ -93,6 +93,7 @@ MACHINE_START(P720T, "ARM-Prospector720T") .map_io = p720t_map_io, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .restart = clps711x_restart,MACHINE_END static int p720t_hw_init(void)
Signature · 1 line
1.7.4.4
PATCH 6/41 ARM: restart: cns3xxx: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-cns3xxx/cns3420vb.c | 1 + arch/arm/mach-cns3xxx/core.h | 1 + arch/arm/mach-cns3xxx/include/mach/system.h | 5 +++-- arch/arm/mach-cns3xxx/pm.c | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/mach-cns3xxx/cns3420vb.c +1 -0
@@ -202,4 +202,5 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board") .init_irq = cns3xxx_init_irq, .timer = &cns3xxx_timer, .init_machine = cns3420_init, + .restart = cns3xxx_restart,MACHINE_END
arch/arm/mach-cns3xxx/core.h +1 -0
@@ -22,5 +22,6 @@ static inline void cns3xxx_l2x0_init(void) {}void __init cns3xxx_map_io (void );void __init cns3xxx_init_irq (void );void cns3xxx_power_off (void ); +void cns3xxx_restart (char ,const char *);#endif /* __CNS3XXX_CORE_H */
arch/arm/mach-cns3xxx/include/mach/system.h +3 -2
@@ -11,7 +11,6 @@#ifndef __MACH_SYSTEM_H#define __MACH_SYSTEM_H -#include <linux/io.h> #include <asm/proc-fns.h> static inline void arch_idle (void )
@@ -23,6 +22,8 @@ static inline void arch_idle(void) cpu_do_idle(); } -void arch_reset (char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif
arch/arm/mach-cns3xxx/pm.c +1 -1
@@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block) }EXPORT_SYMBOL (cns3xxx_pwr_soft_rst); -void arch_reset (char mode,const char *cmd) +void cns3xxx_restart (char mode,const char *cmd) {/* * To reset, we hit the on-board reset register
Signature · 1 line
1.7.4.4
PATCH 6/41 ARM: restart: cns3xxx: use new restart hook
Ack?
Quoted 75 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-cns3xxx/cns3420vb.c | 1 + arch/arm/mach-cns3xxx/core.h | 1 + arch/arm/mach-cns3xxx/include/mach/system.h | 5 +++-- arch/arm/mach-cns3xxx/pm.c | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-)arch/arm/mach-cns3xxx/cns3420vb.c +1
-0@@ -202,4 +202,5 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board") .init_irq = cns3xxx_init_irq, .timer = &cns3xxx_timer, .init_machine = cns3420_init, + .restart = cns3xxx_restart,MACHINE_END arch/arm/mach-cns3xxx/core.h +1
-0@@ -22,5 +22,6 @@ static inline void cns3xxx_l2x0_init(void) {}void __init cns3xxx_map_io (void );void __init cns3xxx_init_irq (void );void cns3xxx_power_off (void ); +void cns3xxx_restart (char ,const char *);#endif /* __CNS3XXX_CORE_H */ arch/arm/mach-cns3xxx/include/mach/system.h +3
-2@@ -11,7 +11,6 @@#ifndef __MACH_SYSTEM_H#define __MACH_SYSTEM_H -#include <linux/io.h> #include <asm/proc-fns.h> static inline void arch_idle (void )@@ -23,6 +22,8 @@ static inline void arch_idle(void) cpu_do_idle(); } -void arch_reset (char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif arch/arm/mach-cns3xxx/pm.c +1
-1@@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block) }EXPORT_SYMBOL (cns3xxx_pwr_soft_rst); -void arch_reset (char mode,const char *cmd) +void cns3xxx_restart (char mode,const char *cmd) {/* * To reset, we hit the on-board reset register Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 6/41 ARM: restart: cns3xxx: use new restart hook
Quoted 1 line · Russell King - ARM Linux
Ack?
Sure, except that pm.c now needs to include core.h (or the prototype has to be added to pm.h). Otherwise I'm getting the following warning:
CHECK arch/arm/mach-cns3xxx/pm.c
arch/arm/mach-cns3xxx/pm.c:92:6: warning: symbol 'cns3xxx_restart' was not declared. Should it be static?
Following hunk helps:
arch/arm/mach-cns3xxx/pm.c +1 -0
@@ -14,6 +14,7 @@#include <mach/system.h> #include <mach/cns3xxx.h> #include <mach/pm.h> +#include "core.h" void cns3xxx_pwr_clk_en (unsigned int block) {
Other than that,
Thanks!
Signature · 2 lines
Anton Vorontsov Email: cbouatmailru at gmail.com
PATCH 7/41 ARM: restart: dove: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-dove/cm-a510.c | 1 + arch/arm/mach-dove/common.c | 16 ++++++++++++++++ arch/arm/mach-dove/common.h | 1 + arch/arm/mach-dove/dove-db-setup.c | 1 + arch/arm/mach-dove/include/mach/system.h | 14 -------------- 5 files changed, 19 insertions(+), 14 deletions(-)
arch/arm/mach-dove/cm-a510.c +1 -0
@@ -93,4 +93,5 @@ MACHINE_START(CM_A510, "Compulab CM-A510 Board") .init_early = dove_init_early, .init_irq = dove_init_irq, .timer = &dove_timer, + .restart = dove_restart,MACHINE_END
arch/arm/mach-dove/common.c +16 -0
@@ -292,3 +292,19 @@ void __init dove_init(void)dove_xor0_init ();dove_xor1_init (); } + +void dove_restart (char mode,const char *cmd) +{ +/* +* Enable soft reset to assert RSTOUTn. +*/ +writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); + +/* +* Assert soft reset. +*/ +writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); + +while (1 ) + ; +}
arch/arm/mach-dove/common.h +1 -0
@@ -39,5 +39,6 @@ void dove_spi1_init(void);void dove_i2c_init (void );void dove_sdio0_init (void );void dove_sdio1_init (void ); +void dove_restart (char ,const char *);#endif
arch/arm/mach-dove/dove-db-setup.c +1 -0
@@ -100,4 +100,5 @@ MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board") .init_early = dove_init_early, .init_irq = dove_init_irq, .timer = &dove_timer, + .restart = dove_restart,MACHINE_END
arch/arm/mach-dove/include/mach/system.h +0 -14
@@ -9,8 +9,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/bridge-regs.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -18,18 +16,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Enable soft reset to assert RSTOUTn. -*/ -writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); - -/* -* Assert soft reset. -*/ -writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); - -while (1 ) - ; }
Signature · 1 line
1.7.4.4
PATCH 7/41 ARM: restart: dove: use new restart hook
Quoted 4 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>
Quoted 104 lines
--- arch/arm/mach-dove/cm-a510.c | 1 + arch/arm/mach-dove/common.c | 16 ++++++++++++++++ arch/arm/mach-dove/common.h | 1 + arch/arm/mach-dove/dove-db-setup.c | 1 + arch/arm/mach-dove/include/mach/system.h | 14 -------------- 5 files changed, 19 insertions(+), 14 deletions(-)arch/arm/mach-dove/cm-a510.c +1
-0@@ -93,4 +93,5 @@ MACHINE_START(CM_A510, "Compulab CM-A510 Board") .init_early = dove_init_early, .init_irq = dove_init_irq, .timer = &dove_timer, + .restart = dove_restart,MACHINE_END arch/arm/mach-dove/common.c +16
-0@@ -292,3 +292,19 @@ void __init dove_init(void)dove_xor0_init ();dove_xor1_init (); } + +void dove_restart (char mode,const char *cmd) +{ +/* +* Enable soft reset to assert RSTOUTn. +*/ +writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); + +/* +* Assert soft reset. +*/ +writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); + +while (1 ) + ; +}arch/arm/mach-dove/common.h +1
-0@@ -39,5 +39,6 @@ void dove_spi1_init(void);void dove_i2c_init (void );void dove_sdio0_init (void );void dove_sdio1_init (void ); +void dove_restart (char ,const char *);#endif arch/arm/mach-dove/dove-db-setup.c +1
-0@@ -100,4 +100,5 @@ MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board") .init_early = dove_init_early, .init_irq = dove_init_irq, .timer = &dove_timer, + .restart = dove_restart,MACHINE_END arch/arm/mach-dove/include/mach/system.h +0
-14@@ -9,8 +9,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/bridge-regs.h> -static inline void arch_idle (void ) {cpu_do_idle ();@@ -18,18 +16,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Enable soft reset to assert RSTOUTn. -*/ -writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); - -/* -* Assert soft reset. -*/ -writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); - -while (1 ) - ; }Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 8/41 ARM: restart: ebsa110: use new restart hook
In reply to Russell King - ARM LinuxHook the EBSA110 platform restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-ebsa110/core.c | 6 ++++++ arch/arm/mach-ebsa110/include/mach/system.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletions(-)
arch/arm/mach-ebsa110/core.c +6 -0
@@ -278,6 +278,11 @@ static int __init ebsa110_init(void)arch_initcall (ebsa110_init); +static void ebsa110_restart (char mode,const char *cmd) +{ +soft_restart (0x80000000 ); +} +MACHINE_START (EBSA110 ,"EBSA110" )/* Maintainer: Russell King */ .atag_offset = 0x400,
@@ -287,4 +292,5 @@ MACHINE_START(EBSA110, "EBSA110") .map_io = ebsa110_map_io, .init_irq = ebsa110_init_irq, .timer = &ebsa110_timer, + .restart = ebsa110_restart,MACHINE_END
arch/arm/mach-ebsa110/include/mach/system.h +3 -1
@@ -34,6 +34,8 @@ static inline void arch_idle(void) asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc"); } -#define arch_reset (mode, cmd) soft_restart(0x80000000) +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif
Signature · 1 line
1.7.4.4
PATCH 9/41 ARM: restart: ep93xx: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-ep93xx/adssphere.c | 1 + arch/arm/mach-ep93xx/core.c | 12 ++++++++++++ arch/arm/mach-ep93xx/edb93xx.c | 8 ++++++++ arch/arm/mach-ep93xx/gesbc9312.c | 1 + arch/arm/mach-ep93xx/include/mach/platform.h | 2 ++ arch/arm/mach-ep93xx/include/mach/system.h | 11 ----------- arch/arm/mach-ep93xx/micro9.c | 4 ++++ arch/arm/mach-ep93xx/simone.c | 1 + arch/arm/mach-ep93xx/snappercl15.c | 1 + arch/arm/mach-ep93xx/ts72xx.c | 1 + arch/arm/mach-ep93xx/vision_ep9307.c | 1 + 11 files changed, 32 insertions(+), 11 deletions(-)
arch/arm/mach-ep93xx/adssphere.c +1 -0
@@ -38,4 +38,5 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = adssphere_init_machine, + .restart = ep93xx_restart,MACHINE_END
arch/arm/mach-ep93xx/core.c +12 -0
@@ -905,3 +905,15 @@ void __init ep93xx_init_devices(void)platform_device_register (&ep93xx_ohci_device);platform_device_register (&ep93xx_leds); } + +void ep93xx_restart (char mode,const char *cmd) +{ +/* +* Set then clear the SWRST bit to initiate a software reset +*/ +ep93xx_devcfg_set_bits (EP93XX_SYSCON_DEVCFG_SWRST ); +ep93xx_devcfg_clear_bits (EP93XX_SYSCON_DEVCFG_SWRST ); + +while (1 ) + ; +}
arch/arm/mach-ep93xx/edb93xx.c +8 -0
@@ -252,6 +252,7 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = edb93xx_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -263,6 +264,7 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = edb93xx_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -274,6 +276,7 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = edb93xx_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -285,6 +288,7 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = edb93xx_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -296,6 +300,7 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = edb93xx_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -307,6 +312,7 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = edb93xx_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -318,6 +324,7 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = edb93xx_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -329,5 +336,6 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = edb93xx_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
arch/arm/mach-ep93xx/gesbc9312.c +1 -0
@@ -38,4 +38,5 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = gesbc9312_init_machine, + .restart = ep93xx_restart,MACHINE_END
arch/arm/mach-ep93xx/include/mach/platform.h +2 -0
@@ -66,4 +66,6 @@ void ep93xx_register_ac97(void);void ep93xx_init_devices (void );extern struct sys_timer ep93xx_timer; +void ep93xx_restart (char ,const char *); +#endif
arch/arm/mach-ep93xx/include/mach/system.h +0 -11
@@ -1,9 +1,6 @@/* * arch/arm/mach-ep93xx/include/mach/system.h */ - -#include <mach/hardware.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -11,12 +8,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Set then clear the SWRST bit to initiate a software reset -*/ -ep93xx_devcfg_set_bits (EP93XX_SYSCON_DEVCFG_SWRST ); -ep93xx_devcfg_clear_bits (EP93XX_SYSCON_DEVCFG_SWRST ); - -while (1 ) - ; }
arch/arm/mach-ep93xx/micro9.c +4 -0
@@ -82,6 +82,7 @@ MACHINE_START(MICRO9, "Contec Micro9-High") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = micro9_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -93,6 +94,7 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = micro9_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -104,6 +106,7 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = micro9_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
@@ -115,5 +118,6 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = micro9_init_machine, + .restart = ep93xx_restart, MACHINE_END#endif
arch/arm/mach-ep93xx/simone.c +1 -0
@@ -82,4 +82,5 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = simone_init_machine, + .restart = ep93xx_restart,MACHINE_END
arch/arm/mach-ep93xx/snappercl15.c +1 -0
@@ -179,4 +179,5 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = snappercl15_init_machine, + .restart = ep93xx_restart,MACHINE_END
arch/arm/mach-ep93xx/ts72xx.c +1 -0
@@ -262,4 +262,5 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = ts72xx_init_machine, + .restart = ep93xx_restart,MACHINE_END
arch/arm/mach-ep93xx/vision_ep9307.c +1 -0
@@ -361,4 +361,5 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307") .init_irq = ep93xx_init_irq, .timer = &ep93xx_timer, .init_machine = vision_init_machine, + .restart = ep93xx_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 9/41 ARM: restart: ep93xx: use new restart hook
Quoted 5 lines · Russell King
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>
Quoted 13 lines
--- arch/arm/mach-ep93xx/adssphere.c | 1 + arch/arm/mach-ep93xx/core.c | 12 ++++++++++++ arch/arm/mach-ep93xx/edb93xx.c | 8 ++++++++ arch/arm/mach-ep93xx/gesbc9312.c | 1 + arch/arm/mach-ep93xx/include/mach/platform.h | 2 ++ arch/arm/mach-ep93xx/include/mach/system.h | 11 ----------- arch/arm/mach-ep93xx/micro9.c | 4 ++++ arch/arm/mach-ep93xx/simone.c | 1 + arch/arm/mach-ep93xx/snappercl15.c | 1 + arch/arm/mach-ep93xx/ts72xx.c | 1 + arch/arm/mach-ep93xx/vision_ep9307.c | 1 + 11 files changed, 32 insertions(+), 11 deletions(-)
Thanks!
PATCH 10/41 ARM: restart: footbridge: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-footbridge/cats-hw.c | 1 + arch/arm/mach-footbridge/common.c | 27 ++++++++++++ arch/arm/mach-footbridge/common.h | 1 + arch/arm/mach-footbridge/ebsa285.c | 1 + arch/arm/mach-footbridge/include/mach/system.h | 52 ------------------------ arch/arm/mach-footbridge/netwinder-hw.c | 27 ++++++++++++ arch/arm/mach-footbridge/personal.c | 1 + 7 files changed, 58 insertions(+), 52 deletions(-)
arch/arm/mach-footbridge/cats-hw.c +1 -0
@@ -91,4 +91,5 @@ MACHINE_START(CATS, "Chalice-CATS") .map_io = footbridge_map_io, .init_irq = footbridge_init_irq, .timer = &isa_timer, + .restart = footbridge_restart,MACHINE_END
arch/arm/mach-footbridge/common.c +27 -0
@@ -199,6 +199,33 @@ void __init footbridge_map_io(void)iotable_init (ebsa285_host_io_desc,ARRAY_SIZE (ebsa285_host_io_desc)); } +void footbridge_restart (char mode,const char *cmd) +{ +if (mode =='s' ) { +/* Jump into the ROM */ +soft_restart (0x41000000 ); + }else { +/* +* Force the watchdog to do a CPU reset. +* +* After making sure that the watchdog is disabled +* (so we can change the timer registers) we first +* enable the timer to autoreload itself. Next, the +* timer interval is set really short and any +* current interrupt request is cleared (so we can +* see an edge transition). Finally, TIMER4 is +* enabled as the watchdog. +*/ + *CSR_SA110_CNTL &= ~(1 <<13 ); + *CSR_TIMER4_CNTL =TIMER_CNTL_ENABLE | +TIMER_CNTL_AUTORELOAD | +TIMER_CNTL_DIV16 ; + *CSR_TIMER4_LOAD =0x2 ; + *CSR_TIMER4_CLR =0 ; + *CSR_SA110_CNTL |= (1 <<13 ); + } +} +#ifdef CONFIG_FOOTBRIDGE_ADDIN static inline unsigned long fb_bus_sdram_offset (void )
arch/arm/mach-footbridge/common.h +1 -0
@@ -8,3 +8,4 @@ extern void footbridge_map_io(void);extern void footbridge_init_irq (void );extern void isa_init_irq (unsigned int irq); +extern void footbridge_restart (char ,const char *);
arch/arm/mach-footbridge/ebsa285.c +1 -0
@@ -21,5 +21,6 @@ MACHINE_START(EBSA285, "EBSA285") .map_io = footbridge_map_io, .init_irq = footbridge_init_irq, .timer = &footbridge_timer, + .restart = footbridge_restart,MACHINE_END
arch/arm/mach-footbridge/include/mach/system.h +0 -52
62 lines not on this page · raw message
arch/arm/mach-footbridge/netwinder-hw.c +27 -0
@@ -645,6 +645,32 @@ fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi)#endif } +static void netwinder_restart (char mode,const char *cmd) +{ +if (mode =='s' ) { +/* Jump into the ROM */ +soft_restart (0x41000000 ); + }else { +local_irq_disable (); +local_fiq_disable (); + +/* open up the SuperIO chip */ +outb (0x87 ,0x370 ); +outb (0x87 ,0x370 ); + +/* aux function group 1 (logical device 7) */ +outb (0x07 ,0x370 ); +outb (0x07 ,0x371 ); + +/* set GP16 for WD-TIMER output */ +outb (0xe6 ,0x370 ); +outb (0x00 ,0x371 ); + +/* set a RED LED and toggle WD_TIMER for rebooting */ +outb (0xc4 ,0x338 ); + } +} +MACHINE_START (NETWINDER ,"Rebel-NetWinder" )/* Maintainer: Russell King/Rebel.com */ .atag_offset = 0x100,
@@ -656,4 +682,5 @@ MACHINE_START(NETWINDER, "Rebel-NetWinder") .map_io = footbridge_map_io, .init_irq = footbridge_init_irq, .timer = &isa_timer, + .restart = netwinder_restart,MACHINE_END
arch/arm/mach-footbridge/personal.c +1 -0
@@ -19,5 +19,6 @@ MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer") .map_io = footbridge_map_io, .init_irq = footbridge_init_irq, .timer = &footbridge_timer, + .restart = footbridge_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 11/41 ARM: restart: h720x: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-h720x/common.c | 5 +++++ arch/arm/mach-h720x/common.h | 1 + arch/arm/mach-h720x/h7201-eval.c | 1 + arch/arm/mach-h720x/h7202-eval.c | 1 + arch/arm/mach-h720x/include/mach/system.h | 4 +--- 5 files changed, 9 insertions(+), 3 deletions(-)
arch/arm/mach-h720x/common.c +5 -0
@@ -242,3 +242,8 @@ void __init h720x_map_io(void) {iotable_init (h720x_io_desc,ARRAY_SIZE (h720x_io_desc)); } + +void h720x_restart (char mode,const char *cmd) +{ +CPU_REG (PMU_BASE ,PMU_STAT ) |=PMU_WARMRESET ; +}
arch/arm/mach-h720x/common.h +1 -0
@@ -16,6 +16,7 @@extern unsigned long h720x_gettimeoffset (void );extern void __init h720x_init_irq (void );extern void __init h720x_map_io (void ); +extern void h720x_restart (char ,const char *);#ifdef CONFIG_ARCH_H7202 extern struct sys_timer h7202_timer;
arch/arm/mach-h720x/h7201-eval.c +1 -0
@@ -34,4 +34,5 @@ MACHINE_START(H7201, "Hynix GMS30C7201") .init_irq = h720x_init_irq, .timer = &h7201_timer, .dma_zone_size = SZ_256M, + .restart = h720x_restart,MACHINE_END
arch/arm/mach-h720x/h7202-eval.c +1 -0
@@ -77,4 +77,5 @@ MACHINE_START(H7202, "Hynix HMS30C7202") .timer = &h7202_timer, .init_machine = init_eval_h7202, .dma_zone_size = SZ_256M, + .restart = h720x_restart,MACHINE_END
arch/arm/mach-h720x/include/mach/system.h +1 -3
@@ -24,10 +24,8 @@ static void arch_idle(void) nop(); } - -static __inline__void arch_reset (char mode,const char *cmd) +static inline void arch_reset (char mode,const char *cmd) { -CPU_REG (PMU_BASE ,PMU_STAT ) |=PMU_WARMRESET ; }#endif
Signature · 1 line
1.7.4.4
PATCH 12/41 ARM: restart: highbank: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-highbank/core.h | 1 + arch/arm/mach-highbank/highbank.c | 1 + arch/arm/mach-highbank/include/mach/system.h | 4 +++- arch/arm/mach-highbank/system.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/mach-highbank/core.h +1 -0
@@ -1,5 +1,6 @@extern void highbank_set_cpu_jump (int cpu,void *jump_addr);extern void highbank_clocks_init (void ); +extern void highbank_restart (char ,const char *);extern void __iomem *scu_base_addr;#ifdef CONFIG_DEBUG_HIGHBANK_UART extern void highbank_lluart_map_io (void );
arch/arm/mach-highbank/highbank.c +1 -0
@@ -142,4 +142,5 @@ DT_MACHINE_START(HIGHBANK, "Highbank") .timer = &highbank_timer, .init_machine = highbank_init, .dt_compat = highbank_match, + .restart = highbank_restart,MACHINE_END
arch/arm/mach-highbank/include/mach/system.h +3 -1
@@ -21,6 +21,8 @@ static inline void arch_idle(void) cpu_do_idle(); } -extern void arch_reset (char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif
arch/arm/mach-highbank/system.c +1 -1
@@ -20,7 +20,7 @@#include "core.h" #include "sysregs.h" -void arch_reset (char mode,const char *cmd) +void highbank_restart (char mode,const char *cmd) {if (mode =='h' )hignbank_set_pwr_hard_reset ();
Signature · 1 line
1.7.4.4
PATCH 12/41 ARM: restart: highbank: use new restart hook
Quoted 11 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-highbank/core.h | 1 + arch/arm/mach-highbank/highbank.c | 1 + arch/arm/mach-highbank/include/mach/system.h | 4 +++- arch/arm/mach-highbank/system.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-)
Rob
Quoted 48 lines
arch/arm/mach-highbank/core.h +1
-0@@ -1,5 +1,6 @@extern void highbank_set_cpu_jump (int cpu,void *jump_addr);extern void highbank_clocks_init (void ); +extern void highbank_restart (char ,const char *);extern void __iomem *scu_base_addr;#ifdef CONFIG_DEBUG_HIGHBANK_UART extern void highbank_lluart_map_io (void );arch/arm/mach-highbank/highbank.c +1
-0@@ -142,4 +142,5 @@ DT_MACHINE_START(HIGHBANK, "Highbank") .timer = &highbank_timer, .init_machine = highbank_init, .dt_compat = highbank_match, + .restart = highbank_restart,MACHINE_END arch/arm/mach-highbank/include/mach/system.h +3
-1@@ -21,6 +21,8 @@ static inline void arch_idle(void) cpu_do_idle(); } -extern void arch_reset (char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif arch/arm/mach-highbank/system.c +1
-1@@ -20,7 +20,7 @@#include "core.h" #include "sysregs.h" -void arch_reset (char mode,const char *cmd) +void highbank_restart (char mode,const char *cmd) {if (mode =='h' )hignbank_set_pwr_hard_reset ();
PATCH 13/41 ARM: restart: integrator: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-integrator/common.h | 1 + arch/arm/mach-integrator/core.c | 8 ++++++++ arch/arm/mach-integrator/include/mach/system.h | 7 ------- arch/arm/mach-integrator/integrator_ap.c | 1 + arch/arm/mach-integrator/integrator_cp.c | 1 + 5 files changed, 11 insertions(+), 7 deletions(-)
arch/arm/mach-integrator/common.h +1 -0
@@ -1,2 +1,3 @@void integrator_init_early (void );void integrator_reserve (void ); +void integrator_restart (char ,const char *);
arch/arm/mach-integrator/core.c +8 -0
@@ -238,3 +238,11 @@ void __init integrator_reserve(void) {memblock_reserve (PHYS_OFFSET ,__pa (swapper_pg_dir) -PHYS_OFFSET ); } + +/* +* To reset, we hit the on-board reset register in the system FPGA +*/ +void integrator_restart (char mode,const char *cmd) +{ +cm_control (CM_CTRL_RESET ,CM_CTRL_RESET ); +}
arch/arm/mach-integrator/include/mach/system.h +0 -7
@@ -21,8 +21,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/cm.h> -static inline void arch_idle (void ) {/*
@@ -34,11 +32,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* To reset, we hit the on-board reset register -* in the system FPGA -*/ -cm_control (CM_CTRL_RESET ,CM_CTRL_RESET ); }#endif
arch/arm/mach-integrator/integrator_ap.c +1 -0
@@ -472,4 +472,5 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator") .init_irq = ap_init_irq, .timer = &ap_timer, .init_machine = ap_init, + .restart = integrator_restart,MACHINE_END
arch/arm/mach-integrator/integrator_cp.c +1 -0
@@ -499,4 +499,5 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") .init_irq = intcp_init_irq, .timer = &cp_timer, .init_machine = intcp_init, + .restart = integrator_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 13/41 ARM: restart: integrator: 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().Signed-off-by Russell King <[email protected]>
Since I tend to play around with this machine,
Thanks,
Linus Walleij
PATCH 14/41 ARM: restart: iop3xx: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the arm_pm_restart hook rather than using arch_reset().
In doing so, we split out the n2100 platform specific restart handler into the n2100 platform file.
--- arch/arm/include/asm/hardware/iop3xx.h | 1 + arch/arm/mach-iop32x/em7210.c | 1 + arch/arm/mach-iop32x/glantank.c | 1 + arch/arm/mach-iop32x/include/mach/system.h | 15 --------------- arch/arm/mach-iop32x/iq31244.c | 2 ++ arch/arm/mach-iop32x/iq80321.c | 1 + arch/arm/mach-iop32x/n2100.c | 9 +++++++++ arch/arm/mach-iop33x/include/mach/system.h | 6 ------ arch/arm/mach-iop33x/iq80331.c | 1 + arch/arm/mach-iop33x/iq80332.c | 1 + arch/arm/plat-iop/Makefile | 2 ++ arch/arm/plat-iop/restart.c | 19 +++++++++++++++++++ 12 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 arch/arm/plat-iop/restart.c
arch/arm/include/asm/hardware/iop3xx.h +1 -0
@@ -234,6 +234,7 @@ extern int iop3xx_get_init_atu(void);void iop3xx_map_io (void );void iop_init_cp6_handler (void );void iop_init_time (unsigned long tickrate); +void iop3xx_restart (char ,const char *);static inline u32 read_tmr0 (void ) {
arch/arm/mach-iop32x/em7210.c +1 -0
@@ -208,4 +208,5 @@ MACHINE_START(EM7210, "Lanner EM7210") .init_irq = iop32x_init_irq, .timer = &em7210_timer, .init_machine = em7210_init_machine, + .restart = iop3xx_restart,MACHINE_END
arch/arm/mach-iop32x/glantank.c +1 -0
@@ -212,4 +212,5 @@ MACHINE_START(GLANTANK, "GLAN Tank") .init_irq = iop32x_init_irq, .timer = &glantank_timer, .init_machine = glantank_init_machine, + .restart = iop3xx_restart,MACHINE_END
arch/arm/mach-iop32x/include/mach/system.h +0 -15
@@ -7,10 +7,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <asm/mach-types.h> -#include <asm/hardware/iop3xx.h> -#include <mach/n2100.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -18,15 +14,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -if (machine_is_n2100 ()) { -gpio_line_set (N2100_HARDWARE_RESET ,GPIO_LOW ); -gpio_line_config (N2100_HARDWARE_RESET ,GPIO_OUT ); -while (1 ) - ; - } - - *IOP3XX_PCSR =0x30 ; - -/* Jump into ROM at address 0 */ -soft_restart (0 ); }
arch/arm/mach-iop32x/iq31244.c +2 -0
@@ -318,6 +318,7 @@ MACHINE_START(IQ31244, "Intel IQ31244") .init_irq = iop32x_init_irq, .timer = &iq31244_timer, .init_machine = iq31244_init_machine, + .restart = iop3xx_restart,MACHINE_END /* There should have been an ep80219 machine identifier from the beginning.
@@ -332,4 +333,5 @@ MACHINE_START(EP80219, "Intel EP80219") .init_irq = iop32x_init_irq, .timer = &iq31244_timer, .init_machine = iq31244_init_machine, + .restart = iop3xx_restart,MACHINE_END
arch/arm/mach-iop32x/iq80321.c +1 -0
@@ -191,4 +191,5 @@ MACHINE_START(IQ80321, "Intel IQ80321") .init_irq = iop32x_init_irq, .timer = &iq80321_timer, .init_machine = iq80321_init_machine, + .restart = iop3xx_restart,MACHINE_END
arch/arm/mach-iop32x/n2100.c +9 -0
@@ -291,6 +291,14 @@ static void n2100_power_off(void) ; } +static void n2100_restart (char mode,const char *cmd) +{ +gpio_line_set (N2100_HARDWARE_RESET ,GPIO_LOW ); +gpio_line_config (N2100_HARDWARE_RESET ,GPIO_OUT ); +while (1 ) + ; +} +static struct timer_list power_button_poll_timer;
@@ -332,4 +340,5 @@ MACHINE_START(N2100, "Thecus N2100") .init_irq = iop32x_init_irq, .timer = &n2100_timer, .init_machine = n2100_init_machine, + .restart = n2100_restart,MACHINE_END
arch/arm/mach-iop33x/include/mach/system.h +0 -6
@@ -7,8 +7,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <asm/hardware/iop3xx.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -16,8 +14,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { - *IOP3XX_PCSR =0x30 ; - -/* Jump into ROM at address 0 */ -soft_restart (0 ); }
arch/arm/mach-iop33x/iq80331.c +1 -0
@@ -146,4 +146,5 @@ MACHINE_START(IQ80331, "Intel IQ80331") .init_irq = iop33x_init_irq, .timer = &iq80331_timer, .init_machine = iq80331_init_machine, + .restart = iop3xx_restart,MACHINE_END
arch/arm/mach-iop33x/iq80332.c +1 -0
@@ -146,4 +146,5 @@ MACHINE_START(IQ80332, "Intel IQ80332") .init_irq = iop33x_init_irq, .timer = &iq80332_timer, .init_machine = iq80332_init_machine, + .restart = iop3xx_restart,MACHINE_END
arch/arm/plat-iop/Makefile +2 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_IOP32X) += io.o obj-$(CONFIG_ARCH_IOP32X) += cp6.o obj-$(CONFIG_ARCH_IOP32X) += adma.o obj-$(CONFIG_ARCH_IOP32X) += pmu.o +obj-$(CONFIG_ARCH_IOP32X) += restart.o # IOP33X obj-$(CONFIG_ARCH_IOP33X) += gpio.o
@@ -25,6 +26,7 @@ obj-$(CONFIG_ARCH_IOP33X) += io.o obj-$(CONFIG_ARCH_IOP33X) += cp6.o obj-$(CONFIG_ARCH_IOP33X) += adma.o obj-$(CONFIG_ARCH_IOP33X) += pmu.o +obj-$(CONFIG_ARCH_IOP33X) += restart.o # IOP13XX obj-$(CONFIG_ARCH_IOP13XX) += cp6.o
arch/arm/plat-iop/restart.c new file +19 -0
@@ -0,0 +1,19 @@ +/* +* restart.c +* +* Copyright (C) 2001 MontaVista Software, Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#include <asm/hardware/iop3xx.h> +#include <mach/hardware.h> + +void iop3xx_restart (char mode,const char *cmd) +{ + *IOP3XX_PCSR =0x30 ; + +/* Jump into ROM at address 0 */ +soft_restart (0 ); +}
Signature · 1 line
1.7.4.4
PATCH 14/41 ARM: restart: iop3xx: use new restart hook
Ack?
Quoted 234 lines · Russell King - ARM Linux
Hook these platforms restart code into the
arm_pm_restarthook rather than usingarch_reset().In doing so, we split out the n2100 platform specific restart handler into the n2100 platform file.
Signed-off-by Russell King <[email protected]>--- arch/arm/include/asm/hardware/iop3xx.h | 1 + arch/arm/mach-iop32x/em7210.c | 1 + arch/arm/mach-iop32x/glantank.c | 1 + arch/arm/mach-iop32x/include/mach/system.h | 15 --------------- arch/arm/mach-iop32x/iq31244.c | 2 ++ arch/arm/mach-iop32x/iq80321.c | 1 + arch/arm/mach-iop32x/n2100.c | 9 +++++++++ arch/arm/mach-iop33x/include/mach/system.h | 6 ------ arch/arm/mach-iop33x/iq80331.c | 1 + arch/arm/mach-iop33x/iq80332.c | 1 + arch/arm/plat-iop/Makefile | 2 ++ arch/arm/plat-iop/restart.c | 19 +++++++++++++++++++ 12 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 arch/arm/plat-iop/restart.carch/arm/include/asm/hardware/iop3xx.h +1
-0@@ -234,6 +234,7 @@ extern int iop3xx_get_init_atu(void);void iop3xx_map_io (void );void iop_init_cp6_handler (void );void iop_init_time (unsigned long tickrate); +void iop3xx_restart (char ,const char *);static inline u32 read_tmr0 (void ) {arch/arm/mach-iop32x/em7210.c +1
-0@@ -208,4 +208,5 @@ MACHINE_START(EM7210, "Lanner EM7210") .init_irq = iop32x_init_irq, .timer = &em7210_timer, .init_machine = em7210_init_machine, + .restart = iop3xx_restart,MACHINE_END arch/arm/mach-iop32x/glantank.c +1
-0@@ -212,4 +212,5 @@ MACHINE_START(GLANTANK, "GLAN Tank") .init_irq = iop32x_init_irq, .timer = &glantank_timer, .init_machine = glantank_init_machine, + .restart = iop3xx_restart,MACHINE_END arch/arm/mach-iop32x/include/mach/system.h +0
-15@@ -7,10 +7,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <asm/mach-types.h> -#include <asm/hardware/iop3xx.h> -#include <mach/n2100.h> -static inline void arch_idle (void ) {cpu_do_idle ();@@ -18,15 +14,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -if (machine_is_n2100 ()) { -gpio_line_set (N2100_HARDWARE_RESET ,GPIO_LOW ); -gpio_line_config (N2100_HARDWARE_RESET ,GPIO_OUT ); -while (1 ) - ; - } - - *IOP3XX_PCSR =0x30 ; - -/* Jump into ROM at address 0 */ -soft_restart (0 ); }arch/arm/mach-iop32x/iq31244.c +2
-0@@ -318,6 +318,7 @@ MACHINE_START(IQ31244, "Intel IQ31244") .init_irq = iop32x_init_irq, .timer = &iq31244_timer, .init_machine = iq31244_init_machine, + .restart = iop3xx_restart,MACHINE_END /* There should have been an ep80219 machine identifier from the beginning. @@ -332,4 +333,5 @@ MACHINE_START(EP80219, "Intel EP80219") .init_irq = iop32x_init_irq, .timer = &iq31244_timer, .init_machine = iq31244_init_machine, + .restart = iop3xx_restart,MACHINE_END arch/arm/mach-iop32x/iq80321.c +1
-0@@ -191,4 +191,5 @@ MACHINE_START(IQ80321, "Intel IQ80321") .init_irq = iop32x_init_irq, .timer = &iq80321_timer, .init_machine = iq80321_init_machine, + .restart = iop3xx_restart,MACHINE_END arch/arm/mach-iop32x/n2100.c +9
-0@@ -291,6 +291,14 @@ static void n2100_power_off(void) ; } +static void n2100_restart (char mode,const char *cmd) +{ +gpio_line_set (N2100_HARDWARE_RESET ,GPIO_LOW ); +gpio_line_config (N2100_HARDWARE_RESET ,GPIO_OUT ); +while (1 ) + ; +} +static struct timer_list power_button_poll_timer;@@ -332,4 +340,5 @@ MACHINE_START(N2100, "Thecus N2100") .init_irq = iop32x_init_irq, .timer = &n2100_timer, .init_machine = n2100_init_machine, + .restart = n2100_restart,MACHINE_END arch/arm/mach-iop33x/include/mach/system.h +0
-6@@ -7,8 +7,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <asm/hardware/iop3xx.h> -static inline void arch_idle (void ) {cpu_do_idle ();@@ -16,8 +14,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { - *IOP3XX_PCSR =0x30 ; - -/* Jump into ROM at address 0 */ -soft_restart (0 ); }arch/arm/mach-iop33x/iq80331.c +1
-0@@ -146,4 +146,5 @@ MACHINE_START(IQ80331, "Intel IQ80331") .init_irq = iop33x_init_irq, .timer = &iq80331_timer, .init_machine = iq80331_init_machine, + .restart = iop3xx_restart,MACHINE_END arch/arm/mach-iop33x/iq80332.c +1
-0@@ -146,4 +146,5 @@ MACHINE_START(IQ80332, "Intel IQ80332") .init_irq = iop33x_init_irq, .timer = &iq80332_timer, .init_machine = iq80332_init_machine, + .restart = iop3xx_restart,MACHINE_END arch/arm/plat-iop/Makefile +2
-0@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_IOP32X) += io.o obj-$(CONFIG_ARCH_IOP32X) += cp6.o obj-$(CONFIG_ARCH_IOP32X) += adma.o obj-$(CONFIG_ARCH_IOP32X) += pmu.o +obj-$(CONFIG_ARCH_IOP32X) += restart.o # IOP33X obj-$(CONFIG_ARCH_IOP33X) += gpio.o@@ -25,6 +26,7 @@ obj-$(CONFIG_ARCH_IOP33X) += io.o obj-$(CONFIG_ARCH_IOP33X) += cp6.o obj-$(CONFIG_ARCH_IOP33X) += adma.o obj-$(CONFIG_ARCH_IOP33X) += pmu.o +obj-$(CONFIG_ARCH_IOP33X) += restart.o # IOP13XX obj-$(CONFIG_ARCH_IOP13XX) += cp6.oarch/arm/plat-iop/restart.c new file +19
-0@@ -0,0 +1,19 @@ +/* +* restart.c +* +* Copyright (C) 2001 MontaVista Software, Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#include <asm/hardware/iop3xx.h> +#include <mach/hardware.h> + +void iop3xx_restart (char mode,const char *cmd) +{ + *IOP3XX_PCSR =0x30 ; + +/* Jump into ROM at address 0 */ +soft_restart (0 ); +}Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 14/41 ARM: restart: iop3xx: use new restart hook
Quoted 10 lines · Russell King - ARM Linux
Ack?
Quoted 7 lines · Russell King - ARM Linux
Hook these platforms restart code into the
arm_pm_restarthook rather than usingarch_reset().In doing so, we split out the n2100 platform specific restart handler into the n2100 platform file.
Signed-off-by Russell King <[email protected]>
PATCH 15/41 ARM: restart: iop13xx: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-iop13xx/include/mach/iop13xx.h | 1 + arch/arm/mach-iop13xx/include/mach/system.h | 10 ---------- arch/arm/mach-iop13xx/iq81340mc.c | 1 + arch/arm/mach-iop13xx/iq81340sc.c | 1 + arch/arm/mach-iop13xx/setup.c | 11 +++++++++++ 5 files changed, 14 insertions(+), 10 deletions(-)
arch/arm/mach-iop13xx/include/mach/iop13xx.h +1 -0
@@ -10,6 +10,7 @@ void iop13xx_map_io(void);void iop13xx_platform_init (void );void iop13xx_add_tpmi_devices (void );void iop13xx_init_irq (void ); +void iop13xx_restart (char ,const char *);/* CPUID CP6 R0 Page 0 */ static inline int iop13xx_cpu_id (void )
arch/arm/mach-iop13xx/include/mach/system.h +0 -10
@@ -7,7 +7,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <mach/iop13xx.h> static inline void arch_idle (void ) {cpu_do_idle ();
@@ -15,13 +14,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Reset the internal bus (warning both cores are reset) -*/ -write_wdtcr (IOP_WDTCR_EN_ARM ); -write_wdtcr (IOP_WDTCR_EN ); -write_wdtsr (IOP13XX_WDTSR_WRITE_EN |IOP13XX_WDTCR_IB_RESET ); -write_wdtcr (0x1000 ); - -for (;;); }
arch/arm/mach-iop13xx/iq81340mc.c +1 -0
@@ -96,4 +96,5 @@ MACHINE_START(IQ81340MC, "Intel IQ81340MC") .init_irq = iop13xx_init_irq, .timer = &iq81340mc_timer, .init_machine = iq81340mc_init, + .restart = iop13xx_restart,MACHINE_END
arch/arm/mach-iop13xx/iq81340sc.c +1 -0
@@ -98,4 +98,5 @@ MACHINE_START(IQ81340SC, "Intel IQ81340SC") .init_irq = iop13xx_init_irq, .timer = &iq81340sc_timer, .init_machine = iq81340sc_init, + .restart = iop13xx_restart,MACHINE_END
arch/arm/mach-iop13xx/setup.c +11 -0
@@ -606,3 +606,14 @@ static int __init iop13xx_init_adma_setup(char *str)__setup ("iop13xx_init_adma" , iop13xx_init_adma_setup);__setup ("iop13xx_init_uart" , iop13xx_init_uart_setup);__setup ("iop13xx_init_i2c" , iop13xx_init_i2c_setup); + +void iop13xx_restart (char mode,const char *cmd) +{ +/* +* Reset the internal bus (warning both cores are reset) +*/ +write_wdtcr (IOP_WDTCR_EN_ARM ); +write_wdtcr (IOP_WDTCR_EN ); +write_wdtsr (IOP13XX_WDTSR_WRITE_EN |IOP13XX_WDTCR_IB_RESET ); +write_wdtcr (0x1000 ); +}
Signature · 1 line
1.7.4.4
PATCH 15/41 ARM: restart: iop13xx: use new restart hook
Ack?
Quoted 97 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-iop13xx/include/mach/iop13xx.h | 1 + arch/arm/mach-iop13xx/include/mach/system.h | 10 ---------- arch/arm/mach-iop13xx/iq81340mc.c | 1 + arch/arm/mach-iop13xx/iq81340sc.c | 1 + arch/arm/mach-iop13xx/setup.c | 11 +++++++++++ 5 files changed, 14 insertions(+), 10 deletions(-)arch/arm/mach-iop13xx/include/mach/iop13xx.h +1
-0@@ -10,6 +10,7 @@ void iop13xx_map_io(void);void iop13xx_platform_init (void );void iop13xx_add_tpmi_devices (void );void iop13xx_init_irq (void ); +void iop13xx_restart (char ,const char *);/* CPUID CP6 R0 Page 0 */ static inline int iop13xx_cpu_id (void )arch/arm/mach-iop13xx/include/mach/system.h +0
-10@@ -7,7 +7,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <mach/iop13xx.h> static inline void arch_idle (void ) {cpu_do_idle ();@@ -15,13 +14,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Reset the internal bus (warning both cores are reset) -*/ -write_wdtcr (IOP_WDTCR_EN_ARM ); -write_wdtcr (IOP_WDTCR_EN ); -write_wdtsr (IOP13XX_WDTSR_WRITE_EN |IOP13XX_WDTCR_IB_RESET ); -write_wdtcr (0x1000 ); - -for (;;); }arch/arm/mach-iop13xx/iq81340mc.c +1
-0@@ -96,4 +96,5 @@ MACHINE_START(IQ81340MC, "Intel IQ81340MC") .init_irq = iop13xx_init_irq, .timer = &iq81340mc_timer, .init_machine = iq81340mc_init, + .restart = iop13xx_restart,MACHINE_END arch/arm/mach-iop13xx/iq81340sc.c +1
-0@@ -98,4 +98,5 @@ MACHINE_START(IQ81340SC, "Intel IQ81340SC") .init_irq = iop13xx_init_irq, .timer = &iq81340sc_timer, .init_machine = iq81340sc_init, + .restart = iop13xx_restart,MACHINE_END arch/arm/mach-iop13xx/setup.c +11
-0@@ -606,3 +606,14 @@ static int __init iop13xx_init_adma_setup(char *str)__setup ("iop13xx_init_adma" , iop13xx_init_adma_setup);__setup ("iop13xx_init_uart" , iop13xx_init_uart_setup);__setup ("iop13xx_init_i2c" , iop13xx_init_i2c_setup); + +void iop13xx_restart (char mode,const char *cmd) +{ +/* +* Reset the internal bus (warning both cores are reset) +*/ +write_wdtcr (IOP_WDTCR_EN_ARM ); +write_wdtcr (IOP_WDTCR_EN ); +write_wdtsr (IOP13XX_WDTSR_WRITE_EN |IOP13XX_WDTCR_IB_RESET ); +write_wdtcr (0x1000 ); +}Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 15/41 ARM: restart: iop13xx: use new restart hook
Quoted 5 lines · Russell King - ARM Linux
Ack?
Quoted 2 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().
PATCH 16/41 ARM: restart: ixp2000: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
In doing so, we split out the IXDP2401, IXDP2801 and IXDP2805 platform specific restart code into their own platform files.
--- arch/arm/mach-ixp2000/core.c | 4 +++ arch/arm/mach-ixp2000/enp2611.c | 1 + arch/arm/mach-ixp2000/include/mach/platform.h | 1 + arch/arm/mach-ixp2000/include/mach/system.h | 29 ---------------------- arch/arm/mach-ixp2000/ixdp2400.c | 1 + arch/arm/mach-ixp2000/ixdp2800.c | 1 + arch/arm/mach-ixp2000/ixdp2x01.c | 32 +++++++++++++++++++++++++ 7 files changed, 40 insertions(+), 29 deletions(-)
arch/arm/mach-ixp2000/core.c +4 -0
@@ -514,3 +514,7 @@ void __init ixp2000_init_irq(void) } } +void ixp2000_restart (char mode,const char *cmd) +{ +ixp2000_reg_wrb (IXP2000_RESET0 ,RSTALL ); +}
arch/arm/mach-ixp2000/enp2611.c +1 -0
@@ -259,6 +259,7 @@ MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") .init_irq = ixp2000_init_irq, .timer = &enp2611_timer, .init_machine = enp2611_init_machine, + .restart = ixp2000_restart,MACHINE_END
arch/arm/mach-ixp2000/include/mach/platform.h +1 -0
@@ -122,6 +122,7 @@ void ixp2000_map_io(void);void ixp2000_uart_init (void );void ixp2000_init_irq (void );void ixp2000_init_time (unsigned long ); +void ixp2000_restart (char ,const char *);unsigned long ixp2000_gettimeoffset (void );struct pci_sys_data ;
arch/arm/mach-ixp2000/include/mach/system.h +0 -29
@@ -8,10 +8,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#include <mach/hardware.h> -#include <asm/mach-types.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -19,29 +15,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Reset flash banking register so that we are pointing at -* RedBoot bank. -*/ -if (machine_is_ixdp2401 ()) { -ixp2000_reg_write (IXDP2X01_CPLD_FLASH_REG , - ((0 >>IXDP2X01_FLASH_WINDOW_BITS ) - |IXDP2X01_CPLD_FLASH_INTERN )); -ixp2000_reg_wrb (IXDP2X01_CPLD_RESET_REG ,0xffffffff ); - } - -/* -* On IXDP2801 we need to write this magic sequence to the CPLD -* to cause a complete reset of the CPU and all external devices -* and move the flash bank register back to 0. -*/ -if (machine_is_ixdp2801 () ||machine_is_ixdp28x5 ()) { -unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG ; - - reset_reg =0x55AA0000 | (reset_reg &0x0000FFFF ); -ixp2000_reg_write (IXDP2X01_CPLD_RESET_REG , reset_reg); -ixp2000_reg_wrb (IXDP2X01_CPLD_RESET_REG ,0x80000000 ); - } - -ixp2000_reg_wrb (IXP2000_RESET0 ,RSTALL ); }
arch/arm/mach-ixp2000/ixdp2400.c +1 -0
@@ -176,5 +176,6 @@ MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform") .init_irq = ixdp2400_init_irq, .timer = &ixdp2400_timer, .init_machine = ixdp2x00_init_machine, + .restart = ixp2000_restart,MACHINE_END
arch/arm/mach-ixp2000/ixdp2800.c +1 -0
@@ -291,5 +291,6 @@ MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform") .init_irq = ixdp2800_init_irq, .timer = &ixdp2800_timer, .init_machine = ixdp2x00_init_machine, + .restart = ixp2000_restart,MACHINE_END
arch/arm/mach-ixp2000/ixdp2x01.c +32 -0
@@ -413,6 +413,35 @@ static void __init ixdp2x01_init_machine(void)ixdp2x01_uart_init (); } +static void ixdp2401_restart (char mode,const char *cmd) +{ +/* +* Reset flash banking register so that we are pointing at +* RedBoot bank. +*/ +ixp2000_reg_write (IXDP2X01_CPLD_FLASH_REG , + ((0 >>IXDP2X01_FLASH_WINDOW_BITS ) + |IXDP2X01_CPLD_FLASH_INTERN )); +ixp2000_reg_wrb (IXDP2X01_CPLD_RESET_REG ,0xffffffff ); + +ixp2000_restart (mode, cmd); +} + +static void ixdp280x_restart (char mode,const char *cmd) +{ +/* +* On IXDP2801 we need to write this magic sequence to the CPLD +* to cause a complete reset of the CPU and all external devices +* and move the flash bank register back to 0. +*/ +unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG ; + + reset_reg =0x55AA0000 | (reset_reg &0x0000FFFF ); +ixp2000_reg_write (IXDP2X01_CPLD_RESET_REG , reset_reg); +ixp2000_reg_wrb (IXDP2X01_CPLD_RESET_REG ,0x80000000 ); + +ixp2000_restart (mode, cmd); +}#ifdef CONFIG_ARCH_IXDP2401 MACHINE_START (IXDP2401 ,"Intel IXDP2401 Development Platform" )
@@ -422,6 +451,7 @@ MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform") .init_irq = ixdp2x01_init_irq, .timer = &ixdp2x01_timer, .init_machine = ixdp2x01_init_machine, + .restart = ixdp2401_restart, MACHINE_END#endif
@@ -433,6 +463,7 @@ MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") .init_irq = ixdp2x01_init_irq, .timer = &ixdp2x01_timer, .init_machine = ixdp2x01_init_machine, + .restart = ixdp280x_restart,MACHINE_END /*
@@ -446,6 +477,7 @@ MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform") .init_irq = ixdp2x01_init_irq, .timer = &ixdp2x01_timer, .init_machine = ixdp2x01_init_machine, + .restart = ixdp280x_restart, MACHINE_END#endif
Signature · 1 line
1.7.4.4
PATCH 16/41 ARM: restart: ixp2000: use new restart hook
Ack?
Quoted 192 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().In doing so, we split out the IXDP2401, IXDP2801 and IXDP2805 platform specific restart code into their own platform files.
Signed-off-by Russell King <[email protected]>--- arch/arm/mach-ixp2000/core.c | 4 +++ arch/arm/mach-ixp2000/enp2611.c | 1 + arch/arm/mach-ixp2000/include/mach/platform.h | 1 + arch/arm/mach-ixp2000/include/mach/system.h | 29 ---------------------- arch/arm/mach-ixp2000/ixdp2400.c | 1 + arch/arm/mach-ixp2000/ixdp2800.c | 1 + arch/arm/mach-ixp2000/ixdp2x01.c | 32 +++++++++++++++++++++++++ 7 files changed, 40 insertions(+), 29 deletions(-)arch/arm/mach-ixp2000/core.c +4
-0@@ -514,3 +514,7 @@ void __init ixp2000_init_irq(void) } } +void ixp2000_restart (char mode,const char *cmd) +{ +ixp2000_reg_wrb (IXP2000_RESET0 ,RSTALL ); +}arch/arm/mach-ixp2000/enp2611.c +1
-0@@ -259,6 +259,7 @@ MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") .init_irq = ixp2000_init_irq, .timer = &enp2611_timer, .init_machine = enp2611_init_machine, + .restart = ixp2000_restart,MACHINE_END arch/arm/mach-ixp2000/include/mach/platform.h +1
-0@@ -122,6 +122,7 @@ void ixp2000_map_io(void);void ixp2000_uart_init (void );void ixp2000_init_irq (void );void ixp2000_init_time (unsigned long ); +void ixp2000_restart (char ,const char *);unsigned long ixp2000_gettimeoffset (void );struct pci_sys_data ;arch/arm/mach-ixp2000/include/mach/system.h +0
-29@@ -8,10 +8,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#include <mach/hardware.h> -#include <asm/mach-types.h> -static inline void arch_idle (void ) {cpu_do_idle ();@@ -19,29 +15,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Reset flash banking register so that we are pointing at -* RedBoot bank. -*/ -if (machine_is_ixdp2401 ()) { -ixp2000_reg_write (IXDP2X01_CPLD_FLASH_REG , - ((0 >>IXDP2X01_FLASH_WINDOW_BITS ) - |IXDP2X01_CPLD_FLASH_INTERN )); -ixp2000_reg_wrb (IXDP2X01_CPLD_RESET_REG ,0xffffffff ); - } - -/* -* On IXDP2801 we need to write this magic sequence to the CPLD -* to cause a complete reset of the CPU and all external devices -* and move the flash bank register back to 0. -*/ -if (machine_is_ixdp2801 () ||machine_is_ixdp28x5 ()) { -unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG ; - - reset_reg =0x55AA0000 | (reset_reg &0x0000FFFF ); -ixp2000_reg_write (IXDP2X01_CPLD_RESET_REG , reset_reg); -ixp2000_reg_wrb (IXDP2X01_CPLD_RESET_REG ,0x80000000 ); - } - -ixp2000_reg_wrb (IXP2000_RESET0 ,RSTALL ); }arch/arm/mach-ixp2000/ixdp2400.c +1
-0@@ -176,5 +176,6 @@ MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform") .init_irq = ixdp2400_init_irq, .timer = &ixdp2400_timer, .init_machine = ixdp2x00_init_machine, + .restart = ixp2000_restart,MACHINE_END arch/arm/mach-ixp2000/ixdp2800.c +1
-0@@ -291,5 +291,6 @@ MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform") .init_irq = ixdp2800_init_irq, .timer = &ixdp2800_timer, .init_machine = ixdp2x00_init_machine, + .restart = ixp2000_restart,MACHINE_END arch/arm/mach-ixp2000/ixdp2x01.c +32
-0@@ -413,6 +413,35 @@ static void __init ixdp2x01_init_machine(void)ixdp2x01_uart_init (); } +static void ixdp2401_restart (char mode,const char *cmd) +{ +/* +* Reset flash banking register so that we are pointing at +* RedBoot bank. +*/ +ixp2000_reg_write (IXDP2X01_CPLD_FLASH_REG , + ((0 >>IXDP2X01_FLASH_WINDOW_BITS ) + |IXDP2X01_CPLD_FLASH_INTERN )); +ixp2000_reg_wrb (IXDP2X01_CPLD_RESET_REG ,0xffffffff ); + +ixp2000_restart (mode, cmd); +} + +static void ixdp280x_restart (char mode,const char *cmd) +{ +/* +* On IXDP2801 we need to write this magic sequence to the CPLD +* to cause a complete reset of the CPU and all external devices +* and move the flash bank register back to 0. +*/ +unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG ; + + reset_reg =0x55AA0000 | (reset_reg &0x0000FFFF ); +ixp2000_reg_write (IXDP2X01_CPLD_RESET_REG , reset_reg); +ixp2000_reg_wrb (IXDP2X01_CPLD_RESET_REG ,0x80000000 ); + +ixp2000_restart (mode, cmd); +}#ifdef CONFIG_ARCH_IXDP2401 MACHINE_START (IXDP2401 ,"Intel IXDP2401 Development Platform" )@@ -422,6 +451,7 @@ MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform") .init_irq = ixdp2x01_init_irq, .timer = &ixdp2x01_timer, .init_machine = ixdp2x01_init_machine, + .restart = ixdp2401_restart, MACHINE_END#endif @@ -433,6 +463,7 @@ MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") .init_irq = ixdp2x01_init_irq, .timer = &ixdp2x01_timer, .init_machine = ixdp2x01_init_machine, + .restart = ixdp280x_restart,MACHINE_END /* @@ -446,6 +477,7 @@ MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform") .init_irq = ixdp2x01_init_irq, .timer = &ixdp2x01_timer, .init_machine = ixdp2x01_init_machine, + .restart = ixdp280x_restart, MACHINE_END#endif Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 16/41 ARM: restart: ixp2000: use new restart hook
Quoted 8 lines · Russell King - ARM Linux
Ack?
Quoted 5 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().In doing so, we split out the IXDP2401, IXDP2801 and IXDP2805 platform specific restart code into their own platform files.
PATCH 17/41 ARM: restart: ixp23xx: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
In doing so, we split out the ixdp2351 restart code into its own platform file.
--- arch/arm/mach-ixp23xx/core.c | 6 ++++++ arch/arm/mach-ixp23xx/espresso.c | 1 + arch/arm/mach-ixp23xx/include/mach/platform.h | 1 + arch/arm/mach-ixp23xx/include/mach/system.h | 13 ------------- arch/arm/mach-ixp23xx/ixdp2351.c | 12 ++++++++++++ arch/arm/mach-ixp23xx/roadrunner.c | 1 + 6 files changed, 21 insertions(+), 13 deletions(-)
arch/arm/mach-ixp23xx/core.c +6 -0
@@ -444,3 +444,9 @@ void __init ixp23xx_sys_init(void) *IXP23XX_EXP_UNIT_FUSE |=0xf ;platform_add_devices (ixp23xx_devices,ARRAY_SIZE (ixp23xx_devices)); } + +void ixp23xx_restart (char mode,const char *cmd) +{ +/* Use on-chip reset capability */ + *IXP23XX_RESET0 |=IXP23XX_RST_ALL ; +}
arch/arm/mach-ixp23xx/espresso.c +1 -0
@@ -90,4 +90,5 @@ MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso") .timer = &ixp23xx_timer, .atag_offset = 0x100, .init_machine = espresso_init, + .restart = ixp23xx_restart,MACHINE_END
arch/arm/mach-ixp23xx/include/mach/platform.h +1 -0
@@ -34,6 +34,7 @@ struct pci_sys_data;void ixp23xx_map_io (void );void ixp23xx_init_irq (void );void ixp23xx_sys_init (void ); +void ixp23xx_restart (char ,const char *);int ixp23xx_pci_setup (int ,struct pci_sys_data *);void ixp23xx_pci_preinit (void );struct pci_bus *ixp23xx_pci_scan_bus (int ,struct pci_sys_data *);
arch/arm/mach-ixp23xx/include/mach/system.h +0 -13
@@ -7,10 +7,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#include <mach/hardware.h> -#include <asm/mach-types.h> -static inline void arch_idle (void ) {#if 0
@@ -21,13 +17,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* First try machine specific support */ -if (machine_is_ixdp2351 ()) { - *IXDP2351_CPLD_RESET1_REG =IXDP2351_CPLD_RESET1_MAGIC ; - (void ) *IXDP2351_CPLD_RESET1_REG ; - *IXDP2351_CPLD_RESET1_REG =IXDP2351_CPLD_RESET1_ENABLE ; - } - -/* Use on-chip reset capability */ - *IXP23XX_RESET0 |=IXP23XX_RST_ALL ; }
arch/arm/mach-ixp23xx/ixdp2351.c +12 -0
@@ -326,6 +326,17 @@ static void __init ixdp2351_init(void)ixp23xx_sys_init (); } +static void ixdp2351_restart (char mode,const char *cmd) +{ +/* First try machine specific support */ + + *IXDP2351_CPLD_RESET1_REG =IXDP2351_CPLD_RESET1_MAGIC ; + (void ) *IXDP2351_CPLD_RESET1_REG ; + *IXDP2351_CPLD_RESET1_REG =IXDP2351_CPLD_RESET1_ENABLE ; + +ixp23xx_restart (mode, cmd); +} +MACHINE_START (IXDP2351 ,"Intel IXDP2351 Development Platform" )/* Maintainer: MontaVista Software, Inc. */ .map_io = ixdp2351_map_io,
@@ -333,4 +344,5 @@ MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform") .timer = &ixp23xx_timer, .atag_offset = 0x100, .init_machine = ixdp2351_init, + .restart = ixdp2351_restart,MACHINE_END
arch/arm/mach-ixp23xx/roadrunner.c +1 -0
@@ -177,4 +177,5 @@ MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform") .timer = &ixp23xx_timer, .atag_offset = 0x100, .init_machine = roadrunner_init, + .restart = ixp23xx_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 17/41 ARM: restart: ixp23xx: use new restart hook
Ack?
Quoted 127 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().In doing so, we split out the ixdp2351 restart code into its own platform file.
Signed-off-by Russell King <[email protected]>--- arch/arm/mach-ixp23xx/core.c | 6 ++++++ arch/arm/mach-ixp23xx/espresso.c | 1 + arch/arm/mach-ixp23xx/include/mach/platform.h | 1 + arch/arm/mach-ixp23xx/include/mach/system.h | 13 ------------- arch/arm/mach-ixp23xx/ixdp2351.c | 12 ++++++++++++ arch/arm/mach-ixp23xx/roadrunner.c | 1 + 6 files changed, 21 insertions(+), 13 deletions(-)arch/arm/mach-ixp23xx/core.c +6
-0@@ -444,3 +444,9 @@ void __init ixp23xx_sys_init(void) *IXP23XX_EXP_UNIT_FUSE |=0xf ;platform_add_devices (ixp23xx_devices,ARRAY_SIZE (ixp23xx_devices)); } + +void ixp23xx_restart (char mode,const char *cmd) +{ +/* Use on-chip reset capability */ + *IXP23XX_RESET0 |=IXP23XX_RST_ALL ; +}arch/arm/mach-ixp23xx/espresso.c +1
-0@@ -90,4 +90,5 @@ MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso") .timer = &ixp23xx_timer, .atag_offset = 0x100, .init_machine = espresso_init, + .restart = ixp23xx_restart,MACHINE_END arch/arm/mach-ixp23xx/include/mach/platform.h +1
-0@@ -34,6 +34,7 @@ struct pci_sys_data;void ixp23xx_map_io (void );void ixp23xx_init_irq (void );void ixp23xx_sys_init (void ); +void ixp23xx_restart (char ,const char *);int ixp23xx_pci_setup (int ,struct pci_sys_data *);void ixp23xx_pci_preinit (void );struct pci_bus *ixp23xx_pci_scan_bus (int ,struct pci_sys_data *);arch/arm/mach-ixp23xx/include/mach/system.h +0
-13@@ -7,10 +7,6 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - -#include <mach/hardware.h> -#include <asm/mach-types.h> -static inline void arch_idle (void ) {#if 0 @@ -21,13 +17,4 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* First try machine specific support */ -if (machine_is_ixdp2351 ()) { - *IXDP2351_CPLD_RESET1_REG =IXDP2351_CPLD_RESET1_MAGIC ; - (void ) *IXDP2351_CPLD_RESET1_REG ; - *IXDP2351_CPLD_RESET1_REG =IXDP2351_CPLD_RESET1_ENABLE ; - } - -/* Use on-chip reset capability */ - *IXP23XX_RESET0 |=IXP23XX_RST_ALL ; }arch/arm/mach-ixp23xx/ixdp2351.c +12
-0@@ -326,6 +326,17 @@ static void __init ixdp2351_init(void)ixp23xx_sys_init (); } +static void ixdp2351_restart (char mode,const char *cmd) +{ +/* First try machine specific support */ + + *IXDP2351_CPLD_RESET1_REG =IXDP2351_CPLD_RESET1_MAGIC ; + (void ) *IXDP2351_CPLD_RESET1_REG ; + *IXDP2351_CPLD_RESET1_REG =IXDP2351_CPLD_RESET1_ENABLE ; + +ixp23xx_restart (mode, cmd); +} +MACHINE_START (IXDP2351 ,"Intel IXDP2351 Development Platform" )/* Maintainer: MontaVista Software, Inc. */ .map_io = ixdp2351_map_io,@@ -333,4 +344,5 @@ MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform") .timer = &ixp23xx_timer, .atag_offset = 0x100, .init_machine = ixdp2351_init, + .restart = ixdp2351_restart,MACHINE_END arch/arm/mach-ixp23xx/roadrunner.c +1
-0@@ -177,4 +177,5 @@ MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform") .timer = &ixp23xx_timer, .atag_offset = 0x100, .init_machine = roadrunner_init, + .restart = ixp23xx_restart,MACHINE_END Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 17/41 ARM: restart: ixp23xx: use new restart hook
Quoted 10 lines · Russell King - ARM Linux
Ack?
Quoted 7 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().In doing so, we split out the ixdp2351 restart code into its own platform file.
Signed-off-by Russell King <[email protected]>
PATCH 18/41 ARM: restart: ixp4xx: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-ixp4xx/avila-setup.c | 2 ++ arch/arm/mach-ixp4xx/common.c | 20 ++++++++++++++++++++ arch/arm/mach-ixp4xx/coyote-setup.c | 2 ++ arch/arm/mach-ixp4xx/dsmg600-setup.c | 1 + arch/arm/mach-ixp4xx/fsg-setup.c | 1 + arch/arm/mach-ixp4xx/gateway7001-setup.c | 1 + arch/arm/mach-ixp4xx/goramo_mlr.c | 1 + arch/arm/mach-ixp4xx/gtwx5715-setup.c | 1 + arch/arm/mach-ixp4xx/include/mach/platform.h | 1 + arch/arm/mach-ixp4xx/include/mach/system.h | 21 --------------------- arch/arm/mach-ixp4xx/ixdp425-setup.c | 1 + arch/arm/mach-ixp4xx/nas100d-setup.c | 1 + arch/arm/mach-ixp4xx/nslu2-setup.c | 1 + arch/arm/mach-ixp4xx/omixp-setup.c | 3 +++ arch/arm/mach-ixp4xx/vulcan-setup.c | 1 + arch/arm/mach-ixp4xx/wg302v2-setup.c | 1 + 16 files changed, 38 insertions(+), 21 deletions(-)
arch/arm/mach-ixp4xx/avila-setup.c +2 -0
@@ -172,6 +172,7 @@ MACHINE_START(AVILA, "Gateworks Avila Network Platform")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END /*
@@ -190,6 +191,7 @@ MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif
arch/arm/mach-ixp4xx/common.c +20 -0
@@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)clockevents_register_device (&clockevent_ixp4xx); } + +void ixp4xx_restart (char mode,const char *cmd) +{ +if (1 && mode =='s' ) { +/* Jump into ROM at address 0 */ +soft_restart (0 ); + }else { +/* Use on-chip reset capability */ + +/* set the "key" register to enable access to +* "timer" and "enable" registers +*/ + *IXP4XX_OSWK =IXP4XX_WDT_KEY ; + +/* write 0 to the timer register for an immediate reset */ + *IXP4XX_OSWT =0 ; + + *IXP4XX_OSWE =IXP4XX_WDT_RESET_ENABLE |IXP4XX_WDT_COUNT_ENABLE ; + } +}
arch/arm/mach-ixp4xx/coyote-setup.c +2 -0
@@ -117,6 +117,7 @@ MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif
@@ -132,6 +133,7 @@ MACHINE_START(IXDPG425, "Intel IXDPG425") .timer = &ixp4xx_timer, .atag_offset = 0x100, .init_machine = coyote_init, + .restart = ixp4xx_restart, MACHINE_END#endif
arch/arm/mach-ixp4xx/dsmg600-setup.c +1 -0
@@ -286,4 +286,5 @@ MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END
arch/arm/mach-ixp4xx/fsg-setup.c +1 -0
@@ -277,5 +277,6 @@ MACHINE_START(FSG, "Freecom FSG-3")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END
arch/arm/mach-ixp4xx/gateway7001-setup.c +1 -0
@@ -104,5 +104,6 @@ MACHINE_START(GATEWAY7001, "Gateway 7001 AP")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif
arch/arm/mach-ixp4xx/goramo_mlr.c +1 -0
@@ -504,4 +504,5 @@ MACHINE_START(GORAMO_MLR, "MultiLink")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END
arch/arm/mach-ixp4xx/gtwx5715-setup.c +1 -0
@@ -172,6 +172,7 @@ MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END
arch/arm/mach-ixp4xx/include/mach/platform.h +1 -0
@@ -125,6 +125,7 @@ extern void ixp4xx_init_irq(void);extern void ixp4xx_sys_init (void );extern void ixp4xx_timer_init (void );extern struct sys_timer ixp4xx_timer; +extern void ixp4xx_restart (char ,const char *);extern void ixp4xx_pci_preinit (void );struct pci_sys_data ;extern int ixp4xx_setup (int nr,struct pci_sys_data *sys);
arch/arm/mach-ixp4xx/include/mach/system.h +0 -21
@@ -8,9 +8,6 @@* published by the Free Software Foundation. * */ - -#include <mach/hardware.h> -static inline void arch_idle (void ) {/* ixp4xx does not implement the XScale PWRMODE register,
@@ -21,24 +18,6 @@ static inline void arch_idle(void)#endif } -static inline void arch_reset (char mode,const char *cmd) { -if (1 && mode =='s' ) { -/* Jump into ROM at address 0 */ -soft_restart (0 ); - }else { -/* Use on-chip reset capability */ - -/* set the "key" register to enable access to -* "timer" and "enable" registers -*/ - *IXP4XX_OSWK =IXP4XX_WDT_KEY ; - -/* write 0 to the timer register for an immediate reset */ - *IXP4XX_OSWT =0 ; - - *IXP4XX_OSWE =IXP4XX_WDT_RESET_ENABLE |IXP4XX_WDT_COUNT_ENABLE ; - } } -
arch/arm/mach-ixp4xx/ixdp425-setup.c +1 -0
@@ -261,6 +261,7 @@ MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif
arch/arm/mach-ixp4xx/nas100d-setup.c +1 -0
@@ -321,4 +321,5 @@ MACHINE_START(NAS100D, "Iomega NAS 100d")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END
arch/arm/mach-ixp4xx/nslu2-setup.c +1 -0
@@ -307,4 +307,5 @@ MACHINE_START(NSLU2, "Linksys NSLU2")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END
arch/arm/mach-ixp4xx/omixp-setup.c +3 -0
@@ -246,6 +246,7 @@ MACHINE_START(DEVIXP, "Omicron DEVIXP") .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .init_machine = omixp_init, + .restart = ixp4xx_restart, MACHINE_END#endif
@@ -259,6 +260,7 @@ MACHINE_START(MICCPT, "Omicron MICCPT")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif
@@ -269,5 +271,6 @@ MACHINE_START(MIC256, "Omicron MIC256") .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .init_machine = omixp_init, + .restart = ixp4xx_restart, MACHINE_END#endif
arch/arm/mach-ixp4xx/vulcan-setup.c +1 -0
@@ -244,4 +244,5 @@ MACHINE_START(ARCOM_VULCAN, "Arcom/Eurotech Vulcan")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END
arch/arm/mach-ixp4xx/wg302v2-setup.c +1 -0
@@ -105,5 +105,6 @@ MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif
Signature · 1 line
1.7.4.4
PATCH 18/41 ARM: restart: ixp4xx: use new restart hook
Ack?
Quoted 284 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-ixp4xx/avila-setup.c | 2 ++ arch/arm/mach-ixp4xx/common.c | 20 ++++++++++++++++++++ arch/arm/mach-ixp4xx/coyote-setup.c | 2 ++ arch/arm/mach-ixp4xx/dsmg600-setup.c | 1 + arch/arm/mach-ixp4xx/fsg-setup.c | 1 + arch/arm/mach-ixp4xx/gateway7001-setup.c | 1 + arch/arm/mach-ixp4xx/goramo_mlr.c | 1 + arch/arm/mach-ixp4xx/gtwx5715-setup.c | 1 + arch/arm/mach-ixp4xx/include/mach/platform.h | 1 + arch/arm/mach-ixp4xx/include/mach/system.h | 21 --------------------- arch/arm/mach-ixp4xx/ixdp425-setup.c | 1 + arch/arm/mach-ixp4xx/nas100d-setup.c | 1 + arch/arm/mach-ixp4xx/nslu2-setup.c | 1 + arch/arm/mach-ixp4xx/omixp-setup.c | 3 +++ arch/arm/mach-ixp4xx/vulcan-setup.c | 1 + arch/arm/mach-ixp4xx/wg302v2-setup.c | 1 + 16 files changed, 38 insertions(+), 21 deletions(-)arch/arm/mach-ixp4xx/avila-setup.c +2
-0@@ -172,6 +172,7 @@ MACHINE_START(AVILA, "Gateworks Avila Network Platform")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END /* @@ -190,6 +191,7 @@ MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif arch/arm/mach-ixp4xx/common.c +20
-0@@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)clockevents_register_device (&clockevent_ixp4xx); } + +void ixp4xx_restart (char mode,const char *cmd) +{ +if (1 && mode =='s' ) { +/* Jump into ROM at address 0 */ +soft_restart (0 ); + }else { +/* Use on-chip reset capability */ + +/* set the "key" register to enable access to +* "timer" and "enable" registers +*/ + *IXP4XX_OSWK =IXP4XX_WDT_KEY ; + +/* write 0 to the timer register for an immediate reset */ + *IXP4XX_OSWT =0 ; + + *IXP4XX_OSWE =IXP4XX_WDT_RESET_ENABLE |IXP4XX_WDT_COUNT_ENABLE ; + } +}arch/arm/mach-ixp4xx/coyote-setup.c +2
-0@@ -117,6 +117,7 @@ MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif @@ -132,6 +133,7 @@ MACHINE_START(IXDPG425, "Intel IXDPG425") .timer = &ixp4xx_timer, .atag_offset = 0x100, .init_machine = coyote_init, + .restart = ixp4xx_restart, MACHINE_END#endif arch/arm/mach-ixp4xx/dsmg600-setup.c +1
-0@@ -286,4 +286,5 @@ MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END arch/arm/mach-ixp4xx/fsg-setup.c +1
-0@@ -277,5 +277,6 @@ MACHINE_START(FSG, "Freecom FSG-3")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END arch/arm/mach-ixp4xx/gateway7001-setup.c +1
-0@@ -104,5 +104,6 @@ MACHINE_START(GATEWAY7001, "Gateway 7001 AP")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif arch/arm/mach-ixp4xx/goramo_mlr.c +1
-0@@ -504,4 +504,5 @@ MACHINE_START(GORAMO_MLR, "MultiLink")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END arch/arm/mach-ixp4xx/gtwx5715-setup.c +1
-0@@ -172,6 +172,7 @@ MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END arch/arm/mach-ixp4xx/include/mach/platform.h +1
-0@@ -125,6 +125,7 @@ extern void ixp4xx_init_irq(void);extern void ixp4xx_sys_init (void );extern void ixp4xx_timer_init (void );extern struct sys_timer ixp4xx_timer; +extern void ixp4xx_restart (char ,const char *);extern void ixp4xx_pci_preinit (void );struct pci_sys_data ;extern int ixp4xx_setup (int nr,struct pci_sys_data *sys);arch/arm/mach-ixp4xx/include/mach/system.h +0
-21@@ -8,9 +8,6 @@* published by the Free Software Foundation. * */ - -#include <mach/hardware.h> -static inline void arch_idle (void ) {/* ixp4xx does not implement the XScale PWRMODE register, @@ -21,24 +18,6 @@ static inline void arch_idle(void)#endif } -static inline void arch_reset (char mode,const char *cmd) { -if (1 && mode =='s' ) { -/* Jump into ROM at address 0 */ -soft_restart (0 ); - }else { -/* Use on-chip reset capability */ - -/* set the "key" register to enable access to -* "timer" and "enable" registers -*/ - *IXP4XX_OSWK =IXP4XX_WDT_KEY ; - -/* write 0 to the timer register for an immediate reset */ - *IXP4XX_OSWT =0 ; - - *IXP4XX_OSWE =IXP4XX_WDT_RESET_ENABLE |IXP4XX_WDT_COUNT_ENABLE ; - } } -arch/arm/mach-ixp4xx/ixdp425-setup.c +1
-0@@ -261,6 +261,7 @@ MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif arch/arm/mach-ixp4xx/nas100d-setup.c +1
-0@@ -321,4 +321,5 @@ MACHINE_START(NAS100D, "Iomega NAS 100d")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END arch/arm/mach-ixp4xx/nslu2-setup.c +1
-0@@ -307,4 +307,5 @@ MACHINE_START(NSLU2, "Linksys NSLU2")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END arch/arm/mach-ixp4xx/omixp-setup.c +3
-0@@ -246,6 +246,7 @@ MACHINE_START(DEVIXP, "Omicron DEVIXP") .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .init_machine = omixp_init, + .restart = ixp4xx_restart, MACHINE_END#endif @@ -259,6 +260,7 @@ MACHINE_START(MICCPT, "Omicron MICCPT")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif @@ -269,5 +271,6 @@ MACHINE_START(MIC256, "Omicron MIC256") .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .init_machine = omixp_init, + .restart = ixp4xx_restart, MACHINE_END#endif arch/arm/mach-ixp4xx/vulcan-setup.c +1
-0@@ -244,4 +244,5 @@ MACHINE_START(ARCOM_VULCAN, "Arcom/Eurotech Vulcan")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart,MACHINE_END arch/arm/mach-ixp4xx/wg302v2-setup.c +1
-0@@ -105,5 +105,6 @@ MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")#if defined(CONFIG_PCI ) .dma_zone_size = SZ_64M, #endif + .restart = ixp4xx_restart, MACHINE_END#endif Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 18/41 ARM: restart: ixp4xx: use new restart hook
Quoted 2 lines · Russell King - ARM Linux
Quoted 2 lines
Hook these platforms restart code into the new restart hook rather than using
arch_reset().
Looks good basically, except a detail:
Quoted 10 lines
arch/arm/mach-ixp4xx/common.c static void __init ixp4xx_clockevent_init(void) · line 506
Quoted 10 lines
arch/arm/mach-ixp4xx/common.c +4
-0@@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)clockevents_register_device (&clockevent_ixp4xx); } + +void ixp4xx_restart (char mode,const char *cmd) +{ +if (1 && mode =='s' ) {
^^^^^^^
This one. Yeah, I can see where does it come from. Otherwise,
Quoted 2 lines
arch/arm/mach-ixp4xx/common.c static void __init ixp4xx_clockevent_init(void) · line 508
Quoted 2 lines
arch/arm/mach-ixp4xx/common.c +2
-0+/* Jump into ROM at address 0 */ +soft_restart (0 );
OTOH I probably need to investigate this soft_restart, "when time permits", that's another story of course.
Signature · 1 line
Krzysztof Halasa
PATCH 18/41 ARM: restart: ixp4xx: use new restart hook
Quoted 11 lines · Krzysztof Halasa
Quoted 2 lines · Russell King - ARM Linux
Quoted 2 lines
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Looks good basically, except a detail:
Quoted 4 lines
Quoted 4 lines
arch/arm/mach-ixp4xx/common.c +0
-0@@ -500,3 +500,23 @@ static void __init ixp4xx_clockevent_init(void)
Quoted 8 lines
Quoted 6 lines
arch/arm/mach-ixp4xx/common.c static void __init ixp4xx_clockevent_init(void) · line 506
Quoted 6 lines
arch/arm/mach-ixp4xx/common.c +4
-0clockevents_register_device (&clockevent_ixp4xx); } + +void ixp4xx_restart (char mode,const char *cmd) +{ +if (1 && mode =='s' ) {^^^^^^^This one. Yeah, I can see where does it come from.
It's weird, I suspect it was supposed to be 1 || there, but I've no idea what the intention is there. So I left the code as-is.
Quoted 2 lines
Otherwise,
Acked-by Krzysztof Ha?asa <[email protected]>
I'm going to assume that applies to this version - because I think fixing that should be done independently of this patch series.
Quoted 7 lines
Quoted 2 lines
arch/arm/mach-ixp4xx/common.c static void __init ixp4xx_clockevent_init(void) · line 508
Quoted 2 lines
arch/arm/mach-ixp4xx/common.c +2
-0+/* Jump into ROM at address 0 */ +soft_restart (0 );OTOH I probably need to investigate this
soft_restart, "when time permits", that's another story of course.Signature · 1 line
Krzysztof Halasa
PATCH 18/41 ARM: restart: ixp4xx: use new restart hook
Quoted 4 lines · Russell King - ARM Linux
Quoted 1 line
Acked-by Krzysztof Ha?asa <[email protected]>I'm going to assume that applies to this version - because I think fixing that should be done independently of this patch series.
No problem, it doesn't look like a terribly important thing to me.
Signature · 1 line
Krzysztof Halasa
PATCH 19/41 ARM: restart: kirkwood: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-kirkwood/common.c | 16 ++++++++++++++++ arch/arm/mach-kirkwood/common.h | 1 + arch/arm/mach-kirkwood/d2net_v2-setup.c | 1 + arch/arm/mach-kirkwood/db88f6281-bp-setup.c | 1 + arch/arm/mach-kirkwood/dockstar-setup.c | 1 + arch/arm/mach-kirkwood/guruplug-setup.c | 1 + arch/arm/mach-kirkwood/include/mach/system.h | 15 --------------- arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | 1 + arch/arm/mach-kirkwood/netspace_v2-setup.c | 3 +++ arch/arm/mach-kirkwood/netxbig_v2-setup.c | 2 ++ arch/arm/mach-kirkwood/openrd-setup.c | 3 +++ arch/arm/mach-kirkwood/rd88f6192-nas-setup.c | 1 + arch/arm/mach-kirkwood/rd88f6281-setup.c | 1 + arch/arm/mach-kirkwood/sheevaplug-setup.c | 2 ++ arch/arm/mach-kirkwood/t5325-setup.c | 1 + arch/arm/mach-kirkwood/ts219-setup.c | 1 + arch/arm/mach-kirkwood/ts41x-setup.c | 1 + 17 files changed, 37 insertions(+), 15 deletions(-)
arch/arm/mach-kirkwood/common.c +16 -0
@@ -534,3 +534,19 @@ static int __init kirkwood_clock_gate(void)return 0 ; }late_initcall (kirkwood_clock_gate); + +void kirkwood_restart (char mode,const char *cmd) +{ +/* +* Enable soft reset to assert RSTOUTn. +*/ +writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); + +/* +* Assert soft reset. +*/ +writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); + +while (1 ) + ; +}
arch/arm/mach-kirkwood/common.h +1 -0
@@ -50,6 +50,7 @@ void kirkwood_uart1_init(void);void kirkwood_nand_init (struct mtd_partition *parts,int nr_parts,int delay);void kirkwood_nand_init_rnb (struct mtd_partition *parts,int nr_parts,int (*dev_ready)(struct mtd_info *));void kirkwood_audio_init (void ); +void kirkwood_restart (char ,const char *);extern int kirkwood_tclk;extern struct sys_timer kirkwood_timer;
arch/arm/mach-kirkwood/d2net_v2-setup.c +1 -0
@@ -227,4 +227,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/db88f6281-bp-setup.c +1 -0
@@ -103,4 +103,5 @@ MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/dockstar-setup.c +1 -0
@@ -108,4 +108,5 @@ MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/guruplug-setup.c +1 -0
@@ -127,4 +127,5 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/include/mach/system.h +0 -15
@@ -9,8 +9,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/bridge-regs.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -18,19 +16,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Enable soft reset to assert RSTOUTn. -*/ -writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); - -/* -* Assert soft reset. -*/ -writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); - -while (1 ) - ; } -#endif
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1 -0
@@ -169,4 +169,5 @@ MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/netspace_v2-setup.c +3 -0
@@ -264,6 +264,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
@@ -275,6 +276,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
@@ -286,5 +288,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
arch/arm/mach-kirkwood/netxbig_v2-setup.c +2 -0
@@ -405,6 +405,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
@@ -416,5 +417,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
arch/arm/mach-kirkwood/openrd-setup.c +3 -0
@@ -220,6 +220,7 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
@@ -232,6 +233,7 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
@@ -244,5 +246,6 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1 -0
@@ -85,4 +85,5 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/rd88f6281-setup.c +1 -0
@@ -121,4 +121,5 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/sheevaplug-setup.c +2 -0
@@ -144,6 +144,7 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
@@ -155,5 +156,6 @@ MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif
arch/arm/mach-kirkwood/t5325-setup.c +1 -0
@@ -207,4 +207,5 @@ MACHINE_START(T5325, "HP t5325 Thin Client") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/ts219-setup.c +1 -0
@@ -138,4 +138,5 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
arch/arm/mach-kirkwood/ts41x-setup.c +1 -0
@@ -182,4 +182,5 @@ MACHINE_START(TS41X, "QNAP TS-41x") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 19/41 ARM: restart: kirkwood: use new restart hook
Quoted 4 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>
Quoted 290 lines
--- arch/arm/mach-kirkwood/common.c | 16 ++++++++++++++++ arch/arm/mach-kirkwood/common.h | 1 + arch/arm/mach-kirkwood/d2net_v2-setup.c | 1 + arch/arm/mach-kirkwood/db88f6281-bp-setup.c | 1 + arch/arm/mach-kirkwood/dockstar-setup.c | 1 + arch/arm/mach-kirkwood/guruplug-setup.c | 1 + arch/arm/mach-kirkwood/include/mach/system.h | 15 --------------- arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | 1 + arch/arm/mach-kirkwood/netspace_v2-setup.c | 3 +++ arch/arm/mach-kirkwood/netxbig_v2-setup.c | 2 ++ arch/arm/mach-kirkwood/openrd-setup.c | 3 +++ arch/arm/mach-kirkwood/rd88f6192-nas-setup.c | 1 + arch/arm/mach-kirkwood/rd88f6281-setup.c | 1 + arch/arm/mach-kirkwood/sheevaplug-setup.c | 2 ++ arch/arm/mach-kirkwood/t5325-setup.c | 1 + arch/arm/mach-kirkwood/ts219-setup.c | 1 + arch/arm/mach-kirkwood/ts41x-setup.c | 1 + 17 files changed, 37 insertions(+), 15 deletions(-)arch/arm/mach-kirkwood/common.c +16
-0@@ -534,3 +534,19 @@ static int __init kirkwood_clock_gate(void)return 0 ; }late_initcall (kirkwood_clock_gate); + +void kirkwood_restart (char mode,const char *cmd) +{ +/* +* Enable soft reset to assert RSTOUTn. +*/ +writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); + +/* +* Assert soft reset. +*/ +writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); + +while (1 ) + ; +}arch/arm/mach-kirkwood/common.h +1
-0@@ -50,6 +50,7 @@ void kirkwood_uart1_init(void);void kirkwood_nand_init (struct mtd_partition *parts,int nr_parts,int delay);void kirkwood_nand_init_rnb (struct mtd_partition *parts,int nr_parts,int (*dev_ready)(struct mtd_info *));void kirkwood_audio_init (void ); +void kirkwood_restart (char ,const char *);extern int kirkwood_tclk;extern struct sys_timer kirkwood_timer;arch/arm/mach-kirkwood/d2net_v2-setup.c +1
-0@@ -227,4 +227,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/db88f6281-bp-setup.c +1
-0@@ -103,4 +103,5 @@ MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/dockstar-setup.c +1
-0@@ -108,4 +108,5 @@ MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/guruplug-setup.c +1
-0@@ -127,4 +127,5 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/include/mach/system.h +0
-15@@ -9,8 +9,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/bridge-regs.h> -static inline void arch_idle (void ) {cpu_do_idle ();@@ -18,19 +16,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Enable soft reset to assert RSTOUTn. -*/ -writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); - -/* -* Assert soft reset. -*/ -writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); - -while (1 ) - ; } -#endif arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1
-0@@ -169,4 +169,5 @@ MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/netspace_v2-setup.c +3
-0@@ -264,6 +264,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif @@ -275,6 +276,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif @@ -286,5 +288,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif arch/arm/mach-kirkwood/netxbig_v2-setup.c +2
-0@@ -405,6 +405,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif @@ -416,5 +417,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif arch/arm/mach-kirkwood/openrd-setup.c +3
-0@@ -220,6 +220,7 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif @@ -232,6 +233,7 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif @@ -244,5 +246,6 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1
-0@@ -85,4 +85,5 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/rd88f6281-setup.c +1
-0@@ -121,4 +121,5 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/sheevaplug-setup.c +2
-0@@ -144,6 +144,7 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif @@ -155,5 +156,6 @@ MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart, MACHINE_END#endif arch/arm/mach-kirkwood/t5325-setup.c +1
-0@@ -207,4 +207,5 @@ MACHINE_START(T5325, "HP t5325 Thin Client") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/ts219-setup.c +1
-0@@ -138,4 +138,5 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END arch/arm/mach-kirkwood/ts41x-setup.c +1
-0@@ -182,4 +182,5 @@ MACHINE_START(TS41X, "QNAP TS-41x") .init_early = kirkwood_init_early, .init_irq = kirkwood_init_irq, .timer = &kirkwood_timer, + .restart = kirkwood_restart,MACHINE_END Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 20/41 ARM: restart: lpc32xx: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the arm_pm_restart hook rather than using arch_reset().
--- arch/arm/mach-lpc32xx/common.c | 22 +++++++++++++++++++++- arch/arm/mach-lpc32xx/common.h | 2 ++ arch/arm/mach-lpc32xx/include/mach/system.h | 18 ------------------ arch/arm/mach-lpc32xx/phy3250.c | 1 + 4 files changed, 24 insertions(+), 19 deletions(-)
arch/arm/mach-lpc32xx/common.c +21 -1
@@ -164,7 +164,7 @@ int clk_is_sysclk_mainosc(void)/* * System reset via the watchdog timer */ -void lpc32xx_watchdog_reset (void ) +static void lpc32xx_watchdog_reset (void ) {/* Make sure WDT clocks are enabled */ __raw_writel(LPC32XX_CLKPWR_PWMCLK_WDOG_EN,
@@ -311,3 +311,23 @@ void __init lpc32xx_map_io(void) {iotable_init (lpc32xx_io_desc,ARRAY_SIZE (lpc32xx_io_desc)); } + +void lpc23xx_restart (char mode,const char *cmd) +{ +switch (mode) { +case 's' : +case 'h' : +printk (KERN_CRIT "RESET: Rebooting system\n" ); + +lpc32xx_watchdog_reset (); +break ; + +default : +/* Do nothing */ +break ; + } + +/* Wait for watchdog to reset system */ +while (1 ) + ; +}
arch/arm/mach-lpc32xx/common.h +2 -0
@@ -39,6 +39,8 @@ extern void __init lpc32xx_init_irq(void);extern void __init lpc32xx_map_io (void );extern void __init lpc32xx_serial_init (void );extern void __init lpc32xx_gpio_init (void ); +extern void lpc23xx_restart (char ,const char *); +/* * Structure used for setting up and querying the PLLS
arch/arm/mach-lpc32xx/include/mach/system.h +0 -18
@@ -26,24 +26,6 @@ static void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -extern void lpc32xx_watchdog_reset (void ); - -switch (mode) { -case 's' : -case 'h' : -printk (KERN_CRIT "RESET: Rebooting system\n" ); - -lpc32xx_watchdog_reset (); -break ; - -default : -/* Do nothing */ -break ; - } - -/* Wait for watchdog to reset system */ -while (1 ) - ; }#endif
arch/arm/mach-lpc32xx/phy3250.c +1 -0
@@ -388,4 +388,5 @@ MACHINE_START(PHY3250, "Phytec 3250 board with the LPC3250 Microcontroller") .init_irq = lpc32xx_init_irq, .timer = &lpc32xx_timer, .init_machine = phy3250_board_init, + .restart = lpc23xx_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 21/41 ARM: restart: mmp: use new restart hook
In reply to Russell King - ARM LinuxHook the Shark restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-mmp/aspenite.c | 2 ++ arch/arm/mach-mmp/avengers_lite.c | 1 + arch/arm/mach-mmp/brownstone.c | 1 + arch/arm/mach-mmp/common.c | 5 +++++ arch/arm/mach-mmp/common.h | 1 + arch/arm/mach-mmp/flint.c | 1 + arch/arm/mach-mmp/gplugd.c | 1 + arch/arm/mach-mmp/include/mach/pxa168.h | 1 + arch/arm/mach-mmp/include/mach/system.h | 6 ------ arch/arm/mach-mmp/jasper.c | 1 + arch/arm/mach-mmp/pxa168.c | 5 +++++ arch/arm/mach-mmp/tavorevb.c | 1 + arch/arm/mach-mmp/teton_bga.c | 1 + arch/arm/mach-mmp/ttc_dkb.c | 1 + 14 files changed, 22 insertions(+), 6 deletions(-)
arch/arm/mach-mmp/aspenite.c +2 -0
@@ -242,6 +242,7 @@ MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = common_init, + .restart = pxa168_restart, MACHINE_ENDMACHINE_START (ZYLONITE2 ,"PXA168-based Zylonite2 Development Platform" )
@@ -250,4 +251,5 @@ MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform") .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = common_init, + .restart = pxa168_restart,MACHINE_END
arch/arm/mach-mmp/avengers_lite.c +1 -0
@@ -45,4 +45,5 @@ MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform") .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = avengers_lite_init, + .restart = pxa168_restart,MACHINE_END
arch/arm/mach-mmp/brownstone.c +1 -0
@@ -219,4 +219,5 @@ MACHINE_START(BROWNSTONE, "Brownstone Development Platform") .init_irq = mmp2_init_irq, .timer = &mmp2_timer, .init_machine = brownstone_init, + .restart = mmp_restart,MACHINE_END
arch/arm/mach-mmp/common.c +5 -0
@@ -45,3 +45,8 @@ void __init mmp_map_io(void)/* this is early, initialize mmp_chip_id here */ mmp_chip_id =__raw_readl (MMP_CHIPID ); } + +void mmp_restart (char mode,const char *cmd) +{ +soft_restart (0 ); +}
arch/arm/mach-mmp/common.h +1 -0
@@ -6,3 +6,4 @@ extern void timer_init(int irq);extern void __init icu_init_irq (void );extern void __init mmp_map_io (void ); +extern void mmp_restart (char ,const char *);
arch/arm/mach-mmp/flint.c +1 -0
@@ -121,4 +121,5 @@ MACHINE_START(FLINT, "Flint Development Platform") .init_irq = mmp2_init_irq, .timer = &mmp2_timer, .init_machine = flint_init, + .restart = mmp_restart,MACHINE_END
arch/arm/mach-mmp/gplugd.c +1 -0
@@ -194,4 +194,5 @@ MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform") .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = gplugd_init, + .restart = pxa168_restart,MACHINE_END
arch/arm/mach-mmp/include/mach/pxa168.h +1 -0
@@ -5,6 +5,7 @@ struct sys_timer;extern struct sys_timer pxa168_timer;extern void __init pxa168_init_irq (void ); +extern void pxa168_restart (char ,const char *);extern void pxa168_clear_keypad_wakeup (void );#include <linux/i2c.h>
arch/arm/mach-mmp/include/mach/system.h +0 -6
@@ -9,8 +9,6 @@#ifndef __ASM_MACH_SYSTEM_H#define __ASM_MACH_SYSTEM_H -#include <mach/cputype.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -18,9 +16,5 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -if (cpu_is_pxa168 ()) -soft_restart (0xffff0000 ); -else -soft_restart (0 ); }#endif /* __ASM_MACH_SYSTEM_H */
arch/arm/mach-mmp/jasper.c +1 -0
@@ -175,4 +175,5 @@ MACHINE_START(MARVELL_JASPER, "Jasper Development Platform") .init_irq = mmp2_init_irq, .timer = &mmp2_timer, .init_machine = jasper_init, + .restart = mmp_restart,MACHINE_END
arch/arm/mach-mmp/pxa168.c +5 -0
@@ -214,3 +214,8 @@ int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata) pxa168_device_usb_host.dev.platform_data = pdata;return platform_device_register (&pxa168_device_usb_host); } + +void pxa168_restart (char mode,const char *cmd) +{ +soft_restart (0xffff0000 ); +}
arch/arm/mach-mmp/tavorevb.c +1 -0
@@ -103,4 +103,5 @@ MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)") .init_irq = pxa910_init_irq, .timer = &pxa910_timer, .init_machine = tavorevb_init, + .restart = mmp_restart,MACHINE_END
arch/arm/mach-mmp/teton_bga.c +1 -0
@@ -86,4 +86,5 @@ MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform") .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = teton_bga_init, + .restart = pxa168_restart,MACHINE_END
arch/arm/mach-mmp/ttc_dkb.c +1 -0
@@ -159,4 +159,5 @@ MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform") .init_irq = pxa910_init_irq, .timer = &pxa910_timer, .init_machine = ttc_dkb_init, + .restart = mmp_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 22/41 ARM: restart: mv78xx0: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 1 + arch/arm/mach-mv78xx0/common.c | 16 ++++++++++++++++ arch/arm/mach-mv78xx0/common.h | 1 + arch/arm/mach-mv78xx0/db78x00-bp-setup.c | 1 + arch/arm/mach-mv78xx0/include/mach/system.h | 14 -------------- arch/arm/mach-mv78xx0/rd78x00-masa-setup.c | 1 + 6 files changed, 20 insertions(+), 14 deletions(-)
arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +1 -0
@@ -151,4 +151,5 @@ MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL") .init_early = mv78xx0_init_early, .init_irq = mv78xx0_init_irq, .timer = &mv78xx0_timer, + .restart = mv78xx0_restart,MACHINE_END
arch/arm/mach-mv78xx0/common.c +16 -0
@@ -401,3 +401,19 @@ void __init mv78xx0_init(void)feroceon_l2_init (is_l2_writethrough ());#endif } + +void mv78xx0_restart (char mode,const char *cmd) +{ +/* +* Enable soft reset to assert RSTOUTn. +*/ +writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); + +/* +* Assert soft reset. +*/ +writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); + +while (1 ) + ; +}
arch/arm/mach-mv78xx0/common.h +1 -0
@@ -46,6 +46,7 @@ void mv78xx0_uart1_init(void);void mv78xx0_uart2_init (void );void mv78xx0_uart3_init (void );void mv78xx0_i2c_init (void ); +void mv78xx0_restart (char ,const char *);extern struct sys_timer mv78xx0_timer;
arch/arm/mach-mv78xx0/db78x00-bp-setup.c +1 -0
@@ -99,4 +99,5 @@ MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board") .init_early = mv78xx0_init_early, .init_irq = mv78xx0_init_irq, .timer = &mv78xx0_timer, + .restart = mv78xx0_restart,MACHINE_END
arch/arm/mach-mv78xx0/include/mach/system.h +0 -14
@@ -9,8 +9,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/bridge-regs.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -18,18 +16,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Enable soft reset to assert RSTOUTn. -*/ -writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); - -/* -* Assert soft reset. -*/ -writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); - -while (1 ) - ; }
arch/arm/mach-mv78xx0/rd78x00-masa-setup.c +1 -0
@@ -84,4 +84,5 @@ MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board") .init_early = mv78xx0_init_early, .init_irq = mv78xx0_init_irq, .timer = &mv78xx0_timer, + .restart = mv78xx0_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 22/41 ARM: restart: mv78xx0: use new restart hook
Quoted 4 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>
(missed the non Kirkwood ones before)
Quoted 116 lines
--- arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 1 + arch/arm/mach-mv78xx0/common.c | 16 ++++++++++++++++ arch/arm/mach-mv78xx0/common.h | 1 + arch/arm/mach-mv78xx0/db78x00-bp-setup.c | 1 + arch/arm/mach-mv78xx0/include/mach/system.h | 14 -------------- arch/arm/mach-mv78xx0/rd78x00-masa-setup.c | 1 + 6 files changed, 20 insertions(+), 14 deletions(-)arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +1
-0@@ -151,4 +151,5 @@ MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL") .init_early = mv78xx0_init_early, .init_irq = mv78xx0_init_irq, .timer = &mv78xx0_timer, + .restart = mv78xx0_restart,MACHINE_END arch/arm/mach-mv78xx0/common.c +16
-0@@ -401,3 +401,19 @@ void __init mv78xx0_init(void)feroceon_l2_init (is_l2_writethrough ());#endif } + +void mv78xx0_restart (char mode,const char *cmd) +{ +/* +* Enable soft reset to assert RSTOUTn. +*/ +writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); + +/* +* Assert soft reset. +*/ +writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); + +while (1 ) + ; +}arch/arm/mach-mv78xx0/common.h +1
-0@@ -46,6 +46,7 @@ void mv78xx0_uart1_init(void);void mv78xx0_uart2_init (void );void mv78xx0_uart3_init (void );void mv78xx0_i2c_init (void ); +void mv78xx0_restart (char ,const char *);extern struct sys_timer mv78xx0_timer;arch/arm/mach-mv78xx0/db78x00-bp-setup.c +1
-0@@ -99,4 +99,5 @@ MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board") .init_early = mv78xx0_init_early, .init_irq = mv78xx0_init_irq, .timer = &mv78xx0_timer, + .restart = mv78xx0_restart,MACHINE_END arch/arm/mach-mv78xx0/include/mach/system.h +0
-14@@ -9,8 +9,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/bridge-regs.h> -static inline void arch_idle (void ) {cpu_do_idle ();@@ -18,18 +16,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Enable soft reset to assert RSTOUTn. -*/ -writel (SOFT_RESET_OUT_EN , RSTOUTn_MASK); - -/* -* Assert soft reset. -*/ -writel (SOFT_RESET ,SYSTEM_SOFT_RESET ); - -while (1 ) - ; }arch/arm/mach-mv78xx0/rd78x00-masa-setup.c +1
-0@@ -84,4 +84,5 @@ MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board") .init_early = mv78xx0_init_early, .init_irq = mv78xx0_init_irq, .timer = &mv78xx0_timer, + .restart = mv78xx0_restart,MACHINE_END Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 23/41 ARM: restart: mxc: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-imx/mach-apf9328.c | 1 + arch/arm/mach-imx/mach-armadillo5x0.c | 1 + arch/arm/mach-imx/mach-bug.c | 1 + arch/arm/mach-imx/mach-cpuimx27.c | 1 + arch/arm/mach-imx/mach-cpuimx35.c | 1 + arch/arm/mach-imx/mach-eukrea_cpuimx25.c | 1 + arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 1 + arch/arm/mach-imx/mach-imx27ipcam.c | 1 + arch/arm/mach-imx/mach-imx27lite.c | 1 + arch/arm/mach-imx/mach-imx6q.c | 1 + arch/arm/mach-imx/mach-kzm_arm11_01.c | 1 + arch/arm/mach-imx/mach-mx1ads.c | 2 ++ arch/arm/mach-imx/mach-mx21ads.c | 1 + arch/arm/mach-imx/mach-mx25_3ds.c | 1 + arch/arm/mach-imx/mach-mx27_3ds.c | 1 + arch/arm/mach-imx/mach-mx27ads.c | 1 + arch/arm/mach-imx/mach-mx31_3ds.c | 1 + arch/arm/mach-imx/mach-mx31ads.c | 1 + arch/arm/mach-imx/mach-mx31lilly.c | 1 + arch/arm/mach-imx/mach-mx31lite.c | 1 + arch/arm/mach-imx/mach-mx31moboard.c | 1 + arch/arm/mach-imx/mach-mx35_3ds.c | 1 + arch/arm/mach-imx/mach-mxt_td60.c | 1 + arch/arm/mach-imx/mach-pca100.c | 1 + arch/arm/mach-imx/mach-pcm037.c | 1 + arch/arm/mach-imx/mach-pcm038.c | 1 + arch/arm/mach-imx/mach-pcm043.c | 1 + arch/arm/mach-imx/mach-qong.c | 1 + arch/arm/mach-imx/mach-scb9328.c | 1 + arch/arm/mach-imx/mach-vpr200.c | 1 + arch/arm/mach-mx5/board-cpuimx51.c | 1 + arch/arm/mach-mx5/board-cpuimx51sd.c | 1 + arch/arm/mach-mx5/board-mx50_rdp.c | 1 + arch/arm/mach-mx5/board-mx51_3ds.c | 1 + arch/arm/mach-mx5/board-mx51_babbage.c | 1 + arch/arm/mach-mx5/board-mx51_efikamx.c | 3 ++- arch/arm/mach-mx5/board-mx51_efikasb.c | 1 + arch/arm/mach-mx5/board-mx53_ard.c | 1 + arch/arm/mach-mx5/board-mx53_evk.c | 1 + arch/arm/mach-mx5/board-mx53_loco.c | 1 + arch/arm/mach-mx5/board-mx53_smd.c | 1 + arch/arm/mach-mx5/imx51-dt.c | 1 + arch/arm/mach-mx5/imx53-dt.c | 1 + arch/arm/plat-mxc/include/mach/common.h | 2 +- arch/arm/plat-mxc/include/mach/system.h | 4 +++- arch/arm/plat-mxc/system.c | 9 +-------- 46 files changed, 50 insertions(+), 11 deletions(-)
arch/arm/mach-imx/mach-apf9328.c +1 -0
@@ -139,4 +139,5 @@ MACHINE_START(APF9328, "Armadeus APF9328") .handle_irq = imx1_handle_irq, .timer = &apf9328_timer, .init_machine = apf9328_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-armadillo5x0.c +1 -0
@@ -561,4 +561,5 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500") .handle_irq = imx31_handle_irq, .timer = &armadillo5x0_timer, .init_machine = armadillo5x0_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-bug.c +1 -0
@@ -65,4 +65,5 @@ MACHINE_START(BUG, "BugLabs BUGBase") .handle_irq = imx31_handle_irq, .timer = &bug_timer, .init_machine = bug_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-cpuimx27.c +1 -0
@@ -318,4 +318,5 @@ MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") .handle_irq = imx27_handle_irq, .timer = &eukrea_cpuimx27_timer, .init_machine = eukrea_cpuimx27_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-cpuimx35.c +1 -0
@@ -201,4 +201,5 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") .handle_irq = imx35_handle_irq, .timer = &eukrea_cpuimx35_timer, .init_machine = eukrea_cpuimx35_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-eukrea_cpuimx25.c +1 -0
@@ -170,4 +170,5 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") .handle_irq = imx25_handle_irq, .timer = &eukrea_cpuimx25_timer, .init_machine = eukrea_cpuimx25_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-imx27_visstrim_m10.c +1 -0
@@ -282,4 +282,5 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") .handle_irq = imx27_handle_irq, .timer = &visstrim_m10_timer, .init_machine = visstrim_m10_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-imx27ipcam.c +1 -0
@@ -78,4 +78,5 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") .handle_irq = imx27_handle_irq, .timer = &mx27ipcam_timer, .init_machine = mx27ipcam_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-imx27lite.c +1 -0
@@ -84,4 +84,5 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") .handle_irq = imx27_handle_irq, .timer = &mx27lite_timer, .init_machine = mx27lite_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-imx6q.c +1 -0
@@ -81,4 +81,5 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)") .timer = &imx6q_timer, .init_machine = imx6q_init_machine, .dt_compat = imx6q_dt_compat, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-kzm_arm11_01.c +1 -0
@@ -279,4 +279,5 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") .handle_irq = imx31_handle_irq, .timer = &kzm_timer, .init_machine = kzm_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx1ads.c +2 -0
@@ -147,6 +147,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") .handle_irq = imx1_handle_irq, .timer = &mx1ads_timer, .init_machine = mx1ads_init, + .restart = mxc_restart, MACHINE_ENDMACHINE_START (MXLADS ,"Freescale MXLADS" )
@@ -157,4 +158,5 @@ MACHINE_START(MXLADS, "Freescale MXLADS") .handle_irq = imx1_handle_irq, .timer = &mx1ads_timer, .init_machine = mx1ads_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx21ads.c +1 -0
@@ -312,4 +312,5 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS") .handle_irq = imx21_handle_irq, .timer = &mx21ads_timer, .init_machine = mx21ads_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx25_3ds.c +1 -0
@@ -270,4 +270,5 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") .handle_irq = imx25_handle_irq, .timer = &mx25pdk_timer, .init_machine = mx25pdk_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx27_3ds.c +1 -0
@@ -425,4 +425,5 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK") .handle_irq = imx27_handle_irq, .timer = &mx27pdk_timer, .init_machine = mx27pdk_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx27ads.c +1 -0
@@ -351,4 +351,5 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS") .handle_irq = imx27_handle_irq, .timer = &mx27ads_timer, .init_machine = mx27ads_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx31_3ds.c +1 -0
@@ -770,4 +770,5 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") .timer = &mx31_3ds_timer, .init_machine = mx31_3ds_init, .reserve = mx31_3ds_reserve, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx31ads.c +1 -0
@@ -542,4 +542,5 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS") .handle_irq = imx31_handle_irq, .timer = &mx31ads_timer, .init_machine = mx31ads_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx31lilly.c +1 -0
@@ -302,4 +302,5 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131") .handle_irq = imx31_handle_irq, .timer = &mx31lilly_timer, .init_machine = mx31lilly_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx31lite.c +1 -0
@@ -286,4 +286,5 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") .handle_irq = imx31_handle_irq, .timer = &mx31lite_timer, .init_machine = mx31lite_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx31moboard.c +1 -0
@@ -599,4 +599,5 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") .handle_irq = imx31_handle_irq, .timer = &mx31moboard_timer, .init_machine = mx31moboard_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mx35_3ds.c +1 -0
@@ -224,4 +224,5 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") .handle_irq = imx35_handle_irq, .timer = &mx35pdk_timer, .init_machine = mx35_3ds_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-mxt_td60.c +1 -0
@@ -274,4 +274,5 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") .handle_irq = imx27_handle_irq, .timer = &mxt_td60_timer, .init_machine = mxt_td60_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-pca100.c +1 -0
@@ -442,4 +442,5 @@ MACHINE_START(PCA100, "phyCARD-i.MX27") .handle_irq = imx27_handle_irq, .init_machine = pca100_init, .timer = &pca100_timer, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-pcm037.c +1 -0
@@ -696,4 +696,5 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") .handle_irq = imx31_handle_irq, .timer = &pcm037_timer, .init_machine = pcm037_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-pcm038.c +1 -0
@@ -357,4 +357,5 @@ MACHINE_START(PCM038, "phyCORE-i.MX27") .handle_irq = imx27_handle_irq, .timer = &pcm038_timer, .init_machine = pcm038_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-pcm043.c +1 -0
@@ -425,4 +425,5 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043") .handle_irq = imx35_handle_irq, .timer = &pcm043_timer, .init_machine = pcm043_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-qong.c +1 -0
@@ -273,4 +273,5 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") .handle_irq = imx31_handle_irq, .timer = &qong_timer, .init_machine = qong_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-scb9328.c +1 -0
@@ -144,4 +144,5 @@ MACHINE_START(SCB9328, "Synertronixx scb9328") .handle_irq = imx1_handle_irq, .timer = &scb9328_timer, .init_machine = scb9328_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-imx/mach-vpr200.c +1 -0
@@ -322,4 +322,5 @@ MACHINE_START(VPR200, "VPR200") .handle_irq = imx35_handle_irq, .timer = &vpr200_timer, .init_machine = vpr200_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-cpuimx51.c +1 -0
@@ -297,4 +297,5 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module") .handle_irq = imx51_handle_irq, .timer = &mxc_timer, .init_machine = eukrea_cpuimx51_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-cpuimx51sd.c +1 -0
@@ -335,4 +335,5 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") .handle_irq = imx51_handle_irq, .timer = &mxc_timer, .init_machine = eukrea_cpuimx51sd_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-mx50_rdp.c +1 -0
@@ -222,4 +222,5 @@ MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform") .handle_irq = imx50_handle_irq, .timer = &mx50_rdp_timer, .init_machine = mx50_rdp_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-mx51_3ds.c +1 -0
@@ -175,4 +175,5 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") .handle_irq = imx51_handle_irq, .timer = &mx51_3ds_timer, .init_machine = mx51_3ds_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-mx51_babbage.c +1 -0
@@ -426,4 +426,5 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") .handle_irq = imx51_handle_irq, .timer = &mx51_babbage_timer, .init_machine = mx51_babbage_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-mx51_efikamx.c +2 -1
@@ -182,7 +182,7 @@ static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initcon .nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey), }; -void mx51_efikamx_reset (void ) +static void mx51_efikamx_restart (char mode,const char *cmd) {if (system_rev ==0x11 )gpio_direction_output (EFIKAMX_RESET1_1 ,0 );
@@ -292,4 +292,5 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") .handle_irq = imx51_handle_irq, .timer = &mx51_efikamx_timer, .init_machine = mx51_efikamx_init, + .restart = mx51_efikamx_restart,MACHINE_END
arch/arm/mach-mx5/board-mx51_efikasb.c +1 -0
@@ -287,4 +287,5 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook") .handle_irq = imx51_handle_irq, .init_machine = efikasb_board_init, .timer = &mx51_efikasb_timer, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-mx53_ard.c +1 -0
@@ -257,4 +257,5 @@ MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board") .handle_irq = imx53_handle_irq, .timer = &mx53_ard_timer, .init_machine = mx53_ard_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-mx53_evk.c +1 -0
@@ -175,4 +175,5 @@ MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board") .handle_irq = imx53_handle_irq, .timer = &mx53_evk_timer, .init_machine = mx53_evk_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-mx53_loco.c +1 -0
@@ -317,4 +317,5 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") .handle_irq = imx53_handle_irq, .timer = &mx53_loco_timer, .init_machine = mx53_loco_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/board-mx53_smd.c +1 -0
@@ -164,4 +164,5 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board") .handle_irq = imx53_handle_irq, .timer = &mx53_smd_timer, .init_machine = mx53_smd_board_init, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/imx51-dt.c +1 -0
@@ -113,4 +113,5 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") .timer = &imx51_timer, .init_machine = imx51_dt_init, .dt_compat = imx51_dt_board_compat, + .restart = mxc_restart,MACHINE_END
arch/arm/mach-mx5/imx53-dt.c +1 -0
@@ -123,4 +123,5 @@ DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") .timer = &imx53_timer, .init_machine = imx53_dt_init, .dt_compat = imx53_dt_board_compat, + .restart = mxc_restart,MACHINE_END
arch/arm/plat-mxc/include/mach/common.h +1 -1
@@ -71,8 +71,8 @@ extern int mx6q_clocks_init(void);extern struct platform_device *mxc_register_gpio (char *name,int id,resource_size_t iobase,resource_size_t iosize,int irq,int irq_high);extern void mxc_set_cpu_type (unsigned int type); +extern void mxc_restart (char ,const char *);extern void mxc_arch_reset_init (void __iomem *); -extern void mx51_efikamx_reset (void );extern int mx53_revision (void );extern int mx53_display_revision (void );
arch/arm/plat-mxc/include/mach/system.h +3 -1
@@ -27,6 +27,8 @@ static inline void arch_idle(void) cpu_do_idle(); } -void arch_reset (char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
arch/arm/plat-mxc/system.c +1 -8
@@ -36,17 +36,10 @@ static void __iomem *wdog_base;/* * Reset the system. It is called by machine_restart(). */ -void arch_reset (char mode,const char *cmd) +void mxc_restart (char mode,const char *cmd) {unsigned int wcr_enable; -#ifdef CONFIG_MACH_MX51_EFIKAMX -if (machine_is_mx51_efikamx ()) { -mx51_efikamx_reset (); -return ; - } -#endif -if (cpu_is_mx1 ()) { wcr_enable = (1 <<0 ); }else {
Signature · 1 line
1.7.4.4
PATCH 23/41 ARM: restart: mxc: use new restart hook
Ack?
Quoted 559 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>--- arch/arm/mach-imx/mach-apf9328.c | 1 + arch/arm/mach-imx/mach-armadillo5x0.c | 1 + arch/arm/mach-imx/mach-bug.c | 1 + arch/arm/mach-imx/mach-cpuimx27.c | 1 + arch/arm/mach-imx/mach-cpuimx35.c | 1 + arch/arm/mach-imx/mach-eukrea_cpuimx25.c | 1 + arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 1 + arch/arm/mach-imx/mach-imx27ipcam.c | 1 + arch/arm/mach-imx/mach-imx27lite.c | 1 + arch/arm/mach-imx/mach-imx6q.c | 1 + arch/arm/mach-imx/mach-kzm_arm11_01.c | 1 + arch/arm/mach-imx/mach-mx1ads.c | 2 ++ arch/arm/mach-imx/mach-mx21ads.c | 1 + arch/arm/mach-imx/mach-mx25_3ds.c | 1 + arch/arm/mach-imx/mach-mx27_3ds.c | 1 + arch/arm/mach-imx/mach-mx27ads.c | 1 + arch/arm/mach-imx/mach-mx31_3ds.c | 1 + arch/arm/mach-imx/mach-mx31ads.c | 1 + arch/arm/mach-imx/mach-mx31lilly.c | 1 + arch/arm/mach-imx/mach-mx31lite.c | 1 + arch/arm/mach-imx/mach-mx31moboard.c | 1 + arch/arm/mach-imx/mach-mx35_3ds.c | 1 + arch/arm/mach-imx/mach-mxt_td60.c | 1 + arch/arm/mach-imx/mach-pca100.c | 1 + arch/arm/mach-imx/mach-pcm037.c | 1 + arch/arm/mach-imx/mach-pcm038.c | 1 + arch/arm/mach-imx/mach-pcm043.c | 1 + arch/arm/mach-imx/mach-qong.c | 1 + arch/arm/mach-imx/mach-scb9328.c | 1 + arch/arm/mach-imx/mach-vpr200.c | 1 + arch/arm/mach-mx5/board-cpuimx51.c | 1 + arch/arm/mach-mx5/board-cpuimx51sd.c | 1 + arch/arm/mach-mx5/board-mx50_rdp.c | 1 + arch/arm/mach-mx5/board-mx51_3ds.c | 1 + arch/arm/mach-mx5/board-mx51_babbage.c | 1 + arch/arm/mach-mx5/board-mx51_efikamx.c | 3 ++- arch/arm/mach-mx5/board-mx51_efikasb.c | 1 + arch/arm/mach-mx5/board-mx53_ard.c | 1 + arch/arm/mach-mx5/board-mx53_evk.c | 1 + arch/arm/mach-mx5/board-mx53_loco.c | 1 + arch/arm/mach-mx5/board-mx53_smd.c | 1 + arch/arm/mach-mx5/imx51-dt.c | 1 + arch/arm/mach-mx5/imx53-dt.c | 1 + arch/arm/plat-mxc/include/mach/common.h | 2 +- arch/arm/plat-mxc/include/mach/system.h | 4 +++- arch/arm/plat-mxc/system.c | 9 +-------- 46 files changed, 50 insertions(+), 11 deletions(-)arch/arm/mach-imx/mach-apf9328.c +1
-0@@ -139,4 +139,5 @@ MACHINE_START(APF9328, "Armadeus APF9328") .handle_irq = imx1_handle_irq, .timer = &apf9328_timer, .init_machine = apf9328_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-armadillo5x0.c +1
-0@@ -561,4 +561,5 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500") .handle_irq = imx31_handle_irq, .timer = &armadillo5x0_timer, .init_machine = armadillo5x0_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-bug.c +1
-0@@ -65,4 +65,5 @@ MACHINE_START(BUG, "BugLabs BUGBase") .handle_irq = imx31_handle_irq, .timer = &bug_timer, .init_machine = bug_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-cpuimx27.c +1
-0@@ -318,4 +318,5 @@ MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") .handle_irq = imx27_handle_irq, .timer = &eukrea_cpuimx27_timer, .init_machine = eukrea_cpuimx27_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-cpuimx35.c +1
-0@@ -201,4 +201,5 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") .handle_irq = imx35_handle_irq, .timer = &eukrea_cpuimx35_timer, .init_machine = eukrea_cpuimx35_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-eukrea_cpuimx25.c +1
-0@@ -170,4 +170,5 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") .handle_irq = imx25_handle_irq, .timer = &eukrea_cpuimx25_timer, .init_machine = eukrea_cpuimx25_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-imx27_visstrim_m10.c +1
-0@@ -282,4 +282,5 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") .handle_irq = imx27_handle_irq, .timer = &visstrim_m10_timer, .init_machine = visstrim_m10_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-imx27ipcam.c +1
-0@@ -78,4 +78,5 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") .handle_irq = imx27_handle_irq, .timer = &mx27ipcam_timer, .init_machine = mx27ipcam_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-imx27lite.c +1
-0@@ -84,4 +84,5 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") .handle_irq = imx27_handle_irq, .timer = &mx27lite_timer, .init_machine = mx27lite_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-imx6q.c +1
-0@@ -81,4 +81,5 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)") .timer = &imx6q_timer, .init_machine = imx6q_init_machine, .dt_compat = imx6q_dt_compat, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-kzm_arm11_01.c +1
-0@@ -279,4 +279,5 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") .handle_irq = imx31_handle_irq, .timer = &kzm_timer, .init_machine = kzm_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx1ads.c +2
-0@@ -147,6 +147,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") .handle_irq = imx1_handle_irq, .timer = &mx1ads_timer, .init_machine = mx1ads_init, + .restart = mxc_restart, MACHINE_ENDMACHINE_START (MXLADS ,"Freescale MXLADS" )@@ -157,4 +158,5 @@ MACHINE_START(MXLADS, "Freescale MXLADS") .handle_irq = imx1_handle_irq, .timer = &mx1ads_timer, .init_machine = mx1ads_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx21ads.c +1
-0@@ -312,4 +312,5 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS") .handle_irq = imx21_handle_irq, .timer = &mx21ads_timer, .init_machine = mx21ads_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx25_3ds.c +1
-0@@ -270,4 +270,5 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") .handle_irq = imx25_handle_irq, .timer = &mx25pdk_timer, .init_machine = mx25pdk_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx27_3ds.c +1
-0@@ -425,4 +425,5 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK") .handle_irq = imx27_handle_irq, .timer = &mx27pdk_timer, .init_machine = mx27pdk_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx27ads.c +1
-0@@ -351,4 +351,5 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS") .handle_irq = imx27_handle_irq, .timer = &mx27ads_timer, .init_machine = mx27ads_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx31_3ds.c +1
-0@@ -770,4 +770,5 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") .timer = &mx31_3ds_timer, .init_machine = mx31_3ds_init, .reserve = mx31_3ds_reserve, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx31ads.c +1
-0@@ -542,4 +542,5 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS") .handle_irq = imx31_handle_irq, .timer = &mx31ads_timer, .init_machine = mx31ads_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx31lilly.c +1
-0@@ -302,4 +302,5 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131") .handle_irq = imx31_handle_irq, .timer = &mx31lilly_timer, .init_machine = mx31lilly_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx31lite.c +1
-0@@ -286,4 +286,5 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") .handle_irq = imx31_handle_irq, .timer = &mx31lite_timer, .init_machine = mx31lite_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx31moboard.c +1
-0@@ -599,4 +599,5 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") .handle_irq = imx31_handle_irq, .timer = &mx31moboard_timer, .init_machine = mx31moboard_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mx35_3ds.c +1
-0@@ -224,4 +224,5 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") .handle_irq = imx35_handle_irq, .timer = &mx35pdk_timer, .init_machine = mx35_3ds_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-mxt_td60.c +1
-0@@ -274,4 +274,5 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") .handle_irq = imx27_handle_irq, .timer = &mxt_td60_timer, .init_machine = mxt_td60_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-pca100.c +1
-0@@ -442,4 +442,5 @@ MACHINE_START(PCA100, "phyCARD-i.MX27") .handle_irq = imx27_handle_irq, .init_machine = pca100_init, .timer = &pca100_timer, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-pcm037.c +1
-0@@ -696,4 +696,5 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") .handle_irq = imx31_handle_irq, .timer = &pcm037_timer, .init_machine = pcm037_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-pcm038.c +1
-0@@ -357,4 +357,5 @@ MACHINE_START(PCM038, "phyCORE-i.MX27") .handle_irq = imx27_handle_irq, .timer = &pcm038_timer, .init_machine = pcm038_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-pcm043.c +1
-0@@ -425,4 +425,5 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043") .handle_irq = imx35_handle_irq, .timer = &pcm043_timer, .init_machine = pcm043_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-qong.c +1
-0@@ -273,4 +273,5 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") .handle_irq = imx31_handle_irq, .timer = &qong_timer, .init_machine = qong_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-scb9328.c +1
-0@@ -144,4 +144,5 @@ MACHINE_START(SCB9328, "Synertronixx scb9328") .handle_irq = imx1_handle_irq, .timer = &scb9328_timer, .init_machine = scb9328_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-imx/mach-vpr200.c +1
-0@@ -322,4 +322,5 @@ MACHINE_START(VPR200, "VPR200") .handle_irq = imx35_handle_irq, .timer = &vpr200_timer, .init_machine = vpr200_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-cpuimx51.c +1
-0@@ -297,4 +297,5 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module") .handle_irq = imx51_handle_irq, .timer = &mxc_timer, .init_machine = eukrea_cpuimx51_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-cpuimx51sd.c +1
-0@@ -335,4 +335,5 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") .handle_irq = imx51_handle_irq, .timer = &mxc_timer, .init_machine = eukrea_cpuimx51sd_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-mx50_rdp.c +1
-0@@ -222,4 +222,5 @@ MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform") .handle_irq = imx50_handle_irq, .timer = &mx50_rdp_timer, .init_machine = mx50_rdp_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-mx51_3ds.c +1
-0@@ -175,4 +175,5 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") .handle_irq = imx51_handle_irq, .timer = &mx51_3ds_timer, .init_machine = mx51_3ds_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-mx51_babbage.c +1
-0@@ -426,4 +426,5 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") .handle_irq = imx51_handle_irq, .timer = &mx51_babbage_timer, .init_machine = mx51_babbage_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-mx51_efikamx.c +2
-1@@ -182,7 +182,7 @@ static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initcon .nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey), }; -void mx51_efikamx_reset (void ) +static void mx51_efikamx_restart (char mode,const char *cmd) {if (system_rev ==0x11 )gpio_direction_output (EFIKAMX_RESET1_1 ,0 );@@ -292,4 +292,5 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") .handle_irq = imx51_handle_irq, .timer = &mx51_efikamx_timer, .init_machine = mx51_efikamx_init, + .restart = mx51_efikamx_restart,MACHINE_END arch/arm/mach-mx5/board-mx51_efikasb.c +1
-0@@ -287,4 +287,5 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook") .handle_irq = imx51_handle_irq, .init_machine = efikasb_board_init, .timer = &mx51_efikasb_timer, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-mx53_ard.c +1
-0@@ -257,4 +257,5 @@ MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board") .handle_irq = imx53_handle_irq, .timer = &mx53_ard_timer, .init_machine = mx53_ard_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-mx53_evk.c +1
-0@@ -175,4 +175,5 @@ MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board") .handle_irq = imx53_handle_irq, .timer = &mx53_evk_timer, .init_machine = mx53_evk_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-mx53_loco.c +1
-0@@ -317,4 +317,5 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") .handle_irq = imx53_handle_irq, .timer = &mx53_loco_timer, .init_machine = mx53_loco_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/board-mx53_smd.c +1
-0@@ -164,4 +164,5 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board") .handle_irq = imx53_handle_irq, .timer = &mx53_smd_timer, .init_machine = mx53_smd_board_init, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/imx51-dt.c +1
-0@@ -113,4 +113,5 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") .timer = &imx51_timer, .init_machine = imx51_dt_init, .dt_compat = imx51_dt_board_compat, + .restart = mxc_restart,MACHINE_END arch/arm/mach-mx5/imx53-dt.c +1
-0@@ -123,4 +123,5 @@ DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") .timer = &imx53_timer, .init_machine = imx53_dt_init, .dt_compat = imx53_dt_board_compat, + .restart = mxc_restart,MACHINE_END arch/arm/plat-mxc/include/mach/common.h +1
-1@@ -71,8 +71,8 @@ extern int mx6q_clocks_init(void);extern struct platform_device *mxc_register_gpio (char *name,int id,resource_size_t iobase,resource_size_t iosize,int irq,int irq_high);extern void mxc_set_cpu_type (unsigned int type); +extern void mxc_restart (char ,const char *);extern void mxc_arch_reset_init (void __iomem *); -extern void mx51_efikamx_reset (void );extern int mx53_revision (void );extern int mx53_display_revision (void );arch/arm/plat-mxc/include/mach/system.h +3
-1@@ -27,6 +27,8 @@ static inline void arch_idle(void) cpu_do_idle(); } -void arch_reset (char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif /* __ASM_ARCH_MXC_SYSTEM_H__ */ arch/arm/plat-mxc/system.c +1
-8@@ -36,17 +36,10 @@ static void __iomem *wdog_base;/* * Reset the system. It is called by machine_restart(). */ -void arch_reset (char mode,const char *cmd) +void mxc_restart (char mode,const char *cmd) {unsigned int wcr_enable; -#ifdef CONFIG_MACH_MX51_EFIKAMX -if (machine_is_mx51_efikamx ()) { -mx51_efikamx_reset (); -return ; - } -#endif -if (cpu_is_mx1 ()) { wcr_enable = (1 <<0 ); }else {Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Sascha Hauer
maintainerPATCH 23/41 ARM: restart: mxc: use new restart hook
Quoted 1 line · Russell King - ARM Linux
Ack?
Yes:
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 24/41 ARM: restart: mxs: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-mxs/include/mach/common.h | 1 + arch/arm/mach-mxs/include/mach/system.h | 4 +++- arch/arm/mach-mxs/mach-m28evk.c | 1 + arch/arm/mach-mxs/mach-mx23evk.c | 1 + arch/arm/mach-mxs/mach-mx28evk.c | 1 + arch/arm/mach-mxs/mach-stmp378x_devb.c | 1 + arch/arm/mach-mxs/mach-tx28.c | 1 + arch/arm/mach-mxs/system.c | 2 +- 8 files changed, 10 insertions(+), 2 deletions(-)
arch/arm/mach-mxs/include/mach/common.h +1 -0
@@ -16,6 +16,7 @@ struct clk;extern const u32 *mxs_get_ocotp (void );extern int mxs_reset_block (void __iomem *);extern void mxs_timer_init (struct clk *,int ); +extern void mxs_restart (char ,const char *);extern int mx23_register_gpios (void );extern int mx23_clocks_init (void );
arch/arm/mach-mxs/include/mach/system.h +3 -1
@@ -22,6 +22,8 @@ static inline void arch_idle(void) cpu_do_idle(); } -void arch_reset (char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif /* __MACH_MXS_SYSTEM_H__ */
arch/arm/mach-mxs/mach-m28evk.c +1 -0
@@ -363,4 +363,5 @@ MACHINE_START(M28EVK, "DENX M28 EVK") .init_irq = mx28_init_irq, .init_machine = m28evk_init, .timer = &m28evk_timer, + .restart = mxs_restart,MACHINE_END
arch/arm/mach-mxs/mach-mx23evk.c +1 -0
@@ -184,4 +184,5 @@ MACHINE_START(MX23EVK, "Freescale MX23 EVK") .init_irq = mx23_init_irq, .timer = &mx23evk_timer, .init_machine = mx23evk_init, + .restart = mxs_restart,MACHINE_END
arch/arm/mach-mxs/mach-mx28evk.c +1 -0
@@ -501,4 +501,5 @@ MACHINE_START(MX28EVK, "Freescale MX28 EVK") .init_irq = mx28_init_irq, .timer = &mx28evk_timer, .init_machine = mx28evk_init, + .restart = mxs_restart,MACHINE_END
arch/arm/mach-mxs/mach-stmp378x_devb.c +1 -0
@@ -117,4 +117,5 @@ MACHINE_START(STMP378X, "STMP378X") .init_irq = mx23_init_irq, .init_machine = stmp378x_dvb_init, .timer = &stmp378x_dvb_timer, + .restart = mxs_restart,MACHINE_END
arch/arm/mach-mxs/mach-tx28.c +1 -0
@@ -178,4 +178,5 @@ MACHINE_START(TX28, "Ka-Ro electronics TX28 module") .init_irq = mx28_init_irq, .timer = &tx28_timer, .init_machine = tx28_stk5v3_init, + .restart = mxs_restart,MACHINE_END
arch/arm/mach-mxs/system.c +1 -1
@@ -42,7 +42,7 @@ static void __iomem *mxs_clkctrl_reset_addr;/* * Reset the system. It is called by machine_restart(). */ -void arch_reset (char mode,const char *cmd) +void mxs_restart (char mode,const char *cmd) {/* reset the chip */ __mxs_setl (MXS_CLKCTRL_RESET_CHIP , mxs_clkctrl_reset_addr);
Signature · 1 line
1.7.4.4
PATCH 24/41 ARM: restart: mxs: use new restart hook
Quoted 4 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>
Regards,
Shawn
Quoted 109 lines
--- arch/arm/mach-mxs/include/mach/common.h | 1 + arch/arm/mach-mxs/include/mach/system.h | 4 +++- arch/arm/mach-mxs/mach-m28evk.c | 1 + arch/arm/mach-mxs/mach-mx23evk.c | 1 + arch/arm/mach-mxs/mach-mx28evk.c | 1 + arch/arm/mach-mxs/mach-stmp378x_devb.c | 1 + arch/arm/mach-mxs/mach-tx28.c | 1 + arch/arm/mach-mxs/system.c | 2 +- 8 files changed, 10 insertions(+), 2 deletions(-)arch/arm/mach-mxs/include/mach/common.h +1
-0@@ -16,6 +16,7 @@ struct clk;extern const u32 *mxs_get_ocotp (void );extern int mxs_reset_block (void __iomem *);extern void mxs_timer_init (struct clk *,int ); +extern void mxs_restart (char ,const char *);extern int mx23_register_gpios (void );extern int mx23_clocks_init (void );arch/arm/mach-mxs/include/mach/system.h +3
-1@@ -22,6 +22,8 @@ static inline void arch_idle(void) cpu_do_idle(); } -void arch_reset (char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}#endif /* __MACH_MXS_SYSTEM_H__ */ arch/arm/mach-mxs/mach-m28evk.c +1
-0@@ -363,4 +363,5 @@ MACHINE_START(M28EVK, "DENX M28 EVK") .init_irq = mx28_init_irq, .init_machine = m28evk_init, .timer = &m28evk_timer, + .restart = mxs_restart,MACHINE_END arch/arm/mach-mxs/mach-mx23evk.c +1
-0@@ -184,4 +184,5 @@ MACHINE_START(MX23EVK, "Freescale MX23 EVK") .init_irq = mx23_init_irq, .timer = &mx23evk_timer, .init_machine = mx23evk_init, + .restart = mxs_restart,MACHINE_END arch/arm/mach-mxs/mach-mx28evk.c +1
-0@@ -501,4 +501,5 @@ MACHINE_START(MX28EVK, "Freescale MX28 EVK") .init_irq = mx28_init_irq, .timer = &mx28evk_timer, .init_machine = mx28evk_init, + .restart = mxs_restart,MACHINE_END arch/arm/mach-mxs/mach-stmp378x_devb.c +1
-0@@ -117,4 +117,5 @@ MACHINE_START(STMP378X, "STMP378X") .init_irq = mx23_init_irq, .init_machine = stmp378x_dvb_init, .timer = &stmp378x_dvb_timer, + .restart = mxs_restart,MACHINE_END arch/arm/mach-mxs/mach-tx28.c +1
-0@@ -178,4 +178,5 @@ MACHINE_START(TX28, "Ka-Ro electronics TX28 module") .init_irq = mx28_init_irq, .timer = &tx28_timer, .init_machine = tx28_stk5v3_init, + .restart = mxs_restart,MACHINE_END arch/arm/mach-mxs/system.c +1
-1@@ -42,7 +42,7 @@ static void __iomem *mxs_clkctrl_reset_addr;/* * Reset the system. It is called by machine_restart(). */ -void arch_reset (char mode,const char *cmd) +void mxs_restart (char mode,const char *cmd) {/* reset the chip */ __mxs_setl (MXS_CLKCTRL_RESET_CHIP , mxs_clkctrl_reset_addr);Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 25/41 ARM: restart: orion5x: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
In addition, convert calls to arm_machine_restart() to orion5x_restart() to ensure that they continue to work as intended.
--- arch/arm/mach-orion5x/common.c | 12 ++++++++++++ arch/arm/mach-orion5x/common.h | 1 + arch/arm/mach-orion5x/d2net-setup.c | 2 ++ arch/arm/mach-orion5x/db88f5281-setup.c | 1 + arch/arm/mach-orion5x/dns323-setup.c | 1 + arch/arm/mach-orion5x/edmini_v2-setup.c | 1 + arch/arm/mach-orion5x/include/mach/system.h | 10 ---------- arch/arm/mach-orion5x/kurobox_pro-setup.c | 2 ++ arch/arm/mach-orion5x/ls-chl-setup.c | 3 ++- arch/arm/mach-orion5x/ls_hgl-setup.c | 3 ++- arch/arm/mach-orion5x/lsmini-setup.c | 3 ++- arch/arm/mach-orion5x/mss2-setup.c | 3 ++- arch/arm/mach-orion5x/mv2120-setup.c | 3 ++- arch/arm/mach-orion5x/net2big-setup.c | 1 + arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 1 + arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 1 + arch/arm/mach-orion5x/rd88f5182-setup.c | 1 + arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 1 + arch/arm/mach-orion5x/terastation_pro2-setup.c | 1 + arch/arm/mach-orion5x/ts209-setup.c | 1 + arch/arm/mach-orion5x/ts409-setup.c | 1 + arch/arm/mach-orion5x/ts78xx-setup.c | 1 + arch/arm/mach-orion5x/wnr854t-setup.c | 1 + arch/arm/mach-orion5x/wrt350n-v2-setup.c | 1 + 24 files changed, 41 insertions(+), 15 deletions(-)
arch/arm/mach-orion5x/common.c +12 -0
@@ -18,6 +18,7 @@#include <linux/mbus.h> #include <linux/mv643xx_i2c.h> #include <linux/ata_platform.h> +#include <linux/delay.h> #include <net/dsa.h> #include <asm/page.h> #include <asm/setup.h>
@@ -304,6 +305,17 @@ void __init orion5x_init(void)orion5x_wdt_init (); } +void orion5x_restart (char mode,const char *cmd) +{ +/* +* Enable and issue soft reset +*/ +orion5x_setbits (RSTOUTn_MASK, (1 <<2 )); +orion5x_setbits (CPU_SOFT_RESET ,1 ); +mdelay (200 ); +orion5x_clrbits (CPU_SOFT_RESET ,1 ); +} +/* * Many orion-based systems have buggy bootloader implementations. * This is a common fixup for bogus memory tags.
arch/arm/mach-orion5x/common.h +1 -0
@@ -39,6 +39,7 @@ void orion5x_spi_init(void);void orion5x_uart0_init (void );void orion5x_uart1_init (void );void orion5x_xor_init (void ); +void orion5x_restart (char ,const char *);/* * PCIe/PCI functions.
arch/arm/mach-orion5x/d2net-setup.c +2 -0
@@ -343,6 +343,7 @@ MACHINE_START(D2NET, "LaCie d2 Network") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif
@@ -355,6 +356,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif
arch/arm/mach-orion5x/db88f5281-setup.c +1 -0
@@ -364,4 +364,5 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/dns323-setup.c +1 -0
@@ -736,4 +736,5 @@ MACHINE_START(DNS323, "D-Link DNS-323") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/edmini_v2-setup.c +1 -0
@@ -258,4 +258,5 @@ MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/include/mach/system.h +0 -10
@@ -11,8 +11,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/bridge-regs.h> -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -20,14 +18,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Enable and issue soft reset -*/ -orion5x_setbits (RSTOUTn_MASK, (1 <<2 )); -orion5x_setbits (CPU_SOFT_RESET ,1 ); -mdelay (200 ); -orion5x_clrbits (CPU_SOFT_RESET ,1 ); } -#endif
arch/arm/mach-orion5x/kurobox_pro-setup.c +2 -0
@@ -386,6 +386,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif
@@ -399,5 +400,6 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif
arch/arm/mach-orion5x/ls-chl-setup.c +2 -1
@@ -140,7 +140,7 @@ static struct mv_sata_platform_data lschl_sata_data = {static void lschl_power_off (void ) { -arm_machine_restart ('h' ,NULL ); +orion5x_restart ('h' ,NULL ); }/*****************************************************************************
@@ -325,4 +325,5 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/ls_hgl-setup.c +2 -1
@@ -186,7 +186,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {static void ls_hgl_power_off (void ) { -arm_machine_restart ('h' ,NULL ); +orion5x_restart ('h' ,NULL ); }
@@ -272,4 +272,5 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/lsmini-setup.c +2 -1
@@ -186,7 +186,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {static void lsmini_power_off (void ) { -arm_machine_restart ('h' ,NULL ); +orion5x_restart ('h' ,NULL ); }
@@ -274,5 +274,6 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif
arch/arm/mach-orion5x/mss2-setup.c +2 -1
@@ -267,5 +267,6 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, - .fixup = tag_fixup_mem32 + .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/mv2120-setup.c +2 -1
@@ -234,5 +234,6 @@ MACHINE_START(MV2120, "HP Media Vault mv2120") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, - .fixup = tag_fixup_mem32 + .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/net2big-setup.c +1 -0
@@ -426,5 +426,6 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +1 -0
@@ -175,4 +175,5 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +1 -0
@@ -187,4 +187,5 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/rd88f5182-setup.c +1 -0
@@ -311,4 +311,5 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1 -0
@@ -128,4 +128,5 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/terastation_pro2-setup.c +1 -0
@@ -364,4 +364,5 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/ts209-setup.c +1 -0
@@ -329,4 +329,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/ts409-setup.c +1 -0
@@ -318,4 +318,5 @@ MACHINE_START(TS409, "QNAP TS-409") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/ts78xx-setup.c +1 -0
@@ -627,4 +627,5 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/wnr854t-setup.c +1 -0
@@ -179,4 +179,5 @@ MACHINE_START(WNR854T, "Netgear WNR854T") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
arch/arm/mach-orion5x/wrt350n-v2-setup.c +1 -0
@@ -267,4 +267,5 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 25/41 ARM: restart: orion5x: use new restart hook
Quoted 7 lines · Russell King - ARM Linux
Hook these platforms restart code into the new restart hook rather than using
arch_reset().In addition, convert calls to
arm_machine_restart()toorion5x_restart()to ensure that they continue to work as intended.Signed-off-by Russell King <[email protected]>
Quoted 368 lines
--- arch/arm/mach-orion5x/common.c | 12 ++++++++++++ arch/arm/mach-orion5x/common.h | 1 + arch/arm/mach-orion5x/d2net-setup.c | 2 ++ arch/arm/mach-orion5x/db88f5281-setup.c | 1 + arch/arm/mach-orion5x/dns323-setup.c | 1 + arch/arm/mach-orion5x/edmini_v2-setup.c | 1 + arch/arm/mach-orion5x/include/mach/system.h | 10 ---------- arch/arm/mach-orion5x/kurobox_pro-setup.c | 2 ++ arch/arm/mach-orion5x/ls-chl-setup.c | 3 ++- arch/arm/mach-orion5x/ls_hgl-setup.c | 3 ++- arch/arm/mach-orion5x/lsmini-setup.c | 3 ++- arch/arm/mach-orion5x/mss2-setup.c | 3 ++- arch/arm/mach-orion5x/mv2120-setup.c | 3 ++- arch/arm/mach-orion5x/net2big-setup.c | 1 + arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 1 + arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 1 + arch/arm/mach-orion5x/rd88f5182-setup.c | 1 + arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 1 + arch/arm/mach-orion5x/terastation_pro2-setup.c | 1 + arch/arm/mach-orion5x/ts209-setup.c | 1 + arch/arm/mach-orion5x/ts409-setup.c | 1 + arch/arm/mach-orion5x/ts78xx-setup.c | 1 + arch/arm/mach-orion5x/wnr854t-setup.c | 1 + arch/arm/mach-orion5x/wrt350n-v2-setup.c | 1 + 24 files changed, 41 insertions(+), 15 deletions(-)arch/arm/mach-orion5x/common.c +12
-0@@ -18,6 +18,7 @@#include <linux/mbus.h> #include <linux/mv643xx_i2c.h> #include <linux/ata_platform.h> +#include <linux/delay.h> #include <net/dsa.h> #include <asm/page.h> #include <asm/setup.h> @@ -304,6 +305,17 @@ void __init orion5x_init(void)orion5x_wdt_init (); } +void orion5x_restart (char mode,const char *cmd) +{ +/* +* Enable and issue soft reset +*/ +orion5x_setbits (RSTOUTn_MASK, (1 <<2 )); +orion5x_setbits (CPU_SOFT_RESET ,1 ); +mdelay (200 ); +orion5x_clrbits (CPU_SOFT_RESET ,1 ); +} +/* * Many orion-based systems have buggy bootloader implementations. * This is a common fixup for bogus memory tags. arch/arm/mach-orion5x/common.h +1
-0@@ -39,6 +39,7 @@ void orion5x_spi_init(void);void orion5x_uart0_init (void );void orion5x_uart1_init (void );void orion5x_xor_init (void ); +void orion5x_restart (char ,const char *);/* * PCIe/PCI functions. arch/arm/mach-orion5x/d2net-setup.c +2
-0@@ -343,6 +343,7 @@ MACHINE_START(D2NET, "LaCie d2 Network") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif @@ -355,6 +356,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif arch/arm/mach-orion5x/db88f5281-setup.c +1
-0@@ -364,4 +364,5 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/dns323-setup.c +1
-0@@ -736,4 +736,5 @@ MACHINE_START(DNS323, "D-Link DNS-323") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/edmini_v2-setup.c +1
-0@@ -258,4 +258,5 @@ MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/include/mach/system.h +0
-10@@ -11,8 +11,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <mach/bridge-regs.h> -static inline void arch_idle (void ) {cpu_do_idle ();@@ -20,14 +18,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -/* -* Enable and issue soft reset -*/ -orion5x_setbits (RSTOUTn_MASK, (1 <<2 )); -orion5x_setbits (CPU_SOFT_RESET ,1 ); -mdelay (200 ); -orion5x_clrbits (CPU_SOFT_RESET ,1 ); } -#endif arch/arm/mach-orion5x/kurobox_pro-setup.c +2
-0@@ -386,6 +386,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif @@ -399,5 +400,6 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif arch/arm/mach-orion5x/ls-chl-setup.c +2
-1@@ -140,7 +140,7 @@ static struct mv_sata_platform_data lschl_sata_data = {static void lschl_power_off (void ) { -arm_machine_restart ('h' ,NULL ); +orion5x_restart ('h' ,NULL ); }/***************************************************************************** @@ -325,4 +325,5 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/ls_hgl-setup.c +2
-1@@ -186,7 +186,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {static void ls_hgl_power_off (void ) { -arm_machine_restart ('h' ,NULL ); +orion5x_restart ('h' ,NULL ); }@@ -272,4 +272,5 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/lsmini-setup.c +2
-1@@ -186,7 +186,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {static void lsmini_power_off (void ) { -arm_machine_restart ('h' ,NULL ); +orion5x_restart ('h' ,NULL ); }@@ -274,5 +274,6 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart, MACHINE_END#endif arch/arm/mach-orion5x/mss2-setup.c +2
-1@@ -267,5 +267,6 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, - .fixup = tag_fixup_mem32 + .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/mv2120-setup.c +2
-1@@ -234,5 +234,6 @@ MACHINE_START(MV2120, "HP Media Vault mv2120") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, - .fixup = tag_fixup_mem32 + .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/net2big-setup.c +1
-0@@ -426,5 +426,6 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +1
-0@@ -175,4 +175,5 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +1
-0@@ -187,4 +187,5 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/rd88f5182-setup.c +1
-0@@ -311,4 +311,5 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1
-0@@ -128,4 +128,5 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/terastation_pro2-setup.c +1
-0@@ -364,4 +364,5 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/ts209-setup.c +1
-0@@ -329,4 +329,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/ts409-setup.c +1
-0@@ -318,4 +318,5 @@ MACHINE_START(TS409, "QNAP TS-409") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/ts78xx-setup.c +1
-0@@ -627,4 +627,5 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") .init_early = orion5x_init_early, .init_irq = orion5x_init_irq, .timer = &orion5x_timer, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/wnr854t-setup.c +1
-0@@ -179,4 +179,5 @@ MACHINE_START(WNR854T, "Netgear WNR854T") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END arch/arm/mach-orion5x/wrt350n-v2-setup.c +1
-0@@ -267,4 +267,5 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2") .init_irq = orion5x_init_irq, .timer = &orion5x_timer, .fixup = tag_fixup_mem32, + .restart = orion5x_restart,MACHINE_END Signature · 7 lines
1.7.4.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 26/41 ARM: restart: pnx4008: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-pnx4008/core.c | 6 ++++++ arch/arm/mach-pnx4008/include/mach/system.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-pnx4008/core.c +6 -0
@@ -260,6 +260,11 @@ void __init pnx4008_map_io(void)iotable_init (pnx4008_io_desc,ARRAY_SIZE (pnx4008_io_desc)); } +static void pnx4008_restart (char mode,const char *cmd) +{ +soft_restart (0 ); +} +extern struct sys_timer pnx4008_timer;MACHINE_START (PNX4008 ,"Philips PNX4008" )
@@ -269,4 +274,5 @@ MACHINE_START(PNX4008, "Philips PNX4008") .init_irq = pnx4008_init_irq, .init_machine = pnx4008_init, .timer = &pnx4008_timer, + .restart = pnx4008_restart,MACHINE_END
arch/arm/mach-pnx4008/include/mach/system.h +0 -5
@@ -21,10 +21,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <linux/io.h> -#include <mach/hardware.h> -#include <mach/platform.h> -static void arch_idle (void ) {cpu_do_idle ();
@@ -32,7 +28,6 @@ static void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -soft_restart (0 ); }#endif
Signature · 1 line
1.7.4.4
PATCH 27/41 ARM: restart: prima2: use new restart hook
In reply to Russell King - ARM LinuxHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-prima2/common.h | 1 + arch/arm/mach-prima2/include/mach/system.h | 8 -------- arch/arm/mach-prima2/prima2.c | 1 + arch/arm/mach-prima2/rstc.c | 7 +++++++ 4 files changed, 9 insertions(+), 8 deletions(-)
arch/arm/mach-prima2/common.h +1 -0
@@ -16,6 +16,7 @@ extern struct sys_timer sirfsoc_timer;extern void __init sirfsoc_of_irq_init (void );extern void __init sirfsoc_of_clk_init (void ); +extern void sirfsoc_restart (char ,const char *);#ifndef CONFIG_DEBUG_LL static inline void sirfsoc_map_lluart (void ) {}
arch/arm/mach-prima2/include/mach/system.h +0 -8
@@ -9,13 +9,6 @@#ifndef __MACH_SYSTEM_H__#define __MACH_SYSTEM_H__ -#include <linux/bitops.h> -#include <mach/hardware.h> - -#define SIRFSOC_SYS_RST_BIT BIT(31) - -extern void __iomem *sirfsoc_rstc_base; -static inline void arch_idle (void ) {cpu_do_idle ();
@@ -23,7 +16,6 @@ static inline void arch_idle(void)static inline void arch_reset (char mode,const char *cmd) { -writel (SIRFSOC_SYS_RST_BIT , sirfsoc_rstc_base); }#endif
arch/arm/mach-prima2/prima2.c +1 -0
@@ -39,4 +39,5 @@ MACHINE_START(PRIMA2_EVB, "prima2cb") .dma_zone_size = SZ_256M, .init_machine = sirfsoc_mach_init, .dt_compat = prima2cb_dt_match, + .restart = sirfsoc_restart,MACHINE_END
arch/arm/mach-prima2/rstc.c +7 -0
@@ -68,3 +68,10 @@ int sirfsoc_reset_device(struct device *dev)return 0 ; } + +#define SIRFSOC_SYS_RST_BIT BIT(31) + +void sirfsoc_restart (char mode,const char *cmd) +{ +writel (SIRFSOC_SYS_RST_BIT , sirfsoc_rstc_base); +}
Signature · 1 line
1.7.4.4