x86: re-add reboot fixups
[wrt350n-kernel.git] / include / asm-arm / arch-ebsa110 / system.h
blobd7c8fece0bc599cdbdce7959d0596bd16d93297a
1 /*
2 * linux/include/asm-arm/arch-ebsa110/system.h
4 * Copyright (C) 1996-2000 Russell King.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10 #ifndef __ASM_ARCH_SYSTEM_H
11 #define __ASM_ARCH_SYSTEM_H
14 * EBSA110 idling methodology:
16 * We can not execute the "wait for interrupt" instruction since that
17 * will stop our MCLK signal (which provides the clock for the glue
18 * logic, and therefore the timer interrupt).
20 * Instead, we spin, polling the IRQ_STAT register for the occurrence
21 * of any interrupt with core clock down to the memory clock.
23 static inline void arch_idle(void)
25 const char *irq_stat = (char *)0xff000000;
27 /* disable clock switching */
28 asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
30 /* wait for an interrupt to occur */
31 while (!*irq_stat);
33 /* enable clock switching */
34 asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
37 #define arch_reset(mode) cpu_reset(0x80000000)
39 #endif