Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
48b48fc9
Commit
48b48fc9
authored
Sep 22, 2011
by
Tony Lindgren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for_3.2/pm-cleanup' of
git://gitorious.org/khilman/linux-omap-pm
into cleanup
parents
7a04c4cb
dca2d0eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
40 deletions
+11
-40
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/pm.c
+10
-12
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm24xx.c
+0
-27
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/pm34xx.c
+1
-1
No files found.
arch/arm/mach-omap2/pm.c
View file @
48b48fc9
...
...
@@ -136,8 +136,8 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
ret
=
pwrdm_set_next_pwrst
(
pwrdm
,
state
);
if
(
ret
)
{
pr
intk
(
KERN_ERR
"U
nable to set state of powerdomain: %s
\n
"
,
pwrdm
->
name
);
pr
_err
(
"%s: u
nable to set state of powerdomain: %s
\n
"
,
__func__
,
pwrdm
->
name
);
goto
err
;
}
...
...
@@ -161,11 +161,11 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
}
/*
* This API is to be called during init to
pu
t the various voltage
* This API is to be called during init to
se
t the various voltage
* domains to the voltage as per the opp table. Typically we boot up
* at the nominal voltage. So this function finds out the rate of
* the clock associated with the voltage domain, finds out the correct
* opp entry and
puts the voltage domain to the voltage specifies
* opp entry and
sets the voltage domain to the voltage specified
* in the opp entry
*/
static
int
__init
omap2_set_init_voltage
(
char
*
vdd_name
,
char
*
clk_name
,
...
...
@@ -177,21 +177,20 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
unsigned
long
freq
,
bootup_volt
;
if
(
!
vdd_name
||
!
clk_name
||
!
dev
)
{
pr
intk
(
KERN_ERR
"%s: Invalid parameters!
\n
"
,
__func__
);
pr
_err
(
"%s: invalid parameters
\n
"
,
__func__
);
goto
exit
;
}
voltdm
=
omap_voltage_domain_lookup
(
vdd_name
);
if
(
IS_ERR
(
voltdm
))
{
pr
intk
(
KERN_ERR
"%s: U
nable to get vdd pointer for vdd_%s
\n
"
,
pr
_err
(
"%s: u
nable to get vdd pointer for vdd_%s
\n
"
,
__func__
,
vdd_name
);
goto
exit
;
}
clk
=
clk_get
(
NULL
,
clk_name
);
if
(
IS_ERR
(
clk
))
{
printk
(
KERN_ERR
"%s: unable to get clk %s
\n
"
,
__func__
,
clk_name
);
pr_err
(
"%s: unable to get clk %s
\n
"
,
__func__
,
clk_name
);
goto
exit
;
}
...
...
@@ -200,14 +199,14 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
opp
=
opp_find_freq_ceil
(
dev
,
&
freq
);
if
(
IS_ERR
(
opp
))
{
pr
intk
(
KERN_ERR
"%s: unable to find boot up OPP for vdd_%s
\n
"
,
pr
_err
(
"%s: unable to find boot up OPP for vdd_%s
\n
"
,
__func__
,
vdd_name
);
goto
exit
;
}
bootup_volt
=
opp_get_voltage
(
opp
);
if
(
!
bootup_volt
)
{
pr
intk
(
KERN_ERR
"%s: unable to find voltage corresponding
"
pr
_err
(
"%s: unable to find voltage corresponding
"
"to the bootup OPP for vdd_%s
\n
"
,
__func__
,
vdd_name
);
goto
exit
;
}
...
...
@@ -216,8 +215,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
return
0
;
exit:
printk
(
KERN_ERR
"%s: Unable to put vdd_%s to its init voltage
\n\n
"
,
__func__
,
vdd_name
);
pr_err
(
"%s: unable to set vdd_%s
\n
"
,
__func__
,
vdd_name
);
return
-
EINVAL
;
}
...
...
arch/arm/mach-omap2/pm24xx.c
View file @
48b48fc9
...
...
@@ -53,8 +53,6 @@
#include "powerdomain.h"
#include "clockdomain.h"
static
int
omap2_pm_debug
;
#ifdef CONFIG_SUSPEND
static
suspend_state_t
suspend_state
=
PM_SUSPEND_ON
;
static
inline
bool
is_suspending
(
void
)
...
...
@@ -96,7 +94,6 @@ static int omap2_fclks_active(void)
static
void
omap2_enter_full_retention
(
void
)
{
u32
l
;
struct
timespec
ts_preidle
,
ts_postidle
,
ts_idle
;
/* There is 1 reference hold for all children of the oscillator
* clock, the following will remove it. If no one else uses the
...
...
@@ -124,10 +121,6 @@ static void omap2_enter_full_retention(void)
omap2_gpio_prepare_for_idle
(
0
);
if
(
omap2_pm_debug
)
{
getnstimeofday
(
&
ts_preidle
);
}
/* One last check for pending IRQs to avoid extra latency due
* to sleeping unnecessarily. */
if
(
omap_irq_pending
())
...
...
@@ -155,13 +148,6 @@ static void omap2_enter_full_retention(void)
console_unlock
();
no_sleep:
if
(
omap2_pm_debug
)
{
unsigned
long
long
tmp
;
getnstimeofday
(
&
ts_postidle
);
ts_idle
=
timespec_sub
(
ts_postidle
,
ts_preidle
);
tmp
=
timespec_to_ns
(
&
ts_idle
)
*
NSEC_PER_USEC
;
}
omap2_gpio_resume_after_idle
();
clk_enable
(
osc_ck
);
...
...
@@ -219,7 +205,6 @@ static int omap2_allow_mpu_retention(void)
static
void
omap2_enter_mpu_retention
(
void
)
{
int
only_idle
=
0
;
struct
timespec
ts_preidle
,
ts_postidle
,
ts_idle
;
/* Putting MPU into the WFI state while a transfer is active
* seems to cause the I2C block to timeout. Why? Good question. */
...
...
@@ -246,19 +231,7 @@ static void omap2_enter_mpu_retention(void)
only_idle
=
1
;
}
if
(
omap2_pm_debug
)
{
getnstimeofday
(
&
ts_preidle
);
}
omap2_sram_idle
();
if
(
omap2_pm_debug
)
{
unsigned
long
long
tmp
;
getnstimeofday
(
&
ts_postidle
);
ts_idle
=
timespec_sub
(
ts_postidle
,
ts_preidle
);
tmp
=
timespec_to_ns
(
&
ts_idle
)
*
NSEC_PER_USEC
;
}
}
static
int
omap2_can_sleep
(
void
)
...
...
arch/arm/mach-omap2/pm34xx.c
View file @
48b48fc9
...
...
@@ -55,7 +55,7 @@
static
suspend_state_t
suspend_state
=
PM_SUSPEND_ON
;
static
inline
bool
is_suspending
(
void
)
{
return
(
suspend_state
!=
PM_SUSPEND_ON
);
return
(
suspend_state
!=
PM_SUSPEND_ON
)
&&
console_suspend_enabled
;
}
#else
static
inline
bool
is_suspending
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment