Skip to content

Commit 1b02dcb

Browse files
committed
Merge tag 'dmaengine-4.17-rc1' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine updates from Vinod Koul: "This time we have couple of new drivers along with updates to drivers: - new drivers for the DesignWare AXI DMAC and MediaTek High-Speed DMA controllers - stm32 dma and qcom bam dma driver updates - norandom test option for dmatest" * tag 'dmaengine-4.17-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (30 commits) dmaengine: stm32-dma: properly mask irq bits dmaengine: stm32-dma: fix max items per transfer dmaengine: stm32-dma: fix DMA IRQ status handling dmaengine: stm32-dma: Improve memory burst management dmaengine: stm32-dma: fix typo and reported checkpatch warnings dmaengine: stm32-dma: fix incomplete configuration in cyclic mode dmaengine: stm32-dma: threshold manages with bitfield feature dt-bindings: stm32-dma: introduce DMA features bitfield dt-bindings: rcar-dmac: Document r8a77470 support dmaengine: rcar-dmac: Fix too early/late system suspend/resume callbacks dmaengine: dw-axi-dmac: fix spelling mistake: "catched" -> "caught" dmaengine: edma: Check the memory allocation for the memcpy dma device dmaengine: at_xdmac: fix rare residue corruption dmaengine: mediatek: update MAINTAINERS entry with MediaTek DMA driver dmaengine: mediatek: Add MediaTek High-Speed DMA controller for MT7622 and MT7623 SoC dt-bindings: dmaengine: Add MediaTek High-Speed DMA controller bindings dt-bindings: Document the Synopsys DW AXI DMA bindings dmaengine: Introduce DW AXI DMAC driver dmaengine: pl330: fix a race condition in case of threaded irqs dmaengine: imx-sdma: fix pagefault when channel is disabled during interrupt ...
2 parents 92589cb + 2ffb850 commit 1b02dcb

24 files changed

+2871
-74
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
MediaTek High-Speed DMA Controller
2+
==================================
3+
4+
This device follows the generic DMA bindings defined in dma/dma.txt.
5+
6+
Required properties:
7+
8+
- compatible: Must be one of
9+
"mediatek,mt7622-hsdma": for MT7622 SoC
10+
"mediatek,mt7623-hsdma": for MT7623 SoC
11+
- reg: Should contain the register's base address and length.
12+
- interrupts: Should contain a reference to the interrupt used by this
13+
device.
14+
- clocks: Should be the clock specifiers corresponding to the entry in
15+
clock-names property.
16+
- clock-names: Should contain "hsdma" entries.
17+
- power-domains: Phandle to the power domain that the device is part of
18+
- #dma-cells: The length of the DMA specifier, must be <1>. This one cell
19+
in dmas property of a client device represents the channel
20+
number.
21+
Example:
22+
23+
hsdma: dma-controller@1b007000 {
24+
compatible = "mediatek,mt7623-hsdma";
25+
reg = <0 0x1b007000 0 0x1000>;
26+
interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_LOW>;
27+
clocks = <&ethsys CLK_ETHSYS_HSDMA>;
28+
clock-names = "hsdma";
29+
power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
30+
#dma-cells = <1>;
31+
};
32+
33+
DMA clients must use the format described in dma/dma.txt file.

Documentation/devicetree/bindings/dma/qcom_bam_dma.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Required properties:
1515
the secure world.
1616
- qcom,controlled-remotely : optional, indicates that the bam is controlled by
1717
remote proccessor i.e. execution environment.
18+
- num-channels : optional, indicates supported number of DMA channels in a
19+
remotely controlled bam.
20+
- qcom,num-ees : optional, indicates supported number of Execution Environments
21+
in a remotely controlled bam.
1822

1923
Example:
2024

Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Required Properties:
1818
Examples with soctypes are:
1919
- "renesas,dmac-r8a7743" (RZ/G1M)
2020
- "renesas,dmac-r8a7745" (RZ/G1E)
21+
- "renesas,dmac-r8a77470" (RZ/G1C)
2122
- "renesas,dmac-r8a7790" (R-Car H2)
2223
- "renesas,dmac-r8a7791" (R-Car M2-W)
2324
- "renesas,dmac-r8a7792" (R-Car V2H)
@@ -26,6 +27,7 @@ Required Properties:
2627
- "renesas,dmac-r8a7795" (R-Car H3)
2728
- "renesas,dmac-r8a7796" (R-Car M3-W)
2829
- "renesas,dmac-r8a77970" (R-Car V3M)
30+
- "renesas,dmac-r8a77980" (R-Car V3H)
2931

