2 * linux/arch/arm/mach-omap2/prcm.c
4 * OMAP 24xx Power Reset and Clock Management (PRCM) functions
6 * Copyright (C) 2005 Nokia Corporation
8 * Written by Tony Lindgren <tony.lindgren@nokia.com>
10 * Some pieces of code Copyright (C) 2005 Texas Instruments, Inc.
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.
16 #include <linux/module.h>
17 #include <linux/init.h>
18 #include <linux/clk.h>
21 #include "prm_regbits_24xx.h"
23 extern void omap2_clk_prepare_for_reboot(void);
25 u32 omap_prcm_get_reset_sources(void)
27 return prm_read_mod_reg(WKUP_MOD, RM_RSTST) & 0x7f;
29 EXPORT_SYMBOL(omap_prcm_get_reset_sources);
31 /* Resets clock rates and reboots the system. Only called from system.h */
32 void omap_prcm_arch_reset(char mode)
35 omap2_clk_prepare_for_reboot();
37 if (cpu_is_omap24xx()) {
38 wkup = prm_read_mod_reg(WKUP_MOD, RM_RSTCTRL) | OMAP_RST_DPLL3;
39 prm_write_mod_reg(wkup, WKUP_MOD, RM_RSTCTRL);
40 } else if (cpu_is_omap34xx()) {
41 wkup = prm_read_mod_reg(OMAP3430_GR_MOD, RM_RSTCTRL)
43 prm_write_mod_reg(wkup, OMAP3430_GR_MOD, RM_RSTCTRL);