[U-Boot] [RFC v2 0/3] Add PL330 DMA support on SoCFPGA

Dinh Nguyen dinguyen at kernel.org
Fri Dec 9 18:03:31 CET 2016


Hello,

I'm seeking advice on debugging on what is happening when I use the PL330
DMA controller to transfer zero's to the SDRAM and the effect of memory
barriers.

Here are my current observations:

1) With commit "a78cd8613204 ARM: Rework and correct barrier definitions",
   the correct memory barrier calls are in place. With this patch in place,
   this version of the PL330 DMA driver can correctly transfer zero's to
   the SDRAM.

   However, after the transfer is done, I'm encountering this error on SPL
   boot up:
	Trying to boot from MMC1
	spl: could not find mmc device. error: -19
	SPL: failed to boot from all boot devices
	### ERROR ### Please RESET the board ###

   The above error can be narrowed down to the list_emtpy(&uc->dev_head) in
   uclass_find_device() being true. A simple revert of patch a78cd8613204
   make this error go away.

2) I've tried to replace all the readl/writel with raw_readl/raw_writel in
   the pl330 driver. Same error.

3) Removing the __iormb and __iowmb in readl/writel, effectively, removing
   the barriers. Error goes away.

I don't know enough what affect the barriers are having on the DMA memory
transfer, so any guidance would be greatly appreciated.

Thanks,
Dinh


Dinh Nguyen (3):
  drivers: dma: Add the ARM PL330 DMA driver
  arm: socfpga: scrub the SDRAM to properly enable ECC support
  arm: socfpga: Add reset manager defines for reset status

 arch/arm/include/asm/pl330.h                       | 105 +++
 arch/arm/mach-socfpga/include/mach/reset_manager.h |  21 +
 arch/arm/mach-socfpga/include/mach/sdram.h         |   2 +
 arch/arm/mach-socfpga/spl.c                        |   8 +
 arch/arm/mach-socfpga/wrap_sdram_config.c          |  32 +
 configs/socfpga_cyclone5_defconfig                 |   2 +
 drivers/dma/Kconfig                                |   4 +
 drivers/dma/Makefile                               |   1 +
 drivers/dma/pl330.c                                | 942 +++++++++++++++++++++
 9 files changed, 1117 insertions(+)
 create mode 100644 arch/arm/include/asm/pl330.h
 create mode 100644 drivers/dma/pl330.c

-- 
2.7.4



More information about the U-Boot mailing list