Skip to content

Add DMA driver for DMA330 controller

Chee u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drivers: dma: Enable DMA-330 driver support+0 -00 replies
2/5drivers: dma: Add function to zeroes a range of destination such as memory+0 -00 replies
4/5include: dma: Update the function description for dma_memcpy+0 -01 reply
4/5include: dma: Update the function description for dma_memcpy+0 -00 replies
5/5arm: dts: socfpga: stratix10: update pdma+0 -00 replies
5/5arm: dts: socfpga: stratix10: update pdma+0 -02 replies
5/5arm: dts: socfpga: stratix10: update pdma+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/5] Add DMA driver for DMA330 controller
Quoted 44 lines · Marek Vasut
Quoted 43 lines · Chin Liang
Quoted 41 lines · Marek Vasut
Quoted 29 lines · tien.fong.chee at intel.com

From: Tien Fong Chee <[email protected]>

This patchset contains dm driver for DMA330 controller.

This series is working on top of u-boot-socfpga.git -
 http://git.denx.de/u-boot.git .

Tien Fong Chee (5):
  drivers: dma: Enable DMA-330 driver support
  drivers: dma: Add function to zeroes a range of destination such
as
    memory
  drivers: dma: Factor out dma_get_device from DMA class function
  include: dma: Update the function description for dma_memcpy
  arm: dts: socfpga: stratix10: update pdma

 arch/arm/dts/socfpga_stratix10.dtsi |   20 +
 drivers/dma/Kconfig                 |    9 +-
 drivers/dma/Makefile                |    1 +
 drivers/dma/dma-uclass.c            |   23 +-
 drivers/dma/dma330.c                | 1514
+++++++++++++++++++++++++++++++++++
 drivers/mtd/spi/spi_flash.c         |    9 +-
 include/dma.h                       |   19 +-
 include/dma330.h                    |  136 ++++

Quoted 4 lines
 8 files changed, 1719 insertions(+), 12 deletions(-)

 create mode 100644 drivers/dma/dma330.c
 create mode 100644 include/dma330.h

I presume this is to zero-out the ECC RAM ? Just enable caches and
use
memset, it is much faster than this DMA witchcraft, at least on the
A10.

Quoted 5 lines
Quoted 3 lines

Yes and no :)

The patch enable DMA-330 support and also zero-out ECC RAM.

Right, that's what I said ?

This driver also enable source to destination transferring through DMA.

Quoted 4 lines
Quoted 2 lines

While for the speed, DMA still faster as it has larger burst size.

It takes ~0.9s to erase 2 GiB of RAM on the A10. How fast is the DMA?

That is pretty fast. Using DMA dm on Stratix 10 also need around 3-4s for 2GiB DRAM.

Would you mind to share us the codes for enabling the both cache and MMU in SPL. I would like to replicate your changes at Stratix 10 for the performance measurement.

Quoted 6 lines
Quoted 4 lines

We
can also parallel the zero out task with other tasks such as flash controller init.

The flash controller also needs some zeroing out ?

I believe what Chin Liang saying is CPU is free to do other HW initialization while DMA is zeroing the DRAM.

However, current driver is blocking, which means CPU has to wait the DMA finish transferring.

I can pull the DMA transfer status check function out as a new class function so user can check the DMA status at anytime.