sdio_ops.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef __SDIO_OPS_H__
  21. #define __SDIO_OPS_H__
  22. /* Follow mac team suggestion, default I/O fail return value is 0xFF */
  23. #define SDIO_ERR_VAL8 0xFF
  24. #define SDIO_ERR_VAL16 0xFFFF
  25. #define SDIO_ERR_VAL32 0xFFFFFFFF
  26. #ifdef PLATFORM_LINUX
  27. #include <sdio_ops_linux.h>
  28. #endif
  29. #ifdef PLATFORM_WINDOWS
  30. #ifdef PLATFORM_OS_XP
  31. #include <sdio_ops_xp.h>
  32. struct async_context {
  33. PMDL pmdl;
  34. PSDBUS_REQUEST_PACKET sdrp;
  35. unsigned char *r_buf;
  36. unsigned char *padapter;
  37. };
  38. #endif
  39. #ifdef PLATFORM_OS_CE
  40. #include <sdio_ops_ce.h>
  41. #endif
  42. #endif /* PLATFORM_WINDOWS */
  43. extern void sdio_set_intf_ops(_adapter *padapter, struct _io_ops *pops);
  44. void dump_sdio_card_info(void *sel, struct dvobj_priv *dvobj);
  45. #if 0
  46. extern void sdio_func1cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
  47. extern void sdio_func1cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
  48. #endif
  49. extern u8 SdioLocalCmd52Read1Byte(PADAPTER padapter, u32 addr);
  50. extern void SdioLocalCmd52Write1Byte(PADAPTER padapter, u32 addr, u8 v);
  51. extern s32 _sdio_local_read(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
  52. extern s32 sdio_local_read(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
  53. extern s32 _sdio_local_write(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
  54. extern s32 sdio_local_write(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
  55. u32 _sdio_read32(PADAPTER padapter, u32 addr);
  56. s32 _sdio_write32(PADAPTER padapter, u32 addr, u32 val);
  57. extern void sd_int_hdl(PADAPTER padapter);
  58. extern u8 CheckIPSStatus(PADAPTER padapter);
  59. #ifdef CONFIG_RTL8188E
  60. extern void InitInterrupt8188ESdio(PADAPTER padapter);
  61. extern void EnableInterrupt8188ESdio(PADAPTER padapter);
  62. extern void DisableInterrupt8188ESdio(PADAPTER padapter);
  63. extern void UpdateInterruptMask8188ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
  64. extern u8 HalQueryTxBufferStatus8189ESdio(PADAPTER padapter);
  65. extern u8 HalQueryTxOQTBufferStatus8189ESdio(PADAPTER padapter);
  66. extern void ClearInterrupt8188ESdio(PADAPTER padapter);
  67. #endif /* CONFIG_RTL8188E */
  68. #ifdef CONFIG_RTL8821A
  69. extern void InitInterrupt8821AS(PADAPTER padapter);
  70. extern void EnableInterrupt8821AS(PADAPTER padapter);
  71. extern void DisableInterrupt8821AS(PADAPTER padapter);
  72. extern u8 HalQueryTxBufferStatus8821AS(PADAPTER padapter);
  73. extern u8 HalQueryTxOQTBufferStatus8821ASdio(PADAPTER padapter);
  74. #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
  75. void ClearInterrupt8821AS(PADAPTER padapter);
  76. #endif /* defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) */
  77. #endif /* CONFIG_RTL8821A */
  78. #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
  79. #ifdef CONFIG_RTL8821C
  80. u8 rtw_hal_enable_cpwm2(_adapter *adapter);
  81. #endif
  82. extern u8 RecvOnePkt(PADAPTER padapter);
  83. #endif /* CONFIG_WOWLAN */
  84. #ifdef CONFIG_RTL8723B
  85. extern void InitInterrupt8723BSdio(PADAPTER padapter);
  86. extern void InitSysInterrupt8723BSdio(PADAPTER padapter);
  87. extern void EnableInterrupt8723BSdio(PADAPTER padapter);
  88. extern void DisableInterrupt8723BSdio(PADAPTER padapter);
  89. extern u8 HalQueryTxBufferStatus8723BSdio(PADAPTER padapter);
  90. extern u8 HalQueryTxOQTBufferStatus8723BSdio(PADAPTER padapter);
  91. #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
  92. extern void DisableInterruptButCpwm28723BSdio(PADAPTER padapter);
  93. extern void ClearInterrupt8723BSdio(PADAPTER padapter);
  94. #endif /* CONFIG_WOWLAN */
  95. #endif
  96. #ifdef CONFIG_RTL8192E
  97. extern void InitInterrupt8192ESdio(PADAPTER padapter);
  98. extern void EnableInterrupt8192ESdio(PADAPTER padapter);
  99. extern void DisableInterrupt8192ESdio(PADAPTER padapter);
  100. extern void UpdateInterruptMask8192ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
  101. extern u8 HalQueryTxBufferStatus8192ESdio(PADAPTER padapter);
  102. extern u8 HalQueryTxOQTBufferStatus8192ESdio(PADAPTER padapter);
  103. extern void ClearInterrupt8192ESdio(PADAPTER padapter);
  104. #endif /* CONFIG_RTL8192E */
  105. #ifdef CONFIG_RTL8703B
  106. extern void InitInterrupt8703BSdio(PADAPTER padapter);
  107. extern void InitSysInterrupt8703BSdio(PADAPTER padapter);
  108. extern void EnableInterrupt8703BSdio(PADAPTER padapter);
  109. extern void DisableInterrupt8703BSdio(PADAPTER padapter);
  110. extern u8 HalQueryTxBufferStatus8703BSdio(PADAPTER padapter);
  111. extern u8 HalQueryTxOQTBufferStatus8703BSdio(PADAPTER padapter);
  112. #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
  113. extern void DisableInterruptButCpwm28703BSdio(PADAPTER padapter);
  114. extern void ClearInterrupt8703BSdio(PADAPTER padapter);
  115. #endif /* CONFIG_WOWLAN */
  116. #endif
  117. #ifdef CONFIG_RTL8723D
  118. extern void InitInterrupt8723DSdio(PADAPTER padapter);
  119. extern void InitSysInterrupt8723DSdio(PADAPTER padapter);
  120. extern void EnableInterrupt8723DSdio(PADAPTER padapter);
  121. extern void DisableInterrupt8723DSdio(PADAPTER padapter);
  122. extern u8 HalQueryTxBufferStatus8723DSdio(PADAPTER padapter);
  123. extern u8 HalQueryTxOQTBufferStatus8723DSdio(PADAPTER padapter);
  124. #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
  125. extern void DisableInterruptButCpwm28723dSdio(PADAPTER padapter);
  126. extern void ClearInterrupt8723DSdio(PADAPTER padapter);
  127. #endif /* CONFIG_WOWLAN */
  128. #endif
  129. #ifdef CONFIG_RTL8188F
  130. extern void InitInterrupt8188FSdio(PADAPTER padapter);
  131. extern void InitSysInterrupt8188FSdio(PADAPTER padapter);
  132. extern void EnableInterrupt8188FSdio(PADAPTER padapter);
  133. extern void DisableInterrupt8188FSdio(PADAPTER padapter);
  134. extern u8 HalQueryTxBufferStatus8188FSdio(PADAPTER padapter);
  135. extern u8 HalQueryTxOQTBufferStatus8188FSdio(PADAPTER padapter);
  136. #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
  137. extern void DisableInterruptButCpwm28188FSdio(PADAPTER padapter);
  138. extern void ClearInterrupt8188FSdio(PADAPTER padapter);
  139. #endif /* defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) */
  140. #endif
  141. #endif /* !__SDIO_OPS_H__ */