![Russell King](/assets/img/avatar_default.png)
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>
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
/*
|
|
* arch/arm/mach-ebsa110/include/mach/system.h
|
|
*
|
|
* Copyright (C) 1996-2000 Russell King.
|
|
*
|
|
* 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 __ASM_ARCH_SYSTEM_H
|
|
#define __ASM_ARCH_SYSTEM_H
|
|
|
|
/*
|
|
* EBSA110 idling methodology:
|
|
*
|
|
* We can not execute the "wait for interrupt" instruction since that
|
|
* will stop our MCLK signal (which provides the clock for the glue
|
|
* logic, and therefore the timer interrupt).
|
|
*
|
|
* Instead, we spin, polling the IRQ_STAT register for the occurrence
|
|
* of any interrupt with core clock down to the memory clock.
|
|
*/
|
|
static inline void arch_idle(void)
|
|
{
|
|
const char *irq_stat = (char *)0xff000000;
|
|
|
|
/* disable clock switching */
|
|
asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
|
|
|
|
/* wait for an interrupt to occur */
|
|
while (!*irq_stat);
|
|
|
|
/* enable clock switching */
|
|
asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
|
|
}
|
|
|
|
#define arch_reset(mode, cmd) cpu_reset(0x80000000)
|
|
|
|
#endif
|