Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
arm
mach-imx
pm-imx3.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved.
3
*
4
* The code contained herein is licensed under the GNU General Public
5
* License. You may obtain a copy of the GNU General Public License
6
* Version 2 or later at the following locations:
7
*
8
* http://www.opensource.org/licenses/gpl-license.html
9
* http://www.gnu.org/copyleft/gpl.html
10
*/
11
#include <
linux/io.h
>
12
#include <mach/common.h>
13
#include <mach/hardware.h>
14
#include <
mach/devices-common.h
>
15
#include "
crmregs-imx3.h
"
16
17
/*
18
* Set cpu low power mode before WFI instruction. This function is called
19
* mx3 because it can be used for mx31 and mx35.
20
* Currently only WAIT_MODE is supported.
21
*/
22
void
mx3_cpu_lp_set
(
enum
mx3_cpu_pwr_mode
mode
)
23
{
24
int
reg
=
__raw_readl
(
mx3_ccm_base
+
MXC_CCM_CCMR
);
25
reg &= ~
MXC_CCM_CCMR_LPM_MASK
;
26
27
switch
(mode) {
28
case
MX3_WAIT
:
29
if
(
cpu_is_mx35
())
30
reg |=
MXC_CCM_CCMR_LPM_WAIT_MX35
;
31
__raw_writel
(reg,
mx3_ccm_base
+
MXC_CCM_CCMR
);
32
break
;
33
default
:
34
pr_err
(
"Unknown cpu power mode: %d\n"
, mode);
35
return
;
36
}
37
}
Generated on Thu Jan 10 2013 12:59:18 for Linux Kernel by
1.8.2