Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7fd92b56
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7fd92b56
编写于
11月 04, 2011
作者:
T
Tony Lindgren
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for_3.2/pm-cleanup-2' of
git://github.com/khilman/linux-omap-pm
into fixes
上级
2cbb6160
30474544
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
53 addition
and
39 deletion
+53
-39
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/id.c
+4
-1
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/pm34xx.c
+37
-33
arch/arm/plat-omap/include/plat/cpu.h
arch/arm/plat-omap/include/plat/cpu.h
+12
-5
未找到文件。
arch/arm/mach-omap2/id.c
浏览文件 @
7fd92b56
...
...
@@ -187,8 +187,11 @@ static void __init omap3_check_features(void)
OMAP3_CHECK_FEATURE
(
status
,
ISP
);
if
(
cpu_is_omap3630
())
omap_features
|=
OMAP3_HAS_192MHZ_CLK
;
if
(
!
cpu_is_omap3505
()
&&
!
cpu_is_omap3517
())
if
(
cpu_is_omap3430
()
||
cpu_is_omap3630
())
omap_features
|=
OMAP3_HAS_IO_WAKEUP
;
if
(
cpu_is_omap3630
()
||
omap_rev
()
==
OMAP3430_REV_ES3_1
||
omap_rev
()
==
OMAP3430_REV_ES3_1_2
)
omap_features
|=
OMAP3_HAS_IO_CHAIN_CTRL
;
omap_features
|=
OMAP3_HAS_SDRC
;
...
...
arch/arm/mach-omap2/pm34xx.c
浏览文件 @
7fd92b56
...
...
@@ -99,31 +99,27 @@ static void omap3_enable_io_chain(void)
{
int
timeout
=
0
;
if
(
omap_rev
()
>=
OMAP3430_REV_ES3_1
)
{
omap2_prm_set_mod_reg_bits
(
OMAP3430_EN_IO_CHAIN_MASK
,
WKUP_MOD
,
PM_WKEN
);
/* Do a readback to assure write has been done */
omap2_prm_read_mod_reg
(
WKUP_MOD
,
PM_WKEN
);
while
(
!
(
omap2_prm_read_mod_reg
(
WKUP_MOD
,
PM_WKEN
)
&
OMAP3430_ST_IO_CHAIN_MASK
))
{
timeout
++
;
if
(
timeout
>
1000
)
{
printk
(
KERN_ERR
"Wake up daisy chain "
"activation failed.
\n
"
);
return
;
}
omap2_prm_set_mod_reg_bits
(
OMAP3430_ST_IO_CHAIN_MASK
,
WKUP_MOD
,
PM_WKEN
);
omap2_prm_set_mod_reg_bits
(
OMAP3430_EN_IO_CHAIN_MASK
,
WKUP_MOD
,
PM_WKEN
);
/* Do a readback to assure write has been done */
omap2_prm_read_mod_reg
(
WKUP_MOD
,
PM_WKEN
);
while
(
!
(
omap2_prm_read_mod_reg
(
WKUP_MOD
,
PM_WKEN
)
&
OMAP3430_ST_IO_CHAIN_MASK
))
{
timeout
++
;
if
(
timeout
>
1000
)
{
pr_err
(
"Wake up daisy chain activation failed.
\n
"
);
return
;
}
omap2_prm_set_mod_reg_bits
(
OMAP3430_ST_IO_CHAIN_MASK
,
WKUP_MOD
,
PM_WKEN
);
}
}
static
void
omap3_disable_io_chain
(
void
)
{
if
(
omap_rev
()
>=
OMAP3430_REV_ES3_1
)
omap2_prm_clear_mod_reg_bits
(
OMAP3430_EN_IO_CHAIN_MASK
,
WKUP_MOD
,
PM_WKEN
);
omap2_prm_clear_mod_reg_bits
(
OMAP3430_EN_IO_CHAIN_MASK
,
WKUP_MOD
,
PM_WKEN
);
}
static
void
omap3_core_save_context
(
void
)
...
...
@@ -363,7 +359,6 @@ void omap_sram_idle(void)
printk
(
KERN_ERR
"Invalid mpu state in sram_idle
\n
"
);
return
;
}
pwrdm_pre_transition
();
/* NEON control */
if
(
pwrdm_read_pwrst
(
neon_pwrdm
)
==
PWRDM_POWER_ON
)
...
...
@@ -376,7 +371,8 @@ void omap_sram_idle(void)
(
per_next_state
<
PWRDM_POWER_ON
||
core_next_state
<
PWRDM_POWER_ON
))
{
omap2_prm_set_mod_reg_bits
(
OMAP3430_EN_IO_MASK
,
WKUP_MOD
,
PM_WKEN
);
omap3_enable_io_chain
();
if
(
omap3_has_io_chain_ctrl
())
omap3_enable_io_chain
();
}
/* Block console output in case it is on one of the OMAP UARTs */
...
...
@@ -386,6 +382,8 @@ void omap_sram_idle(void)
if
(
!
console_trylock
())
goto
console_still_active
;
pwrdm_pre_transition
();
/* PER */
if
(
per_next_state
<
PWRDM_POWER_ON
)
{
per_going_off
=
(
per_next_state
==
PWRDM_POWER_OFF
)
?
1
:
0
;
...
...
@@ -409,13 +407,14 @@ void omap_sram_idle(void)
omap3_intc_prepare_idle
();
/*
* On EMU/HS devices ROM code restores a SRDC value
* from scratchpad which has automatic self refresh on timeout
* of AUTO_CNT = 1 enabled. This takes care of erratum ID i443.
* Hence store/restore the SDRC_POWER register here.
*/
if
(
omap_rev
()
>=
OMAP3430_REV_ES3_0
&&
omap_type
()
!=
OMAP2_DEVICE_TYPE_GP
&&
* On EMU/HS devices ROM code restores a SRDC value
* from scratchpad which has automatic self refresh on timeout
* of AUTO_CNT = 1 enabled. This takes care of erratum ID i443.
* Hence store/restore the SDRC_POWER register here.
*/
if
(
cpu_is_omap3430
()
&&
omap_rev
()
>=
OMAP3430_REV_ES3_0
&&
(
omap_type
()
==
OMAP2_DEVICE_TYPE_EMU
||
omap_type
()
==
OMAP2_DEVICE_TYPE_SEC
)
&&
core_next_state
==
PWRDM_POWER_OFF
)
sdrc_pwr
=
sdrc_read_reg
(
SDRC_POWER
);
...
...
@@ -432,8 +431,9 @@ void omap_sram_idle(void)
omap34xx_do_sram_idle
(
save_state
);
/* Restore normal SDRC POWER settings */
if
(
omap_rev
()
>=
OMAP3430_REV_ES3_0
&&
omap_type
()
!=
OMAP2_DEVICE_TYPE_GP
&&
if
(
cpu_is_omap3430
()
&&
omap_rev
()
>=
OMAP3430_REV_ES3_0
&&
(
omap_type
()
==
OMAP2_DEVICE_TYPE_EMU
||
omap_type
()
==
OMAP2_DEVICE_TYPE_SEC
)
&&
core_next_state
==
PWRDM_POWER_OFF
)
sdrc_write_reg
(
sdrc_pwr
,
SDRC_POWER
);
...
...
@@ -455,6 +455,8 @@ void omap_sram_idle(void)
}
omap3_intc_resume_idle
();
pwrdm_post_transition
();
/* PER */
if
(
per_next_state
<
PWRDM_POWER_ON
)
{
per_prev_state
=
pwrdm_read_prev_pwrst
(
per_pwrdm
);
...
...
@@ -475,11 +477,10 @@ void omap_sram_idle(void)
core_next_state
<
PWRDM_POWER_ON
))
{
omap2_prm_clear_mod_reg_bits
(
OMAP3430_EN_IO_MASK
,
WKUP_MOD
,
PM_WKEN
);
omap3_disable_io_chain
();
if
(
omap3_has_io_chain_ctrl
())
omap3_disable_io_chain
();
}
pwrdm_post_transition
();
clkdm_allow_idle
(
mpu_pwrdm
->
pwrdm_clkdms
[
0
]);
}
...
...
@@ -870,6 +871,9 @@ static int __init omap3_pm_init(void)
if
(
!
cpu_is_omap34xx
())
return
-
ENODEV
;
if
(
!
omap3_has_io_chain_ctrl
())
pr_warning
(
"PM: no software I/O chain control; some wakeups may be lost
\n
"
);
pm_errata_configure
();
/* XXX prcm_setup_regs needs to be before enabling hw
...
...
arch/arm/plat-omap/include/plat/cpu.h
浏览文件 @
7fd92b56
...
...
@@ -399,6 +399,13 @@ void omap2_check_revision(void);
/*
* Runtime detection of OMAP3 features
*
* OMAP3_HAS_IO_CHAIN_CTRL: Some later members of the OMAP3 chip
* family have OS-level control over the I/O chain clock. This is
* to avoid a window during which wakeups could potentially be lost
* during powerdomain transitions. If this bit is set, it
* indicates that the chip does support OS-level control of this
* feature.
*/
extern
u32
omap_features
;
...
...
@@ -410,9 +417,10 @@ extern u32 omap_features;
#define OMAP3_HAS_192MHZ_CLK BIT(5)
#define OMAP3_HAS_IO_WAKEUP BIT(6)
#define OMAP3_HAS_SDRC BIT(7)
#define OMAP4_HAS_MPU_1GHZ BIT(8)
#define OMAP4_HAS_MPU_1_2GHZ BIT(9)
#define OMAP4_HAS_MPU_1_5GHZ BIT(10)
#define OMAP3_HAS_IO_CHAIN_CTRL BIT(8)
#define OMAP4_HAS_MPU_1GHZ BIT(9)
#define OMAP4_HAS_MPU_1_2GHZ BIT(10)
#define OMAP4_HAS_MPU_1_5GHZ BIT(11)
#define OMAP3_HAS_FEATURE(feat,flag) \
...
...
@@ -429,12 +437,11 @@ OMAP3_HAS_FEATURE(isp, ISP)
OMAP3_HAS_FEATURE
(
192
mhz_clk
,
192
MHZ_CLK
)
OMAP3_HAS_FEATURE
(
io_wakeup
,
IO_WAKEUP
)
OMAP3_HAS_FEATURE
(
sdrc
,
SDRC
)
OMAP3_HAS_FEATURE
(
io_chain_ctrl
,
IO_CHAIN_CTRL
)
/*
* Runtime detection of OMAP4 features
*/
extern
u32
omap_features
;
#define OMAP4_HAS_FEATURE(feat, flag) \
static inline unsigned int omap4_has_ ##feat(void) \
{ \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录