1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
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
19 ******************************************************************************/
20 #ifndef __SDIO_OPS_H__
21 #define __SDIO_OPS_H__
25 #include <sdio_ops_linux.h>
28 #ifdef PLATFORM_WINDOWS
31 #include <sdio_ops_xp.h>
35 PSDBUS_REQUEST_PACKET sdrp;
37 unsigned char* padapter;
42 #include <sdio_ops_ce.h>
45 #endif // PLATFORM_WINDOWS
48 extern void sdio_set_intf_ops(_adapter *padapter,struct _io_ops *pops);
50 //extern void sdio_func1cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
51 //extern void sdio_func1cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
52 extern u8 SdioLocalCmd52Read1Byte(PADAPTER padapter, u32 addr);
53 extern void SdioLocalCmd52Write1Byte(PADAPTER padapter, u32 addr, u8 v);
54 extern s32 _sdio_local_read(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
55 extern s32 sdio_local_read(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
56 extern s32 _sdio_local_write(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
57 extern s32 sdio_local_write(PADAPTER padapter, u32 addr, u32 cnt, u8 *pbuf);
59 u32 _sdio_read32(PADAPTER padapter, u32 addr);
60 s32 _sdio_write32(PADAPTER padapter, u32 addr, u32 val);
62 extern void sd_int_hdl(PADAPTER padapter);
63 extern u8 CheckIPSStatus(PADAPTER padapter);
65 #ifdef CONFIG_RTL8723A
66 extern void InitInterrupt8723ASdio(PADAPTER padapter);
67 extern void InitSysInterrupt8723ASdio(PADAPTER padapter);
68 extern void EnableInterrupt8723ASdio(PADAPTER padapter);
69 extern void DisableInterrupt8723ASdio(PADAPTER padapter);
70 extern u8 HalQueryTxBufferStatus8723ASdio(PADAPTER padapter);
71 #endif // CONFIG_RTL8723A
73 #ifdef CONFIG_RTL8188E
74 extern void InitInterrupt8188ESdio(PADAPTER padapter);
75 extern void EnableInterrupt8188ESdio(PADAPTER padapter);
76 extern void DisableInterrupt8188ESdio(PADAPTER padapter);
77 extern void UpdateInterruptMask8188ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
78 extern u8 HalQueryTxBufferStatus8189ESdio(PADAPTER padapter);
79 extern void ClearInterrupt8188ESdio(PADAPTER padapter);
80 #endif // CONFIG_RTL8188E
82 #ifdef CONFIG_RTL8821A
83 extern void InitInterrupt8821AS(PADAPTER padapter);
84 extern void EnableInterrupt8821AS(PADAPTER padapter);
85 extern void DisableInterrupt8821AS(PADAPTER padapter);
86 extern u8 HalQueryTxBufferStatus8821AS(PADAPTER padapter);
87 #endif // CONFIG_RTL8188E
89 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
90 extern u8 RecvOnePkt(PADAPTER padapter, u32 size);
91 #endif // CONFIG_WOWLAN
92 #ifdef CONFIG_RTL8723B
93 extern void InitInterrupt8723BSdio(PADAPTER padapter);
94 extern void InitSysInterrupt8723BSdio(PADAPTER padapter);
95 extern void EnableInterrupt8723BSdio(PADAPTER padapter);
96 extern void DisableInterrupt8723BSdio(PADAPTER padapter);
97 extern u8 HalQueryTxBufferStatus8723BSdio(PADAPTER padapter);
98 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
99 extern void DisableInterruptButCpwm28723BSdio(PADAPTER padapter);
100 extern void ClearInterrupt8723BSdio(PADAPTER padapter);
101 #endif //CONFIG_WOWLAN
104 #endif // !__SDIO_OPS_H__