Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
f0aa411d
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f0aa411d
编写于
6月 29, 2016
作者:
S
Simon Horman
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'rcar-sysc-for-v4.8' into HEAD
上级
c94bc815
ced42730
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
161 addition
and
21 deletion
+161
-21
Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
...mentation/devicetree/bindings/power/renesas,rcar-sysc.txt
+1
-0
arch/arm/mach-shmobile/pm-r8a7779.c
arch/arm/mach-shmobile/pm-r8a7779.c
+1
-5
arch/arm/mach-shmobile/pm-rcar-gen2.c
arch/arm/mach-shmobile/pm-rcar-gen2.c
+1
-5
drivers/soc/renesas/Makefile
drivers/soc/renesas/Makefile
+2
-0
drivers/soc/renesas/r8a7792-sysc.c
drivers/soc/renesas/r8a7792-sysc.c
+34
-0
drivers/soc/renesas/r8a7796-sysc.c
drivers/soc/renesas/r8a7796-sysc.c
+48
-0
drivers/soc/renesas/rcar-sysc.c
drivers/soc/renesas/rcar-sysc.c
+35
-10
drivers/soc/renesas/rcar-sysc.h
drivers/soc/renesas/rcar-sysc.h
+2
-0
include/dt-bindings/power/r8a7796-sysc.h
include/dt-bindings/power/r8a7796-sysc.h
+36
-0
include/linux/soc/renesas/rcar-sysc.h
include/linux/soc/renesas/rcar-sysc.h
+1
-1
未找到文件。
Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
浏览文件 @
f0aa411d
...
@@ -14,6 +14,7 @@ Required properties:
...
@@ -14,6 +14,7 @@ Required properties:
- "renesas,r8a7793-sysc" (R-Car M2-N)
- "renesas,r8a7793-sysc" (R-Car M2-N)
- "renesas,r8a7794-sysc" (R-Car E2)
- "renesas,r8a7794-sysc" (R-Car E2)
- "renesas,r8a7795-sysc" (R-Car H3)
- "renesas,r8a7795-sysc" (R-Car H3)
- "renesas,r8a7796-sysc" (R-Car M3-W)
- reg: Address start and address range for the device.
- reg: Address start and address range for the device.
- #power-domain-cells: Must be 1.
- #power-domain-cells: Must be 1.
...
...
arch/arm/mach-shmobile/pm-r8a7779.c
浏览文件 @
f0aa411d
...
@@ -23,11 +23,7 @@
...
@@ -23,11 +23,7 @@
static
void
__init
r8a7779_sysc_init
(
void
)
static
void
__init
r8a7779_sysc_init
(
void
)
{
{
void
__iomem
*
base
=
rcar_sysc_init
(
0xffd85000
);
rcar_sysc_init
(
0xffd85000
,
0x0131000e
);
/* enable all interrupt sources, but do not use interrupt handler */
iowrite32
(
0x0131000e
,
base
+
SYSCIER
);
iowrite32
(
0
,
base
+
SYSCIMR
);
}
}
#else
/* CONFIG_PM || CONFIG_SMP */
#else
/* CONFIG_PM || CONFIG_SMP */
...
...
arch/arm/mach-shmobile/pm-rcar-gen2.c
浏览文件 @
f0aa411d
...
@@ -36,11 +36,7 @@
...
@@ -36,11 +36,7 @@
static
void
__init
rcar_gen2_sysc_init
(
u32
syscier
)
static
void
__init
rcar_gen2_sysc_init
(
u32
syscier
)
{
{
void
__iomem
*
base
=
rcar_sysc_init
(
0xe6180000
);
rcar_sysc_init
(
0xe6180000
,
syscier
);
/* enable all interrupt sources, but do not use interrupt handler */
iowrite32
(
syscier
,
base
+
SYSCIER
);
iowrite32
(
0
,
base
+
SYSCIMR
);
}
}
#else
/* CONFIG_SMP */
#else
/* CONFIG_SMP */
...
...
drivers/soc/renesas/Makefile
浏览文件 @
f0aa411d
obj-$(CONFIG_ARCH_R8A7779)
+=
rcar-sysc.o r8a7779-sysc.o
obj-$(CONFIG_ARCH_R8A7779)
+=
rcar-sysc.o r8a7779-sysc.o
obj-$(CONFIG_ARCH_R8A7790)
+=
rcar-sysc.o r8a7790-sysc.o
obj-$(CONFIG_ARCH_R8A7790)
+=
rcar-sysc.o r8a7790-sysc.o
obj-$(CONFIG_ARCH_R8A7791)
+=
rcar-sysc.o r8a7791-sysc.o
obj-$(CONFIG_ARCH_R8A7791)
+=
rcar-sysc.o r8a7791-sysc.o
obj-$(CONFIG_ARCH_R8A7792)
+=
rcar-sysc.o r8a7792-sysc.o
# R-Car M2-N is identical to R-Car M2-W w.r.t. power domains.
# R-Car M2-N is identical to R-Car M2-W w.r.t. power domains.
obj-$(CONFIG_ARCH_R8A7793)
+=
rcar-sysc.o r8a7791-sysc.o
obj-$(CONFIG_ARCH_R8A7793)
+=
rcar-sysc.o r8a7791-sysc.o
obj-$(CONFIG_ARCH_R8A7794)
+=
rcar-sysc.o r8a7794-sysc.o
obj-$(CONFIG_ARCH_R8A7794)
+=
rcar-sysc.o r8a7794-sysc.o
obj-$(CONFIG_ARCH_R8A7795)
+=
rcar-sysc.o r8a7795-sysc.o
obj-$(CONFIG_ARCH_R8A7795)
+=
rcar-sysc.o r8a7795-sysc.o
obj-$(CONFIG_ARCH_R8A7796)
+=
rcar-sysc.o r8a7796-sysc.o
drivers/soc/renesas/r8a7792-sysc.c
0 → 100644
浏览文件 @
f0aa411d
/*
* Renesas R-Car V2H (R8A7792) System Controller
*
* Copyright (C) 2016 Cogent Embedded Inc.
*
* 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; version 2 of the License.
*/
#include <linux/bug.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <dt-bindings/power/r8a7792-sysc.h>
#include "rcar-sysc.h"
static
const
struct
rcar_sysc_area
r8a7792_areas
[]
__initconst
=
{
{
"always-on"
,
0
,
0
,
R8A7792_PD_ALWAYS_ON
,
-
1
,
PD_ALWAYS_ON
},
{
"ca15-scu"
,
0x180
,
0
,
R8A7792_PD_CA15_SCU
,
R8A7792_PD_ALWAYS_ON
,
PD_SCU
},
{
"ca15-cpu0"
,
0x40
,
0
,
R8A7792_PD_CA15_CPU0
,
R8A7792_PD_CA15_SCU
,
PD_CPU_NOCR
},
{
"ca15-cpu1"
,
0x40
,
1
,
R8A7792_PD_CA15_CPU1
,
R8A7792_PD_CA15_SCU
,
PD_CPU_NOCR
},
{
"sgx"
,
0xc0
,
0
,
R8A7792_PD_SGX
,
R8A7792_PD_ALWAYS_ON
},
{
"imp"
,
0x140
,
0
,
R8A7792_PD_IMP
,
R8A7792_PD_ALWAYS_ON
},
};
const
struct
rcar_sysc_info
r8a7792_sysc_info
__initconst
=
{
.
areas
=
r8a7792_areas
,
.
num_areas
=
ARRAY_SIZE
(
r8a7792_areas
),
};
drivers/soc/renesas/r8a7796-sysc.c
0 → 100644
浏览文件 @
f0aa411d
/*
* Renesas R-Car M3-W System Controller
*
* Copyright (C) 2016 Glider bvba
*
* 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; version 2 of the License.
*/
#include <linux/bug.h>
#include <linux/kernel.h>
#include <dt-bindings/power/r8a7796-sysc.h>
#include "rcar-sysc.h"
static
const
struct
rcar_sysc_area
r8a7796_areas
[]
__initconst
=
{
{
"always-on"
,
0
,
0
,
R8A7796_PD_ALWAYS_ON
,
-
1
,
PD_ALWAYS_ON
},
{
"ca57-scu"
,
0x1c0
,
0
,
R8A7796_PD_CA57_SCU
,
R8A7796_PD_ALWAYS_ON
,
PD_SCU
},
{
"ca57-cpu0"
,
0x80
,
0
,
R8A7796_PD_CA57_CPU0
,
R8A7796_PD_CA57_SCU
,
PD_CPU_NOCR
},
{
"ca57-cpu1"
,
0x80
,
1
,
R8A7796_PD_CA57_CPU1
,
R8A7796_PD_CA57_SCU
,
PD_CPU_NOCR
},
{
"ca53-scu"
,
0x140
,
0
,
R8A7796_PD_CA53_SCU
,
R8A7796_PD_ALWAYS_ON
,
PD_SCU
},
{
"ca53-cpu0"
,
0x200
,
0
,
R8A7796_PD_CA53_CPU0
,
R8A7796_PD_CA53_SCU
,
PD_CPU_NOCR
},
{
"ca53-cpu1"
,
0x200
,
1
,
R8A7796_PD_CA53_CPU1
,
R8A7796_PD_CA53_SCU
,
PD_CPU_NOCR
},
{
"ca53-cpu2"
,
0x200
,
2
,
R8A7796_PD_CA53_CPU2
,
R8A7796_PD_CA53_SCU
,
PD_CPU_NOCR
},
{
"ca53-cpu3"
,
0x200
,
3
,
R8A7796_PD_CA53_CPU3
,
R8A7796_PD_CA53_SCU
,
PD_CPU_NOCR
},
{
"cr7"
,
0x240
,
0
,
R8A7796_PD_CR7
,
R8A7796_PD_ALWAYS_ON
},
{
"a3vc"
,
0x380
,
0
,
R8A7796_PD_A3VC
,
R8A7796_PD_ALWAYS_ON
},
{
"a2vc0"
,
0x3c0
,
0
,
R8A7796_PD_A2VC0
,
R8A7796_PD_A3VC
},
{
"a2vc1"
,
0x3c0
,
1
,
R8A7796_PD_A2VC1
,
R8A7796_PD_A3VC
},
{
"3dg-a"
,
0x100
,
0
,
R8A7796_PD_3DG_A
,
R8A7796_PD_ALWAYS_ON
},
{
"3dg-b"
,
0x100
,
1
,
R8A7796_PD_3DG_B
,
R8A7796_PD_3DG_A
},
{
"a3ir"
,
0x180
,
0
,
R8A7796_PD_A3IR
,
R8A7796_PD_ALWAYS_ON
},
};
const
struct
rcar_sysc_info
r8a7796_sysc_info
__initconst
=
{
.
areas
=
r8a7796_areas
,
.
num_areas
=
ARRAY_SIZE
(
r8a7796_areas
),
};
drivers/soc/renesas/rcar-sysc.c
浏览文件 @
f0aa411d
...
@@ -164,15 +164,6 @@ static bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch)
...
@@ -164,15 +164,6 @@ static bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch)
return
false
;
return
false
;
}
}
void
__iomem
*
rcar_sysc_init
(
phys_addr_t
base
)
{
rcar_sysc_base
=
ioremap_nocache
(
base
,
PAGE_SIZE
);
if
(
!
rcar_sysc_base
)
panic
(
"unable to ioremap R-Car SYSC hardware block
\n
"
);
return
rcar_sysc_base
;
}
struct
rcar_sysc_pd
{
struct
rcar_sysc_pd
{
struct
generic_pm_domain
genpd
;
struct
generic_pm_domain
genpd
;
struct
rcar_sysc_ch
ch
;
struct
rcar_sysc_ch
ch
;
...
@@ -293,6 +284,9 @@ static const struct of_device_id rcar_sysc_matches[] = {
...
@@ -293,6 +284,9 @@ static const struct of_device_id rcar_sysc_matches[] = {
#ifdef CONFIG_ARCH_R8A7791
#ifdef CONFIG_ARCH_R8A7791
{
.
compatible
=
"renesas,r8a7791-sysc"
,
.
data
=
&
r8a7791_sysc_info
},
{
.
compatible
=
"renesas,r8a7791-sysc"
,
.
data
=
&
r8a7791_sysc_info
},
#endif
#endif
#ifdef CONFIG_ARCH_R8A7792
{
.
compatible
=
"renesas,r8a7792-sysc"
,
.
data
=
&
r8a7792_sysc_info
},
#endif
#ifdef CONFIG_ARCH_R8A7793
#ifdef CONFIG_ARCH_R8A7793
/* R-Car M2-N is identical to R-Car M2-W w.r.t. power domains. */
/* R-Car M2-N is identical to R-Car M2-W w.r.t. power domains. */
{
.
compatible
=
"renesas,r8a7793-sysc"
,
.
data
=
&
r8a7791_sysc_info
},
{
.
compatible
=
"renesas,r8a7793-sysc"
,
.
data
=
&
r8a7791_sysc_info
},
...
@@ -302,6 +296,9 @@ static const struct of_device_id rcar_sysc_matches[] = {
...
@@ -302,6 +296,9 @@ static const struct of_device_id rcar_sysc_matches[] = {
#endif
#endif
#ifdef CONFIG_ARCH_R8A7795
#ifdef CONFIG_ARCH_R8A7795
{
.
compatible
=
"renesas,r8a7795-sysc"
,
.
data
=
&
r8a7795_sysc_info
},
{
.
compatible
=
"renesas,r8a7795-sysc"
,
.
data
=
&
r8a7795_sysc_info
},
#endif
#ifdef CONFIG_ARCH_R8A7796
{
.
compatible
=
"renesas,r8a7796-sysc"
,
.
data
=
&
r8a7796_sysc_info
},
#endif
#endif
{
/* sentinel */
}
{
/* sentinel */
}
};
};
...
@@ -322,6 +319,9 @@ static int __init rcar_sysc_pd_init(void)
...
@@ -322,6 +319,9 @@ static int __init rcar_sysc_pd_init(void)
unsigned
int
i
;
unsigned
int
i
;
int
error
;
int
error
;
if
(
rcar_sysc_base
)
return
0
;
np
=
of_find_matching_node_and_match
(
NULL
,
rcar_sysc_matches
,
&
match
);
np
=
of_find_matching_node_and_match
(
NULL
,
rcar_sysc_matches
,
&
match
);
if
(
!
np
)
if
(
!
np
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -392,10 +392,35 @@ static int __init rcar_sysc_pd_init(void)
...
@@ -392,10 +392,35 @@ static int __init rcar_sysc_pd_init(void)
domains
->
domains
[
area
->
isr_bit
]
=
&
pd
->
genpd
;
domains
->
domains
[
area
->
isr_bit
]
=
&
pd
->
genpd
;
}
}
of_genpd_add_provider_onecell
(
np
,
&
domains
->
onecell_data
);
error
=
of_genpd_add_provider_onecell
(
np
,
&
domains
->
onecell_data
);
out_put:
out_put:
of_node_put
(
np
);
of_node_put
(
np
);
return
error
;
return
error
;
}
}
early_initcall
(
rcar_sysc_pd_init
);
early_initcall
(
rcar_sysc_pd_init
);
void
__init
rcar_sysc_init
(
phys_addr_t
base
,
u32
syscier
)
{
u32
syscimr
;
if
(
!
rcar_sysc_pd_init
())
return
;
rcar_sysc_base
=
ioremap_nocache
(
base
,
PAGE_SIZE
);
/*
* Mask all interrupt sources to prevent the CPU from receiving them.
* Make sure not to clear reserved bits that were set before.
*/
syscimr
=
ioread32
(
rcar_sysc_base
+
SYSCIMR
);
syscimr
|=
syscier
;
pr_debug
(
"%s: syscimr = 0x%08x
\n
"
,
__func__
,
syscimr
);
iowrite32
(
syscimr
,
rcar_sysc_base
+
SYSCIMR
);
/*
* SYSC needs all interrupt sources enabled to control power.
*/
pr_debug
(
"%s: syscier = 0x%08x
\n
"
,
__func__
,
syscier
);
iowrite32
(
syscier
,
rcar_sysc_base
+
SYSCIER
);
}
drivers/soc/renesas/rcar-sysc.h
浏览文件 @
f0aa411d
...
@@ -53,6 +53,8 @@ struct rcar_sysc_info {
...
@@ -53,6 +53,8 @@ struct rcar_sysc_info {
extern
const
struct
rcar_sysc_info
r8a7779_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7779_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7790_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7790_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7791_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7791_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7792_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7794_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7794_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7795_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7795_sysc_info
;
extern
const
struct
rcar_sysc_info
r8a7796_sysc_info
;
#endif
/* __SOC_RENESAS_RCAR_SYSC_H__ */
#endif
/* __SOC_RENESAS_RCAR_SYSC_H__ */
include/dt-bindings/power/r8a7796-sysc.h
0 → 100644
浏览文件 @
f0aa411d
/*
* Copyright (C) 2016 Glider bvba
*
* 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; version 2 of the License.
*/
#ifndef __DT_BINDINGS_POWER_R8A7796_SYSC_H__
#define __DT_BINDINGS_POWER_R8A7796_SYSC_H__
/*
* These power domain indices match the numbers of the interrupt bits
* representing the power areas in the various Interrupt Registers
* (e.g. SYSCISR, Interrupt Status Register)
*/
#define R8A7796_PD_CA57_CPU0 0
#define R8A7796_PD_CA57_CPU1 1
#define R8A7796_PD_CA53_CPU0 5
#define R8A7796_PD_CA53_CPU1 6
#define R8A7796_PD_CA53_CPU2 7
#define R8A7796_PD_CA53_CPU3 8
#define R8A7796_PD_CA57_SCU 12
#define R8A7796_PD_CR7 13
#define R8A7796_PD_A3VC 14
#define R8A7796_PD_3DG_A 17
#define R8A7796_PD_3DG_B 18
#define R8A7796_PD_CA53_SCU 21
#define R8A7796_PD_A3IR 24
#define R8A7796_PD_A2VC0 25
#define R8A7796_PD_A2VC1 26
/* Always-on power area */
#define R8A7796_PD_ALWAYS_ON 32
#endif
/* __DT_BINDINGS_POWER_R8A7796_SYSC_H__ */
include/linux/soc/renesas/rcar-sysc.h
浏览文件 @
f0aa411d
...
@@ -11,6 +11,6 @@ struct rcar_sysc_ch {
...
@@ -11,6 +11,6 @@ struct rcar_sysc_ch {
int
rcar_sysc_power_down
(
const
struct
rcar_sysc_ch
*
sysc_ch
);
int
rcar_sysc_power_down
(
const
struct
rcar_sysc_ch
*
sysc_ch
);
int
rcar_sysc_power_up
(
const
struct
rcar_sysc_ch
*
sysc_ch
);
int
rcar_sysc_power_up
(
const
struct
rcar_sysc_ch
*
sysc_ch
);
void
__iomem
*
rcar_sysc_init
(
phys_addr_t
base
);
void
rcar_sysc_init
(
phys_addr_t
base
,
u32
syscier
);
#endif
/* __LINUX_SOC_RENESAS_RCAR_SYSC_H__ */
#endif
/* __LINUX_SOC_RENESAS_RCAR_SYSC_H__ */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录