Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
050d4cc7
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
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看板
提交
050d4cc7
编写于
4月 13, 2010
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sh: dmaengine support for SH7786 DMAC0.
Hook up DMAC0 on SH7786. Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
99dc5c0c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
83 addition
and
2 deletion
+83
-2
arch/sh/include/cpu-sh4/cpu/dma-register.h
arch/sh/include/cpu-sh4/cpu/dma-register.h
+2
-1
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+81
-1
未找到文件。
arch/sh/include/cpu-sh4/cpu/dma-register.h
浏览文件 @
050d4cc7
...
...
@@ -23,7 +23,8 @@
#define CHCR_TS_HIGH_MASK 0
#define CHCR_TS_HIGH_SHIFT 0
#elif defined(CONFIG_CPU_SUBTYPE_SH7722) || \
defined(CONFIG_CPU_SUBTYPE_SH7724)
defined(CONFIG_CPU_SUBTYPE_SH7724) || \
defined(CONFIG_CPU_SUBTYPE_SH7786)
#define CHCR_TS_LOW_MASK 0x00000018
#define CHCR_TS_LOW_SHIFT 3
#define CHCR_TS_HIGH_MASK 0x00300000
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
浏览文件 @
050d4cc7
/*
* SH7786 Setup
*
* Copyright (C) 2009 Renesas Solutions Corp.
* Copyright (C) 2009
- 2010
Renesas Solutions Corp.
* Kuninori Morimoto <morimoto.kuninori@renesas.com>
* Paul Mundt <paul.mundt@renesas.com>
*
...
...
@@ -21,7 +21,9 @@
#include <linux/mm.h>
#include <linux/dma-mapping.h>
#include <linux/sh_timer.h>
#include <cpu/dma-register.h>
#include <asm/mmzone.h>
#include <asm/dmaengine.h>
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffea0000
,
...
...
@@ -442,6 +444,83 @@ static struct platform_device tmu11_device = {
.
num_resources
=
ARRAY_SIZE
(
tmu11_resources
),
};
static
struct
sh_dmae_channel
dmac0_channels
[]
=
{
{
.
offset
=
0
,
.
dmars
=
0
,
.
dmars_bit
=
0
,
},
{
.
offset
=
0x10
,
.
dmars
=
0
,
.
dmars_bit
=
8
,
},
{
.
offset
=
0x20
,
.
dmars
=
4
,
.
dmars_bit
=
0
,
},
{
.
offset
=
0x30
,
.
dmars
=
4
,
.
dmars_bit
=
8
,
},
{
.
offset
=
0x50
,
.
dmars
=
8
,
.
dmars_bit
=
0
,
},
{
.
offset
=
0x60
,
.
dmars
=
8
,
.
dmars_bit
=
8
,
}
};
static
unsigned
int
ts_shift
[]
=
TS_SHIFT
;
static
struct
sh_dmae_pdata
dma0_platform_data
=
{
.
channel
=
dmac0_channels
,
.
channel_num
=
ARRAY_SIZE
(
dmac0_channels
),
.
ts_low_shift
=
CHCR_TS_LOW_SHIFT
,
.
ts_low_mask
=
CHCR_TS_LOW_MASK
,
.
ts_high_shift
=
CHCR_TS_HIGH_SHIFT
,
.
ts_high_mask
=
CHCR_TS_HIGH_MASK
,
.
ts_shift
=
ts_shift
,
.
ts_shift_num
=
ARRAY_SIZE
(
ts_shift
),
.
dmaor_init
=
DMAOR_INIT
,
};
/* Resource order important! */
static
struct
resource
dmac0_resources
[]
=
{
{
/* Channel registers and DMAOR */
.
start
=
0xfe008020
,
.
end
=
0xfe00808f
,
.
flags
=
IORESOURCE_MEM
,
},
{
/* DMARSx */
.
start
=
0xfe009000
,
.
end
=
0xfe00900b
,
.
flags
=
IORESOURCE_MEM
,
},
{
/* DMA error IRQ */
.
start
=
evt2irq
(
0x5c0
),
.
end
=
evt2irq
(
0x5c0
),
.
flags
=
IORESOURCE_IRQ
,
},
{
/* IRQ for channels 0-5 */
.
start
=
evt2irq
(
0x500
),
.
end
=
evt2irq
(
0x5a0
),
.
flags
=
IORESOURCE_IRQ
,
},
};
static
struct
platform_device
dma0_device
=
{
.
name
=
"sh-dma-engine"
,
.
id
=
0
,
.
resource
=
dmac0_resources
,
.
num_resources
=
ARRAY_SIZE
(
dmac0_resources
),
.
dev
=
{
.
platform_data
=
&
dma0_platform_data
,
},
};
static
struct
resource
usb_ohci_resources
[]
=
{
[
0
]
=
{
.
start
=
0xffe70400
,
...
...
@@ -489,6 +568,7 @@ static struct platform_device *sh7786_early_devices[] __initdata = {
};
static
struct
platform_device
*
sh7786_devices
[]
__initdata
=
{
&
dma0_device
,
&
usb_ohci_device
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录