dmitry pervushin | e317872 | 2009-04-22 23:55:23 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2005 Sigmatel Inc |
| 3 | * |
| 4 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. |
| 5 | * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved. |
| 6 | */ |
| 7 | |
| 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: |
| 12 | * |
| 13 | * http://www.opensource.org/licenses/gpl-license.html |
| 14 | * http://www.gnu.org/copyleft/gpl.html |
| 15 | */ |
| 16 | #ifndef __ASM_ARCH_SYSTEM_H |
| 17 | #define __ASM_ARCH_SYSTEM_H |
| 18 | |
| 19 | #include <asm/proc-fns.h> |
dmitry pervushin | 98f420b | 2009-05-31 13:32:11 +0100 | [diff] [blame] | 20 | #include <mach/platform.h> |
dmitry pervushin | e317872 | 2009-04-22 23:55:23 +0100 | [diff] [blame] | 21 | #include <mach/regs-clkctrl.h> |
| 22 | #include <mach/regs-power.h> |
| 23 | |
| 24 | static inline void arch_idle(void) |
| 25 | { |
| 26 | /* |
| 27 | * This should do all the clock switching |
| 28 | * and wait for interrupt tricks |
| 29 | */ |
| 30 | |
| 31 | cpu_do_idle(); |
| 32 | } |
| 33 | |
| 34 | static inline void arch_reset(char mode, const char *cmd) |
| 35 | { |
| 36 | /* Set BATTCHRG to default value */ |
dmitry pervushin | 98f420b | 2009-05-31 13:32:11 +0100 | [diff] [blame] | 37 | __raw_writel(0x00010000, REGS_POWER_BASE + HW_POWER_CHARGE); |
dmitry pervushin | e317872 | 2009-04-22 23:55:23 +0100 | [diff] [blame] | 38 | |
| 39 | /* Set MINPWR to default value */ |
dmitry pervushin | 98f420b | 2009-05-31 13:32:11 +0100 | [diff] [blame] | 40 | __raw_writel(0, REGS_POWER_BASE + HW_POWER_MINPWR); |
dmitry pervushin | e317872 | 2009-04-22 23:55:23 +0100 | [diff] [blame] | 41 | |
| 42 | /* Reset digital side of chip (but not power or RTC) */ |
dmitry pervushin | 98f420b | 2009-05-31 13:32:11 +0100 | [diff] [blame] | 43 | __raw_writel(BM_CLKCTRL_RESET_DIG, |
| 44 | REGS_CLKCTRL_BASE + HW_CLKCTRL_RESET); |
dmitry pervushin | e317872 | 2009-04-22 23:55:23 +0100 | [diff] [blame] | 45 | |
| 46 | /* Should not return */ |
| 47 | } |
| 48 | |
| 49 | #endif |