dmac.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * TXx9 SoC DMA Controller
  4. */
  5. #ifndef __ASM_TXX9_DMAC_H
  6. #define __ASM_TXX9_DMAC_H
  7. #include <linux/dmaengine.h>
  8. #define TXX9_DMA_MAX_NR_CHANNELS 4
  9. /**
  10. * struct txx9dmac_platform_data - Controller configuration parameters
  11. * @memcpy_chan: Channel used for DMA_MEMCPY
  12. * @have_64bit_regs: DMAC have 64 bit registers
  13. */
  14. struct txx9dmac_platform_data {
  15. int memcpy_chan;
  16. bool have_64bit_regs;
  17. };
  18. /**
  19. * struct txx9dmac_chan_platform_data - Channel configuration parameters
  20. * @dmac_dev: A platform device for DMAC
  21. */
  22. struct txx9dmac_chan_platform_data {
  23. struct platform_device *dmac_dev;
  24. };
  25. /**
  26. * struct txx9dmac_slave - Controller-specific information about a slave
  27. * @tx_reg: physical address of data register used for
  28. * memory-to-peripheral transfers
  29. * @rx_reg: physical address of data register used for
  30. * peripheral-to-memory transfers
  31. * @reg_width: peripheral register width
  32. */
  33. struct txx9dmac_slave {
  34. u64 tx_reg;
  35. u64 rx_reg;
  36. unsigned int reg_width;
  37. };
  38. void txx9_dmac_init(int id, unsigned long baseaddr, int irq,
  39. const struct txx9dmac_platform_data *pdata);
  40. #endif /* __ASM_TXX9_DMAC_H */