Path: blob/master/arch/arm/mach-gemini/include/mach/system.h
10820 views
/*1* Copyright (C) 2001-2006 Storlink, Corp.2* Copyright (C) 2008-2009 Paulius Zaleckas <[email protected]>3*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; either version 2 of the License, or7* (at your option) any later version.8*/9#ifndef __MACH_SYSTEM_H10#define __MACH_SYSTEM_H1112#include <linux/io.h>13#include <mach/hardware.h>14#include <mach/global_reg.h>1516static inline void arch_idle(void)17{18/*19* Because of broken hardware we have to enable interrupts or the CPU20* will never wakeup... Acctualy it is not very good to enable21* interrupts here since scheduler can miss a tick, but there is22* no other way around this. Platforms that needs it for power saving23* should call enable_hlt() in init code, since by default it is24* disabled.25*/26local_irq_enable();27cpu_do_idle();28}2930static inline void arch_reset(char mode, const char *cmd)31{32__raw_writel(RESET_GLOBAL | RESET_CPU1,33IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET);34}3536#endif /* __MACH_SYSTEM_H */373839