mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC 0/2] dma: clean up streaming DMA API
@ 2023-02-28 10:32 Denis Orlov
  2023-02-28 10:32 ` [RFC 1/2] dma: rework dma_sync_single interface Denis Orlov
  2023-02-28 10:32 ` [RFC 2/2] dma: update dma_sync_single uses in drivers Denis Orlov
  0 siblings, 2 replies; 5+ messages in thread
From: Denis Orlov @ 2023-02-28 10:32 UTC (permalink / raw)
  To: barebox; +Cc: Denis Orlov, Ahmad Fatoum

This fixes some incoherence between dma_map/free_coherent() and
dma_sync_single_for_*() functions. While the former do appropriate
cpu/dma conversions, the latter do not. This also fixes streaming DMA
for MIPS CPUs and cleans up the interface somewhat.

I want to get some thoughts on whether those are the appropriate changes
to make and if I missed something important.

The changes are split in two parts for now so it would be easier to
review them. The first commit is the main part. It contains interface
changes and arch-specific code adjustments. The second one just updates
the functions usage in drivers.

Denis Orlov (2):
  dma: rework dma_sync_single interface
  dma: update dma_sync_single uses in drivers

 arch/arm/cpu/mmu-common.c            |   9 +--
 arch/arm/cpu/mmu.c                   |  17 +++--
 arch/arm/cpu/mmu_64.c                |  13 ++--
 arch/arm/include/asm/dma.h           |  12 ++--
 arch/arm/mach-bcm283x/mbox.c         |   4 +-
 arch/kvx/lib/dma-default.c           |  16 +++--
 arch/mips/lib/dma-default.c          |  12 ++--
 arch/riscv/cpu/dma.c                 |  23 +++---
 arch/riscv/include/asm/dma.h         |   4 +-
 arch/sandbox/include/asm/dma.h       |  12 ++--
 arch/x86/include/asm/dma.h           |  12 ++--
 drivers/crypto/caam/caam-blobgen.c   |  28 ++++----
 drivers/crypto/caam/caamrng.c        |   6 +-
 drivers/crypto/caam/rng_self_test.c  |   6 +-
 drivers/dma/Makefile                 |   1 -
 drivers/dma/map.c                    |  39 -----------
 drivers/mci/dove-sdhci.c             |   8 +--
 drivers/mci/stm32_sdmmc2.c           |   8 +--
 drivers/mci/tegra-sdmmc.c            |   8 +--
 drivers/net/ag71xx.c                 |   8 +--
 drivers/net/arc_emac.c               |  10 +--
 drivers/net/at91_ether.c             |   8 +--
 drivers/net/bcmgenet.c               |   4 +-
 drivers/net/cpsw.c                   |   8 +--
 drivers/net/davinci_emac.c           |   8 +--
 drivers/net/designware.c             |  10 +--
 drivers/net/designware_eqos.c        |   4 +-
 drivers/net/e1000/main.c             |   4 +-
 drivers/net/fec_imx.c                |   4 +-
 drivers/net/fsl-fman.c               |   7 +-
 drivers/net/macb.c                   |  20 +++---
 drivers/net/mvneta.c                 |   8 +--
 drivers/net/orion-gbe.c              |   8 +--
 drivers/net/rtl8169.c                |  12 ++--
 drivers/soc/sifive/sifive_l2_cache.c |   2 +-
 drivers/soc/starfive/jh7100_dma.c    |   2 +-
 drivers/usb/gadget/fsl_udc.c         |   4 +-
 drivers/usb/host/ohci-hcd.c          |   6 +-
 include/dma.h                        | 101 +++++++++++++++++++--------
 39 files changed, 240 insertions(+), 236 deletions(-)
 delete mode 100644 drivers/dma/map.c

-- 
2.30.2




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-06 13:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 10:32 [RFC 0/2] dma: clean up streaming DMA API Denis Orlov
2023-02-28 10:32 ` [RFC 1/2] dma: rework dma_sync_single interface Denis Orlov
2023-03-03 10:06   ` Sascha Hauer
2023-03-06 13:56     ` Denis Orlov
2023-02-28 10:32 ` [RFC 2/2] dma: update dma_sync_single uses in drivers Denis Orlov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox