Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
faf73fa1
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
faf73fa1
编写于
10月 30, 2017
作者:
U
Ulf Hansson
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fixes' into next
上级
35ed78a0
48e1dc10
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
23 addition
and
7 deletion
+23
-7
drivers/mmc/host/renesas_sdhi_internal_dmac.c
drivers/mmc/host/renesas_sdhi_internal_dmac.c
+10
-7
drivers/mmc/host/tmio_mmc_core.c
drivers/mmc/host/tmio_mmc_core.c
+13
-0
未找到文件。
drivers/mmc/host/renesas_sdhi_internal_dmac.c
浏览文件 @
faf73fa1
...
@@ -146,11 +146,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
...
@@ -146,11 +146,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
WARN_ON
(
host
->
sg_len
>
1
);
WARN_ON
(
host
->
sg_len
>
1
);
/* This DMAC cannot handle if buffer is not 8-bytes alignment */
/* This DMAC cannot handle if buffer is not 8-bytes alignment */
if
(
!
IS_ALIGNED
(
sg
->
offset
,
8
))
{
if
(
!
IS_ALIGNED
(
sg
->
offset
,
8
))
host
->
force_pio
=
true
;
goto
force_pio
;
renesas_sdhi_internal_dmac_enable_dma
(
host
,
false
);
return
;
}
if
(
data
->
flags
&
MMC_DATA_READ
)
{
if
(
data
->
flags
&
MMC_DATA_READ
)
{
dtran_mode
|=
DTRAN_MODE_CH_NUM_CH1
;
dtran_mode
|=
DTRAN_MODE_CH_NUM_CH1
;
...
@@ -163,8 +160,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
...
@@ -163,8 +160,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
}
}
ret
=
dma_map_sg
(
&
host
->
pdev
->
dev
,
sg
,
host
->
sg_len
,
dir
);
ret
=
dma_map_sg
(
&
host
->
pdev
->
dev
,
sg
,
host
->
sg_len
,
dir
);
if
(
ret
<
0
)
if
(
ret
==
0
)
return
;
goto
force_pio
;
renesas_sdhi_internal_dmac_enable_dma
(
host
,
true
);
renesas_sdhi_internal_dmac_enable_dma
(
host
,
true
);
...
@@ -176,6 +173,12 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
...
@@ -176,6 +173,12 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
dtran_mode
);
dtran_mode
);
renesas_sdhi_internal_dmac_dm_write
(
host
,
DM_DTRAN_ADDR
,
renesas_sdhi_internal_dmac_dm_write
(
host
,
DM_DTRAN_ADDR
,
sg
->
dma_address
);
sg
->
dma_address
);
return
;
force_pio:
host
->
force_pio
=
true
;
renesas_sdhi_internal_dmac_enable_dma
(
host
,
false
);
}
}
static
void
renesas_sdhi_internal_dmac_issue_tasklet_fn
(
unsigned
long
arg
)
static
void
renesas_sdhi_internal_dmac_issue_tasklet_fn
(
unsigned
long
arg
)
...
...
drivers/mmc/host/tmio_mmc_core.c
浏览文件 @
faf73fa1
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#include <linux/mmc/sdio.h>
#include <linux/mmc/sdio.h>
#include <linux/scatterlist.h>
#include <linux/scatterlist.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/swiotlb.h>
#include <linux/workqueue.h>
#include <linux/workqueue.h>
#include "tmio_mmc.h"
#include "tmio_mmc.h"
...
@@ -1215,6 +1216,18 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
...
@@ -1215,6 +1216,18 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
mmc
->
max_blk_count
=
pdata
->
max_blk_count
?
:
mmc
->
max_blk_count
=
pdata
->
max_blk_count
?
:
(
PAGE_SIZE
/
mmc
->
max_blk_size
)
*
mmc
->
max_segs
;
(
PAGE_SIZE
/
mmc
->
max_blk_size
)
*
mmc
->
max_segs
;
mmc
->
max_req_size
=
mmc
->
max_blk_size
*
mmc
->
max_blk_count
;
mmc
->
max_req_size
=
mmc
->
max_blk_size
*
mmc
->
max_blk_count
;
/*
* Since swiotlb has memory size limitation, this will calculate
* the maximum size locally (because we don't have any APIs for it now)
* and check the current max_req_size. And then, this will update
* the max_req_size if needed as a workaround.
*/
if
(
swiotlb_max_segment
())
{
unsigned
int
max_size
=
(
1
<<
IO_TLB_SHIFT
)
*
IO_TLB_SEGSIZE
;
if
(
mmc
->
max_req_size
>
max_size
)
mmc
->
max_req_size
=
max_size
;
}
mmc
->
max_seg_size
=
mmc
->
max_req_size
;
mmc
->
max_seg_size
=
mmc
->
max_req_size
;
_host
->
native_hotplug
=
!
(
pdata
->
flags
&
TMIO_MMC_USE_GPIO_CD
||
_host
->
native_hotplug
=
!
(
pdata
->
flags
&
TMIO_MMC_USE_GPIO_CD
||
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录