Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
c97ad0fc
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c97ad0fc
编写于
4月 15, 2017
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge back cpufreq core changes for v4.12.
上级
c4a3fa26
69a07f18
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
59 addition
and
132 deletion
+59
-132
MAINTAINERS
MAINTAINERS
+1
-0
arch/arm/boot/dts/ste-dbx5x0.dtsi
arch/arm/boot/dts/ste-dbx5x0.dtsi
+0
-5
drivers/cpufreq/dbx500-cpufreq.c
drivers/cpufreq/dbx500-cpufreq.c
+20
-0
drivers/cpufreq/mt8173-cpufreq.c
drivers/cpufreq/mt8173-cpufreq.c
+21
-2
drivers/cpufreq/qoriq-cpufreq.c
drivers/cpufreq/qoriq-cpufreq.c
+17
-7
drivers/thermal/Kconfig
drivers/thermal/Kconfig
+0
-12
drivers/thermal/Makefile
drivers/thermal/Makefile
+0
-1
drivers/thermal/db8500_cpufreq_cooling.c
drivers/thermal/db8500_cpufreq_cooling.c
+0
-105
未找到文件。
MAINTAINERS
浏览文件 @
c97ad0fc
...
...
@@ -3449,6 +3449,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
T: git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
B: https://bugzilla.kernel.org
F: Documentation/cpu-freq/
F: Documentation/devicetree/bindings/cpufreq/
F: drivers/cpufreq/
F: include/linux/cpufreq.h
F: tools/testing/selftests/cpufreq/
...
...
arch/arm/boot/dts/ste-dbx5x0.dtsi
浏览文件 @
c97ad0fc
...
...
@@ -1189,11 +1189,6 @@
status = "disabled";
};
cpufreq-cooling {
compatible = "stericsson,db8500-cpufreq-cooling";
status = "disabled";
};
mcde@a0350000 {
compatible = "stericsson,mcde";
reg = <0xa0350000 0x1000>, /* MCDE */
...
...
drivers/cpufreq/dbx500-cpufreq.c
浏览文件 @
c97ad0fc
...
...
@@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/cpufreq.h>
#include <linux/cpu_cooling.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
...
...
@@ -18,6 +19,7 @@
static
struct
cpufreq_frequency_table
*
freq_table
;
static
struct
clk
*
armss_clk
;
static
struct
thermal_cooling_device
*
cdev
;
static
int
dbx500_cpufreq_target
(
struct
cpufreq_policy
*
policy
,
unsigned
int
index
)
...
...
@@ -32,6 +34,22 @@ static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
return
cpufreq_generic_init
(
policy
,
freq_table
,
20
*
1000
);
}
static
int
dbx500_cpufreq_exit
(
struct
cpufreq_policy
*
policy
)
{
if
(
!
IS_ERR
(
cdev
))
cpufreq_cooling_unregister
(
cdev
);
return
0
;
}
static
void
dbx500_cpufreq_ready
(
struct
cpufreq_policy
*
policy
)
{
cdev
=
cpufreq_cooling_register
(
policy
->
cpus
);
if
(
IS_ERR
(
cdev
))
pr_err
(
"Failed to register cooling device %ld
\n
"
,
PTR_ERR
(
cdev
));
else
pr_info
(
"Cooling device registered: %s
\n
"
,
cdev
->
type
);
}
static
struct
cpufreq_driver
dbx500_cpufreq_driver
=
{
.
flags
=
CPUFREQ_STICKY
|
CPUFREQ_CONST_LOOPS
|
CPUFREQ_NEED_INITIAL_FREQ_CHECK
,
...
...
@@ -39,6 +57,8 @@ static struct cpufreq_driver dbx500_cpufreq_driver = {
.
target_index
=
dbx500_cpufreq_target
,
.
get
=
cpufreq_generic_get
,
.
init
=
dbx500_cpufreq_init
,
.
exit
=
dbx500_cpufreq_exit
,
.
ready
=
dbx500_cpufreq_ready
,
.
name
=
"DBX500"
,
.
attr
=
cpufreq_generic_attr
,
};
...
...
drivers/cpufreq/mt8173-cpufreq.c
浏览文件 @
c97ad0fc
...
...
@@ -573,14 +573,33 @@ static struct platform_driver mt8173_cpufreq_platdrv = {
.
probe
=
mt8173_cpufreq_probe
,
};
static
int
mt8173_cpufreq_driver_init
(
void
)
/* List of machines supported by this driver */
static
const
struct
of_device_id
mt8173_cpufreq_machines
[]
__initconst
=
{
{
.
compatible
=
"mediatek,mt817x"
,
},
{
.
compatible
=
"mediatek,mt8173"
,
},
{
.
compatible
=
"mediatek,mt8176"
,
},
{
}
};
static
int
__init
mt8173_cpufreq_driver_init
(
void
)
{
struct
device_node
*
np
;
const
struct
of_device_id
*
match
;
struct
platform_device
*
pdev
;
int
err
;
if
(
!
of_machine_is_compatible
(
"mediatek,mt8173"
))
np
=
of_find_node_by_path
(
"/"
);
if
(
!
np
)
return
-
ENODEV
;
match
=
of_match_node
(
mt8173_cpufreq_machines
,
np
);
of_node_put
(
np
);
if
(
!
match
)
{
pr_warn
(
"Machine is not compatible with mt8173-cpufreq
\n
"
);
return
-
ENODEV
;
}
err
=
platform_driver_register
(
&
mt8173_cpufreq_platdrv
);
if
(
err
)
return
err
;
...
...
drivers/cpufreq/qoriq-cpufreq.c
浏览文件 @
c97ad0fc
...
...
@@ -52,17 +52,27 @@ static u32 get_bus_freq(void)
{
struct
device_node
*
soc
;
u32
sysfreq
;
struct
clk
*
pltclk
;
int
ret
;
/* get platform freq by searching bus-frequency property */
soc
=
of_find_node_by_type
(
NULL
,
"soc"
);
if
(
!
soc
)
return
0
;
if
(
of_property_read_u32
(
soc
,
"bus-frequency"
,
&
sysfreq
))
sysfreq
=
0
;
if
(
soc
)
{
ret
=
of_property_read_u32
(
soc
,
"bus-frequency"
,
&
sysfreq
);
of_node_put
(
soc
);
if
(
!
ret
)
return
sysfreq
;
}
of_node_put
(
soc
);
/* get platform freq by its clock name */
pltclk
=
clk_get
(
NULL
,
"cg-pll0-div1"
);
if
(
IS_ERR
(
pltclk
))
{
pr_err
(
"%s: can't get bus frequency %ld
\n
"
,
__func__
,
PTR_ERR
(
pltclk
));
return
PTR_ERR
(
pltclk
);
}
return
sysfreq
;
return
clk_get_rate
(
pltclk
)
;
}
static
struct
clk
*
cpu_to_clk
(
int
cpu
)
...
...
drivers/thermal/Kconfig
浏览文件 @
c97ad0fc
...
...
@@ -291,18 +291,6 @@ config ARMADA_THERMAL
Enable this option if you want to have support for thermal management
controller present in Armada 370 and Armada XP SoC.
config DB8500_CPUFREQ_COOLING
tristate "DB8500 cpufreq cooling"
depends on ARCH_U8500 || COMPILE_TEST
depends on HAS_IOMEM
depends on CPU_THERMAL
default y
help
Adds DB8500 cpufreq cooling devices, and these cooling devices can be
bound to thermal zone trip points. When a trip point reached, the
bound cpufreq cooling device turns active to set CPU frequency low to
cool down the CPU.
config INTEL_POWERCLAMP
tristate "Intel PowerClamp idle injection driver"
depends on THERMAL
...
...
drivers/thermal/Makefile
浏览文件 @
c97ad0fc
...
...
@@ -41,7 +41,6 @@ obj-$(CONFIG_TANGO_THERMAL) += tango_thermal.o
obj-$(CONFIG_IMX_THERMAL)
+=
imx_thermal.o
obj-$(CONFIG_MAX77620_THERMAL)
+=
max77620_thermal.o
obj-$(CONFIG_QORIQ_THERMAL)
+=
qoriq_thermal.o
obj-$(CONFIG_DB8500_CPUFREQ_COOLING)
+=
db8500_cpufreq_cooling.o
obj-$(CONFIG_INTEL_POWERCLAMP)
+=
intel_powerclamp.o
obj-$(CONFIG_X86_PKG_TEMP_THERMAL)
+=
x86_pkg_temp_thermal.o
obj-$(CONFIG_INTEL_SOC_DTS_IOSF_CORE)
+=
intel_soc_dts_iosf.o
...
...
drivers/thermal/db8500_cpufreq_cooling.c
已删除
100644 → 0
浏览文件 @
c4a3fa26
/*
* db8500_cpufreq_cooling.c - DB8500 cpufreq works as cooling device.
*
* Copyright (C) 2012 ST-Ericsson
* Copyright (C) 2012 Linaro Ltd.
*
* Author: Hongbo Zhang <hongbo.zhang@linaro.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/cpu_cooling.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
static
int
db8500_cpufreq_cooling_probe
(
struct
platform_device
*
pdev
)
{
struct
thermal_cooling_device
*
cdev
;
cdev
=
cpufreq_cooling_register
(
cpu_present_mask
);
if
(
IS_ERR
(
cdev
))
{
int
ret
=
PTR_ERR
(
cdev
);
if
(
ret
!=
-
EPROBE_DEFER
)
dev_err
(
&
pdev
->
dev
,
"Failed to register cooling device %d
\n
"
,
ret
);
return
ret
;
}
platform_set_drvdata
(
pdev
,
cdev
);
dev_info
(
&
pdev
->
dev
,
"Cooling device registered: %s
\n
"
,
cdev
->
type
);
return
0
;
}
static
int
db8500_cpufreq_cooling_remove
(
struct
platform_device
*
pdev
)
{
struct
thermal_cooling_device
*
cdev
=
platform_get_drvdata
(
pdev
);
cpufreq_cooling_unregister
(
cdev
);
return
0
;
}
static
int
db8500_cpufreq_cooling_suspend
(
struct
platform_device
*
pdev
,
pm_message_t
state
)
{
return
-
ENOSYS
;
}
static
int
db8500_cpufreq_cooling_resume
(
struct
platform_device
*
pdev
)
{
return
-
ENOSYS
;
}
#ifdef CONFIG_OF
static
const
struct
of_device_id
db8500_cpufreq_cooling_match
[]
=
{
{
.
compatible
=
"stericsson,db8500-cpufreq-cooling"
},
{},
};
MODULE_DEVICE_TABLE
(
of
,
db8500_cpufreq_cooling_match
);
#endif
static
struct
platform_driver
db8500_cpufreq_cooling_driver
=
{
.
driver
=
{
.
name
=
"db8500-cpufreq-cooling"
,
.
of_match_table
=
of_match_ptr
(
db8500_cpufreq_cooling_match
),
},
.
probe
=
db8500_cpufreq_cooling_probe
,
.
suspend
=
db8500_cpufreq_cooling_suspend
,
.
resume
=
db8500_cpufreq_cooling_resume
,
.
remove
=
db8500_cpufreq_cooling_remove
,
};
static
int
__init
db8500_cpufreq_cooling_init
(
void
)
{
return
platform_driver_register
(
&
db8500_cpufreq_cooling_driver
);
}
static
void
__exit
db8500_cpufreq_cooling_exit
(
void
)
{
platform_driver_unregister
(
&
db8500_cpufreq_cooling_driver
);
}
/* Should be later than db8500_cpufreq_register */
late_initcall
(
db8500_cpufreq_cooling_init
);
module_exit
(
db8500_cpufreq_cooling_exit
);
MODULE_AUTHOR
(
"Hongbo Zhang <hongbo.zhang@stericsson.com>"
);
MODULE_DESCRIPTION
(
"DB8500 cpufreq cooling driver"
);
MODULE_LICENSE
(
"GPL"
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录