calculationAnalysisOfLeakageCurrentConsumption.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * Copyright(c) 2006, Intel Corporation.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms and conditions of the GNU General Public License,
  6. * version 2, as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along with
  14. * this program; if not, write to the Free Software Foundation, Inc.,
  15. * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  16. *
  17. */
  18. #ifndef _ADMA_H
  19. #define _ADMA_H
  20. #include <linux/types.h>
  21. #include <linux/io.h>
  22. #include <mach/hardware.h>
  23. #include <asm/hardware/iop_adma.h>
  24. #define ADMA_ACCR(chan) (chan->mmr_base + 0x0)
  25. #define ADMA_ACSR(chan) (chan->mmr_base + 0x4)
  26. #define ADMA_ADAR(chan) (chan->mmr_base + 0x8)
  27. #define ADMA_IIPCR(chan) (chan->mmr_base + 0x18)
  28. #define ADMA_IIPAR(chan) (chan->mmr_base + 0x1c)
  29. #define ADMA_IIPUAR(chan) (chan->mmr_base + 0x20)
  30. #define ADMA_ANDAR(chan) (chan->mmr_base + 0x24)
  31. #define ADMA_ADCR(chan) (chan->mmr_base + 0x28)
  32. #define ADMA_CARMD(chan) (chan->mmr_base + 0x2c)
  33. #define ADMA_ABCR(chan) (chan->mmr_base + 0x30)
  34. #define ADMA_DLADR(chan) (chan->mmr_base + 0x34)
  35. #define ADMA_DUADR(chan) (chan->mmr_base + 0x38)
  36. #define ADMA_SLAR(src, chan) (chan->mmr_base + (0x3c + (src << 3)))
  37. #define ADMA_SUAR(src, chan) (chan->mmr_base + (0x40 + (src << 3)))
  38. struct iop13xx_adma_src {
  39. u32 src_addr;
  40. union {
  41. u32 upper_src_addr;
  42. struct {
  43. unsigned int pq_upper_src_addr:24;
  44. unsigned int pq_dmlt:8;
  45. };
  46. };
  47. };
  48. struct iop13xx_adma_desc_ctrl {
  49. unsigned int int_en:1;
  50. unsigned int xfer_dir:2;
  51. unsigned int src_select:4;
  52. unsigned int zero_result:1;
  53. unsigned int block_fill_en:1;
  54. unsigned int crc_gen_en:1;
  55. unsigned int crc_xfer_dis:1;
  56. unsigned int crc_seed_fetch_dis:1;
  57. unsigned int status_write_back_en:1;
  58. unsigned int endian_swap_en:1;
  59. unsigned int reserved0:2;
  60. unsigned int pq_update_xfer_en:1;
  61. unsigned int dual_xor_en:1;
  62. unsigned int pq_xfer_en:1;
  63. unsigned int p_xfer_dis:1;
  64. unsigned int reserved1:10;
  65. unsigned int relax_order_en:1;
  66. unsigned int no_snoop_en:1;
  67. };
  68. struct iop13xx_adma_byte_count {
  69. unsigned int byte_count:24;
  70. unsigned int host_if:3;
  71. unsigned int reserved:2;
  72. unsigned int zero_result_err_q:1;
  73. unsigned int zero_result_err:1;
  74. unsigned int tx_complete:1;
  75. };
  76. struct iop13xx_adma_desc_hw {
  77. u32 next_desc;
  78. union {
  79. u32 desc_ctrl;
  80. struct iop13xx_adma_desc_ctrl desc_ctrl_field;
  81. };
  82. union {
  83. u32 crc_addr;
  84. u32 block_fill_data;
  85. u32 q_dest_addr;
  86. };
  87. union {
  88. u32 byte_count;
  89. struct iop13xx_adma_byte_count byte_count_field;
  90. };
  91. union {
  92. u32 dest_addr;
  93. u32 p_dest_addr;
  94. };
  95. union {
  96. u32 upper_dest_addr;
  97. u32 pq_upper_dest_addr;
  98. };
  99. struct iop13xx_adma_src src[1];
  100. };
  101. struct iop13xx_adma_desc_dual_xor {
  102. u32 next_desc;
  103. u32 desc_ctrl;
  104. u32 reserved;
  105. u32 byte_count;
  106. u32 h_dest_addr;
  107. u32 h_upper_dest_addr;
  108. u32 src0_addr;
  109. u32 upper_src0_addr;
  110. u32 src1_addr;
  111. u32 upper_src1_addr;
  112. u32 h_src_addr;
  113. u32 h_upper_src_addr;
  114. u32 d_src_addr;
  115. u32 d_upper_src_addr;
  116. u32 d_dest_addr;
  117. u32 d_upper_dest_addr;
  118. };