mantis_reg.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. Mantis PCI bridge driver
  3. Copyright (C) 2005, 2006 Manu Abraham (abraham.manu@gmail.com)
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef __MANTIS_REG_H
  17. #define __MANTIS_REG_H
  18. // Interrupts
  19. #define MANTIS_INT_STAT 0x00
  20. #define MANTIS_INT_MASK 0x04
  21. #define MANTIS_INT_RISCSTAT (0x0f << 28)
  22. #define MANTIS_INT_RISCEN (0x01 << 27)
  23. #define MANTIS_INT_I2CRACK (0x01 << 26)
  24. //#define MANTIS_INT_GPIF (0xff << 12)
  25. #define MANTIS_INT_PCMCIA7 (0x01 << 19)
  26. #define MANTIS_INT_PCMCIA6 (0x01 << 18)
  27. #define MANTIS_INT_PCMCIA5 (0x01 << 17)
  28. #define MANTIS_INT_PCMCIA4 (0x01 << 16)
  29. #define MANTIS_INT_PCMCIA3 (0x01 << 15)
  30. #define MANTIS_INT_PCMCIA2 (0x01 << 14)
  31. #define MANTIS_INT_PCMCIA1 (0x01 << 13)
  32. #define MANTIS_INT_PCMCIA0 (0x01 << 12)
  33. #define MANTIS_INT_IRQ1 (0x01 << 11)
  34. #define MANTIS_INT_IRQ0 (0x01 << 10)
  35. #define MANTIS_INT_OCERR (0x01 << 8)
  36. #define MANTIS_INT_PABORT (0x01 << 7)
  37. #define MANTIS_INT_RIPERR (0x01 << 6)
  38. #define MANTIS_INT_PPERR (0x01 << 5)
  39. #define MANTIS_INT_FTRGT (0x01 << 3)
  40. #define MANTIS_INT_RISCI (0x01 << 1)
  41. #define MANTIS_INT_I2CDONE (0x01 << 0)
  42. // DMA
  43. #define MANTIS_DMA_CTL 0x08
  44. #define MANTIS_I2C_RD (0x01 << 7)
  45. #define MANTIS_I2C_WR (0x01 << 6)
  46. #define MANTIS_DCAP_MODE (0x01 << 5)
  47. #define MANTIS_FIFO_TP_4 (0x00 << 3)
  48. #define MANTIS_FIFO_TP_8 (0x01 << 3)
  49. #define MANTIS_FIFO_TP_16 (0x02 << 3)
  50. #define MANTIS_FIFO_EN (0x01 << 2)
  51. #define MANTIS_DCAP_EN (0x01 << 1)
  52. #define MANTIS_RISC_EN (0x01 << 0)
  53. #define MANTIS_RISC_START 0x10
  54. #define MANTIS_RISC_PC 0x14
  55. // I2C
  56. #define MANTIS_I2CDATA_CTL 0x18
  57. #define MANTIS_I2C_RATE_1 (0x00 << 6)
  58. #define MANTIS_I2C_RATE_2 (0x01 << 6)
  59. #define MANTIS_I2C_RATE_3 (0x02 << 6)
  60. #define MANTIS_I2C_RATE_4 (0x03 << 6)
  61. #define MANTIS_I2C_STOP (0x01 << 5)
  62. #define MANTIS_I2C_PGMODE (0x01 << 3)
  63. #define MANTIS_GPIF_IRQCFG 0x98
  64. #define MANTIS_GPIF_IRQPOL (0x01 << 8)
  65. #define MANTIS_MASK_WRACK (0x01 << 7)
  66. #define MANTIS_MASK_BRRDY (0x01 << 6)
  67. #define MANTIS_MASK_OVFLW (0x01 << 5)
  68. #define MANTIS_MASK_OTHERR (0x01 << 4)
  69. #define MANTIS_MASK_WSTO (0x01 << 3)
  70. #define MANTIS_MASK_EXTIRQ (0x01 << 2)
  71. #define MANTIS_MASK_PLUGIN (0x01 << 1)
  72. #define MANTIS_MASK_PLUGOUT (0x01 << 0)
  73. #define MANTIS_GPIF_STATUS 0x9c
  74. #define MANTIS_SBUF_KILLOP (0x01 << 15)
  75. #define MANTIS_SBUF_OPDONE (0x01 << 14)
  76. #define MANTIS_SBUF_EMPTY (0x01 << 13)
  77. #define MANTIS_GPIF_DETSTAT (0x01 << 9)
  78. #define MANTIS_GPIF_INTSTAT (0x01 << 8)
  79. #define MANTIS_GPIF_WRACK (0x01 << 7)
  80. #define MANTIS_GPIF_BRRDY (0x01 << 6)
  81. #define MANTIS_SBUF_OVFLW (0x01 << 5)
  82. #define MANTIS_GPIF_OTHERR (0x01 << 4)
  83. #define MANTIS_SBUF_WSTO (0x01 << 3)
  84. #define MANTIS_GPIF_EXTIRQ (0x01 << 2)
  85. #define MANTIS_CARD_PLUGIN (0x01 << 1)
  86. #define MANTIS_CARD_PLUGOUT (0x01 << 0)
  87. #define MANTIS_GPIF_ADDR 0xb0
  88. #define MANTIS_GPIF_RDWRN (0x01 << 31)
  89. #define MANTIS_GPIF_DOUT 0xb4
  90. #define MANTIS_GPIF_DIN 0xb8
  91. #endif //__MANTIS_REG_H