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.

70 lines
2.7 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * edma.h
  3. *
  4. * EDMA user space library - Allocates EDMA channel for memory to memory
  5. * copy using kernel DMA API. Allocates from the same TC (Transfer Controller)
  6. * so that multiple bus masters (ARM9 and PRU) can read/write to shared memory
  7. * using EDMA and EDMA h/w will take care of data integrity.
  8. *
  9. * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
  10. *
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions
  14. * are met:
  15. *
  16. * Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. *
  19. * Redistributions in binary form must reproduce the above copyright
  20. * notice, this list of conditions and the following disclaimer in the
  21. * documentation and/or other materials provided with the
  22. * distribution.
  23. *
  24. * Neither the name of Texas Instruments Incorporated nor the names of
  25. * its contributors may be used to endorse or promote products derived
  26. * from this software without specific prior written permission.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  30. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  31. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  32. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  35. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  36. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  38. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. */
  41. /*
  42. * ============================================================================
  43. * Copyright (c) Texas Instruments Inc 2010-11
  44. *
  45. * Use of this software is controlled by the terms and conditions found in the
  46. * license agreement under which this software has been supplied or provided.
  47. * ============================================================================
  48. */
  49. #ifndef _EDMA_H
  50. #define _EDMA_H
  51. #include <sys/types.h>
  52. #if defined (__cplusplus)
  53. extern "C" {
  54. #endif
  55. int edma_allocate_channel(int *channel);
  56. int edma_memcpy(int channel, unsigned int dst, unsigned int src,
  57. unsigned int length);
  58. int edma_memset(int channel, unsigned int dst,
  59. unsigned int patternaddr, unsigned int length);
  60. int edma_free_channel(int channel);
  61. #if defined (__cplusplus)
  62. }
  63. #endif
  64. #endif