]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-omap2/prcm.c
ARM: OMAP: Avoid sleeping during arch_reset
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / prcm.c
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  */
16 #include <linux/config.h>
17 #include <linux/module.h>
18 #include <linux/init.h>
19 #include <linux/clk.h>
20
21 #include "prcm-regs.h"
22
23 extern void omap2_clk_prepare_for_reboot(void);
24
25 u32 omap_prcm_get_reset_sources(void)
26 {
27         return RM_RSTST_WKUP & 0x7f;
28 }
29 EXPORT_SYMBOL(omap_prcm_get_reset_sources);
30
31 /* Resets clock rates and reboots the system. Only called from system.h */
32 void omap_prcm_arch_reset(char mode)
33 {
34         omap2_clk_prepare_for_reboot();
35         RM_RSTCTRL_WKUP |= 2;
36 }