Skip to content

Commit ec5b103

Browse files
committed
Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine updates from Vinod Koul: "This pull brings: - Andy's DW driver updates - Guennadi's sh driver updates - Pl08x driver fixes from Tomasz & Alban - Improvements to mmp_pdma by Daniel - TI EDMA fixes by Joel - New drivers: - Hisilicon k3dma driver - Renesas rcar dma driver - New API for publishing slave driver capablities - Various fixes across the subsystem by Andy, Jingoo, Sachin etc..." * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (94 commits) dma: edma: Remove limits on number of slots dma: edma: Leave linked to Null slot instead of DUMMY slot dma: edma: Find missed events and issue them ARM: edma: Add function to manually trigger an EDMA channel dma: edma: Write out and handle MAX_NR_SG at a given time dma: edma: Setup parameters to DMA MAX_NR_SG at a time dmaengine: pl330: use dma_set_max_seg_size to set the sg limit dmaengine: dma_slave_caps: remove sg entries dma: replace devm_request_and_ioremap by devm_ioremap_resource dma: ste_dma40: Fix potential null pointer dereference dma: ste_dma40: Remove duplicate const dma: imx-dma: Remove redundant NULL check dma: dmagengine: fix function names in comments dma: add driver for R-Car HPB-DMAC dma: k3dma: use devm_ioremap_resource() instead of devm_request_and_ioremap() dma: imx-sdma: Staticize sdma_driver_data structures pch_dma: Add MODULE_DEVICE_TABLE dmaengine: PL08x: Add cyclic transfer support dmaengine: PL08x: Fix reading the byte count in cctl dmaengine: PL08x: Add support for different maximum transfer size ...
2 parents d0048f0 + 5622ff1 commit ec5b103

54 files changed

Lines changed: 3241 additions & 738 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
* Freescale Smart Direct Memory Access (SDMA) Controller for i.MX
22

33
Required properties:
4-
- compatible : Should be "fsl,<chip>-sdma"
4+
- compatible : Should be "fsl,imx31-sdma", "fsl,imx31-to1-sdma",
5+
"fsl,imx31-to2-sdma", "fsl,imx35-sdma", "fsl,imx35-to1-sdma",
6+
"fsl,imx35-to2-sdma", "fsl,imx51-sdma", "fsl,imx53-sdma" or
7+
"fsl,imx6q-sdma". The -to variants should be preferred since they
8+
allow to determnine the correct ROM script addresses needed for
9+
the driver to work without additional firmware.
510
- reg : Should contain SDMA registers location and length
611
- interrupts : Should contain SDMA interrupt
712
- #dma-cells : Must be <3>.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
* Hisilicon K3 DMA controller
2+
3+
See dma.txt first
4+
5+
Required properties:
6+
- compatible: Should be "hisilicon,k3-dma-1.0"
7+
- reg: Should contain DMA registers location and length.
8+
- interrupts: Should contain one interrupt shared by all channel
9+
- #dma-cells: see dma.txt, should be 1, para number
10+
- dma-channels: physical channels supported
11+
- dma-requests: virtual channels supported, each virtual channel
12+
have specific request line
13+
- clocks: clock required
14+
15+
Example:
16+
17+
Controller:
18+
dma0: dma@fcd02000 {
19+
compatible = "hisilicon,k3-dma-1.0";
20+
reg = <0xfcd02000 0x1000>;
21+
#dma-cells = <1>;
22+
dma-channels = <16>;
23+
dma-requests = <27>;
24+
interrupts = <0 12 4>;
25+
clocks = <&pclk>;
26+
status = "disable";
27+
};
28+
29+
Client:
30+
Use specific request line passing from dmax
31+
For example, i2c0 read channel request line is 18, while write channel use 19
32+
33+
i2c0: i2c@fcb08000 {
34+
compatible = "snps,designware-i2c";
35+
dmas = <&dma0 18 /* read channel */
36+
&dma0 19>; /* write channel */
37+
dma-names = "rx", "tx";
38+
};
39+
40+
i2c1: i2c@fcb09000 {
41+
compatible = "snps,designware-i2c";
42+
dmas = <&dma0 20 /* read channel */
43+
&dma0 21>; /* write channel */
44+
dma-names = "rx", "tx";
45+
};
46+

