You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.8 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * edma.h
  3. *
  4. * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation version 2.
  9. *
  10. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  11. * kind, whether express or implied; without even the implied warranty
  12. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. /*
  16. * ============================================================================
  17. * Copyright (c) Texas Instruments Inc 2010-11
  18. *
  19. * Use of this software is controlled by the terms and conditions found in the
  20. * license agreement under which this software has been supplied or provided.
  21. * ============================================================================
  22. */
  23. #ifndef _EDMADRV_H
  24. #define _EDMADRV_H
  25. #include <linux/ioctl.h>
  26. #if defined (__cplusplus)
  27. extern "C" {
  28. #endif
  29. #define MAX_EDMA_CHANNELS 8
  30. typedef struct _memcpy {
  31. int channel;
  32. unsigned int srcaddr;
  33. unsigned int dstaddr;
  34. unsigned int len;
  35. } memcpyparams_t;
  36. typedef struct _memset {
  37. int channel;
  38. unsigned int dstaddr;
  39. unsigned int patternaddr;
  40. unsigned int len;
  41. } memsetparams_t;
  42. #define DRIVER_MAJOR 0 // define major number if 0 driver search for a free number
  43. //define magic number for ioctl function
  44. #define EDMADRV_IOC_MAGIC 0xE2
  45. #define EDMADRV_IOCALLOC_EDMA _IOW(EDMADRV_IOC_MAGIC, 1, int)
  46. #define EDMADRV_IOCMEMCPY_EDMA _IOR(EDMADRV_IOC_MAGIC, 2, memcpyparams_t*)
  47. #define EDMADRV_IOCMEMSET_EDMA _IOR(EDMADRV_IOC_MAGIC, 3, memsetparams_t*)
  48. #define EDMADRV_IOCFREE_EDMA _IOR(EDMADRV_IOC_MAGIC, 4, int)
  49. #if defined (__cplusplus)
  50. }
  51. #endif
  52. #endif