Path: blob/master/arch/arm/mach-ebsa110/include/mach/system.h
10820 views
/*1* arch/arm/mach-ebsa110/include/mach/system.h2*3* Copyright (C) 1996-2000 Russell King.4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/9#ifndef __ASM_ARCH_SYSTEM_H10#define __ASM_ARCH_SYSTEM_H1112/*13* EBSA110 idling methodology:14*15* We can not execute the "wait for interrupt" instruction since that16* will stop our MCLK signal (which provides the clock for the glue17* logic, and therefore the timer interrupt).18*19* Instead, we spin, polling the IRQ_STAT register for the occurrence20* of any interrupt with core clock down to the memory clock.21*/22static inline void arch_idle(void)23{24const char *irq_stat = (char *)0xff000000;2526/* disable clock switching */27asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");2829/* wait for an interrupt to occur */30while (!*irq_stat);3132/* enable clock switching */33asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");34}3536#define arch_reset(mode, cmd) cpu_reset(0x80000000)3738#endif394041