dmac.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * TXx9 SoC DMA Controller
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef __ASM_TXX9_DMAC_H
  9. #define __ASM_TXX9_DMAC_H
  10. #include <linux/dmaengine.h>
  11. #define TXX9_DMA_MAX_NR_CHANNELS 4
  12. /**
  13. * struct txx9dmac_platform_data - Controller configuration parameters
  14. * @memcpy_chan: Channel used for DMA_MEMCPY
  15. * @have_64bit_regs: DMAC have 64 bit registers
  16. */
  17. struct txx9dmac_platform_data {
  18. int memcpy_chan;
  19. bool have_64bit_regs;
  20. };
  21. /**
  22. * struct txx9dmac_chan_platform_data - Channel configuration parameters
  23. * @dmac_dev: A platform device for DMAC
  24. */
  25. struct txx9dmac_chan_platform_data {
  26. struct platform_device *dmac_dev;
  27. };
  28. /**
  29. * struct txx9dmac_slave - Controller-specific information about a slave
  30. * @tx_reg: physical address of data register used for
  31. * memory-to-peripheral transfers
  32. * @rx_reg: physical address of data register used for
  33. * peripheral-to-memory transfers
  34. * @reg_width: peripheral register width
  35. */
  36. struct txx9dmac_slave {
  37. u64 tx_reg;
  38. u64 rx_reg;
  39. unsigned int reg_width;
  40. };
  41. void txx9_dmac_init(int id, unsigned long baseaddr, int irq,
  42. const struct txx9dmac_platform_data *pdata);
  43. #endif /* __ASM_TXX9_DMAC_H */