2006-04-02 09:46:20 -07:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-omap2/prcm.c
|
|
|
|
*
|
|
|
|
* OMAP 24xx Power Reset and Clock Management (PRCM) functions
|
|
|
|
*
|
|
|
|
* Copyright (C) 2005 Nokia Corporation
|
|
|
|
*
|
|
|
|
* Written by Tony Lindgren <tony.lindgren@nokia.com>
|
|
|
|
*
|
|
|
|
* Some pieces of code Copyright (C) 2005 Texas Instruments, Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/clk.h>
|
|
|
|
|
|
|
|
#include "prcm-regs.h"
|
|
|
|
|
2006-09-25 02:41:20 -07:00
|
|
|
extern void omap2_clk_prepare_for_reboot(void);
|
|
|
|
|
2006-04-02 09:46:20 -07:00
|
|
|
u32 omap_prcm_get_reset_sources(void)
|
|
|
|
{
|
|
|
|
return RM_RSTST_WKUP & 0x7f;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(omap_prcm_get_reset_sources);
|
|
|
|
|
|
|
|
/* Resets clock rates and reboots the system. Only called from system.h */
|
|
|
|
void omap_prcm_arch_reset(char mode)
|
|
|
|
{
|
2006-09-25 02:41:20 -07:00
|
|
|
omap2_clk_prepare_for_reboot();
|
2006-04-02 09:46:20 -07:00
|
|
|
RM_RSTCTRL_WKUP |= 2;
|
|
|
|
}
|