Linux 2.6.31.8
[linux/fpc-iii.git] / arch / arm / plat-stmp3xxx / include / mach / system.h
blob28a988889319bbc335691ab3945e72ec93ac5404
1 /*
2 * Copyright (C) 2005 Sigmatel Inc
4 * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
5 * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
6 */
8 /*
9 * The code contained herein is licensed under the GNU General Public
10 * License. You may obtain a copy of the GNU General Public License
11 * Version 2 or later at the following locations:
13 * http://www.opensource.org/licenses/gpl-license.html
14 * http://www.gnu.org/copyleft/gpl.html
16 #ifndef __ASM_ARCH_SYSTEM_H
17 #define __ASM_ARCH_SYSTEM_H
19 #include <asm/proc-fns.h>
20 #include <mach/platform.h>
21 #include <mach/regs-clkctrl.h>
22 #include <mach/regs-power.h>
24 static inline void arch_idle(void)
27 * This should do all the clock switching
28 * and wait for interrupt tricks
31 cpu_do_idle();
34 static inline void arch_reset(char mode, const char *cmd)
36 /* Set BATTCHRG to default value */
37 __raw_writel(0x00010000, REGS_POWER_BASE + HW_POWER_CHARGE);
39 /* Set MINPWR to default value */
40 __raw_writel(0, REGS_POWER_BASE + HW_POWER_MINPWR);
42 /* Reset digital side of chip (but not power or RTC) */
43 __raw_writel(BM_CLKCTRL_RESET_DIG,
44 REGS_CLKCTRL_BASE + HW_CLKCTRL_RESET);
46 /* Should not return */
49 #endif