Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
c25a7e5d
K
Kernel
项目概览
openeuler
/
Kernel
大约 2 年 前同步成功
通知
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看板
提交
c25a7e5d
编写于
4月 26, 2022
作者:
U
Ulf Hansson
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fixes' into next
上级
cfb64661
4bc31ede
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
19 addition
and
4 deletion
+19
-4
drivers/mmc/core/mmc.c
drivers/mmc/core/mmc.c
+19
-4
未找到文件。
drivers/mmc/core/mmc.c
浏览文件 @
c25a7e5d
...
@@ -1384,13 +1384,17 @@ static int mmc_select_hs400es(struct mmc_card *card)
...
@@ -1384,13 +1384,17 @@ static int mmc_select_hs400es(struct mmc_card *card)
goto
out_err
;
goto
out_err
;
}
}
/*
* Bump to HS timing and frequency. Some cards don't handle
* SEND_STATUS reliably at the initial frequency.
*/
mmc_set_timing
(
host
,
MMC_TIMING_MMC_HS
);
mmc_set_timing
(
host
,
MMC_TIMING_MMC_HS
);
mmc_set_bus_speed
(
card
);
err
=
mmc_switch_status
(
card
,
true
);
err
=
mmc_switch_status
(
card
,
true
);
if
(
err
)
if
(
err
)
goto
out_err
;
goto
out_err
;
mmc_set_clock
(
host
,
card
->
ext_csd
.
hs_max_dtr
);
/* Switch card to DDR with strobe bit */
/* Switch card to DDR with strobe bit */
val
=
EXT_CSD_DDR_BUS_WIDTH_8
|
EXT_CSD_BUS_WIDTH_STROBE
;
val
=
EXT_CSD_DDR_BUS_WIDTH_8
|
EXT_CSD_BUS_WIDTH_STROBE
;
err
=
mmc_switch
(
card
,
EXT_CSD_CMD_SET_NORMAL
,
err
=
mmc_switch
(
card
,
EXT_CSD_CMD_SET_NORMAL
,
...
@@ -1448,7 +1452,7 @@ static int mmc_select_hs400es(struct mmc_card *card)
...
@@ -1448,7 +1452,7 @@ static int mmc_select_hs400es(struct mmc_card *card)
static
int
mmc_select_hs200
(
struct
mmc_card
*
card
)
static
int
mmc_select_hs200
(
struct
mmc_card
*
card
)
{
{
struct
mmc_host
*
host
=
card
->
host
;
struct
mmc_host
*
host
=
card
->
host
;
unsigned
int
old_timing
,
old_signal_voltage
;
unsigned
int
old_timing
,
old_signal_voltage
,
old_clock
;
int
err
=
-
EINVAL
;
int
err
=
-
EINVAL
;
u8
val
;
u8
val
;
...
@@ -1479,8 +1483,17 @@ static int mmc_select_hs200(struct mmc_card *card)
...
@@ -1479,8 +1483,17 @@ static int mmc_select_hs200(struct mmc_card *card)
false
,
true
,
MMC_CMD_RETRIES
);
false
,
true
,
MMC_CMD_RETRIES
);
if
(
err
)
if
(
err
)
goto
err
;
goto
err
;
/*
* Bump to HS timing and frequency. Some cards don't handle
* SEND_STATUS reliably at the initial frequency.
* NB: We can't move to full (HS200) speeds until after we've
* successfully switched over.
*/
old_timing
=
host
->
ios
.
timing
;
old_timing
=
host
->
ios
.
timing
;
old_clock
=
host
->
ios
.
clock
;
mmc_set_timing
(
host
,
MMC_TIMING_MMC_HS200
);
mmc_set_timing
(
host
,
MMC_TIMING_MMC_HS200
);
mmc_set_clock
(
card
->
host
,
card
->
ext_csd
.
hs_max_dtr
);
/*
/*
* For HS200, CRC errors are not a reliable way to know the
* For HS200, CRC errors are not a reliable way to know the
...
@@ -1493,9 +1506,11 @@ static int mmc_select_hs200(struct mmc_card *card)
...
@@ -1493,9 +1506,11 @@ static int mmc_select_hs200(struct mmc_card *card)
* mmc_select_timing() assumes timing has not changed if
* mmc_select_timing() assumes timing has not changed if
* it is a switch error.
* it is a switch error.
*/
*/
if
(
err
==
-
EBADMSG
)
if
(
err
==
-
EBADMSG
)
{
mmc_set_clock
(
host
,
old_clock
);
mmc_set_timing
(
host
,
old_timing
);
mmc_set_timing
(
host
,
old_timing
);
}
}
}
err:
err:
if
(
err
)
{
if
(
err
)
{
/* fall back to the old signal voltage, if fails report error */
/* fall back to the old signal voltage, if fails report error */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录