3032
- reg: base address and length of the registers block for the DMAC
3133

Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Required Properties:
1111
- "renesas,r8a7794-usb-dmac" (R-Car E2)
1212
- "renesas,r8a7795-usb-dmac" (R-Car H3)
1313
- "renesas,r8a7796-usb-dmac" (R-Car M3-W)
14+
- "renesas,r8a77965-usb-dmac" (R-Car M3-N)
1415
- reg: base address and length of the registers block for the DMAC
1516
- interrupts: interrupt specifiers for the DMAC, one for each entry in
1617
interrupt-names.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Synopsys DesignWare AXI DMA Controller
2+
3+
Required properties:
4+
- compatible: "snps,axi-dma-1.01a"
5+
- reg: Address range of the DMAC registers. This should include
6+
all of the per-channel registers.
7+
- interrupt: Should contain the DMAC interrupt number.
8+
- interrupt-parent: Should be the phandle for the interrupt controller
9+
that services interrupts for this device.
10+
- dma-channels: Number of channels supported by hardware.
11+
- snps,dma-masters: Number of AXI masters supported by the hardware.
12+
- snps,data-width: Maximum AXI data width supported by hardware.
13+
(0 - 8bits, 1 - 16bits, 2 - 32bits, ..., 6 - 512bits)
14+
- snps,priority: Priority of channel. Array size is equal to the number of
15+
dma-channels. Priority value must be programmed within [0:dma-channels-1]
16+
range. (0 - minimum priority)
17+
- snps,block-size: Maximum block size supported by the controller channel.
18+
Array size is equal to the number of dma-channels.
19+
20+
Optional properties:
21+
- snps,axi-max-burst-len: Restrict master AXI burst length by value specified
22+
in this property. If this property is missing the maximum AXI burst length
23+
supported by DMAC is used. [1:256]
24+
25+
Example:
26+
27+
dmac: dma-controller@80000 {
28+
compatible = "snps,axi-dma-1.01a";
29+
reg = <0x80000 0x400>;
30+
clocks = <&core_clk>, <&cfgr_clk>;
31+
clock-names = "core-clk", "cfgr-clk";
32+
interrupt-parent = <&intc>;
33+
interrupts = <27>;
34+
35+
dma-channels = <4>;
36+
snps,dma-masters = <2>;
37+
snps,data-width = <3>;
38+
snps,block-size = <4096 4096 4096 4096>;
39+
snps,priority = <0 1 2 3>;
40+
snps,axi-max-burst-len = <16>;
41+
};

Documentation/devicetree/bindings/dma/stm32-dma.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ channel: a phandle to the DMA controller plus the following four integer cells:
6262
0x1: medium
6363
0x2: high
6464
0x3: very high
65-
4. A 32bit mask specifying the DMA FIFO threshold configuration which are device
66-
dependent:
67-
-bit 0-1: Fifo threshold
65+
4. A 32bit bitfield value specifying DMA features which are device dependent:
66+
-bit 0-1: DMA FIFO threshold selection
6867
0x0: 1/4 full FIFO
6968
0x1: 1/2 full FIFO
7069
0x2: 3/4 full FIFO
7170
0x3: full FIFO
7271

72+
7373
Example:
7474

