cryp_irqp.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /**
  2. * Copyright (C) ST-Ericsson SA 2010
  3. * Author: Shujuan Chen <shujuan.chen@stericsson.com> for ST-Ericsson.
  4. * Author: Jonas Linde <jonas.linde@stericsson.com> for ST-Ericsson.
  5. * Author: Joakim Bech <joakim.xx.bech@stericsson.com> for ST-Ericsson.
  6. * Author: Berne Hebark <berne.herbark@stericsson.com> for ST-Ericsson.
  7. * Author: Niklas Hernaeus <niklas.hernaeus@stericsson.com> for ST-Ericsson.
  8. * License terms: GNU General Public License (GPL) version 2
  9. */
  10. #ifndef __CRYP_IRQP_H_
  11. #define __CRYP_IRQP_H_
  12. #include "cryp_irq.h"
  13. /**
  14. *
  15. * CRYP Registers - Offset mapping
  16. * +-----------------+
  17. * 00h | CRYP_CR | Configuration register
  18. * +-----------------+
  19. * 04h | CRYP_SR | Status register
  20. * +-----------------+
  21. * 08h | CRYP_DIN | Data In register
  22. * +-----------------+
  23. * 0ch | CRYP_DOUT | Data out register
  24. * +-----------------+
  25. * 10h | CRYP_DMACR | DMA control register
  26. * +-----------------+
  27. * 14h | CRYP_IMSC | IMSC
  28. * +-----------------+
  29. * 18h | CRYP_RIS | Raw interrupt status
  30. * +-----------------+
  31. * 1ch | CRYP_MIS | Masked interrupt status.
  32. * +-----------------+
  33. * Key registers
  34. * IVR registers
  35. * Peripheral
  36. * Cell IDs
  37. *
  38. * Refer data structure for other register map
  39. */
  40. /**
  41. * struct cryp_register
  42. * @cr - Configuration register
  43. * @status - Status register
  44. * @din - Data input register
  45. * @din_size - Data input size register
  46. * @dout - Data output register
  47. * @dout_size - Data output size register
  48. * @dmacr - Dma control register
  49. * @imsc - Interrupt mask set/clear register
  50. * @ris - Raw interrupt status
  51. * @mis - Masked interrupt statu register
  52. * @key_1_l - Key register 1 L
  53. * @key_1_r - Key register 1 R
  54. * @key_2_l - Key register 2 L
  55. * @key_2_r - Key register 2 R
  56. * @key_3_l - Key register 3 L
  57. * @key_3_r - Key register 3 R
  58. * @key_4_l - Key register 4 L
  59. * @key_4_r - Key register 4 R
  60. * @init_vect_0_l - init vector 0 L
  61. * @init_vect_0_r - init vector 0 R
  62. * @init_vect_1_l - init vector 1 L
  63. * @init_vect_1_r - init vector 1 R
  64. * @cryp_unused1 - unused registers
  65. * @itcr - Integration test control register
  66. * @itip - Integration test input register
  67. * @itop - Integration test output register
  68. * @cryp_unused2 - unused registers
  69. * @periphId0 - FE0 CRYP Peripheral Identication Register
  70. * @periphId1 - FE4
  71. * @periphId2 - FE8
  72. * @periphId3 - FEC
  73. * @pcellId0 - FF0 CRYP PCell Identication Register
  74. * @pcellId1 - FF4
  75. * @pcellId2 - FF8
  76. * @pcellId3 - FFC
  77. */
  78. struct cryp_register {
  79. u32 cr; /* Configuration register */
  80. u32 sr; /* Status register */
  81. u32 din; /* Data input register */
  82. u32 din_size; /* Data input size register */
  83. u32 dout; /* Data output register */
  84. u32 dout_size; /* Data output size register */
  85. u32 dmacr; /* Dma control register */
  86. u32 imsc; /* Interrupt mask set/clear register */
  87. u32 ris; /* Raw interrupt status */
  88. u32 mis; /* Masked interrupt statu register */
  89. u32 key_1_l; /*Key register 1 L */
  90. u32 key_1_r; /*Key register 1 R */
  91. u32 key_2_l; /*Key register 2 L */
  92. u32 key_2_r; /*Key register 2 R */
  93. u32 key_3_l; /*Key register 3 L */
  94. u32 key_3_r; /*Key register 3 R */
  95. u32 key_4_l; /*Key register 4 L */
  96. u32 key_4_r; /*Key register 4 R */
  97. u32 init_vect_0_l; /*init vector 0 L */
  98. u32 init_vect_0_r; /*init vector 0 R */
  99. u32 init_vect_1_l; /*init vector 1 L */
  100. u32 init_vect_1_r; /*init vector 1 R */
  101. u32 cryp_unused1[(0x80 - 0x58) / sizeof(u32)]; /* unused registers */
  102. u32 itcr; /*Integration test control register */
  103. u32 itip; /*Integration test input register */
  104. u32 itop; /*Integration test output register */
  105. u32 cryp_unused2[(0xFE0 - 0x8C) / sizeof(u32)]; /* unused registers */
  106. u32 periphId0; /* FE0 CRYP Peripheral Identication Register */
  107. u32 periphId1; /* FE4 */
  108. u32 periphId2; /* FE8 */
  109. u32 periphId3; /* FEC */
  110. u32 pcellId0; /* FF0 CRYP PCell Identication Register */
  111. u32 pcellId1; /* FF4 */
  112. u32 pcellId2; /* FF8 */
  113. u32 pcellId3; /* FFC */
  114. };
  115. #endif