kernel: bump 4.19 to 4.19.90
[openwrt/staging/wigyori.git] / target / linux / apm821xx / patches-4.19 / 010-dt-bindings-dmaengine-dw-dmac-add-protection-control.patch
1 From 538098281ce884a51d2aa4ab445056a41741c6ad Mon Sep 17 00:00:00 2001
2 From: Christian Lamparter <chunkeey@gmail.com>
3 Date: Sat, 17 Nov 2018 17:17:20 +0100
4 Subject: [PATCH] dt-bindings: dmaengine: dw-dmac: add protection control
5 property
6
7 This patch for the DesignWare AHB Central
8 Direct Memory Access Controller adds the dma
9 protection control property:
10 "snps,dma-protection-control"
11
12 as well as the properties specific values defines into
13 a new include file: include/dt-bindings/dma/dw-dmac.h
14
15 Note: The protection control signals are one-to-one
16 mapped to the AHB HPROT[1:3] signals for this controller.
17 The HPROT0 (Data Access) is always hardwired to 1.
18
19 Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
20 Reviewed-by: Rob Herring <robh@kernel.org>
21 Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
22 Signed-off-by: Vinod Koul <vkoul@kernel.org>
23 ---
24 Documentation/devicetree/bindings/dma/snps-dma.txt | 4 ++++
25 MAINTAINERS | 4 +++-
26 include/dt-bindings/dma/dw-dmac.h | 14 ++++++++++++++
27 3 files changed, 21 insertions(+), 1 deletion(-)
28 create mode 100644 include/dt-bindings/dma/dw-dmac.h
29
30 --- a/Documentation/devicetree/bindings/dma/snps-dma.txt
31 +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt
32 @@ -27,6 +27,10 @@ Optional properties:
33 general purpose DMA channel allocator. False if not passed.
34 - multi-block: Multi block transfers supported by hardware. Array property with
35 one cell per channel. 0: not supported, 1 (default): supported.
36 +- snps,dma-protection-control: AHB HPROT[3:1] protection setting.
37 + The default value is 0 (for non-cacheable, non-buffered,
38 + unprivileged data access).
39 + Refer to include/dt-bindings/dma/dw-dmac.h for possible values.
40
41 Example:
42
43 --- a/MAINTAINERS
44 +++ b/MAINTAINERS
45 @@ -14075,9 +14075,11 @@ SYNOPSYS DESIGNWARE DMAC DRIVER
46 M: Viresh Kumar <vireshk@kernel.org>
47 R: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
48 S: Maintained
49 +F: Documentation/devicetree/bindings/dma/snps-dma.txt
50 +F: drivers/dma/dw/
51 +F: include/dt-bindings/dma/dw-dmac.h
52 F: include/linux/dma/dw.h
53 F: include/linux/platform_data/dma-dw.h
54 -F: drivers/dma/dw/
55
56 SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET DRIVER
57 M: Jose Abreu <Jose.Abreu@synopsys.com>
58 --- /dev/null
59 +++ b/include/dt-bindings/dma/dw-dmac.h
60 @@ -0,0 +1,14 @@
61 +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
62 +
63 +#ifndef __DT_BINDINGS_DMA_DW_DMAC_H__
64 +#define __DT_BINDINGS_DMA_DW_DMAC_H__
65 +
66 +/*
67 + * Protection Control bits provide protection against illegal transactions.
68 + * The protection bits[0:2] are one-to-one mapped to AHB HPROT[3:1] signals.
69 + */
70 +#define DW_DMAC_HPROT1_PRIVILEGED_MODE (1 << 0) /* Privileged Mode */
71 +#define DW_DMAC_HPROT2_BUFFERABLE (1 << 1) /* DMA is bufferable */
72 +#define DW_DMAC_HPROT3_CACHEABLE (1 << 2) /* DMA is cacheable */
73 +
74 +#endif /* __DT_BINDINGS_DMA_DW_DMAC_H__ */