dma.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * dma.h - Blackfin DMA defines/structures/etc...
  3. *
  4. * Copyright 2004-2008 Analog Devices Inc.
  5. * Licensed under the GPL-2 or later.
  6. */
  7. #ifndef _BLACKFIN_DMA_H_
  8. #define _BLACKFIN_DMA_H_
  9. #include <linux/types.h>
  10. #ifdef __ADSPBF60x__
  11. #include <asm/mach-common/bits/dde.h>
  12. #else
  13. #include <asm/mach-common/bits/dma.h>
  14. #endif
  15. struct dmasg_large {
  16. void *next_desc_addr;
  17. u32 start_addr;
  18. u16 cfg;
  19. u16 x_count;
  20. s16 x_modify;
  21. u16 y_count;
  22. s16 y_modify;
  23. } __attribute__((packed));
  24. struct dmasg {
  25. u32 start_addr;
  26. u16 cfg;
  27. u16 x_count;
  28. s16 x_modify;
  29. u16 y_count;
  30. s16 y_modify;
  31. } __attribute__((packed));
  32. struct dma_register {
  33. #ifdef __ADSPBF60x__
  34. void *next_desc_ptr; /* DMA Next Descriptor Pointer register */
  35. u32 start_addr; /* DMA Start address register */
  36. u32 config; /* DMA Configuration register */
  37. u32 x_count; /* DMA x_count register */
  38. s32 x_modify; /* DMA x_modify register */
  39. u32 y_count; /* DMA y_count register */
  40. s32 y_modify; /* DMA y_modify register */
  41. u32 __pad0[2];
  42. void *curr_desc_ptr; /* DMA Curr Descriptor Pointer register */
  43. void *prev_desc_ptr; /* DMA Prev Descriptor Pointer register */
  44. void *curr_addr; /* DMA Current Address Pointer register */
  45. u32 status; /* DMA irq status register */
  46. u32 curr_x_count; /* DMA Current x-count register */
  47. u32 curr_y_count; /* DMA Current y-count register */
  48. u32 __pad1[2];
  49. u32 bw_limit; /* DMA Bandwidth Limit Count */
  50. u32 curr_bw_limit; /* DMA curr Bandwidth Limit Count */
  51. u32 bw_monitor; /* DMA Bandwidth Monitor Count */
  52. u32 curr_bw_monitor; /* DMA curr Bandwidth Monitor Count */
  53. #else
  54. void *next_desc_ptr; /* DMA Next Descriptor Pointer register */
  55. u32 start_addr; /* DMA Start address register */
  56. u16 config; /* DMA Configuration register */
  57. u16 dummy1; /* DMA Configuration register */
  58. u32 reserved;
  59. u16 x_count; /* DMA x_count register */
  60. u16 dummy2;
  61. s16 x_modify; /* DMA x_modify register */
  62. u16 dummy3;
  63. u16 y_count; /* DMA y_count register */
  64. u16 dummy4;
  65. s16 y_modify; /* DMA y_modify register */
  66. u16 dummy5;
  67. void *curr_desc_ptr; /* DMA Current Descriptor Pointer register */
  68. u32 curr_addr_ptr; /* DMA Current Address Pointer register */
  69. u16 status; /* DMA irq status register */
  70. u16 dummy6;
  71. u16 peripheral_map; /* DMA peripheral map register */
  72. u16 dummy7;
  73. u16 curr_x_count; /* DMA Current x-count register */
  74. u16 dummy8;
  75. u32 reserved2;
  76. u16 curr_y_count; /* DMA Current y-count register */
  77. u16 dummy9;
  78. u32 reserved3;
  79. #endif
  80. };
  81. #endif