[PATCH 0/9] mmc: sdhci: code clean-up and fix cache coherency problem.

Masahiro Yamada yamada.masahiro at socionext.com
Tue Feb 4 12:08:57 CET 2020


My main motivation of this series is the last patch
"mmc: sdhci: fix missing cache invalidation after reading by DMA".

Currently, read data are occasionally corrupted due to the
missing cache invalidation.

To fix it nicely (adds dma_unmap_single(), which follows the
Linux coding style), I did some cleaups first.

Patch 01 and 02 fix the prototypes of dma_{map,unmap}_single().

Patch 03-08 are code clean-ups.

Patch 09 fixes the bug.



Masahiro Yamada (9):
  dma-mapping: fix the prototype of dma_map_single()
  dma-mapping: fix the prototype of dma_unmap_single()
  mmc: sdhci: put the aligned buffer pointer to struct sdhci_host
  mmc: sdhci: reduce code duplication for aligned buffer
  mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting
    adma_addr
  mmc: sdhci: remove unneeded casts
  mmc: add mmc_get_dma_dir() helper
  mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA
  mmc: sdhci: fix missing cache invalidation after reading by DMA

 arch/arm/include/asm/dma-mapping.h   |  9 ++-
 arch/nds32/include/asm/dma-mapping.h |  9 ++-
 arch/riscv/include/asm/dma-mapping.h |  9 ++-
 arch/x86/include/asm/dma-mapping.h   |  9 ++-
 drivers/mmc/sdhci.c                  | 96 +++++++++++++---------------
 drivers/mmc/tmio-common.c            |  2 +-
 drivers/mtd/nand/raw/denali.c        |  2 +-
 drivers/net/macb.c                   |  2 +-
 drivers/usb/dwc3/core.c              |  6 +-
 drivers/usb/gadget/udc/udc-core.c    |  2 +-
 include/mmc.h                        |  6 ++
 include/sdhci.h                      |  3 +
 12 files changed, 78 insertions(+), 77 deletions(-)

-- 
2.17.1



More information about the U-Boot mailing list