Path: blob/master/arch/arm/mach-ks8695/include/mach/system.h
15159 views
/*1* arch/arm/mach-s3c2410/include/mach/system.h2*3* Copyright (C) 2006 Simtec Electronics4* Ben Dooks <[email protected]>5*6* KS8695 - System function defines and includes7*8* This program is free software; you can redistribute it and/or modify9* it under the terms of the GNU General Public License version 2 as10* published by the Free Software Foundation.11*/1213#ifndef __ASM_ARCH_SYSTEM_H14#define __ASM_ARCH_SYSTEM_H1516#include <linux/io.h>17#include <mach/regs-timer.h>1819static void arch_idle(void)20{21/*22* This should do all the clock switching23* and wait for interrupt tricks,24*/25cpu_do_idle();2627}2829static void arch_reset(char mode, const char *cmd)30{31unsigned int reg;3233if (mode == 's')34cpu_reset(0);3536/* disable timer0 */37reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);38__raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);3940/* enable watchdog mode */41__raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC);4243/* re-enable timer0 */44__raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);45}4647#endif484950