dma-s3c24xx.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * S3C24XX DMA handling
  4. *
  5. * Copyright (c) 2013 Heiko Stuebner <[email protected]>
  6. */
  7. /* Helper to encode the source selection constraints for early s3c socs. */
  8. #define S3C24XX_DMA_CHANREQ(src, chan) ((BIT(3) | src) << chan * 4)
  9. enum s3c24xx_dma_bus {
  10. S3C24XX_DMA_APB,
  11. S3C24XX_DMA_AHB,
  12. };
  13. /**
  14. * @bus: on which bus does the peripheral reside - AHB or APB.
  15. * @handshake: is a handshake with the peripheral necessary
  16. * @chansel: channel selection information, depending on variant; reqsel for
  17. * s3c2443 and later and channel-selection map for earlier SoCs
  18. * see CHANSEL doc in s3c2443-dma.c
  19. */
  20. struct s3c24xx_dma_channel {
  21. enum s3c24xx_dma_bus bus;
  22. bool handshake;
  23. u16 chansel;
  24. };
  25. struct dma_slave_map;
  26. /**
  27. * struct s3c24xx_dma_platdata - platform specific settings
  28. * @num_phy_channels: number of physical channels
  29. * @channels: array of virtual channel descriptions
  30. * @num_channels: number of virtual channels
  31. * @slave_map: dma slave map matching table
  32. * @slavecnt: number of elements in slave_map
  33. */
  34. struct s3c24xx_dma_platdata {
  35. int num_phy_channels;
  36. struct s3c24xx_dma_channel *channels;
  37. int num_channels;
  38. const struct dma_slave_map *slave_map;
  39. int slavecnt;
  40. };
  41. struct dma_chan;
  42. bool s3c24xx_dma_filter(struct dma_chan *chan, void *param);