Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: mv_xor: remove support for dmacap,* DT properties

The only reason why we had dmacap,* properties is because back when
DMA_MEMSET was supported, only one out of the two channels per engine
could do a memset operation. But this is something that the driver
already knows anyway, and since then, the DMA_MEMSET support has been
removed.

The driver is already well aware of what each channel supports and the
one to one mapping between Linux specific implementation details (such
as dmacap,interrupt enabling DMA_INTERRUPT) and DT properties is a
good indication that these DT properties are wrong.

Therefore, this commit simply gets rid of these dmacap,* properties,
they are now ignored, and the driver is responsible for knowing the
capabilities of the hardware with regard to the dmaengine subsystem
expectations.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Thomas Petazzoni and committed by
Vinod Koul
6d8f7abd 31495d60

+7 -12
+4 -6
Documentation/devicetree/bindings/dma/mv-xor.txt
··· 12 12 properties: 13 13 - interrupts: interrupt of the XOR channel 14 14 15 - And the following optional properties: 15 + The sub-nodes used to contain one or several of the following 16 + properties, but they are now deprecated: 16 17 - dmacap,memcpy to indicate that the XOR channel is capable of memcpy operations 17 18 - dmacap,memset to indicate that the XOR channel is capable of memset operations 18 19 - dmacap,xor to indicate that the XOR channel is capable of xor operations 20 + - dmacap,interrupt to indicate that the XOR channel is capable of 21 + generating interrupts 19 22 20 23 Example: 21 24 ··· 31 28 32 29 xor00 { 33 30 interrupts = <51>; 34 - dmacap,memcpy; 35 - dmacap,xor; 36 31 }; 37 32 xor01 { 38 33 interrupts = <52>; 39 - dmacap,memcpy; 40 - dmacap,xor; 41 - dmacap,memset; 42 34 }; 43 35 };
+3 -6
drivers/dma/mv_xor.c
··· 1190 1190 op_in_desc = (int)of_id->data; 1191 1191 1192 1192 dma_cap_zero(cap_mask); 1193 - if (of_property_read_bool(np, "dmacap,memcpy")) 1194 - dma_cap_set(DMA_MEMCPY, cap_mask); 1195 - if (of_property_read_bool(np, "dmacap,xor")) 1196 - dma_cap_set(DMA_XOR, cap_mask); 1197 - if (of_property_read_bool(np, "dmacap,interrupt")) 1198 - dma_cap_set(DMA_INTERRUPT, cap_mask); 1193 + dma_cap_set(DMA_MEMCPY, cap_mask); 1194 + dma_cap_set(DMA_XOR, cap_mask); 1195 + dma_cap_set(DMA_INTERRUPT, cap_mask); 1199 1196 1200 1197 irq = irq_of_parse_and_map(np, 0); 1201 1198 if (!irq) {