Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8a1c049a
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看板
提交
8a1c049a
编写于
8月 29, 2011
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'rmobile/dma' into rmobile-fixes-for-linus
上级
fe437561
afe48049
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
154 addition
and
1 deletion
+154
-1
arch/arm/mach-shmobile/clock-sh7372.c
arch/arm/mach-shmobile/clock-sh7372.c
+4
-1
arch/arm/mach-shmobile/include/mach/sh7372.h
arch/arm/mach-shmobile/include/mach/sh7372.h
+4
-0
arch/arm/mach-shmobile/setup-sh7372.c
arch/arm/mach-shmobile/setup-sh7372.c
+146
-0
未找到文件。
arch/arm/mach-shmobile/clock-sh7372.c
浏览文件 @
8a1c049a
...
@@ -509,7 +509,7 @@ enum { MSTP001,
...
@@ -509,7 +509,7 @@ enum { MSTP001,
MSTP118
,
MSTP117
,
MSTP116
,
MSTP113
,
MSTP118
,
MSTP117
,
MSTP116
,
MSTP113
,
MSTP106
,
MSTP101
,
MSTP100
,
MSTP106
,
MSTP101
,
MSTP100
,
MSTP223
,
MSTP223
,
MSTP218
,
MSTP217
,
MSTP216
,
MSTP21
4
,
MSTP21
8
,
MSTP217
,
MSTP216
,
MSTP207
,
MSTP206
,
MSTP204
,
MSTP203
,
MSTP202
,
MSTP201
,
MSTP200
,
MSTP207
,
MSTP206
,
MSTP204
,
MSTP203
,
MSTP202
,
MSTP201
,
MSTP200
,
MSTP328
,
MSTP323
,
MSTP322
,
MSTP314
,
MSTP313
,
MSTP312
,
MSTP328
,
MSTP323
,
MSTP322
,
MSTP314
,
MSTP313
,
MSTP312
,
MSTP423
,
MSTP415
,
MSTP413
,
MSTP411
,
MSTP410
,
MSTP406
,
MSTP403
,
MSTP400
,
MSTP423
,
MSTP415
,
MSTP413
,
MSTP411
,
MSTP410
,
MSTP406
,
MSTP403
,
MSTP400
,
...
@@ -538,6 +538,7 @@ static struct clk mstp_clks[MSTP_NR] = {
...
@@ -538,6 +538,7 @@ static struct clk mstp_clks[MSTP_NR] = {
[
MSTP218
]
=
MSTP
(
&
div4_clks
[
DIV4_HP
],
SMSTPCR2
,
18
,
0
),
/* DMAC1 */
[
MSTP218
]
=
MSTP
(
&
div4_clks
[
DIV4_HP
],
SMSTPCR2
,
18
,
0
),
/* DMAC1 */
[
MSTP217
]
=
MSTP
(
&
div4_clks
[
DIV4_HP
],
SMSTPCR2
,
17
,
0
),
/* DMAC2 */
[
MSTP217
]
=
MSTP
(
&
div4_clks
[
DIV4_HP
],
SMSTPCR2
,
17
,
0
),
/* DMAC2 */
[
MSTP216
]
=
MSTP
(
&
div4_clks
[
DIV4_HP
],
SMSTPCR2
,
16
,
0
),
/* DMAC3 */
[
MSTP216
]
=
MSTP
(
&
div4_clks
[
DIV4_HP
],
SMSTPCR2
,
16
,
0
),
/* DMAC3 */
[
MSTP214
]
=
MSTP
(
&
div4_clks
[
DIV4_HP
],
SMSTPCR2
,
14
,
0
),
/* USBDMAC */
[
MSTP207
]
=
MSTP
(
&
div6_clks
[
DIV6_SUB
],
SMSTPCR2
,
7
,
0
),
/* SCIFA5 */
[
MSTP207
]
=
MSTP
(
&
div6_clks
[
DIV6_SUB
],
SMSTPCR2
,
7
,
0
),
/* SCIFA5 */
[
MSTP206
]
=
MSTP
(
&
div6_clks
[
DIV6_SUB
],
SMSTPCR2
,
6
,
0
),
/* SCIFB */
[
MSTP206
]
=
MSTP
(
&
div6_clks
[
DIV6_SUB
],
SMSTPCR2
,
6
,
0
),
/* SCIFB */
[
MSTP204
]
=
MSTP
(
&
div6_clks
[
DIV6_SUB
],
SMSTPCR2
,
4
,
0
),
/* SCIFA0 */
[
MSTP204
]
=
MSTP
(
&
div6_clks
[
DIV6_SUB
],
SMSTPCR2
,
4
,
0
),
/* SCIFA0 */
...
@@ -629,6 +630,8 @@ static struct clk_lookup lookups[] = {
...
@@ -629,6 +630,8 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID
(
"sh-dma-engine.0"
,
&
mstp_clks
[
MSTP218
]),
/* DMAC1 */
CLKDEV_DEV_ID
(
"sh-dma-engine.0"
,
&
mstp_clks
[
MSTP218
]),
/* DMAC1 */
CLKDEV_DEV_ID
(
"sh-dma-engine.1"
,
&
mstp_clks
[
MSTP217
]),
/* DMAC2 */
CLKDEV_DEV_ID
(
"sh-dma-engine.1"
,
&
mstp_clks
[
MSTP217
]),
/* DMAC2 */
CLKDEV_DEV_ID
(
"sh-dma-engine.2"
,
&
mstp_clks
[
MSTP216
]),
/* DMAC3 */
CLKDEV_DEV_ID
(
"sh-dma-engine.2"
,
&
mstp_clks
[
MSTP216
]),
/* DMAC3 */
CLKDEV_DEV_ID
(
"sh-dma-engine.3"
,
&
mstp_clks
[
MSTP214
]),
/* USB-DMAC0 */
CLKDEV_DEV_ID
(
"sh-dma-engine.4"
,
&
mstp_clks
[
MSTP214
]),
/* USB-DMAC1 */
CLKDEV_DEV_ID
(
"sh-sci.5"
,
&
mstp_clks
[
MSTP207
]),
/* SCIFA5 */
CLKDEV_DEV_ID
(
"sh-sci.5"
,
&
mstp_clks
[
MSTP207
]),
/* SCIFA5 */
CLKDEV_DEV_ID
(
"sh-sci.6"
,
&
mstp_clks
[
MSTP206
]),
/* SCIFB */
CLKDEV_DEV_ID
(
"sh-sci.6"
,
&
mstp_clks
[
MSTP206
]),
/* SCIFB */
CLKDEV_DEV_ID
(
"sh-sci.0"
,
&
mstp_clks
[
MSTP204
]),
/* SCIFA0 */
CLKDEV_DEV_ID
(
"sh-sci.0"
,
&
mstp_clks
[
MSTP204
]),
/* SCIFA0 */
...
...
arch/arm/mach-shmobile/include/mach/sh7372.h
浏览文件 @
8a1c049a
...
@@ -459,6 +459,10 @@ enum {
...
@@ -459,6 +459,10 @@ enum {
SHDMA_SLAVE_SDHI2_TX
,
SHDMA_SLAVE_SDHI2_TX
,
SHDMA_SLAVE_MMCIF_RX
,
SHDMA_SLAVE_MMCIF_RX
,
SHDMA_SLAVE_MMCIF_TX
,
SHDMA_SLAVE_MMCIF_TX
,
SHDMA_SLAVE_USB0_TX
,
SHDMA_SLAVE_USB0_RX
,
SHDMA_SLAVE_USB1_TX
,
SHDMA_SLAVE_USB1_RX
,
};
};
extern
struct
clk
sh7372_extal1_clk
;
extern
struct
clk
sh7372_extal1_clk
;
...
...
arch/arm/mach-shmobile/setup-sh7372.c
浏览文件 @
8a1c049a
...
@@ -602,6 +602,150 @@ static struct platform_device dma2_device = {
...
@@ -602,6 +602,150 @@ static struct platform_device dma2_device = {
},
},
};
};
/*
* USB-DMAC
*/
unsigned
int
usbts_shift
[]
=
{
3
,
4
,
5
};
enum
{
XMIT_SZ_8BYTE
=
0
,
XMIT_SZ_16BYTE
=
1
,
XMIT_SZ_32BYTE
=
2
,
};
#define USBTS_INDEX2VAL(i) (((i) & 3) << 6)
static
const
struct
sh_dmae_channel
sh7372_usb_dmae_channels
[]
=
{
{
.
offset
=
0
,
},
{
.
offset
=
0x20
,
},
};
/* USB DMAC0 */
static
const
struct
sh_dmae_slave_config
sh7372_usb_dmae0_slaves
[]
=
{
{
.
slave_id
=
SHDMA_SLAVE_USB0_TX
,
.
chcr
=
USBTS_INDEX2VAL
(
XMIT_SZ_8BYTE
),
},
{
.
slave_id
=
SHDMA_SLAVE_USB0_RX
,
.
chcr
=
USBTS_INDEX2VAL
(
XMIT_SZ_8BYTE
),
},
};
static
struct
sh_dmae_pdata
usb_dma0_platform_data
=
{
.
slave
=
sh7372_usb_dmae0_slaves
,
.
slave_num
=
ARRAY_SIZE
(
sh7372_usb_dmae0_slaves
),
.
channel
=
sh7372_usb_dmae_channels
,
.
channel_num
=
ARRAY_SIZE
(
sh7372_usb_dmae_channels
),
.
ts_low_shift
=
6
,
.
ts_low_mask
=
0xc0
,
.
ts_high_shift
=
0
,
.
ts_high_mask
=
0
,
.
ts_shift
=
usbts_shift
,
.
ts_shift_num
=
ARRAY_SIZE
(
usbts_shift
),
.
dmaor_init
=
DMAOR_DME
,
.
chcr_offset
=
0x14
,
.
chcr_ie_bit
=
1
<<
5
,
.
dmaor_is_32bit
=
1
,
.
needs_tend_set
=
1
,
.
no_dmars
=
1
,
};
static
struct
resource
sh7372_usb_dmae0_resources
[]
=
{
{
/* Channel registers and DMAOR */
.
start
=
0xe68a0020
,
.
end
=
0xe68a0064
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
/* VCR/SWR/DMICR */
.
start
=
0xe68a0000
,
.
end
=
0xe68a0014
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
/* IRQ for channels */
.
start
=
evt2irq
(
0x0a00
),
.
end
=
evt2irq
(
0x0a00
),
.
flags
=
IORESOURCE_IRQ
,
},
};
static
struct
platform_device
usb_dma0_device
=
{
.
name
=
"sh-dma-engine"
,
.
id
=
3
,
.
resource
=
sh7372_usb_dmae0_resources
,
.
num_resources
=
ARRAY_SIZE
(
sh7372_usb_dmae0_resources
),
.
dev
=
{
.
platform_data
=
&
usb_dma0_platform_data
,
},
};
/* USB DMAC1 */
static
const
struct
sh_dmae_slave_config
sh7372_usb_dmae1_slaves
[]
=
{
{
.
slave_id
=
SHDMA_SLAVE_USB1_TX
,
.
chcr
=
USBTS_INDEX2VAL
(
XMIT_SZ_8BYTE
),
},
{
.
slave_id
=
SHDMA_SLAVE_USB1_RX
,
.
chcr
=
USBTS_INDEX2VAL
(
XMIT_SZ_8BYTE
),
},
};
static
struct
sh_dmae_pdata
usb_dma1_platform_data
=
{
.
slave
=
sh7372_usb_dmae1_slaves
,
.
slave_num
=
ARRAY_SIZE
(
sh7372_usb_dmae1_slaves
),
.
channel
=
sh7372_usb_dmae_channels
,
.
channel_num
=
ARRAY_SIZE
(
sh7372_usb_dmae_channels
),
.
ts_low_shift
=
6
,
.
ts_low_mask
=
0xc0
,
.
ts_high_shift
=
0
,
.
ts_high_mask
=
0
,
.
ts_shift
=
usbts_shift
,
.
ts_shift_num
=
ARRAY_SIZE
(
usbts_shift
),
.
dmaor_init
=
DMAOR_DME
,
.
chcr_offset
=
0x14
,
.
chcr_ie_bit
=
1
<<
5
,
.
dmaor_is_32bit
=
1
,
.
needs_tend_set
=
1
,
.
no_dmars
=
1
,
};
static
struct
resource
sh7372_usb_dmae1_resources
[]
=
{
{
/* Channel registers and DMAOR */
.
start
=
0xe68c0020
,
.
end
=
0xe68c0064
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
/* VCR/SWR/DMICR */
.
start
=
0xe68c0000
,
.
end
=
0xe68c0014
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
/* IRQ for channels */
.
start
=
evt2irq
(
0x1d00
),
.
end
=
evt2irq
(
0x1d00
),
.
flags
=
IORESOURCE_IRQ
,
},
};
static
struct
platform_device
usb_dma1_device
=
{
.
name
=
"sh-dma-engine"
,
.
id
=
4
,
.
resource
=
sh7372_usb_dmae1_resources
,
.
num_resources
=
ARRAY_SIZE
(
sh7372_usb_dmae1_resources
),
.
dev
=
{
.
platform_data
=
&
usb_dma1_platform_data
,
},
};
/* VPU */
/* VPU */
static
struct
uio_info
vpu_platform_data
=
{
static
struct
uio_info
vpu_platform_data
=
{
.
name
=
"VPU5HG"
,
.
name
=
"VPU5HG"
,
...
@@ -829,6 +973,8 @@ static struct platform_device *sh7372_late_devices[] __initdata = {
...
@@ -829,6 +973,8 @@ static struct platform_device *sh7372_late_devices[] __initdata = {
&
dma0_device
,
&
dma0_device
,
&
dma1_device
,
&
dma1_device
,
&
dma2_device
,
&
dma2_device
,
&
usb_dma0_device
,
&
usb_dma1_device
,
&
vpu_device
,
&
vpu_device
,
&
veu0_device
,
&
veu0_device
,
&
veu1_device
,
&
veu1_device
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录