‎Documentation/devicetree/bindings/dma/shdma.txt‎

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,42 +22,51 @@ Optional properties (currently unused):
2222
* DMA controller
2323

2424
Required properties:
25-
- compatible: should be "renesas,shdma"
25+
- compatible: should be of the form "renesas,shdma-<soc>", where <soc> should
26+
be replaced with the desired SoC model, e.g.
27+
"renesas,shdma-r8a73a4" for the system DMAC on r8a73a4 SoC
2628

2729
Example:
28-
dmac: dma-mux0 {
30+
dmac: dma-multiplexer@0 {
2931
compatible = "renesas,shdma-mux";
3032
#dma-cells = <1>;
31-
dma-channels = <6>;
33+
dma-channels = <20>;
3234
dma-requests = <256>;
33-
reg = <0 0>; /* Needed for AUXDATA */
34-
#address-cells = <1>;
35-
#size-cells = <1>;
35+
#address-cells = <2>;
36+
#size-cells = <2>;
3637
ranges;
3738

38-
dma0: shdma@fe008020 {
39-
compatible = "renesas,shdma";
40-
reg = <0xfe008020 0x270>,
41-
<0xfe009000 0xc>;
39+
dma0: dma-controller@e6700020 {
40+
compatible = "renesas,shdma-r8a73a4";
41+
reg = <0 0xe6700020 0 0x89e0>;
4242
interrupt-parent = <&gic>;
43-
interrupts = <0 34 4
44-
0 28 4
45-
0 29 4
46-
0 30 4
47-
0 31 4
48-
0 32 4
49-
0 33 4>;
43+
interrupts = <0 220 4
44+
0 200 4
45+
0 201 4
46+
0 202 4
47+
0 203 4
48+
0 204 4
49+
0 205 4
50+
0 206 4
51+
0 207 4
52+
0 208 4
53+
0 209 4
54+
0 210 4
55+
0 211 4
56+
0 212 4
57+
0 213 4
58+
0 214 4
59+
0 215 4
60+
0 216 4
61+
0 217 4
62+
0 218 4
63+
0 219 4>;
5064
interrupt-names = "error",
5165
"ch0", "ch1", "ch2", "ch3",
52-
"ch4", "ch5";
53-
};
54-
55-
dma1: shdma@fe018020 {
56-
...
57-
};
58-
59-
dma2: shdma@fe028020 {
60-
...
66+
"ch4", "ch5", "ch6", "ch7",
67+
"ch8", "ch9", "ch10", "ch11",
68+
"ch12", "ch13", "ch14", "ch15",
69+
"ch16", "ch17", "ch18", "ch19";
6170
};
6271
};
6372

‎Documentation/driver-model/devres.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,6 @@ PWM
299299
PHY
300300
devm_usb_get_phy()
301301
devm_usb_put_phy()
302+
303+
SLAVE DMA ENGINE
304+
devm_acpi_dma_controller_register()

‎MAINTAINERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7204,6 +7204,7 @@ F: drivers/tty/serial
72047204

72057205
SYNOPSYS DESIGNWARE DMAC DRIVER
72067206
M: Viresh Kumar <viresh.linux@gmail.com>
7207+
M: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
72077208
S: Maintained
72087209
F: include/linux/dw_dmac.h
72097210
F: drivers/dma/dw/

‎arch/arm/common/edma.c‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,23 @@ void edma_resume(unsigned channel)
12351235
}
12361236
EXPORT_SYMBOL(edma_resume);
12371237

1238+
int edma_trigger_channel(unsigned channel)
1239+
{
1240+
unsigned ctlr;
1241+
unsigned int mask;
1242+
1243+
ctlr = EDMA_CTLR(channel);
1244+
channel = EDMA_CHAN_SLOT(channel);
1245+
mask = BIT(channel & 0x1f);
1246+
1247+
edma_shadow0_write_array(ctlr, SH_ESR, (channel >> 5), mask);
1248+
1249+
pr_debug("EDMA: ESR%d %08x\n", (channel >> 5),
1250+
edma_shadow0_read_array(ctlr, SH_ESR, (channel >> 5)));
1251+
return 0;
1252+
}
1253+
EXPORT_SYMBOL(edma_trigger_channel);
1254+
12381255
/**
12391256
* edma_start - start dma on a channel
12401257
* @channel: channel being activated

‎arch/arm/mach-imx/mm-imx25.c‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,8 @@ void __init mx25_init_irq(void)
6161
mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR));
6262
}
6363

64-
static struct sdma_script_start_addrs imx25_sdma_script __initdata = {
65-
.ap_2_ap_addr = 729,
66-
.uart_2_mcu_addr = 904,
67-
.per_2_app_addr = 1255,
68-
.mcu_2_app_addr = 834,
69-
.uartsh_2_mcu_addr = 1120,
70-
.per_2_shp_addr = 1329,
71-
.mcu_2_shp_addr = 1048,
72-
.ata_2_mcu_addr = 1560,
73-
.mcu_2_ata_addr = 1479,
74-
.app_2_per_addr = 1189,
75-
.app_2_mcu_addr = 770,
76-
.shp_2_per_addr = 1407,
77-
.shp_2_mcu_addr = 979,
78-
};
79-
8064
static struct sdma_platform_data imx25_sdma_pdata __initdata = {
8165
.fw_name = "sdma-imx25.bin",
82-
.script_addrs = &imx25_sdma_script,
8366
};
8467

8568
static const struct resource imx25_audmux_res[] __initconst = {

‎arch/arm/mach-imx/mm-imx5.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,8 @@ void __init mx53_init_irq(void)
103103
tzic_init_irq(MX53_IO_ADDRESS(MX53_TZIC_BASE_ADDR));
104104
}
105105

106-
static struct sdma_script_start_addrs imx51_sdma_script __initdata = {
107-
.ap_2_ap_addr = 642,
108-
.uart_2_mcu_addr = 817,
109-
.mcu_2_app_addr = 747,
110-
.mcu_2_shp_addr = 961,
111-
.ata_2_mcu_addr = 1473,
112-
.mcu_2_ata_addr = 1392,
113-
.app_2_per_addr = 1033,
114-
.app_2_mcu_addr = 683,
115-
.shp_2_per_addr = 1251,
116-
.shp_2_mcu_addr = 892,
117-
};
118-
119106
static struct sdma_platform_data imx51_sdma_pdata __initdata = {
120107
.fw_name = "sdma-imx51.bin",
121-
.script_addrs = &imx51_sdma_script,
122108
};
123109

124110
static const struct resource imx51_audmux_res[] __initconst = {

‎drivers/dma/Kconfig‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,15 @@ config DMA_JZ4740
308308
select DMA_ENGINE
309309
select DMA_VIRTUAL_CHANNELS
310310

311+
config K3_DMA
312+
tristate "Hisilicon K3 DMA support"
313+
depends on ARCH_HI3xxx
314+
select DMA_ENGINE
315+
select DMA_VIRTUAL_CHANNELS
316+
help
317+
Support the DMA engine for Hisilicon K3 platform
318+
devices.
319+
311320
config DMA_ENGINE
312321
bool
313322

‎drivers/dma/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ obj-$(CONFIG_DMA_OMAP) += omap-dma.o
4040
obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o
4141
obj-$(CONFIG_DMA_JZ4740) += dma-jz4740.o
4242
obj-$(CONFIG_TI_CPPI41) += cppi41.o
43+
obj-$(CONFIG_K3_DMA) += k3dma.o

0 commit comments

Comments
 (0)