Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
ac8a1eb0
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看板
You need to sign in or sign up before continuing.
提交
ac8a1eb0
编写于
10月 19, 2017
作者:
T
Thierry Reding
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-4.15/firmware' into for-4.15/thermal
上级
5f5f4e1b
80d47a91
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
61 addition
and
11 deletion
+61
-11
drivers/firmware/tegra/bpmp.c
drivers/firmware/tegra/bpmp.c
+19
-8
include/soc/tegra/bpmp.h
include/soc/tegra/bpmp.h
+42
-3
未找到文件。
drivers/firmware/tegra/bpmp.c
浏览文件 @
ac8a1eb0
...
...
@@ -194,16 +194,24 @@ static int tegra_bpmp_wait_master_free(struct tegra_bpmp_channel *channel)
}
static
ssize_t
__tegra_bpmp_channel_read
(
struct
tegra_bpmp_channel
*
channel
,
void
*
data
,
size_t
size
)
void
*
data
,
size_t
size
,
int
*
ret
)
{
int
err
;
if
(
data
&&
size
>
0
)
memcpy
(
data
,
channel
->
ib
->
data
,
size
);
return
tegra_ivc_read_advance
(
channel
->
ivc
);
err
=
tegra_ivc_read_advance
(
channel
->
ivc
);
if
(
err
<
0
)
return
err
;
*
ret
=
channel
->
ib
->
code
;
return
0
;
}
static
ssize_t
tegra_bpmp_channel_read
(
struct
tegra_bpmp_channel
*
channel
,
void
*
data
,
size_t
size
)
void
*
data
,
size_t
size
,
int
*
ret
)
{
struct
tegra_bpmp
*
bpmp
=
channel
->
bpmp
;
unsigned
long
flags
;
...
...
@@ -217,7 +225,7 @@ static ssize_t tegra_bpmp_channel_read(struct tegra_bpmp_channel *channel,
}
spin_lock_irqsave
(
&
bpmp
->
lock
,
flags
);
err
=
__tegra_bpmp_channel_read
(
channel
,
data
,
size
);
err
=
__tegra_bpmp_channel_read
(
channel
,
data
,
size
,
ret
);
clear_bit
(
index
,
bpmp
->
threaded
.
allocated
);
spin_unlock_irqrestore
(
&
bpmp
->
lock
,
flags
);
...
...
@@ -337,7 +345,8 @@ int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,
if
(
err
<
0
)
return
err
;
return
__tegra_bpmp_channel_read
(
channel
,
msg
->
rx
.
data
,
msg
->
rx
.
size
);
return
__tegra_bpmp_channel_read
(
channel
,
msg
->
rx
.
data
,
msg
->
rx
.
size
,
&
msg
->
rx
.
ret
);
}
EXPORT_SYMBOL_GPL
(
tegra_bpmp_transfer_atomic
);
...
...
@@ -371,7 +380,8 @@ int tegra_bpmp_transfer(struct tegra_bpmp *bpmp,
if
(
err
==
0
)
return
-
ETIMEDOUT
;
return
tegra_bpmp_channel_read
(
channel
,
msg
->
rx
.
data
,
msg
->
rx
.
size
);
return
tegra_bpmp_channel_read
(
channel
,
msg
->
rx
.
data
,
msg
->
rx
.
size
,
&
msg
->
rx
.
ret
);
}
EXPORT_SYMBOL_GPL
(
tegra_bpmp_transfer
);
...
...
@@ -387,8 +397,8 @@ static struct tegra_bpmp_mrq *tegra_bpmp_find_mrq(struct tegra_bpmp *bpmp,
return
NULL
;
}
static
void
tegra_bpmp_mrq_return
(
struct
tegra_bpmp_channel
*
channel
,
int
code
,
const
void
*
data
,
size_t
size
)
void
tegra_bpmp_mrq_return
(
struct
tegra_bpmp_channel
*
channel
,
int
code
,
const
void
*
data
,
size_t
size
)
{
unsigned
long
flags
=
channel
->
ib
->
flags
;
struct
tegra_bpmp
*
bpmp
=
channel
->
bpmp
;
...
...
@@ -426,6 +436,7 @@ static void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel,
mbox_client_txdone
(
bpmp
->
mbox
.
channel
,
0
);
}
}
EXPORT_SYMBOL_GPL
(
tegra_bpmp_mrq_return
);
static
void
tegra_bpmp_handle_mrq
(
struct
tegra_bpmp
*
bpmp
,
unsigned
int
mrq
,
...
...
include/soc/tegra/bpmp.h
浏览文件 @
ac8a1eb0
...
...
@@ -96,9 +96,6 @@ struct tegra_bpmp {
struct
genpd_onecell_data
genpd
;
};
struct
tegra_bpmp
*
tegra_bpmp_get
(
struct
device
*
dev
);
void
tegra_bpmp_put
(
struct
tegra_bpmp
*
bpmp
);
struct
tegra_bpmp_message
{
unsigned
int
mrq
;
...
...
@@ -110,18 +107,60 @@ struct tegra_bpmp_message {
struct
{
void
*
data
;
size_t
size
;
int
ret
;
}
rx
;
};
#if IS_ENABLED(CONFIG_TEGRA_BPMP)
struct
tegra_bpmp
*
tegra_bpmp_get
(
struct
device
*
dev
);
void
tegra_bpmp_put
(
struct
tegra_bpmp
*
bpmp
);
int
tegra_bpmp_transfer_atomic
(
struct
tegra_bpmp
*
bpmp
,
struct
tegra_bpmp_message
*
msg
);
int
tegra_bpmp_transfer
(
struct
tegra_bpmp
*
bpmp
,
struct
tegra_bpmp_message
*
msg
);
void
tegra_bpmp_mrq_return
(
struct
tegra_bpmp_channel
*
channel
,
int
code
,
const
void
*
data
,
size_t
size
);
int
tegra_bpmp_request_mrq
(
struct
tegra_bpmp
*
bpmp
,
unsigned
int
mrq
,
tegra_bpmp_mrq_handler_t
handler
,
void
*
data
);
void
tegra_bpmp_free_mrq
(
struct
tegra_bpmp
*
bpmp
,
unsigned
int
mrq
,
void
*
data
);
#else
static
inline
struct
tegra_bpmp
*
tegra_bpmp_get
(
struct
device
*
dev
)
{
return
ERR_PTR
(
-
ENOTSUPP
);
}
static
inline
void
tegra_bpmp_put
(
struct
tegra_bpmp
*
bpmp
)
{
}
static
inline
int
tegra_bpmp_transfer_atomic
(
struct
tegra_bpmp
*
bpmp
,
struct
tegra_bpmp_message
*
msg
)
{
return
-
ENOTSUPP
;
}
static
inline
int
tegra_bpmp_transfer
(
struct
tegra_bpmp
*
bpmp
,
struct
tegra_bpmp_message
*
msg
)
{
return
-
ENOTSUPP
;
}
static
inline
void
tegra_bpmp_mrq_return
(
struct
tegra_bpmp_channel
*
channel
,
int
code
,
const
void
*
data
,
size_t
size
)
{
}
static
inline
int
tegra_bpmp_request_mrq
(
struct
tegra_bpmp
*
bpmp
,
unsigned
int
mrq
,
tegra_bpmp_mrq_handler_t
handler
,
void
*
data
)
{
return
-
ENOTSUPP
;
}
static
inline
void
tegra_bpmp_free_mrq
(
struct
tegra_bpmp
*
bpmp
,
unsigned
int
mrq
,
void
*
data
)
{
}
#endif
#if IS_ENABLED(CONFIG_CLK_TEGRA_BPMP)
int
tegra_bpmp_init_clocks
(
struct
tegra_bpmp
*
bpmp
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录