7575
usart1: serial@40011000 {

MAINTAINERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8859,6 +8859,15 @@ M: Sean Wang <[email protected]>
88598859
S: Maintained
88608860
F: drivers/media/rc/mtk-cir.c
88618861

8862+
MEDIATEK DMA DRIVER
8863+
M: Sean Wang <[email protected]>
8864+
8865+
L: [email protected] (moderated for non-subscribers)
8866+
L: [email protected] (moderated for non-subscribers)
8867+
S: Maintained
8868+
F: Documentation/devicetree/bindings/dma/mtk-*
8869+
F: drivers/dma/mediatek/
8870+
88628871
MEDIATEK PMIC LED DRIVER
88638872
M: Sean Wang <[email protected]>
88648873
S: Maintained
@@ -13482,6 +13491,12 @@ S: Maintained
1348213491
F: drivers/gpio/gpio-dwapb.c
1348313492
F: Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt
1348413493

13494+
SYNOPSYS DESIGNWARE AXI DMAC DRIVER
13495+
M: Eugeniy Paltsev <[email protected]>
13496+
S: Maintained
13497+
F: drivers/dma/dwi-axi-dmac/
13498+
F: Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.txt
13499+
1348513500
SYNOPSYS DESIGNWARE DMAC DRIVER
1348613501
M: Viresh Kumar <[email protected]>
1348713502
R: Andy Shevchenko <[email protected]>

drivers/dma/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,16 @@ config DMA_SUN6I
187187
help
188188
Support for the DMA engine first found in Allwinner A31 SoCs.
189189

190+
config DW_AXI_DMAC
191+
tristate "Synopsys DesignWare AXI DMA support"
192+
depends on OF || COMPILE_TEST
193+
select DMA_ENGINE
194+
select DMA_VIRTUAL_CHANNELS
195+
help
196+
Enable support for Synopsys DesignWare AXI DMA controller.
197+
NOTE: This driver wasn't tested on 64 bit platform because
198+
of lack 64 bit platform with Synopsys DW AXI DMAC.
199+
190200
config EP93XX_DMA
191201
bool "Cirrus Logic EP93xx DMA support"
192202
depends on ARCH_EP93XX || COMPILE_TEST
@@ -633,6 +643,8 @@ config ZX_DMA
633643
# driver files
634644
source "drivers/dma/bestcomm/Kconfig"
635645

646+
source "drivers/dma/mediatek/Kconfig"
647+
636648
source "drivers/dma/qcom/Kconfig"
637649

638650
source "drivers/dma/dw/Kconfig"

drivers/dma/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ obj-$(CONFIG_DMA_OMAP) += omap-dma.o
2828
obj-$(CONFIG_DMA_SA11X0) += sa11x0-dma.o
2929
obj-$(CONFIG_DMA_SUN4I) += sun4i-dma.o
3030
obj-$(CONFIG_DMA_SUN6I) += sun6i-dma.o
31+
obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac/
3132
obj-$(CONFIG_DW_DMAC_CORE) += dw/
3233
obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
3334
obj-$(CONFIG_FSL_DMA) += fsldma.o
@@ -75,5 +76,6 @@ obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
7576
obj-$(CONFIG_ZX_DMA) += zx_dma.o
7677
obj-$(CONFIG_ST_FDMA) += st_fdma.o
7778

79+
obj-y += mediatek/
7880
obj-y += qcom/
7981
obj-y += xilinx/

drivers/dma/at_xdmac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,10 +1471,10 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
14711471
for (retry = 0; retry < AT_XDMAC_RESIDUE_MAX_RETRIES; retry++) {
14721472
check_nda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA) & 0xfffffffc;
14731473
rmb();
1474-
initd = !!(at_xdmac_chan_read(atchan, AT_XDMAC_CC) & AT_XDMAC_CC_INITD);
1475-
rmb();
14761474
cur_ubc = at_xdmac_chan_read(atchan, AT_XDMAC_CUBC);
14771475
rmb();
1476+
initd = !!(at_xdmac_chan_read(atchan, AT_XDMAC_CC) & AT_XDMAC_CC_INITD);
1477+
rmb();
14781478
cur_nda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA) & 0xfffffffc;
14791479
rmb();
14801480

drivers/dma/dmatest.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ MODULE_PARM_DESC(timeout, "Transfer Timeout in msec (default: 3000), "
7474

7575
static bool noverify;
7676
module_param(noverify, bool, S_IRUGO | S_IWUSR);
77-
MODULE_PARM_DESC(noverify, "Disable random data setup and verification");
77+
MODULE_PARM_DESC(noverify, "Disable data verification (default: verify)");
78+
79+
static bool norandom;
80+
module_param(norandom, bool, 0644);
81+
MODULE_PARM_DESC(norandom, "Disable random offset setup (default: random)");
7882

7983
static bool verbose;
8084
module_param(verbose, bool, S_IRUGO | S_IWUSR);
@@ -103,6 +107,7 @@ struct dmatest_params {
103107
unsigned int pq_sources;
104108
int timeout;
105109
bool noverify;
110+
bool norandom;
106111
};
107112

108113
/**
@@ -575,7 +580,7 @@ static int dmatest_func(void *data)
575580
break;
576581
}
577582

578-
if (params->noverify)
583+
if (params->norandom)
579584
len = params->buf_size;
580585
else
581586
len = dmatest_random() % params->buf_size + 1;
@@ -586,17 +591,19 @@ static int dmatest_func(void *data)
586591

587592
total_len += len;
588593

589-
if (params->noverify) {
594+
if (params->norandom) {
590595
src_off = 0;
591596
dst_off = 0;
592597
} else {
593-
start = ktime_get();
594598
src_off = dmatest_random() % (params->buf_size - len + 1);
595599
dst_off = dmatest_random() % (params->buf_size - len + 1);
596600

597601
src_off = (src_off >> align) << align;
598602
dst_off = (dst_off >> align) << align;
603+
}
599604

605+
if (!params->noverify) {
606+
start = ktime_get();
600607
dmatest_init_srcs(thread->srcs, src_off, len,
601608
params->buf_size, is_memset);
602609
dmatest_init_dsts(thread->dsts, dst_off, len,
@@ -975,6 +982,7 @@ static void run_threaded_test(struct dmatest_info *info)
975982
params->pq_sources = pq_sources;
976983
params->timeout = timeout;
977984
params->noverify = noverify;
985+
params->norandom = norandom;
978986

979987
request_channels(info, DMA_MEMCPY);
980988
request_channels(info, DMA_MEMSET);

drivers/dma/dw-axi-dmac/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac-platform.o

0 commit comments

Comments
 (0)