Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
027e6872
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
027e6872
编写于
12月 16, 2008
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
serial: sh-sci: Fix up the cpufreq notifier to use the proper port clock.
Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
d9341b51
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
28 deletion
+10
-28
drivers/serial/sh-sci.c
drivers/serial/sh-sci.c
+10
-28
未找到文件。
drivers/serial/sh-sci.c
浏览文件 @
027e6872
...
...
@@ -748,7 +748,7 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
return
ret
;
}
#if
defined(CONFIG_CPU_FREQ) && defined(CONFIG_HAVE_CLK)
#if
def CONFIG_HAVE_CLK
/*
* Here we define a transistion notifier so that we can update all of our
* ports' baud rate when the peripheral clock changes.
...
...
@@ -756,41 +756,20 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
static
int
sci_notifier
(
struct
notifier_block
*
self
,
unsigned
long
phase
,
void
*
p
)
{
struct
cpufreq_freqs
*
freqs
=
p
;
int
i
;
if
((
phase
==
CPUFREQ_POSTCHANGE
)
||
(
phase
==
CPUFREQ_RESUMECHANGE
))
{
(
phase
==
CPUFREQ_RESUMECHANGE
))
for
(
i
=
0
;
i
<
SCI_NPORTS
;
i
++
)
{
struct
uart_port
*
port
=
&
sci_ports
[
i
].
port
;
struct
clk
*
clk
;
/*
* Update the uartclk per-port if frequency has
* changed, since it will no longer necessarily be
* consistent with the old frequency.
*
* Really we want to be able to do something like
* uart_change_speed() or something along those lines
* here to implicitly reset the per-port baud rate..
*
* Clean this up later..
*/
clk
=
clk_get
(
NULL
,
"module_clk"
);
port
->
uartclk
=
clk_get_rate
(
clk
);
clk_put
(
clk
);
struct
sci_port
*
s
=
&
sci_ports
[
i
];
s
->
port
.
uartclk
=
clk_get_rate
(
s
->
clk
);
}
printk
(
KERN_INFO
"%s: got a postchange notification "
"for cpu %d (old %d, new %d)
\n
"
,
__func__
,
freqs
->
cpu
,
freqs
->
old
,
freqs
->
new
);
}
return
NOTIFY_OK
;
}
static
struct
notifier_block
sci_nb
=
{
&
sci_notifier
,
NULL
,
0
};
#endif
/* CONFIG_CPU_FREQ && CONFIG_HAVE_CLK */
#endif
static
int
sci_request_irq
(
struct
sci_port
*
port
)
{
...
...
@@ -1326,9 +1305,8 @@ static int __devinit sci_probe(struct platform_device *dev)
uart_add_one_port
(
&
sci_uart_driver
,
&
sciport
->
port
);
}
#if
defined(CONFIG_CPU_FREQ) && defined(CONFIG_HAVE_CLK)
#if
def CONFIG_HAVE_CLK
cpufreq_register_notifier
(
&
sci_nb
,
CPUFREQ_TRANSITION_NOTIFIER
);
dev_info
(
&
dev
->
dev
,
"CPU frequency notifier registered
\n
"
);
#endif
#ifdef CONFIG_SH_STANDARD_BIOS
...
...
@@ -1348,6 +1326,10 @@ static int __devexit sci_remove(struct platform_device *dev)
{
int
i
;
#ifdef CONFIG_HAVE_CLK
cpufreq_unregister_notifier
(
&
sci_nb
,
CPUFREQ_TRANSITION_NOTIFIER
);
#endif
for
(
i
=
0
;
i
<
SCI_NPORTS
;
i
++
)
uart_remove_one_port
(
&
sci_uart_driver
,
&
sci_ports
[
i
].
port
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录