cisreg.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * cisreg.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * The initial developer of the original code is David A. Hinds
  9. * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
  10. * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
  11. *
  12. * (C) 1999 David A. Hinds
  13. */
  14. #ifndef _LINUX_CISREG_H
  15. #define _LINUX_CISREG_H
  16. /*
  17. * Offsets from ConfigBase for CIS registers
  18. */
  19. #define CISREG_COR 0x00
  20. #define CISREG_CCSR 0x02
  21. #define CISREG_PRR 0x04
  22. #define CISREG_SCR 0x06
  23. #define CISREG_ESR 0x08
  24. #define CISREG_IOBASE_0 0x0a
  25. #define CISREG_IOBASE_1 0x0c
  26. #define CISREG_IOBASE_2 0x0e
  27. #define CISREG_IOBASE_3 0x10
  28. #define CISREG_IOSIZE 0x12
  29. /*
  30. * Configuration Option Register
  31. */
  32. #define COR_CONFIG_MASK 0x3f
  33. #define COR_MFC_CONFIG_MASK 0x38
  34. #define COR_FUNC_ENA 0x01
  35. #define COR_ADDR_DECODE 0x02
  36. #define COR_IREQ_ENA 0x04
  37. #define COR_LEVEL_REQ 0x40
  38. #define COR_SOFT_RESET 0x80
  39. /*
  40. * Card Configuration and Status Register
  41. */
  42. #define CCSR_INTR_ACK 0x01
  43. #define CCSR_INTR_PENDING 0x02
  44. #define CCSR_POWER_DOWN 0x04
  45. #define CCSR_AUDIO_ENA 0x08
  46. #define CCSR_IOIS8 0x20
  47. #define CCSR_SIGCHG_ENA 0x40
  48. #define CCSR_CHANGED 0x80
  49. /*
  50. * Pin Replacement Register
  51. */
  52. #define PRR_WP_STATUS 0x01
  53. #define PRR_READY_STATUS 0x02
  54. #define PRR_BVD2_STATUS 0x04
  55. #define PRR_BVD1_STATUS 0x08
  56. #define PRR_WP_EVENT 0x10
  57. #define PRR_READY_EVENT 0x20
  58. #define PRR_BVD2_EVENT 0x40
  59. #define PRR_BVD1_EVENT 0x80
  60. /*
  61. * Socket and Copy Register
  62. */
  63. #define SCR_SOCKET_NUM 0x0f
  64. #define SCR_COPY_NUM 0x70
  65. /*
  66. * Extended Status Register
  67. */
  68. #define ESR_REQ_ATTN_ENA 0x01
  69. #define ESR_REQ_ATTN 0x10
  70. /*
  71. * CardBus Function Status Registers
  72. */
  73. #define CBFN_EVENT 0x00
  74. #define CBFN_MASK 0x04
  75. #define CBFN_STATE 0x08
  76. #define CBFN_FORCE 0x0c
  77. /*
  78. * These apply to all the CardBus function registers
  79. */
  80. #define CBFN_WP 0x0001
  81. #define CBFN_READY 0x0002
  82. #define CBFN_BVD2 0x0004
  83. #define CBFN_BVD1 0x0008
  84. #define CBFN_GWAKE 0x0010
  85. #define CBFN_INTR 0x8000
  86. /*
  87. * Extra bits in the Function Event Mask Register
  88. */
  89. #define FEMR_BAM_ENA 0x0020
  90. #define FEMR_PWM_ENA 0x0040
  91. #define FEMR_WKUP_MASK 0x4000
  92. /*
  93. * Indirect Addressing Registers for Zoomed Video: these are addresses
  94. * in common memory space
  95. */
  96. #define CISREG_ICTRL0 0x02 /* control registers */
  97. #define CISREG_ICTRL1 0x03
  98. #define CISREG_IADDR0 0x04 /* address registers */
  99. #define CISREG_IADDR1 0x05
  100. #define CISREG_IADDR2 0x06
  101. #define CISREG_IADDR3 0x07
  102. #define CISREG_IDATA0 0x08 /* data registers */
  103. #define CISREG_IDATA1 0x09
  104. #define ICTRL0_COMMON 0x01
  105. #define ICTRL0_AUTOINC 0x02
  106. #define ICTRL0_BYTEGRAN 0x04
  107. #endif /* _LINUX_CISREG_H */