timb_dma.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * timb_dma.h timberdale FPGA DMA driver defines
  3. * Copyright (c) 2010 Intel Corporation
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. /* Supports:
  19. * Timberdale FPGA DMA engine
  20. */
  21. #ifndef _LINUX_TIMB_DMA_H
  22. #define _LINUX_TIMB_DMA_H
  23. /**
  24. * struct timb_dma_platform_data_channel - Description of each individual
  25. * DMA channel for the timberdale DMA driver
  26. * @rx: true if this channel handles data in the direction to
  27. * the CPU.
  28. * @bytes_per_line: Number of bytes per line, this is specific for channels
  29. * handling video data. For other channels this shall be left to 0.
  30. * @descriptors: Number of descriptors to allocate for this channel.
  31. * @descriptor_elements: Number of elements in each descriptor.
  32. *
  33. */
  34. struct timb_dma_platform_data_channel {
  35. bool rx;
  36. unsigned int bytes_per_line;
  37. unsigned int descriptors;
  38. unsigned int descriptor_elements;
  39. };
  40. /**
  41. * struct timb_dma_platform_data - Platform data of the timberdale DMA driver
  42. * @nr_channels: Number of defined channels in the channels array.
  43. * @channels: Definition of the each channel.
  44. *
  45. */
  46. struct timb_dma_platform_data {
  47. unsigned nr_channels;
  48. struct timb_dma_platform_data_channel channels[32];
  49. };
  50. #endif