Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

627 lines
19 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. exca.h
  5. Abstract:
  6. This module defines the 82365SL chip, and subsequent chips based on it.
  7. Author(s):
  8. Jeff McLeman (mcleman@zso.dec.com)
  9. Revisions:
  10. Added misc stuff
  11. Ravisankar Pudipeddi (ravisp) 1 Dec 1996
  12. --*/
  13. #ifndef _PCMCIA_EXCA_H_
  14. #define _PCMCIA_EXCA_H_
  15. //
  16. // For initial debug
  17. //
  18. #define PCMCIA_PROTO 1
  19. //
  20. // Memory window sizes that will be allocated
  21. // for this controller - to map card memory
  22. //
  23. #define PCIC_WINDOW_SIZE 0x1000 //(4K)
  24. #define PCIC_WINDOW_ALIGNMENT 0x1000 //(4K)
  25. //
  26. // Define on chip registers
  27. //
  28. #define PCIC_IDENT 0x00
  29. #define PCIC_STATUS 0x01
  30. #define PCIC_PWR_RST 0x02
  31. #define PCIC_INTERRUPT 0x03
  32. #define PCIC_CARD_CHANGE 0x04
  33. #define PCIC_CARD_INT_CONFIG 0x05
  34. #define PCIC_ADD_WIN_ENA 0x06
  35. #define PCIC_IO_CONTROL 0x07
  36. #define PCIC_IO_ADD0_STRT_L 0x08
  37. #define PCIC_IO_ADD0_STRT_H 0x09
  38. #define PCIC_IO_ADD0_STOP_L 0x0a
  39. #define PCIC_IO_ADD0_STOP_H 0x0b
  40. #define PCIC_IO_ADD1_STRT_L 0x0c
  41. #define PCIC_IO_ADD1_STRT_H 0x0d
  42. #define PCIC_IO_ADD1_STOP_L 0x0e
  43. #define PCIC_IO_ADD1_STOP_H 0x0f
  44. #define PCIC_MEM_ADD0_STRT_L 0x10
  45. #define PCIC_MEM_ADD0_STRT_H 0x11
  46. #define PCIC_MEM_ADD0_STOP_L 0x12
  47. #define PCIC_MEM_ADD0_STOP_H 0x13
  48. #define PCIC_CRDMEM_OFF_ADD0_L 0x14
  49. #define PCIC_CRDMEM_OFF_ADD0_H 0x15
  50. #define PCIC_MEM_ADD1_STRT_L 0x18
  51. #define PCIC_MEM_ADD1_STRT_H 0x19
  52. #define PCIC_MEM_ADD1_STOP_L 0x1a
  53. #define PCIC_MEM_ADD1_STOP_H 0x1b
  54. #define PCIC_CRDMEM_OFF_ADD1_L 0x1c
  55. #define PCIC_CRDMEM_OFF_ADD1_H 0x1d
  56. #define PCIC_MEM_ADD2_STRT_L 0x20
  57. #define PCIC_MEM_ADD2_STRT_H 0x21
  58. #define PCIC_MEM_ADD2_STOP_L 0x22
  59. #define PCIC_MEM_ADD2_STOP_H 0x23
  60. #define PCIC_CRDMEM_OFF_ADD2_L 0x24
  61. #define PCIC_CRDMEM_OFF_ADD2_H 0x25
  62. #define PCIC_MEM_ADD3_STRT_L 0x28
  63. #define PCIC_MEM_ADD3_STRT_H 0x29
  64. #define PCIC_MEM_ADD3_STOP_L 0x2a
  65. #define PCIC_MEM_ADD3_STOP_H 0x2b
  66. #define PCIC_CRDMEM_OFF_ADD3_L 0x2c
  67. #define PCIC_CRDMEM_OFF_ADD3_H 0x2d
  68. #define PCIC_MEM_ADD4_STRT_L 0x30
  69. #define PCIC_MEM_ADD4_STRT_H 0x31
  70. #define PCIC_MEM_ADD4_STOP_L 0x32
  71. #define PCIC_MEM_ADD4_STOP_H 0x33
  72. #define PCIC_CRDMEM_OFF_ADD4_L 0x34
  73. #define PCIC_CRDMEM_OFF_ADD4_H 0x35
  74. #define PCIC_IO_WIN0_OFFSET_L 0x36
  75. #define PCIC_IO_WIN0_OFFSET_H 0x37
  76. #define PCIC_IO_WIN1_OFFSET_L 0x38
  77. #define PCIC_IO_WIN1_OFFSET_H 0x39
  78. //
  79. // TI registers
  80. //
  81. #define PCIC_TI_CARD_DETECT 0x16
  82. #define PCIC_TI_GLOBAL_CONTROL 0x1e
  83. //
  84. // Topic registers
  85. //
  86. #define PCIC_TO_ADDITIONAL_GENCTRL 0x16
  87. #define PCIC_TO_MMI_CTRL 0x3c
  88. #define PCIC_TO_FUNC_CTRL 0x3e
  89. //
  90. // RICOH registers
  91. //
  92. #define PCIC_RICOH_MISC_CTRL1 0x2f
  93. //
  94. // Other Cirrus Logic registers
  95. //
  96. #define PCIC_CL_MISC_CTRL1 0x16
  97. #define PCIC_CL_MISC_CTRL2 0x1e
  98. #define PCIC_CL_CHIP_INFO 0x1f
  99. #define PCIC_CL_MISC_CTRL3 0x125
  100. #define PCIC_CL_MASK_REV 0x134
  101. #define PCIC_CL_PRODUCT_ID 0x135
  102. #define PCIC_CL_DEV_CAP_A 0x136
  103. #define PCIC_CL_DEV_CAP_B 0x137
  104. #define PCIC_CL_DEV_IMP_A 0x138
  105. #define PCIC_CL_DEV_IMP_B 0x139
  106. #define PCIC_CL_DEV_IMP_C 0x13a
  107. #define PCIC_CL_DEV_IMP_D 0x13b
  108. //Cirrus Logic Miscellaneous Control 1 Register bits
  109. #define CL_MC1_5V_DETECT 0x01
  110. #define CL_MC1_MM_ENABLE 0x01
  111. #define CL_MC1_VCC_33V 0x02
  112. #define CL_MC1_PULSE_MGMT_INT 0x04
  113. #define CL_MC1_PULSE_SYSTEM_IRQ 0x08
  114. #define CL_MC1_SPKR_ENABLE 0x10
  115. #define CL_MC1_INPACK_ENABLE 0x80
  116. //Cirrus Logic Miscellaneous Control 2 Register bits
  117. #define CL_MC2_BFS 0x01
  118. #define CL_MC2_LPDYNAMIC_MODE 0x02
  119. #define CL_MC2_SUSPEND 0x04
  120. #define CL_MC2_5VCORE 0x08
  121. #define CL_MC2_DRIVELED_ENABLE 0x10
  122. #define CL_MC2_TIMERCLK_DIVIDE 0x10
  123. #define CL_MC2_3STATE_BIT7 0x20
  124. #define CL_MC2_DMA_SYSTEM 0x40
  125. #define CL_MC2_IRQ15_RIOUT 0x80
  126. //Cirrus Logic Miscellaneous Control 3 Register bits
  127. #define CL_MC3_INTMODE_MASK 0x03
  128. #define CL_MC3_INTMODE_SERIAL 0x00
  129. #define CL_MC3_INTMODE_EXTHW 0x01
  130. #define CL_MC3_INTMODE_PCIWAY 0x02
  131. #define CL_MC3_INTMODE_PCI 0x03 //default
  132. #define CL_MC3_PWRMODE_MASK 0x0c
  133. #define CL_MC3_HWSUSPEND_ENABLE 0x10
  134. //
  135. // Cirrus Logic extension register 1
  136. //
  137. #define PCIC_CIRRUS_EXTENDED_INDEX 0x2E
  138. #define PCIC_CIRRUS_INDEX_REG 0x2F
  139. #define PCIC_CIRRUS_EXTENSION_CTRL_1 0x03
  140. //
  141. // Databook registers
  142. //
  143. #define PCIC_DBK_ZV_ENABLE 0x3b
  144. //
  145. // Opti registers
  146. //
  147. #define PCIC_OPTI_GLOBAL_CTRL 0x1e
  148. //
  149. // This is only for cardbus controllers
  150. //
  151. #define PCIC_PAGE_REG 0x40
  152. //
  153. //
  154. // Define offset to socket A and B
  155. //
  156. #define PCIC_SOCKETA_OFFSET 0x00
  157. #define PCIC_SOCKETB_OFFSET 0x40
  158. #define PCIC_REVISION 0x82
  159. #define PCIC_REVISION2 0x83
  160. #define PCIC_REVISION3 0x84
  161. #define PCIC_SCM_REVISION 0xAB
  162. #define SOCKET1 PCIC_SOCKETA_OFFSET
  163. #define SOCKET2 PCIC_SOCKETB_OFFSET
  164. #define CARD_DETECT_1 0x4
  165. #define CARD_DETECT_2 0x8
  166. #define CARD_IN_SOCKET_A 0x1
  167. #define CARD_IN_SOCKET_B 0x2
  168. #define CARD_TYPE_MODEM 0x1
  169. #define CARD_TYPE_ENET 0x2
  170. #define CARD_TYPE_DISK 0x3
  171. //
  172. // For Cirrus Logic PCI controllers
  173. //
  174. #define PCIC_CIRRUS_INTA 0x3
  175. #define PCIC_CIRRUS_INTB 0x4
  176. #define PCIC_CIRRUS_INTC 0x5
  177. #define PCIC_CIRRUS_INTD 0x7
  178. //
  179. // Support IRQs:
  180. // 15,14, , , 11,10, 9, , 7, ,5,4, 3, , ,
  181. // 1 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0
  182. //
  183. #define PCIC_SUPPORTED_INTERRUPTS 0xCEB8
  184. //
  185. // Support IRQs:
  186. // 15,14, , , 11,10, 9, , 7, ,5,4, 3, , ,
  187. // 0 1 0 0 0 1 0 0 1 0 1 1 1 0 0 0
  188. //
  189. #define CL_SUPPORTED_INTERRUPTS 0x44B8
  190. //
  191. // Support IRQs for NEC_98:
  192. // , , ,12, ,10, , , ,6 ,5 , , 3 , , ,
  193. // 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0
  194. //
  195. #define PCIC_SUPPORTED_INTERRUPTS_NEC_98 0x1468
  196. /*** 16-Bit Socket Constants
  197. */
  198. //Device IDs for various controllers
  199. #define DEVID_VALID_LO 0x82
  200. #define DEVID_CL 0x82
  201. #define DEVID_VADEM 0x83
  202. #define DEVID_RICOH 0x83
  203. #define DEVID_GEN_PCIC 0x84
  204. #define DEVID_IBM_KING 0x8a
  205. #define DEVID_OPTI_82C824 0x87
  206. #define DEVID_OPTI_82C852 0x8f
  207. //TI PCI-1130 specific registers
  208. #define PCIC_TI_MEMWIN_PAGE 0x40
  209. //ID and Revision Register bits
  210. #define IDREV_REV_MASK 0x0f
  211. #define IDREV_IFID_MASK 0xc0
  212. #define IDREV_IFID_IO 0x00
  213. #define IDREV_IFID_MEM 0x40
  214. #define IDREV_IFID_IOMEM 0x80
  215. //Interface Status Register bits
  216. #define IFS_BVD_MASK 0x03
  217. #define IFS_BVD1 0x01
  218. #define IFS_BVD2 0x02
  219. #define IFS_CD_MASK 0x0c
  220. #define IFS_CD1 0x04
  221. #define IFS_CD2 0x08
  222. #define IFS_WP 0x10
  223. #define IFS_RDYBSY 0x20
  224. #define IFS_CARDPWR_ACTIVE 0x40
  225. #define IFS_VPP_VALID 0x80
  226. //Power and RESETDRV Control Register bits
  227. #define PC_VPP1_MASK 0x03
  228. #define PC_VPP2_MASK 0x0c
  229. #define PC_CARDPWR_ENABLE 0x10
  230. #define PC_AUTOPWR_ENABLE 0x20
  231. #define PC_RESETDRV_DISABLE 0x40
  232. #define PC_OUTPUT_ENABLE 0x80
  233. #define PC_PWRON_BITS (PC_OUTPUT_ENABLE | PC_AUTOPWR_ENABLE)
  234. #define PC_VPP_NO_CONNECT 0x00
  235. #define PC_VPP_SETTO_VCC 0x01
  236. #define PC_VPP_SETTO_VPP 0x02
  237. #define PC_VPP_RESERVED 0x03
  238. #define PC_VPP_VLSI_MASK 0x03
  239. #define PC_VPP_VLSI_NO_CONNECT 0x00
  240. #define PC_VPP_VLSI_050V 0x01
  241. #define PC_VPP_VLSI_120V 0x02
  242. #define PC_VPP_VLSI_RESERVED 0x03
  243. #define PC_VCC_TOPIC_033V 0x08
  244. #define PC_VCC_VLSI_MASK 0x18
  245. #define PC_VCC_VLSI_NO_CONNECT 0x00
  246. #define PC_VCC_VLSI_RESERVED 0x08
  247. #define PC_VCC_VLSI_050V 0x10
  248. #define PC_VCC_VLSI_033V 0x18
  249. #define PC_VPP_KING_MASK 0x03
  250. #define PC_VPP_KING_NO_CONNECT 0x00
  251. #define PC_VPP_KING_050V 0x01
  252. #define PC_VPP_KING_120V 0x02
  253. #define PC_VPP_KING_SETTO_VCC 0x03
  254. #define PC_VCC_KING_MASK 0x0c
  255. #define PC_VCC_KING_NO_CONNECT 0x00
  256. #define PC_VCC_KING_050V 0x04
  257. #define PC_VCC_KING_RESERVED 0x08
  258. #define PC_VCC_KING_033V 0x0c
  259. #define PC_VPP_OPTI_MASK 0x03
  260. #define PC_VPP_OPTI_NO_CONNECT 0x00
  261. #define PC_VPP_OPTI_SETTO_VCC 0x01
  262. #define PC_VPP_OPTI_120V 0x02
  263. #define PC_VPP_OPTI_0V 0x03
  264. #define PC_VCC_OPTI_MASK 0x18
  265. #define PC_VCC_OPTI_NO_CONNECT 0x00
  266. #define PC_VCC_OPTI_033V 0x08
  267. #define PC_VCC_OPTI_050V 0x10
  268. #define PC_VCC_OPTI_0XXV 0x18
  269. //Interrupt and General Control Register bits
  270. #define IGC_IRQ_MASK 0x0f
  271. #define IGC_INTR_ENABLE 0x10
  272. #define IGC_PCCARD_IO 0x20
  273. #define IGC_PCCARD_RESETLO 0x40
  274. #define IGC_RINGIND_ENABLE 0x80
  275. //Card Status Change Register bits
  276. #define CSC_CHANGE_MASK 0x0f
  277. #define CSC_BATT_DEAD 0x01
  278. #define CSC_BATT_WARNING 0x02
  279. #define CSC_BATT_MASK (CSC_BATT_DEAD | CSC_BATT_WARNING)
  280. #define CSC_READY_CHANGE 0x04
  281. #define CSC_CD_CHANGE 0x08
  282. //Card Status Change Interrupt Configuration Register bits
  283. #define CSCFG_ENABLE_MASK 0x0f
  284. #define CSCFG_BATT_DEAD 0x01
  285. #define CSCFG_BATT_WARNING 0x02
  286. #define CSCFG_BATT_MASK (CSCFG_BATT_DEAD | CSCFG_BATT_WARNING)
  287. #define CSCFG_READY_ENABLE 0x04
  288. #define CSCFG_CD_ENABLE 0x08
  289. #define CSCFG_IRQ_MASK 0xf0
  290. //Address Window Enable Register bits
  291. #define WE_MEM0_ENABLE 0x01
  292. #define WE_MEM1_ENABLE 0x02
  293. #define WE_MEM2_ENABLE 0x04
  294. #define WE_MEM3_ENABLE 0x08
  295. #define WE_MEM4_ENABLE 0x10
  296. #define WE_MEMWIN_MASK (WE_MEM0_ENABLE | WE_MEM1_ENABLE | \
  297. WE_MEM2_ENABLE | WE_MEM3_ENABLE | \
  298. WE_MEM4_ENABLE)
  299. #define WE_MEMCS16_DECODE 0x20
  300. #define WE_IO0_ENABLE 0x40
  301. #define WE_IO1_ENABLE 0x80
  302. #define WE_IOWIN_MASK (WE_IO0_ENABLE | WE_IO1_ENABLE)
  303. //I/O Control Register bits
  304. #define IOC_IO0_MASK 0x0f
  305. #define IOC_IO0_DATASIZE 0x01
  306. #define IOC_IO0_IOCS16 0x02
  307. #define IOC_IO0_ZEROWS 0x04
  308. #define IOC_IO0_WAITSTATE 0x08
  309. #define IOC_IO1_MASK 0xf0
  310. #define IOC_IO1_DATASIZE 0x10
  311. #define IOC_IO1_IOCS16 0x20
  312. #define IOC_IO1_ZEROWS 0x40
  313. #define IOC_IO1_WAITSTATE 0x80
  314. //Card Detection and General Control Register
  315. #define CDGC_SW_DET_INT 0x20
  316. //Memory Window Start Register bits
  317. #define MEMBASE_ADDR_MASK 0x0fff
  318. #define MEMBASE_ZEROWS 0x4000
  319. #define MEMBASE_16BIT 0x8000
  320. //Memory Window Stop Register bits
  321. #define MEMEND_ADDR_MASK 0x0fff
  322. #define MEMEND_WS_MASK 0xc000
  323. //Memory Window Offset Register bits
  324. #define MEMOFF_ADDR_MASK 0x3fff
  325. #define MEMOFF_REG_ACTIVE 0x4000
  326. #define MEMOFF_WP 0x8000
  327. //
  328. //Masks used to calculate 2's-complement based offset
  329. #define OFFSETCALC_BASE_MASK 0x00FFFFFF
  330. #define OFFSETCALC_OFFSET_MASK 0x03FFFFFF
  331. //Cirrus Logic Miscellaneous Control 1 Register bits
  332. #define CL_MC1_5V_DETECT 0x01
  333. #define CL_MC1_MM_ENABLE 0x01
  334. #define CL_MC1_VCC_33V 0x02
  335. #define CL_MC1_PULSE_MGMT_INT 0x04
  336. #define CL_MC1_PULSE_SYSTEM_IRQ 0x08
  337. #define CL_MC1_SPKR_ENABLE 0x10
  338. #define CL_MC1_INPACK_ENABLE 0x80
  339. //Cirrus Logic Miscellaneous Control 2 Register bits
  340. #define CL_MC2_BFS 0x01
  341. #define CL_MC2_LPDYNAMIC_MODE 0x02
  342. #define CL_MC2_SUSPEND 0x04
  343. #define CL_MC2_5VCORE 0x08
  344. #define CL_MC2_DRIVELED_ENABLE 0x10
  345. #define CL_MC2_TIMERCLK_DIVIDE 0x10
  346. #define CL_MC2_3STATE_BIT7 0x20
  347. #define CL_MC2_DMA_SYSTEM 0x40
  348. #define CL_MC2_IRQ15_RIOUT 0x80
  349. //Cirrus Logic Miscellaneous Control 3 Register bits
  350. #define CL_MC3_INTMODE_MASK 0x03
  351. #define CL_MC3_INTMODE_SERIAL 0x00
  352. #define CL_MC3_INTMODE_EXTHW 0x01
  353. #define CL_MC3_INTMODE_PCIWAY 0x02
  354. #define CL_MC3_INTMODE_PCI 0x03 //default
  355. #define CL_MC3_PWRMODE_MASK 0x0c
  356. #define CL_MC3_HWSUSPEND_ENABLE 0x10
  357. #define CL_MC3_MM_ARM 0x80
  358. //Cirrus Logic Chip Info Register bits
  359. #define CL_CI_REV_MASK 0x1e
  360. #define CL_CI_DUAL_SOCKET 0x20
  361. #define CL_CI_CHIP_ID 0xc0
  362. //Cirrus Logic Mask Revision Register bits
  363. #define CL_MSKREV_MASK 0x0f
  364. //Cirrus Logic Product ID Register bits
  365. #define CL_PID_PRODUCT_CODE_MASK 0x0f
  366. #define CL_PID_FAMILY_CODE_MASK 0xf0
  367. //Cirrus Logic Device Capability Register A bits
  368. #define CL_CAPA_NUMSKT_MASK 0x03
  369. #define CL_CAPA_IDE_INTERFACE 0x04
  370. #define CL_CAPA_SLAVE_DMA 0x08
  371. #define CL_CAPA_CPSTB_CAPABLE 0x20
  372. #define CL_CAPA_PER_SKT_LED 0x80
  373. //Cirrus Logic Device Capability Register B bits
  374. #define CL_CAPB_CARDBUS_CAPABLE 0x01
  375. #define CL_CAPB_LOCK_SUPPORT 0x02
  376. #define CL_CAPB_CLKRUN_SUPPORT 0x04
  377. #define CL_CAPB_EXT_DEF 0x80
  378. //Cirrus Logic Device Implementation Register A bits
  379. #define CL_IMPA_NUMSKT_MASK 0x03
  380. #define CL_IMPA_SLAVE_DMA 0x04
  381. #define CL_IMPA_VS1_VS2 0x08
  382. #define CL_IMPA_GPSTB_A 0x10
  383. #define CL_IMPA_GPSTB_B 0x20
  384. #define CL_IMPA_HW_SUSPEND 0x40
  385. #define CL_IMPA_RI_OUT 0x80
  386. //Cirrus Logic Device Implementation Register B bits
  387. #define CL_IMPB_033_VCC 0x01
  388. #define CL_IMPB_050_VCC 0x02
  389. #define CL_IMPB_0YY_VCC 0x04
  390. #define CL_IMPB_0XX_VCC 0x08
  391. #define CL_IMPB_120_VPP 0x10
  392. #define CL_IMPB_VPP_VCC_1A 0x20
  393. #define CL_IMPB_RFRATED_SKT 0x40
  394. //Cirrus Logic Device Implementation Register C bits
  395. #define CL_IMPC_LED 0x01
  396. #define CL_IMPC_PER_SKT_LED 0x02
  397. #define CL_IMPC_SPK 0x04
  398. #define CL_IMPC_ZVP_A 0x08
  399. #define CL_IMPC_ZVP_B 0x10
  400. //Cirrus Logic Device Implementation Register D bits
  401. #define CL_IMPD_CLKRUN 0x01
  402. #define CL_IMPD_LOCK 0x02
  403. #define CL_IMPD_EXT_CLK 0x40
  404. //Cirrus Logic Extension Registers
  405. #define CLEXTREG_EXTCTRL_1 0x03
  406. #define CLEXTREG_MEMWIN0_HIADDR 0x05
  407. #define CLEXTREG_MEMWIN1_HIADDR 0x06
  408. #define CLEXTREG_MEMWIN2_HIADDR 0x07
  409. #define CLEXTREG_MEMWIN3_HIADDR 0x08
  410. #define CLEXTREG_MEMWIN4_HIADDR 0x09
  411. #define CLEXTREG_EXT_DATA 0x0a
  412. #define CLEXTREG_EXTCTRL_2 0x0b
  413. //TI Global Control Register bits
  414. #define TI_GCTRL_PWRDOWN_MODE_ENABLE 0x01
  415. #define TI_GCTRL_CSC_LEVEL_MODE 0x02
  416. #define TI_GCTRL_INTFLAG_CLEAR_MODE 0x04
  417. #define TI_GCTRL_CARDA_LEVEL_MODE 0x08
  418. #define TI_GCTRL_CARDB_LEVEL_MODE 0x10
  419. //Cirrus Logic External Data Register bits (Index=0x6f,ExtIndex=0x0a)
  420. #define CL_EDATA_A_VS1 0x01
  421. #define CL_EDATA_A_VS2 0x02
  422. #define CL_EDATA_A_5V (CL_EDATA_A_VS1 | CL_EDATA_A_VS2)
  423. #define CL_EDATA_B_VS1 0x04
  424. #define CL_EDATA_B_VS2 0x08
  425. #define CL_EDATA_B_5V (CL_EDATA_B_VS1 | CL_EDATA_B_VS2)
  426. //Toshiba TOPIC95 Function Control Register bits
  427. #define TO_FCTRL_CARDPWR_ENABLE 0x01
  428. #define TO_FCTRL_VSSTATUS_ENABLE 0x02
  429. #define TO_FCTRL_PPEC_TIMING_ENABLE 0x04
  430. #define TO_FCTRL_CARD_TIMING_ENABLE 0x08
  431. #define TO_FCTRL_CARD_MEMPAGE_ENABLE 0x10
  432. #define TO_FCTRL_DMA_ENABLE 0x20
  433. #define TO_FCTRL_PWRCTRL_BUFFER_ENABLE 0x40
  434. //Toshiba TOPIC95 Multimedia Interface Control Register bits
  435. #define TO_MMI_VIDEO_CTRL 0x01
  436. #define TO_MMI_AUDIO_CTRL 0x02
  437. #define TO_MMI_REV_BIT 0x80
  438. //Toshiba TOPIC95 Addition General Control Register bits
  439. #define TO_GCTRL_CARDREMOVAL_RESET 0x02
  440. #define TO_GCTRL_SWCD_INT 0x20
  441. //Databook DB87144 Zoom Video Port Enable Register
  442. #define DBK_ZVE_MODE_MASK 0x03
  443. #define DBK_ZVE_STANDARD_MODE 0x00
  444. #define DBK_ZVE_MM_MODE 0x03
  445. //OPTi Global Control Register bits
  446. #define OPTI_ZV_ENABLE 0x20
  447. //VLSI ELC Constants
  448. #define VLSI_ELC_ALIAS 0x8000
  449. #define VLSI_EA2_EA_ENABLE 0x10
  450. #define VLSI_CC_VS1 0x04
  451. //VADEM Constants
  452. #define VADEM_UNLOCK_SEQ1 0x0e
  453. #define VADEM_UNLOCK_SEQ2 0x37
  454. #define VADEM_MISC_UNLOCK_VADEMREV 0xc0
  455. #define VADEM_IDREV_VG469_REV 0x0c
  456. #define VADEM_VSEL_VCC_MASK 0x03
  457. #define VADEM_VSEL_VCC_050V 0x00
  458. #define VADEM_VSEL_VCC_033V 0x01
  459. #define VADEM_VSEL_VCC_XXXV 0x02
  460. #define VADEM_VSEL_VCC_033VB 0x03
  461. #define VADEM_VSEL_SKT_MIXEDVOLT 0x40
  462. #define VADEM_VSENSE_A_VS1 0x01
  463. #define VADEM_VSENSE_A_VS2 0x02
  464. #define VADEM_VSENSE_B_VS1 0x04
  465. #define VADEM_VSENSE_B_VS2 0x08
  466. #define VADEM_VSENSE_050V_ONLY 0x03
  467. //IBM King Constants
  468. #define KING_CVS_VS1 0x01
  469. #define KING_CVS_VS2 0x02
  470. #define KING_CVS_VS_MASK (KING_CVS_VS1 | KING_CVS_VS2)
  471. #define KING_CVS_5V (KING_CVS_VS1 | KING_CVS_VS2)
  472. #define KING_CVS_GPI 0x80
  473. //Ricoh RL5C466 Miscellaneous Control 1 Register bits
  474. #define RICOH_MC1_VS 0x01
  475. #define RICOH_MC1_IREQ_SENSE_SEL 0x02
  476. #define RICOH_MC1_INPACK_ENABLE 0x04
  477. #define RICOH_MC1_ZV_ENABLE 0x08
  478. #define RICOH_MC1_DMA_ENABLE_MASK 0x30
  479. #define RICOH_MC1_DMA_DISABLE 0x00
  480. #define RICOH_MC1_DMA_INPACK 0x10
  481. #define RICOH_MC1_DMA_IOIS16 0x20
  482. #define RICOH_MC1_DMA_SPKR 0x30
  483. //Misc. Constants
  484. #define EXCAREGBASE_SPACE 0x40
  485. #define NUMWIN_PCCARD16 7 //5 mem + 2 io per socket
  486. #define NUMWIN_PC16_MEM 5
  487. #define NUMWIN_PC16_IO 2
  488. #define PCCARD_IOWIN_START 5
  489. //These are default values for the slowest and fastest memory speeds supported.
  490. //It may be necessary to change the actual values with arguments, if the bus
  491. //speed is not the default 8MHz/8.33MHz, which gives 120ns-125ns per cycle.
  492. //Note that the SLOW_MEM_SPEED should be the same as the default
  493. //WaitToSpeed[3], and FAST_MEM_SPEED might as well be 1ns, since the socket
  494. //will support arbitrarily fast memory.
  495. #define SLOW_MEM_SPEED 0x72 //700ns
  496. #define FAST_MEM_SPEED 0x08 //1ns
  497. //
  498. // Values for various delays for R2 cards
  499. //
  500. #define PWRON_DELAY 400000 //400ms
  501. #define PCMCIA_DEFAULT_READY_DELAY_ITER 850
  502. #define PCMCIA_DEFAULT_READY_STALL 10000 // 10 millesec
  503. #define PCMCIA_DEFAULT_PCIC_MEMORY_WINDOW_DELAY 3000 // 3 msec
  504. #define PCMCIA_DEFAULT_PCIC_RESET_WIDTH_DELAY 100 // 100 usec
  505. #define PCMCIA_DEFAULT_PCIC_RESET_SETUP_DELAY 70000 // 70 msec
  506. #define PCMCIA_DEFAULT_ATTRIBUTE_MEMORY_LOW 0xD0000
  507. #define PCMCIA_DEFAULT_ATTRIBUTE_MEMORY_HIGH 0xE0000
  508. #define PCMCIA_DEFAULT_IO_LOW 0x0
  509. #define PCMCIA_DEFAULT_IO_HIGH 0xFFFF
  510. //I/O Control Register default nibble values
  511. //The Xircom net PC cards fails with a 16-bit wait on the AcerNote which
  512. //has a Cirrus Logic controller. Why the addition of a wait state causes
  513. //this to fail is a mystery. The Socket EA PC card fails on the IBM ThinkPad
  514. //755 if the 16-bit wait state is not set.
  515. #define DEF_IOC_8BIT 0x00
  516. #define DEF_IOC_16BIT (IOC_IO0_DATASIZE | IOC_IO0_IOCS16 | \
  517. IOC_IO0_WAITSTATE)
  518. #endif // _PCMCIA_EXCA_H_