[ARM] pass reboot command line to arch_reset()

OMAP wishes to pass state to the boot loader upon reboot in order to
instruct it whether to wait for USB-based reflashing or not.  There is
already a facility to do this via the reboot() syscall, except we ignore
the string passed to machine_restart().

This patch fixes things to pass this string to arch_reset().  This means
that we keep the reboot mode limited to telling the kernel _how_ to
perform the reboot which should be independent of what we request the
boot loader to do.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Russell King
2009-03-19 16:20:24 +00:00
committed by Russell King
parent 14b6848bc0
commit be093beb60
50 changed files with 65 additions and 65 deletions

View File

@@ -97,8 +97,8 @@ extern void __show_regs(struct pt_regs *);
extern int cpu_architecture(void);
extern void cpu_init(void);
void arm_machine_restart(char mode);
extern void (*arm_pm_restart)(char str);
void arm_machine_restart(char mode, const char *cmd);
extern void (*arm_pm_restart)(char str, const char *cmd);
#define UDBG_UNDEFINED (1 << 0)
#define UDBG_SYSCALL (1 << 1)

View File

@@ -83,7 +83,7 @@ static int __init hlt_setup(char *__unused)
__setup("nohlt", nohlt_setup);
__setup("hlt", hlt_setup);
void arm_machine_restart(char mode)
void arm_machine_restart(char mode, const char *cmd)
{
/*
* Clean and disable cache, and turn off interrupts
@@ -100,7 +100,7 @@ void arm_machine_restart(char mode)
/*
* Now call the architecture specific reboot code.
*/
arch_reset(mode);
arch_reset(mode, cmd);
/*
* Whoops - the architecture was unable to reboot.
@@ -120,7 +120,7 @@ EXPORT_SYMBOL(pm_idle);
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
void (*arm_pm_restart)(char str) = arm_machine_restart;
void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
EXPORT_SYMBOL_GPL(arm_pm_restart);
@@ -195,9 +195,9 @@ void machine_power_off(void)
pm_power_off();
}
void machine_restart(char * __unused)
void machine_restart(char *cmd)
{
arm_pm_restart(reboot_mode);
arm_pm_restart(reboot_mode, cmd);
}
void __show_regs(struct pt_regs *regs)

View File

@@ -16,7 +16,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
cpu_reset(0);
}

View File

@@ -43,7 +43,7 @@ static inline void arch_idle(void)
void (*at91_arch_reset)(void);
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
/* call the CPU-specific reset function */
if (at91_arch_reset)

View File

@@ -32,7 +32,7 @@ static inline void arch_idle(void)
mov r0, r0");
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
cpu_reset(0);
}

View File

@@ -21,7 +21,7 @@ static void arch_idle(void)
cpu_do_idle();
}
static void arch_reset(char mode)
static void arch_reset(char mode, const char *cmd)
{
davinci_watchdog_reset();
}

View File

@@ -34,6 +34,6 @@ static inline void arch_idle(void)
asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
}
#define arch_reset(mode) cpu_reset(0x80000000)
#define arch_reset(mode, cmd) cpu_reset(0x80000000)
#endif

View File

@@ -9,7 +9,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
u32 devicecfg;

View File

@@ -18,7 +18,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
if (mode == 's') {
/*

View File

@@ -25,7 +25,7 @@ static void arch_idle(void)
}
static __inline__ void arch_reset(char mode)
static __inline__ void arch_reset(char mode, const char *cmd)
{
CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
}

View File

@@ -32,7 +32,7 @@ arch_idle(void)
}
static inline void
arch_reset(char mode)
arch_reset(char mode, const char *cmd)
{
cpu_reset(0);
}

View File

@@ -32,7 +32,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
/*
* To reset, we hit the on-board reset register

View File

@@ -13,7 +13,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
/*
* Reset the internal bus (warning both cores are reset)

View File

@@ -16,7 +16,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
local_irq_disable();

View File

@@ -14,7 +14,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
*IOP3XX_PCSR = 0x30;

View File

@@ -17,7 +17,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
local_irq_disable();

View File

@@ -19,7 +19,7 @@ static inline void arch_idle(void)
#endif
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
/* First try machine specific support */
if (machine_is_ixdp2351()) {

View File

@@ -20,7 +20,7 @@ static inline void arch_idle(void)
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
if ( 1 && mode == 's') {
/* Jump into ROM at address 0 */

View File

@@ -17,7 +17,7 @@ static inline void arch_idle(void)
cpu_do_idle();
}
static inline void arch_reset(char mode)
static inline void arch_reset(char mode, const char *cmd)
{
/*
* Enable soft reset to assert RSTOUTn.

View File

@@ -27,7 +27,7 @@ static void arch_idle(void)
}
static void arch_reset(char mode)
static void arch_reset(char mode, const char *cmd)
{
unsigned int reg;

Some files were not shown because too many files have changed in this diff Show More