dma-s3c24xx.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * S3C24XX DMA handling
  3. *
  4. * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the Free
  8. * Software Foundation; either version 2 of the License, or (at your option)
  9. * any later version.
  10. */
  11. /* Helper to encode the source selection constraints for early s3c socs. */
  12. #define S3C24XX_DMA_CHANREQ(src, chan) ((BIT(3) | src) << chan * 4)
  13. enum s3c24xx_dma_bus {
  14. S3C24XX_DMA_APB,
  15. S3C24XX_DMA_AHB,
  16. };
  17. /**
  18. * @bus: on which bus does the peripheral reside - AHB or APB.
  19. * @handshake: is a handshake with the peripheral necessary
  20. * @chansel: channel selection information, depending on variant; reqsel for
  21. * s3c2443 and later and channel-selection map for earlier SoCs
  22. * see CHANSEL doc in s3c2443-dma.c
  23. */
  24. struct s3c24xx_dma_channel {
  25. enum s3c24xx_dma_bus bus;
  26. bool handshake;
  27. u16 chansel;
  28. };
  29. /**
  30. * struct s3c24xx_dma_platdata - platform specific settings
  31. * @num_phy_channels: number of physical channels
  32. * @channels: array of virtual channel descriptions
  33. * @num_channels: number of virtual channels
  34. */
  35. struct s3c24xx_dma_platdata {
  36. int num_phy_channels;
  37. struct s3c24xx_dma_channel *channels;
  38. int num_channels;
  39. };
  40. struct dma_chan;
  41. bool s3c24xx_dma_filter(struct dma_chan *chan, void *param);