143-dmaengine-add-h3.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. Required properties:
  5. -- compatible: Must be "allwinner,sun6i-a31-dma" or "allwinner,sun8i-a23-dma"
  6. +- compatible: Must be one of
  7. + "allwinner,sun6i-a31-dma"
  8. + "allwinner,sun8i-a23-dma"
  9. + "allwinner,sun8i-h3-dma"
  10. - reg: Should contain the registers base address and length
  11. - interrupts: Should contain a reference to the interrupt used by this device
  12. - clocks: Should contain a reference to the parent AHB clock
  13. --- a/drivers/dma/sun6i-dma.c
  14. +++ b/drivers/dma/sun6i-dma.c
  15. @@ -891,9 +891,21 @@ static struct sun6i_dma_config sun8i_a23
  16. .nr_max_vchans = 37,
  17. };
  18. +/*
  19. + * The H3 has 12 physical channels, a maximum DRQ port id of 27,
  20. + * and a total of 34 usable source and destination endpoints.
  21. + */
  22. +
  23. +static struct sun6i_dma_config sun8i_h3_dma_cfg = {
  24. + .nr_max_channels = 12,
  25. + .nr_max_requests = 27,
  26. + .nr_max_vchans = 34,
  27. +};
  28. +
  29. static const struct of_device_id sun6i_dma_match[] = {
  30. { .compatible = "allwinner,sun6i-a31-dma", .data = &sun6i_a31_dma_cfg },
  31. { .compatible = "allwinner,sun8i-a23-dma", .data = &sun8i_a23_dma_cfg },
  32. + { .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg },
  33. { /* sentinel */ }
  34. };