Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
98cd085e
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
98cd085e
编写于
7月 04, 2017
作者:
V
Vinod Koul
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'topic/pl08x' into for-linus
上级
70ef9af7
fcc78541
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
905 addition
and
276 deletion
+905
-276
Documentation/devicetree/bindings/dma/arm-pl08x.txt
Documentation/devicetree/bindings/dma/arm-pl08x.txt
+7
-2
arch/arm/mach-lpc32xx/phy3250.c
arch/arm/mach-lpc32xx/phy3250.c
+3
-0
arch/arm/mach-s3c64xx/pl080.c
arch/arm/mach-s3c64xx/pl080.c
+8
-20
arch/arm/mach-spear/spear3xx.c
arch/arm/mach-spear/spear3xx.c
+4
-10
arch/arm/mach-spear/spear6xx.c
arch/arm/mach-spear/spear6xx.c
+4
-10
drivers/dma/Kconfig
drivers/dma/Kconfig
+4
-2
drivers/dma/amba-pl08x.c
drivers/dma/amba-pl08x.c
+755
-215
include/linux/amba/pl080.h
include/linux/amba/pl080.h
+94
-13
include/linux/amba/pl08x.h
include/linux/amba/pl08x.h
+26
-4
未找到文件。
Documentation/devicetree/bindings/dma/arm-pl08x.txt
浏览文件 @
98cd085e
...
...
@@ -3,6 +3,11 @@
Required properties:
- compatible: "arm,pl080", "arm,primecell";
"arm,pl081", "arm,primecell";
"faraday,ftdmac020", "arm,primecell"
- arm,primecell-periphid: on the FTDMAC020 the primecell ID is not hard-coded
in the hardware and must be specified here as <0x0003b080>. This number
follows the PrimeCell standard numbering using the JEP106 vendor code 0x38
for Faraday Technology.
- reg: Address range of the PL08x registers
- interrupt: The PL08x interrupt number
- clocks: The clock running the IP core clock
...
...
@@ -20,8 +25,8 @@ Optional properties:
- dma-requests: contains the total number of DMA requests supported by the DMAC
- memcpy-burst-size: the size of the bursts for memcpy: 1, 4, 8, 16, 32
64, 128 or 256 bytes are legal values
- memcpy-bus-width: the bus width used for memcpy: 8, 16 or 32 are legal
values
- memcpy-bus-width: the bus width used for memcpy
in bits
: 8, 16 or 32 are legal
values
, the Faraday FTDMAC020 can also accept 64 bits
Clients
Required properties:
...
...
arch/arm/mach-lpc32xx/phy3250.c
浏览文件 @
98cd085e
...
...
@@ -137,6 +137,9 @@ static void pl08x_put_signal(const struct pl08x_channel_data *cd, int ch)
}
static
struct
pl08x_platform_data
pl08x_pd
=
{
/* Some reasonable memcpy defaults */
.
memcpy_burst_size
=
PL08X_BURST_SZ_256
,
.
memcpy_bus_width
=
PL08X_BUS_WIDTH_32_BITS
,
.
slave_channels
=
&
pl08x_slave_channels
[
0
],
.
num_slave_channels
=
ARRAY_SIZE
(
pl08x_slave_channels
),
.
get_xfer_signal
=
pl08x_get_signal
,
...
...
arch/arm/mach-s3c64xx/pl080.c
浏览文件 @
98cd085e
...
...
@@ -137,16 +137,10 @@ static const struct dma_slave_map s3c64xx_dma0_slave_map[] = {
};
struct
pl08x_platform_data
s3c64xx_dma0_plat_data
=
{
.
memcpy_channel
=
{
.
bus_id
=
"memcpy"
,
.
cctl_memcpy
=
(
PL080_BSIZE_4
<<
PL080_CONTROL_SB_SIZE_SHIFT
|
PL080_BSIZE_4
<<
PL080_CONTROL_DB_SIZE_SHIFT
|
PL080_WIDTH_32BIT
<<
PL080_CONTROL_SWIDTH_SHIFT
|
PL080_WIDTH_32BIT
<<
PL080_CONTROL_DWIDTH_SHIFT
|
PL080_CONTROL_PROT_BUFF
|
PL080_CONTROL_PROT_CACHE
|
PL080_CONTROL_PROT_SYS
),
},
.
memcpy_burst_size
=
PL08X_BURST_SZ_4
,
.
memcpy_bus_width
=
PL08X_BUS_WIDTH_32_BITS
,
.
memcpy_prot_buff
=
true
,
.
memcpy_prot_cache
=
true
,
.
lli_buses
=
PL08X_AHB1
,
.
mem_buses
=
PL08X_AHB1
,
.
get_xfer_signal
=
pl08x_get_xfer_signal
,
...
...
@@ -238,16 +232,10 @@ static const struct dma_slave_map s3c64xx_dma1_slave_map[] = {
};
struct
pl08x_platform_data
s3c64xx_dma1_plat_data
=
{
.
memcpy_channel
=
{
.
bus_id
=
"memcpy"
,
.
cctl_memcpy
=
(
PL080_BSIZE_4
<<
PL080_CONTROL_SB_SIZE_SHIFT
|
PL080_BSIZE_4
<<
PL080_CONTROL_DB_SIZE_SHIFT
|
PL080_WIDTH_32BIT
<<
PL080_CONTROL_SWIDTH_SHIFT
|
PL080_WIDTH_32BIT
<<
PL080_CONTROL_DWIDTH_SHIFT
|
PL080_CONTROL_PROT_BUFF
|
PL080_CONTROL_PROT_CACHE
|
PL080_CONTROL_PROT_SYS
),
},
.
memcpy_burst_size
=
PL08X_BURST_SZ_4
,
.
memcpy_bus_width
=
PL08X_BUS_WIDTH_32_BITS
,
.
memcpy_prot_buff
=
true
,
.
memcpy_prot_cache
=
true
,
.
lli_buses
=
PL08X_AHB1
,
.
mem_buses
=
PL08X_AHB1
,
.
get_xfer_signal
=
pl08x_get_xfer_signal
,
...
...
arch/arm/mach-spear/spear3xx.c
浏览文件 @
98cd085e
...
...
@@ -44,16 +44,10 @@ struct pl022_ssp_controller pl022_plat_data = {
/* dmac device registration */
struct
pl08x_platform_data
pl080_plat_data
=
{
.
memcpy_channel
=
{
.
bus_id
=
"memcpy"
,
.
cctl_memcpy
=
(
PL080_BSIZE_16
<<
PL080_CONTROL_SB_SIZE_SHIFT
|
\
PL080_BSIZE_16
<<
PL080_CONTROL_DB_SIZE_SHIFT
|
\
PL080_WIDTH_32BIT
<<
PL080_CONTROL_SWIDTH_SHIFT
|
\
PL080_WIDTH_32BIT
<<
PL080_CONTROL_DWIDTH_SHIFT
|
\
PL080_CONTROL_PROT_BUFF
|
PL080_CONTROL_PROT_CACHE
|
\
PL080_CONTROL_PROT_SYS
),
},
.
memcpy_burst_size
=
PL08X_BURST_SZ_16
,
.
memcpy_bus_width
=
PL08X_BUS_WIDTH_32_BITS
,
.
memcpy_prot_buff
=
true
,
.
memcpy_prot_cache
=
true
,
.
lli_buses
=
PL08X_AHB1
,
.
mem_buses
=
PL08X_AHB1
,
.
get_xfer_signal
=
pl080_get_signal
,
...
...
arch/arm/mach-spear/spear6xx.c
浏览文件 @
98cd085e
...
...
@@ -322,16 +322,10 @@ static struct pl08x_channel_data spear600_dma_info[] = {
};
static
struct
pl08x_platform_data
spear6xx_pl080_plat_data
=
{
.
memcpy_channel
=
{
.
bus_id
=
"memcpy"
,
.
cctl_memcpy
=
(
PL080_BSIZE_16
<<
PL080_CONTROL_SB_SIZE_SHIFT
|
\
PL080_BSIZE_16
<<
PL080_CONTROL_DB_SIZE_SHIFT
|
\
PL080_WIDTH_32BIT
<<
PL080_CONTROL_SWIDTH_SHIFT
|
\
PL080_WIDTH_32BIT
<<
PL080_CONTROL_DWIDTH_SHIFT
|
\
PL080_CONTROL_PROT_BUFF
|
PL080_CONTROL_PROT_CACHE
|
\
PL080_CONTROL_PROT_SYS
),
},
.
memcpy_burst_size
=
PL08X_BURST_SZ_16
,
.
memcpy_bus_width
=
PL08X_BUS_WIDTH_32_BITS
,
.
memcpy_prot_buff
=
true
,
.
memcpy_prot_cache
=
true
,
.
lli_buses
=
PL08X_AHB1
,
.
mem_buses
=
PL08X_AHB1
,
.
get_xfer_signal
=
pl080_get_signal
,
...
...
drivers/dma/Kconfig
浏览文件 @
98cd085e
...
...
@@ -62,8 +62,10 @@ config AMBA_PL08X
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
help
Platform has a PL08x DMAC device
which can provide DMA engine support
Say yes if your platform has a PL08x DMAC device which can
provide DMA engine support. This includes the original ARM
PL080 and PL081, Samsungs PL080 derivative and Faraday
Technology's FTDMAC020 PL080 derivative.
config AMCC_PPC440SPE_ADMA
tristate "AMCC PPC440SPe ADMA support"
...
...
drivers/dma/amba-pl08x.c
浏览文件 @
98cd085e
此差异已折叠。
点击以展开。
include/linux/amba/pl080.h
浏览文件 @
98cd085e
...
...
@@ -44,7 +44,14 @@
#define PL080_SYNC (0x34)
/* Per channel configuration registers */
/* The Faraday Technology FTDMAC020 variant registers */
#define FTDMAC020_CH_BUSY (0x20)
/* Identical to PL080_CONFIG */
#define FTDMAC020_CSR (0x24)
/* Identical to PL080_SYNC */
#define FTDMAC020_SYNC (0x2C)
#define FTDMAC020_REVISION (0x30)
#define FTDMAC020_FEATURE (0x34)
/* Per channel configuration registers */
#define PL080_Cx_BASE(x) ((0x100 + (x * 0x20)))
...
...
@@ -55,13 +62,20 @@
#define PL080_CH_CONFIG (0x10)
#define PL080S_CH_CONTROL2 (0x10)
#define PL080S_CH_CONFIG (0x14)
#define PL080_LLI_ADDR_MASK (0x3fffffff << 2)
/* The Faraday FTDMAC020 derivative shuffles the registers around */
#define FTDMAC020_CH_CSR (0x00)
#define FTDMAC020_CH_CFG (0x04)
#define FTDMAC020_CH_SRC_ADDR (0x08)
#define FTDMAC020_CH_DST_ADDR (0x0C)
#define FTDMAC020_CH_LLP (0x10)
#define FTDMAC020_CH_SIZE (0x14)
#define PL080_LLI_ADDR_MASK GENMASK(31, 2)
#define PL080_LLI_ADDR_SHIFT (2)
#define PL080_LLI_LM_AHB2 BIT(0)
#define PL080_CONTROL_TC_IRQ_EN BIT(31)
#define PL080_CONTROL_PROT_MASK
(0x7 <<
28)
#define PL080_CONTROL_PROT_MASK
GENMASK(30,
28)
#define PL080_CONTROL_PROT_SHIFT (28)
#define PL080_CONTROL_PROT_CACHE BIT(30)
#define PL080_CONTROL_PROT_BUFF BIT(29)
...
...
@@ -70,16 +84,16 @@
#define PL080_CONTROL_SRC_INCR BIT(26)
#define PL080_CONTROL_DST_AHB2 BIT(25)
#define PL080_CONTROL_SRC_AHB2 BIT(24)
#define PL080_CONTROL_DWIDTH_MASK
(0x7 <<
21)
#define PL080_CONTROL_DWIDTH_MASK
GENMASK(23,
21)
#define PL080_CONTROL_DWIDTH_SHIFT (21)
#define PL080_CONTROL_SWIDTH_MASK
(0x7 <<
18)
#define PL080_CONTROL_SWIDTH_MASK
GENMASK(20,
18)
#define PL080_CONTROL_SWIDTH_SHIFT (18)
#define PL080_CONTROL_DB_SIZE_MASK
(0x7 <<
15)
#define PL080_CONTROL_DB_SIZE_MASK
GENMASK(17,
15)
#define PL080_CONTROL_DB_SIZE_SHIFT (15)
#define PL080_CONTROL_SB_SIZE_MASK
(0x7 <<
12)
#define PL080_CONTROL_SB_SIZE_MASK
GENMASK(14,
12)
#define PL080_CONTROL_SB_SIZE_SHIFT (12)
#define PL080_CONTROL_TRANSFER_SIZE_MASK
(0xfff <<
0)
#define PL080S_CONTROL_TRANSFER_SIZE_MASK
(0x1ffffff <<
0)
#define PL080_CONTROL_TRANSFER_SIZE_MASK
GENMASK(11,
0)
#define PL080S_CONTROL_TRANSFER_SIZE_MASK
GENMASK(24,
0)
#define PL080_CONTROL_TRANSFER_SIZE_SHIFT (0)
#define PL080_BSIZE_1 (0x0)
...
...
@@ -102,11 +116,11 @@
#define PL080_CONFIG_LOCK BIT(16)
#define PL080_CONFIG_TC_IRQ_MASK BIT(15)
#define PL080_CONFIG_ERR_IRQ_MASK BIT(14)
#define PL080_CONFIG_FLOW_CONTROL_MASK
(0x7 <<
11)
#define PL080_CONFIG_FLOW_CONTROL_MASK
GENMASK(13,
11)
#define PL080_CONFIG_FLOW_CONTROL_SHIFT (11)
#define PL080_CONFIG_DST_SEL_MASK
(0xf <<
6)
#define PL080_CONFIG_DST_SEL_MASK
GENMASK(9,
6)
#define PL080_CONFIG_DST_SEL_SHIFT (6)
#define PL080_CONFIG_SRC_SEL_MASK
(0xf <<
1)
#define PL080_CONFIG_SRC_SEL_MASK
GENMASK(4,
1)
#define PL080_CONFIG_SRC_SEL_SHIFT (1)
#define PL080_CONFIG_ENABLE BIT(0)
...
...
@@ -119,6 +133,73 @@
#define PL080_FLOW_PER2MEM_PER (0x6)
#define PL080_FLOW_SRC2DST_SRC (0x7)
#define FTDMAC020_CH_CSR_TC_MSK BIT(31)
/* Later versions have a threshold in bits 24..26, */
#define FTDMAC020_CH_CSR_FIFOTH_MSK GENMASK(26, 24)
#define FTDMAC020_CH_CSR_FIFOTH_SHIFT (24)
#define FTDMAC020_CH_CSR_CHPR1_MSK GENMASK(23, 22)
#define FTDMAC020_CH_CSR_PROT3 BIT(21)
#define FTDMAC020_CH_CSR_PROT2 BIT(20)
#define FTDMAC020_CH_CSR_PROT1 BIT(19)
#define FTDMAC020_CH_CSR_SRC_SIZE_MSK GENMASK(18, 16)
#define FTDMAC020_CH_CSR_SRC_SIZE_SHIFT (16)
#define FTDMAC020_CH_CSR_ABT BIT(15)
#define FTDMAC020_CH_CSR_SRC_WIDTH_MSK GENMASK(13, 11)
#define FTDMAC020_CH_CSR_SRC_WIDTH_SHIFT (11)
#define FTDMAC020_CH_CSR_DST_WIDTH_MSK GENMASK(10, 8)
#define FTDMAC020_CH_CSR_DST_WIDTH_SHIFT (8)
#define FTDMAC020_CH_CSR_MODE BIT(7)
/* 00 = increase, 01 = decrease, 10 = fix */
#define FTDMAC020_CH_CSR_SRCAD_CTL_MSK GENMASK(6, 5)
#define FTDMAC020_CH_CSR_SRCAD_CTL_SHIFT (5)
#define FTDMAC020_CH_CSR_DSTAD_CTL_MSK GENMASK(4, 3)
#define FTDMAC020_CH_CSR_DSTAD_CTL_SHIFT (3)
#define FTDMAC020_CH_CSR_SRC_SEL BIT(2)
#define FTDMAC020_CH_CSR_DST_SEL BIT(1)
#define FTDMAC020_CH_CSR_EN BIT(0)
/* FIFO threshold setting */
#define FTDMAC020_CH_CSR_FIFOTH_1 (0x0)
#define FTDMAC020_CH_CSR_FIFOTH_2 (0x1)
#define FTDMAC020_CH_CSR_FIFOTH_4 (0x2)
#define FTDMAC020_CH_CSR_FIFOTH_8 (0x3)
#define FTDMAC020_CH_CSR_FIFOTH_16 (0x4)
/* The FTDMAC020 supports 64bit wide transfers */
#define FTDMAC020_WIDTH_64BIT (0x3)
/* Address can be increased, decreased or fixed */
#define FTDMAC020_CH_CSR_SRCAD_CTL_INC (0x0)
#define FTDMAC020_CH_CSR_SRCAD_CTL_DEC (0x1)
#define FTDMAC020_CH_CSR_SRCAD_CTL_FIXED (0x2)
#define FTDMAC020_CH_CFG_LLP_CNT_MASK GENMASK(19, 16)
#define FTDMAC020_CH_CFG_LLP_CNT_SHIFT (16)
#define FTDMAC020_CH_CFG_BUSY BIT(8)
#define FTDMAC020_CH_CFG_INT_ABT_MASK BIT(2)
#define FTDMAC020_CH_CFG_INT_ERR_MASK BIT(1)
#define FTDMAC020_CH_CFG_INT_TC_MASK BIT(0)
/* Inside the LLIs, the applicable CSR fields are mapped differently */
#define FTDMAC020_LLI_TC_MSK BIT(28)
#define FTDMAC020_LLI_SRC_WIDTH_MSK GENMASK(27, 25)
#define FTDMAC020_LLI_SRC_WIDTH_SHIFT (25)
#define FTDMAC020_LLI_DST_WIDTH_MSK GENMASK(24, 22)
#define FTDMAC020_LLI_DST_WIDTH_SHIFT (22)
#define FTDMAC020_LLI_SRCAD_CTL_MSK GENMASK(21, 20)
#define FTDMAC020_LLI_SRCAD_CTL_SHIFT (20)
#define FTDMAC020_LLI_DSTAD_CTL_MSK GENMASK(19, 18)
#define FTDMAC020_LLI_DSTAD_CTL_SHIFT (18)
#define FTDMAC020_LLI_SRC_SEL BIT(17)
#define FTDMAC020_LLI_DST_SEL BIT(16)
#define FTDMAC020_LLI_TRANSFER_SIZE_MASK GENMASK(11, 0)
#define FTDMAC020_LLI_TRANSFER_SIZE_SHIFT (0)
#define FTDMAC020_CFG_LLP_CNT_MASK GENMASK(19, 16)
#define FTDMAC020_CFG_LLP_CNT_SHIFT (16)
#define FTDMAC020_CFG_BUSY BIT(8)
#define FTDMAC020_CFG_INT_ABT_MSK BIT(2)
#define FTDMAC020_CFG_INT_ERR_MSK BIT(1)
#define FTDMAC020_CFG_INT_TC_MSK BIT(0)
/* DMA linked list chain structure */
struct
pl080_lli
{
...
...
include/linux/amba/pl08x.h
浏览文件 @
98cd085e
...
...
@@ -47,8 +47,6 @@ enum {
* devices with static assignments
* @muxval: a number usually used to poke into some mux regiser to
* mux in the signal to this channel
* @cctl_memcpy: options for the channel control register for memcpy
* *** not used for slave channels ***
* @addr: source/target address in physical memory for this DMA channel,
* can be the address of a FIFO register for burst requests for example.
* This can be left undefined if the PrimeCell API is used for configuring
...
...
@@ -63,12 +61,28 @@ struct pl08x_channel_data {
int
min_signal
;
int
max_signal
;
u32
muxval
;
u32
cctl_memcpy
;
dma_addr_t
addr
;
bool
single
;
u8
periph_buses
;
};
enum
pl08x_burst_size
{
PL08X_BURST_SZ_1
,
PL08X_BURST_SZ_4
,
PL08X_BURST_SZ_8
,
PL08X_BURST_SZ_16
,
PL08X_BURST_SZ_32
,
PL08X_BURST_SZ_64
,
PL08X_BURST_SZ_128
,
PL08X_BURST_SZ_256
,
};
enum
pl08x_bus_width
{
PL08X_BUS_WIDTH_8_BITS
,
PL08X_BUS_WIDTH_16_BITS
,
PL08X_BUS_WIDTH_32_BITS
,
};
/**
* struct pl08x_platform_data - the platform configuration for the PL08x
* PrimeCells.
...
...
@@ -76,6 +90,11 @@ struct pl08x_channel_data {
* platform, all inclusive, including multiplexed channels. The available
* physical channels will be multiplexed around these signals as they are
* requested, just enumerate all possible channels.
* @num_slave_channels: number of elements in the slave channel array
* @memcpy_burst_size: the appropriate burst size for memcpy operations
* @memcpy_bus_width: memory bus width
* @memcpy_prot_buff: whether memcpy DMA is bufferable
* @memcpy_prot_cache: whether memcpy DMA is cacheable
* @get_xfer_signal: request a physical signal to be used for a DMA transfer
* immediately: if there is some multiplexing or similar blocking the use
* of the channel the transfer can be denied by returning less than zero,
...
...
@@ -90,7 +109,10 @@ struct pl08x_channel_data {
struct
pl08x_platform_data
{
struct
pl08x_channel_data
*
slave_channels
;
unsigned
int
num_slave_channels
;
struct
pl08x_channel_data
memcpy_channel
;
enum
pl08x_burst_size
memcpy_burst_size
;
enum
pl08x_bus_width
memcpy_bus_width
;
bool
memcpy_prot_buff
;
bool
memcpy_prot_cache
;
int
(
*
get_xfer_signal
)(
const
struct
pl08x_channel_data
*
);
void
(
*
put_xfer_signal
)(
const
struct
pl08x_channel_data
*
,
int
);
u8
lli_buses
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录