kernel: update kernel 3.18 to version 3.18.23
[openwrt/staging/chunkeey.git] / target / linux / sunxi / patches-4.1 / 143-dmaengine-add-h3.patch
1 --- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt
2 +++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
3 @@ -4,7 +4,10 @@ This driver follows the generic DMA bind
4
5 Required properties:
6
7 -- compatible: Must be "allwinner,sun6i-a31-dma" or "allwinner,sun8i-a23-dma"
8 +- compatible: Must be one of
9 + "allwinner,sun6i-a31-dma"
10 + "allwinner,sun8i-a23-dma"
11 + "allwinner,sun8i-h3-dma"
12 - reg: Should contain the registers base address and length
13 - interrupts: Should contain a reference to the interrupt used by this device
14 - clocks: Should contain a reference to the parent AHB clock
15 --- a/drivers/dma/sun6i-dma.c
16 +++ b/drivers/dma/sun6i-dma.c
17 @@ -891,9 +891,21 @@ static struct sun6i_dma_config sun8i_a23
18 .nr_max_vchans = 37,
19 };
20
21 +/*
22 + * The H3 has 12 physical channels, a maximum DRQ port id of 27,
23 + * and a total of 34 usable source and destination endpoints.
24 + */
25 +
26 +static struct sun6i_dma_config sun8i_h3_dma_cfg = {
27 + .nr_max_channels = 12,
28 + .nr_max_requests = 27,
29 + .nr_max_vchans = 34,
30 +};
31 +
32 static const struct of_device_id sun6i_dma_match[] = {
33 { .compatible = "allwinner,sun6i-a31-dma", .data = &sun6i_a31_dma_cfg },
34 { .compatible = "allwinner,sun8i-a23-dma", .data = &sun8i_a23_dma_cfg },
35 + { .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg },
36 { /* sentinel */ }
37 };
38