mbox series

[v5,0/4] Add STM32 MDMA driver

Message ID 1506613003-28376-1-git-send-email-pierre-yves.mordret@st.com
Headers show
Series Add STM32 MDMA driver | expand

Message

Pierre Yves MORDRET Sept. 28, 2017, 3:36 p.m. UTC
This patchset adds support for the STM32 MDMA controller.
The Master Direct memory access (MDMA) provides high-speed data transfer
between memory and memory or between peripherals and memory.
Contrary to STM32 DMA, the STM32 MDMA controller supports hardware LLI and
uses a larger integrated FIFO (128 vs 16 bytes)
---
  Version history:
     v5:
         * Change 'platform_driver_probe' into
           'platform_driver_register' to manage defer mechanism
     v4:
         * Add safe getter/setter macros
         * forbid DMA preparation in cyclic mode yet
         * Optimize burst and memory width for memcpy
         * replace of_property_xx by device_property_xx
     v3:
         * Update header template
         * Unsigned expression compared with zero
         * Rework stm32_mdma_get_max_width
         * moved to src/dst case where they are used in set_xfer
         * Change of_property_* with device_property_*
         * Add dev_warn whether default value is used
         * Indentation
         * Add MODULE_*
     v2:
         * change compatible into st,stm32h7-mdma to be more SoC specific
         * Add MDMA support in DT for H7
         * Add MDMA support in STM32 defconfig
---
Pierre-Yves MORDRET (4):
  dt-bindings: Document the STM32 MDMA bindings
  dmaengine: Add STM32 MDMA driver
  ARM: dts: stm32: Add MDMA support for STM32H743 SoC
  ARM: configs: stm32: Add MDMA support in STM32 defconfig

 .../devicetree/bindings/dma/stm32-mdma.txt         |   94 ++
 arch/arm/boot/dts/stm32h743.dtsi                   |   10 +
 arch/arm/configs/stm32_defconfig                   |    1 +
 drivers/dma/Kconfig                                |   12 +
 drivers/dma/Makefile                               |    1 +
 drivers/dma/stm32-mdma.c                           | 1666 ++++++++++++++++++++
 6 files changed, 1784 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/stm32-mdma.txt
 create mode 100644 drivers/dma/stm32-mdma.c

Comments

Vinod Koul Oct. 8, 2017, 9:16 a.m. UTC | #1
On Thu, Sep 28, 2017 at 05:36:41PM +0200, Pierre-Yves MORDRET wrote:
> This patch adds the driver for the STM32 MDMA controller.
> 
> Master Direct memory access (MDMA) is used in order to provide high-speed
> data transfer between memory and memory or between peripherals and memory.
> 
> MDMA controller provides a master AXI interface for main memory and
> peripheral registers access (system access port) and a master AHB
> interface only for Cortex-M7 TCM memory access (TCM access port).
> 
> MDMA works in conjunction with the standard DMA controllers (DMA1 or DMA2).
> It offers up to 64 channels, each dedicated to managing memory access
> requests from one of the DMA stream memory buffer or other peripherals
> (w/ integrated FIFO).

Applied, thanks
Alexandre TORGUE Oct. 16, 2017, 4:30 p.m. UTC | #2
Hi

On 09/28/2017 05:36 PM, Pierre-Yves MORDRET wrote:
> This patch adds MDMA support for STM32H743 SoC.
> 
> Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
> ---
>   Version history:
>      v5:
>      v4:
>      v3:
>          * None
>      v2:
>          * Add MDMA support in DT for H7
> ---
> ---
>   arch/arm/boot/dts/stm32h743.dtsi | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
> index 58ec227..8e0aeb7 100644
> --- a/arch/arm/boot/dts/stm32h743.dtsi
> +++ b/arch/arm/boot/dts/stm32h743.dtsi
> @@ -193,6 +193,16 @@
>   				status = "disabled";
>   			};
>   		};
> +
> +		mdma1: dma@52000000 {
> +			compatible = "st,stm32h7-mdma";
> +			reg = <0x52000000 0x1000>;
> +			interrupts = <122>;
> +			clocks = <&timer_clk>;
> +			#dma-cells = <5>;
> +			dma-channels = <16>;
> +			dma-requests = <32>;
> +		};
>   	};
>   };
>   
> 
Applied on stm32-dt-for-v4.15.

Thanks
Alex
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexandre TORGUE Oct. 16, 2017, 4:31 p.m. UTC | #3
hi

On 09/28/2017 05:36 PM, Pierre-Yves MORDRET wrote:
> This patch adds MDMA support in STM32 defconfig file
> 
> Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
> ---
>   Version history:
>      v5:
>      v4:
>      v3:
>          * None
>      v2:
>          * Add MDMA support in STM32 defconfig
> ---
> ---
>   arch/arm/configs/stm32_defconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/configs/stm32_defconfig b/arch/arm/configs/stm32_defconfig
> index 90e5c46..dd8919b 100644
> --- a/arch/arm/configs/stm32_defconfig
> +++ b/arch/arm/configs/stm32_defconfig
> @@ -67,6 +67,7 @@ CONFIG_RTC_CLASS=y
>   CONFIG_RTC_DRV_STM32=y
>   CONFIG_DMADEVICES=y
>   CONFIG_STM32_DMA=y
> +CONFIG_STM32_MDMA=y
>   CONFIG_IIO=y
>   CONFIG_STM32_ADC_CORE=y
>   CONFIG_STM32_ADC=y
> 
Applied on stm32-defconfig-for-v4.15.

Thanks
Alex
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html