sdio_ops.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. #ifdef PLATFORM_LINUX
  23. #include <sdio_ops_linux.h>
  24. #endif
  25. #ifdef PLATFORM_WINDOWS
  26. #ifdef PLATFORM_OS_XP
  27. #include <sdio_ops_xp.h>
  28. struct async_context
  29. {
  30. PMDL pmdl;
  31. PSDBUS_REQUEST_PACKET sdrp;
  32. unsigned char* r_buf;
  33. unsigned char* padapter;
  34. };
  35. #endif
  36. #ifdef PLATFORM_OS_CE
  37. #include <sdio_ops_ce.h>
  38. #endif
  39. #endif // PLATFORM_WINDOWS
  40. extern void sdio_set_intf_ops(_adapter *padapter,struct _io_ops *pops);
  41. //extern void sdio_func1cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
  42. //extern void sdio_func1cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
  43. extern u8 SdioLocalCmd52Read1Byte(PADAPTER padapter, u32 addr);
  44. extern void SdioLocalCmd52Write1Byte(PADAPTER padapter, u32 addr, u8 v);
  45. extern s32 _sdio_local_read(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
  46. extern s32 sdio_local_read(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
  47. extern s32 _sdio_local_write(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
  48. extern s32 sdio_local_write(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
  49. u32 _sdio_read32(PADAPTER padapter, u32 addr);
  50. s32 _sdio_write32(PADAPTER padapter, u32 addr, u32 val);
  51. extern void sd_int_hdl(PADAPTER padapter);
  52. #ifdef CONFIG_RTL8723A
  53. extern void InitInterrupt8723ASdio(PADAPTER padapter);
  54. extern void InitSysInterrupt8723ASdio(PADAPTER padapter);
  55. extern void EnableInterrupt8723ASdio(PADAPTER padapter);
  56. extern void DisableInterrupt8723ASdio(PADAPTER padapter);
  57. extern u8 HalQueryTxBufferStatus8723ASdio(PADAPTER padapter);
  58. #endif // CONFIG_RTL8723A
  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. #endif // CONFIG_RTL8188E
  66. #ifdef CONFIG_RTL8821A
  67. extern void InitInterrupt8821AS(PADAPTER padapter);
  68. extern void EnableInterrupt8821AS(PADAPTER padapter);
  69. extern void DisableInterrupt8821AS(PADAPTER padapter);
  70. extern u8 HalQueryTxBufferStatus8821AS(PADAPTER padapter);
  71. #endif // CONFIG_RTL8188E
  72. #ifdef CONFIG_WOWLAN
  73. extern u8 RecvOnePkt(PADAPTER padapter, u32 size);
  74. #endif // CONFIG_WOWLAN
  75. #ifdef CONFIG_RTL8723B
  76. extern void InitInterrupt8723BSdio(PADAPTER padapter);
  77. extern void InitSysInterrupt8723BSdio(PADAPTER padapter);
  78. extern void EnableInterrupt8723BSdio(PADAPTER padapter);
  79. extern void DisableInterrupt8723BSdio(PADAPTER padapter);
  80. extern u8 HalQueryTxBufferStatus8723BSdio(PADAPTER padapter);
  81. #ifdef CONFIG_WOWLAN
  82. extern void DisableInterruptButCpwm28723BSdio(PADAPTER padapter);
  83. extern void ClearInterrupt8723BSdio(PADAPTER padapter);
  84. #endif //CONFIG_WOWLAN
  85. #endif
  86. #endif // !__SDIO_OPS_H__