| Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 1 | /* | 
 | 2 |  * linux/arch/arm/mach-omap2/prcm.c | 
 | 3 |  * | 
 | 4 |  * OMAP 24xx Power Reset and Clock Management (PRCM) functions | 
 | 5 |  * | 
 | 6 |  * Copyright (C) 2005 Nokia Corporation | 
 | 7 |  * | 
 | 8 |  * Written by Tony Lindgren <tony.lindgren@nokia.com> | 
 | 9 |  * | 
 | 10 |  * Some pieces of code Copyright (C) 2005 Texas Instruments, Inc. | 
 | 11 |  * | 
 | 12 |  * This program is free software; you can redistribute it and/or modify | 
 | 13 |  * it under the terms of the GNU General Public License version 2 as | 
 | 14 |  * published by the Free Software Foundation. | 
 | 15 |  */ | 
| Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 16 | #include <linux/module.h> | 
 | 17 | #include <linux/init.h> | 
 | 18 | #include <linux/clk.h> | 
 | 19 |  | 
 | 20 | #include "prcm-regs.h" | 
 | 21 |  | 
| Tony Lindgren | ae78dcf | 2006-09-25 12:41:20 +0300 | [diff] [blame] | 22 | extern void omap2_clk_prepare_for_reboot(void); | 
 | 23 |  | 
| Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 24 | u32 omap_prcm_get_reset_sources(void) | 
 | 25 | { | 
 | 26 | 	return RM_RSTST_WKUP & 0x7f; | 
 | 27 | } | 
 | 28 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); | 
 | 29 |  | 
 | 30 | /* Resets clock rates and reboots the system. Only called from system.h */ | 
 | 31 | void omap_prcm_arch_reset(char mode) | 
 | 32 | { | 
| Tony Lindgren | ae78dcf | 2006-09-25 12:41:20 +0300 | [diff] [blame] | 33 | 	omap2_clk_prepare_for_reboot(); | 
| Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 34 | 	RM_RSTCTRL_WKUP |= 2; | 
 | 35 | } |