Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
66061182
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看板
提交
66061182
编写于
12月 31, 2018
作者:
V
Vinod Koul
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'topic/xilinx' into for-linus
上级
69ca36b3
aeaebcc1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
21 deletion
+25
-21
drivers/dma/xilinx/xilinx_dma.c
drivers/dma/xilinx/xilinx_dma.c
+24
-20
drivers/dma/xilinx/zynqmp_dma.c
drivers/dma/xilinx/zynqmp_dma.c
+1
-1
未找到文件。
drivers/dma/xilinx/xilinx_dma.c
浏览文件 @
66061182
...
...
@@ -190,6 +190,8 @@
/* AXI CDMA Specific Masks */
#define XILINX_CDMA_CR_SGMODE BIT(3)
#define xilinx_prep_dma_addr_t(addr) \
((dma_addr_t)((u64)addr##_##msb << 32 | (addr)))
/**
* struct xilinx_vdma_desc_hw - Hardware Descriptor
* @next_desc: Next Descriptor Pointer @0x00
...
...
@@ -887,6 +889,24 @@ static int xilinx_dma_alloc_chan_resources(struct dma_chan *dchan)
chan
->
id
);
return
-
ENOMEM
;
}
/*
* For cyclic DMA mode we need to program the tail Descriptor
* register with a value which is not a part of the BD chain
* so allocating a desc segment during channel allocation for
* programming tail descriptor.
*/
chan
->
cyclic_seg_v
=
dma_zalloc_coherent
(
chan
->
dev
,
sizeof
(
*
chan
->
cyclic_seg_v
),
&
chan
->
cyclic_seg_p
,
GFP_KERNEL
);
if
(
!
chan
->
cyclic_seg_v
)
{
dev_err
(
chan
->
dev
,
"unable to allocate desc segment for cyclic DMA
\n
"
);
dma_free_coherent
(
chan
->
dev
,
sizeof
(
*
chan
->
seg_v
)
*
XILINX_DMA_NUM_DESCS
,
chan
->
seg_v
,
chan
->
seg_p
);
return
-
ENOMEM
;
}
chan
->
cyclic_seg_v
->
phys
=
chan
->
cyclic_seg_p
;
for
(
i
=
0
;
i
<
XILINX_DMA_NUM_DESCS
;
i
++
)
{
chan
->
seg_v
[
i
].
hw
.
next_desc
=
...
...
@@ -922,24 +942,6 @@ static int xilinx_dma_alloc_chan_resources(struct dma_chan *dchan)
return
-
ENOMEM
;
}
if
(
chan
->
xdev
->
dma_config
->
dmatype
==
XDMA_TYPE_AXIDMA
)
{
/*
* For cyclic DMA mode we need to program the tail Descriptor
* register with a value which is not a part of the BD chain
* so allocating a desc segment during channel allocation for
* programming tail descriptor.
*/
chan
->
cyclic_seg_v
=
dma_zalloc_coherent
(
chan
->
dev
,
sizeof
(
*
chan
->
cyclic_seg_v
),
&
chan
->
cyclic_seg_p
,
GFP_KERNEL
);
if
(
!
chan
->
cyclic_seg_v
)
{
dev_err
(
chan
->
dev
,
"unable to allocate desc segment for cyclic DMA
\n
"
);
return
-
ENOMEM
;
}
chan
->
cyclic_seg_v
->
phys
=
chan
->
cyclic_seg_p
;
}
dma_cookie_init
(
dchan
);
if
(
chan
->
xdev
->
dma_config
->
dmatype
==
XDMA_TYPE_AXIDMA
)
{
...
...
@@ -1245,8 +1247,10 @@ static void xilinx_cdma_start_transfer(struct xilinx_dma_chan *chan)
hw
=
&
segment
->
hw
;
xilinx_write
(
chan
,
XILINX_CDMA_REG_SRCADDR
,
hw
->
src_addr
);
xilinx_write
(
chan
,
XILINX_CDMA_REG_DSTADDR
,
hw
->
dest_addr
);
xilinx_write
(
chan
,
XILINX_CDMA_REG_SRCADDR
,
xilinx_prep_dma_addr_t
(
hw
->
src_addr
));
xilinx_write
(
chan
,
XILINX_CDMA_REG_DSTADDR
,
xilinx_prep_dma_addr_t
(
hw
->
dest_addr
));
/* Start the transfer */
dma_ctrl_write
(
chan
,
XILINX_DMA_REG_BTT
,
...
...
drivers/dma/xilinx/zynqmp_dma.c
浏览文件 @
66061182
...
...
@@ -163,7 +163,7 @@ struct zynqmp_dma_desc_ll {
u32
ctrl
;
u64
nxtdscraddr
;
u64
rsvd
;
};
__aligned
(
64
)
};
/**
* struct zynqmp_dma_desc_sw - Per Transaction structure
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录