From: viresh.kumar@st.com (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 33/41] ARM: restart: spear: use new restart hook
Date: Fri, 25 Nov 2011 09:05:07 +0530 [thread overview]
Message-ID: <4ECF0CEB.9060108@st.com> (raw)
In-Reply-To: <20111124203240.GT9581@n2100.arm.linux.org.uk>
On 11/25/2011 2:02 AM, Russell King - ARM Linux wrote:
> Ack?
>
> On Sun, Nov 06, 2011 at 05:51:09PM +0000, Russell King - ARM Linux wrote:
>> Hook these platforms restart code into the new restart hook rather
>> than using arch_reset().
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> ---
>> arch/arm/mach-spear3xx/include/mach/generic.h | 2 +
>> arch/arm/mach-spear3xx/spear300_evb.c | 1 +
>> arch/arm/mach-spear3xx/spear310_evb.c | 1 +
>> arch/arm/mach-spear3xx/spear320_evb.c | 1 +
>> arch/arm/mach-spear6xx/include/mach/generic.h | 2 +
>> arch/arm/mach-spear6xx/spear600_evb.c | 1 +
>> arch/arm/plat-spear/Makefile | 2 +-
>> arch/arm/plat-spear/include/plat/system.h | 11 ----------
>> arch/arm/plat-spear/restart.c | 27 +++++++++++++++++++++++++
>> 9 files changed, 36 insertions(+), 12 deletions(-)
>> create mode 100644 arch/arm/plat-spear/restart.c
>>
Sorry for missing it earlier.
Acked-by: Viresh Kumar <viresh.kumar@st.com>
>> diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
>> index b8f31c3..14276e5 100644
>> --- a/arch/arm/mach-spear3xx/include/mach/generic.h
>> +++ b/arch/arm/mach-spear3xx/include/mach/generic.h
>> @@ -42,6 +42,8 @@ void __init spear3xx_map_io(void);
>> void __init spear3xx_init_irq(void);
>> void __init spear3xx_init(void);
>>
>> +void spear_restart(char, const char *);
>> +
>> /* pad mux declarations */
>> #define PMX_FIRDA_MASK (1 << 14)
>> #define PMX_I2C_MASK (1 << 13)
>> diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c
>> index a5ff98e..8b429f0 100644
>> --- a/arch/arm/mach-spear3xx/spear300_evb.c
>> +++ b/arch/arm/mach-spear3xx/spear300_evb.c
>> @@ -69,4 +69,5 @@ MACHINE_START(SPEAR300, "ST-SPEAR300-EVB")
>> .init_irq = spear3xx_init_irq,
>> .timer = &spear3xx_timer,
>> .init_machine = spear300_evb_init,
>> + .restart = spear_restart,
>> MACHINE_END
>> diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c
>> index 45d180d..a11d6ea 100644
>> --- a/arch/arm/mach-spear3xx/spear310_evb.c
>> +++ b/arch/arm/mach-spear3xx/spear310_evb.c
>> @@ -75,4 +75,5 @@ MACHINE_START(SPEAR310, "ST-SPEAR310-EVB")
>> .init_irq = spear3xx_init_irq,
>> .timer = &spear3xx_timer,
>> .init_machine = spear310_evb_init,
>> + .restart = spear_restart,
>> MACHINE_END
>> diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c
>> index 2287984..4239a70 100644
>> --- a/arch/arm/mach-spear3xx/spear320_evb.c
>> +++ b/arch/arm/mach-spear3xx/spear320_evb.c
>> @@ -73,4 +73,5 @@ MACHINE_START(SPEAR320, "ST-SPEAR320-EVB")
>> .init_irq = spear3xx_init_irq,
>> .timer = &spear3xx_timer,
>> .init_machine = spear320_evb_init,
>> + .restart = spear_restart,
>> MACHINE_END
>> diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h
>> index 183f023..116b993 100644
>> --- a/arch/arm/mach-spear6xx/include/mach/generic.h
>> +++ b/arch/arm/mach-spear6xx/include/mach/generic.h
>> @@ -41,6 +41,8 @@ void __init spear6xx_init(void);
>> void __init spear600_init(void);
>> void __init spear6xx_clk_init(void);
>>
>> +void spear_restart(char, const char *);
>> +
>> /* Add spear600 machine device structure declarations here */
>>
>> #endif /* __MACH_GENERIC_H */
>> diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c
>> index 8238fe3..0a16559 100644
>> --- a/arch/arm/mach-spear6xx/spear600_evb.c
>> +++ b/arch/arm/mach-spear6xx/spear600_evb.c
>> @@ -48,4 +48,5 @@ MACHINE_START(SPEAR600, "ST-SPEAR600-EVB")
>> .init_irq = spear6xx_init_irq,
>> .timer = &spear6xx_timer,
>> .init_machine = spear600_evb_init,
>> + .restart = spear_restart,
>> MACHINE_END
>> diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile
>> index b4f340b..e0f2e5b 100644
>> --- a/arch/arm/plat-spear/Makefile
>> +++ b/arch/arm/plat-spear/Makefile
>> @@ -3,6 +3,6 @@
>> #
>>
>> # Common support
>> -obj-y := clock.o time.o
>> +obj-y := clock.o restart.o time.o
>>
>> obj-$(CONFIG_ARCH_SPEAR3XX) += shirq.o padmux.o
>> diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
>> index 1171f22..4a0d125 100644
>> --- a/arch/arm/plat-spear/include/plat/system.h
>> +++ b/arch/arm/plat-spear/include/plat/system.h
>> @@ -14,10 +14,6 @@
>> #ifndef __PLAT_SYSTEM_H
>> #define __PLAT_SYSTEM_H
>>
>> -#include <linux/io.h>
>> -#include <asm/hardware/sp810.h>
>> -#include <mach/hardware.h>
>> -
>> static inline void arch_idle(void)
>> {
>> /*
>> @@ -29,13 +25,6 @@ static inline void arch_idle(void)
>>
>> static inline void arch_reset(char mode, const char *cmd)
>> {
>> - if (mode == 's') {
>> - /* software reset, Jump into ROM at address 0 */
>> - soft_restart(0);
>> - } else {
>> - /* hardware reset, Use on-chip reset capability */
>> - sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
>> - }
>> }
>>
>> #endif /* __PLAT_SYSTEM_H */
>> diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c
>> new file mode 100644
>> index 0000000..2b4e3d8
>> --- /dev/null
>> +++ b/arch/arm/plat-spear/restart.c
>> @@ -0,0 +1,27 @@
>> +/*
>> + * arch/arm/plat-spear/restart.c
>> + *
>> + * SPEAr platform specific restart functions
>> + *
>> + * Copyright (C) 2009 ST Microelectronics
>> + * Viresh Kumar<viresh.kumar@st.com>
>> + *
>> + * This file is licensed under the terms of the GNU General Public
>> + * License version 2. This program is licensed "as is" without any
>> + * warranty of any kind, whether express or implied.
>> + */
>> +#include <linux/io.h>
>> +#include <asm/hardware/sp810.h>
>> +#include <mach/hardware.h>
>> +#include <mach/generic.h>
>> +
>> +void spear_restart(char mode, const char *cmd)
>> +{
>> + if (mode == 's') {
>> + /* software reset, Jump into ROM at address 0 */
>> + soft_restart(0);
>> + } else {
>> + /* hardware reset, Use on-chip reset capability */
>> + sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
>> + }
>> +}
>> --
>> 1.7.4.4
>>
next prev parent reply other threads:[~2011-11-25 3:35 UTC|newest]
Thread overview: 152+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 17:31 [01: PATCH 0/7] Preparation for arch_reset changes Russell King - ARM Linux
2011-11-06 17:31 ` [PATCH 1/7] ARM: restart: add restart hook to machine_desc record Russell King - ARM Linux
2011-11-09 22:28 ` Tony Lindgren
2011-11-11 19:10 ` Linus Walleij
2011-11-06 17:32 ` [PATCH 2/7] ARM: restart: allow platforms more flexibility specifying restart mode Russell King - ARM Linux
2011-11-06 17:32 ` [PATCH 3/7] ARM: restart: add default restart modes for PXA mioa701, spitz and tosa Russell King - ARM Linux
2011-11-07 18:02 ` Robert Jarzmik
2011-11-06 17:32 ` [PATCH 4/7] ARM: restart: move reboot failure handing into machine_restart() Russell King - ARM Linux
2011-11-09 22:29 ` Tony Lindgren
2011-11-06 17:33 ` [PATCH 5/7] ARM: restart: remove argument to setup_mm_for_reboot() Russell King - ARM Linux
2011-11-09 22:30 ` Tony Lindgren
2011-11-06 17:33 ` [PATCH 6/7] ARM: restart: only perform setup for restart when soft-restarting Russell King - ARM Linux
2011-11-17 17:42 ` Russell King - ARM Linux
2011-11-17 18:00 ` Sascha Hauer
2011-11-18 3:29 ` Viresh Kumar
2011-11-18 7:51 ` Krzysztof Halasa
2011-11-18 7:56 ` Paul Mundt
2011-11-18 10:13 ` Richard Purdie
2011-11-24 6:47 ` Lennert Buytenhek
2011-12-03 9:23 ` Kukjin Kim
2011-12-03 9:30 ` Russell King - ARM Linux
2011-12-03 9:45 ` Kukjin Kim
2011-11-18 3:43 ` Wan ZongShun
2011-11-21 3:42 ` Eric Miao
2011-11-06 17:33 ` [PATCH 7/7] ARM: restart: remove local_irq_disable() from within arch_reset() Russell King - ARM Linux
2011-11-06 17:39 ` [02: PATCH 0/41] Platform arch_reset changes Russell King - ARM Linux
2011-11-06 17:54 ` [03: PATCH 0/5] The remaining stuff Russell King - ARM Linux
2011-11-06 17:55 ` [PATCH 1/5] XXX: tcc8k Russell King - ARM Linux
2011-11-06 17:55 ` [PATCH 2/5] ARM: restart: omap: use new restart hook XXX WIP XXX Russell King - ARM Linux
2011-11-09 22:27 ` Tony Lindgren
2011-11-10 22:32 ` Russell King - ARM Linux
2011-11-06 17:56 ` [PATCH 3/5] ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX Russell King - ARM Linux
2011-11-07 10:30 ` Russell King - ARM Linux
2011-11-07 11:17 ` Kyungmin Park
2011-11-07 11:52 ` Russell King - ARM Linux
2011-11-08 5:21 ` Kukjin Kim
2011-11-10 23:15 ` Russell King - ARM Linux
2011-11-15 7:47 ` Kukjin Kim
2011-11-06 17:56 ` [PATCH 4/5] ARM: restart: s5pv210: " Russell King - ARM Linux
2011-11-08 5:23 ` Kukjin Kim
2011-11-08 10:04 ` Russell King - ARM Linux
2011-11-06 17:56 ` [PATCH 5/5] ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook Russell King - ARM Linux
2011-11-08 5:22 ` Kukjin Kim
2011-11-08 7:00 ` [03: PATCH 0/5] The remaining stuff Kukjin Kim
2011-11-08 9:00 ` Russell King - ARM Linux
2011-11-09 5:06 ` Kukjin Kim
2011-11-11 17:16 ` Russell King - ARM Linux
2011-11-14 19:01 ` Nori, Sekhar
2011-11-28 10:40 ` Linus Walleij
2011-11-28 11:07 ` Russell King - ARM Linux
2011-11-28 11:23 ` Linus Walleij
2011-11-07 13:38 ` [02: PATCH 0/41] Platform arch_reset changes Will Deacon
2011-11-07 13:52 ` Russell King - ARM Linux
2011-11-08 4:24 ` Nicolas Pitre
2011-11-06 17:40 ` [PATCH 01/41] ARM: clps711x: consolidate irq/mm/time code into a single file Russell King - ARM Linux
2011-11-06 17:40 ` [PATCH 02/41] ARM: restart: remove poodle restart handler Russell King - ARM Linux
2011-11-17 17:24 ` Russell King - ARM Linux
2011-11-18 10:11 ` Richard Purdie
2011-11-06 17:40 ` [PATCH 03/41] ARM: restart: remove s3c24xx " Russell King - ARM Linux
2011-11-08 5:00 ` Kukjin Kim
2011-11-06 17:41 ` [PATCH 04/41] ARM: restart: at91: use new restart hook Russell King - ARM Linux
2011-11-15 1:16 ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-15 8:52 ` Russell King - ARM Linux
2011-11-15 9:15 ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-06 17:41 ` [PATCH 05/41] ARM: restart: clps711x: " Russell King - ARM Linux
2011-11-06 17:41 ` [PATCH 06/41] ARM: restart: cns3xxx: " Russell King - ARM Linux
2011-11-24 20:30 ` Russell King - ARM Linux
2011-11-24 21:00 ` Anton Vorontsov
2011-11-06 17:42 ` [PATCH 07/41] ARM: restart: dove: " Russell King - ARM Linux
2011-11-24 22:07 ` Nicolas Pitre
2011-11-06 17:42 ` [PATCH 08/41] ARM: restart: ebsa110: " Russell King - ARM Linux
2011-11-06 17:43 ` [PATCH 09/41] ARM: restart: ep93xx: " Russell King - ARM Linux
2011-11-07 17:10 ` H Hartley Sweeten
2011-11-06 17:43 ` [PATCH 10/41] ARM: restart: footbridge: " Russell King - ARM Linux
2011-11-06 17:43 ` [PATCH 11/41] ARM: restart: h720x: " Russell King - ARM Linux
2011-11-06 17:44 ` [PATCH 12/41] ARM: restart: highbank: " Russell King - ARM Linux
2011-11-07 15:43 ` Rob Herring
2011-11-06 17:44 ` [PATCH 13/41] ARM: restart: integrator: " Russell King - ARM Linux
2011-11-25 21:41 ` Linus Walleij
2011-11-06 17:44 ` [PATCH 14/41] ARM: restart: iop3xx: " Russell King - ARM Linux
2011-11-17 17:28 ` Russell King - ARM Linux
2011-11-24 6:45 ` Lennert Buytenhek
2011-11-06 17:45 ` [PATCH 15/41] ARM: restart: iop13xx: " Russell King - ARM Linux
2011-11-17 17:29 ` Russell King - ARM Linux
2011-11-24 6:45 ` Lennert Buytenhek
2011-11-06 17:45 ` [PATCH 16/41] ARM: restart: ixp2000: " Russell King - ARM Linux
2011-11-17 17:29 ` Russell King - ARM Linux
2011-11-24 6:45 ` Lennert Buytenhek
2011-11-06 17:45 ` [PATCH 17/41] ARM: restart: ixp23xx: " Russell King - ARM Linux
2011-11-17 17:30 ` Russell King - ARM Linux
2011-11-24 6:46 ` Lennert Buytenhek
2011-11-06 17:46 ` [PATCH 18/41] ARM: restart: ixp4xx: " Russell King - ARM Linux
2011-11-17 17:30 ` Russell King - ARM Linux
2011-11-18 7:49 ` Krzysztof Halasa
2011-11-18 19:46 ` Russell King - ARM Linux
2011-11-18 22:11 ` Krzysztof Halasa
2011-11-06 17:46 ` [PATCH 19/41] ARM: restart: kirkwood: " Russell King - ARM Linux
2011-11-07 2:58 ` Nicolas Pitre
2011-11-06 17:46 ` [PATCH 20/41] ARM: restart: lpc32xx: " Russell King - ARM Linux
2011-11-06 17:47 ` [PATCH 21/41] ARM: restart: mmp: " Russell King - ARM Linux
2011-11-06 17:47 ` [PATCH 22/41] ARM: restart: mv78xx0: " Russell King - ARM Linux
2011-11-24 22:02 ` Nicolas Pitre
2011-11-06 17:47 ` [PATCH 23/41] ARM: restart: mxc: " Russell King - ARM Linux
2011-11-24 20:31 ` Russell King - ARM Linux
2011-11-25 12:06 ` Sascha Hauer
2011-11-06 17:48 ` [PATCH 24/41] ARM: restart: mxs: " Russell King - ARM Linux
2011-11-11 4:02 ` Shawn Guo
2011-11-06 17:48 ` [PATCH 25/41] ARM: restart: orion5x: " Russell King - ARM Linux
2011-11-24 22:05 ` Nicolas Pitre
2011-11-06 17:48 ` [PATCH 26/41] ARM: restart: pnx4008: " Russell King - ARM Linux
2011-11-06 17:49 ` [PATCH 27/41] ARM: restart: prima2: " Russell King - ARM Linux
2011-11-07 8:15 ` Barry Song
2011-11-06 17:49 ` [PATCH 28/41] ARM: restart: pxa: " Russell King - ARM Linux
2011-11-17 17:27 ` Russell King - ARM Linux
2011-11-18 10:11 ` Richard Purdie
2011-11-06 17:49 ` [PATCH 29/41] ARM: restart: realview: " Russell King - ARM Linux
2011-11-06 17:50 ` [PATCH 30/41] ARM: restart: riscpc: " Russell King - ARM Linux
2011-11-06 17:50 ` [PATCH 31/41] ARM: restart: sa1100: " Russell King - ARM Linux
2011-11-06 17:50 ` [PATCH 32/41] ARM: restart: shark: " Russell King - ARM Linux
2011-11-06 17:51 ` [PATCH 33/41] ARM: restart: spear: " Russell King - ARM Linux
2011-11-24 20:32 ` Russell King - ARM Linux
2011-11-25 3:35 ` Viresh Kumar [this message]
2011-11-06 17:51 ` [PATCH 34/41] ARM: restart: tegra: " Russell King - ARM Linux
2011-11-06 17:51 ` [PATCH 35/41] ARM: restart: u300: " Russell King - ARM Linux
2011-11-07 8:10 ` Linus Walleij
2011-11-06 17:52 ` [PATCH 36/41] ARM: restart: versatile: " Russell King - ARM Linux
2011-11-06 17:52 ` [PATCH 37/41] ARM: restart: Versatile Express: " Russell King - ARM Linux
2011-11-06 17:52 ` [PATCH 38/41] ARM: restart: w90x900: " Russell King - ARM Linux
2011-11-07 17:16 ` Russell King - ARM Linux
2011-11-06 17:53 ` [PATCH 39/41] ARM: restart: lpc32xx & u300: remove unnecessary printk Russell King - ARM Linux
2011-11-11 18:46 ` Linus Walleij
2011-11-11 19:00 ` Russell King - ARM Linux
2011-11-11 19:32 ` Linus Walleij
2011-11-06 17:53 ` [PATCH 40/41] ARM: restart: remove comments about adding code to arch_reset() Russell King - ARM Linux
2011-11-07 2:59 ` Nicolas Pitre
2011-11-08 15:47 ` Jamie Iles
2011-11-10 23:35 ` Tony Lindgren
2011-11-06 17:53 ` [PATCH 41/41] ARM: restart: remove the now empty arch_reset() Russell King - ARM Linux
2011-11-07 3:02 ` Nicolas Pitre
2011-11-07 17:15 ` H Hartley Sweeten
2011-11-08 15:48 ` Jamie Iles
2011-11-10 23:38 ` Tony Lindgren
2011-11-25 21:44 ` Linus Walleij
2011-11-07 2:48 ` [01: PATCH 0/7] Preparation for arch_reset changes Nicolas Pitre
2011-11-07 13:31 ` Will Deacon
2011-11-07 17:24 ` H Hartley Sweeten
2011-11-08 5:00 ` Kukjin Kim
2011-11-08 10:05 ` Russell King - ARM Linux
2011-11-21 9:56 ` Russell King - ARM Linux
2011-11-22 11:21 ` Will Deacon
2011-11-22 15:24 ` Russell King - ARM Linux
2011-11-22 15:29 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECF0CEB.9060108@st.com \
--to=viresh.kumar@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).