xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8189es/include/sdio_ops.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
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 
23 
24 #ifdef PLATFORM_LINUX
25 #include <sdio_ops_linux.h>
26 #endif
27 
28 #ifdef PLATFORM_WINDOWS
29 
30 #ifdef PLATFORM_OS_XP
31 #include <sdio_ops_xp.h>
32 struct async_context
33 {
34 	PMDL pmdl;
35 	PSDBUS_REQUEST_PACKET sdrp;
36 	unsigned char* r_buf;
37 	unsigned char* padapter;
38 };
39 #endif
40 
41 #ifdef PLATFORM_OS_CE
42 #include <sdio_ops_ce.h>
43 #endif
44 
45 #endif // PLATFORM_WINDOWS
46 
47 
48 extern void sdio_set_intf_ops(_adapter *padapter,struct _io_ops *pops);
49 
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);
58 
59 u32 _sdio_read32(PADAPTER padapter, u32 addr);
60 s32 _sdio_write32(PADAPTER padapter, u32 addr, u32 val);
61 
62 extern void sd_int_hdl(PADAPTER padapter);
63 extern u8 CheckIPSStatus(PADAPTER padapter);
64 
65 #ifdef CONFIG_RTL8188E
66 extern void InitInterrupt8188ESdio(PADAPTER padapter);
67 extern void EnableInterrupt8188ESdio(PADAPTER padapter);
68 extern void DisableInterrupt8188ESdio(PADAPTER padapter);
69 extern void UpdateInterruptMask8188ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
70 extern u8 HalQueryTxBufferStatus8189ESdio(PADAPTER padapter);
71 extern u8 HalQueryTxOQTBufferStatus8189ESdio(PADAPTER padapter);
72 extern void ClearInterrupt8188ESdio(PADAPTER padapter);
73 #endif // CONFIG_RTL8188E
74 
75 #ifdef CONFIG_RTL8821A
76 extern void InitInterrupt8821AS(PADAPTER padapter);
77 extern void EnableInterrupt8821AS(PADAPTER padapter);
78 extern void DisableInterrupt8821AS(PADAPTER padapter);
79 extern u8 HalQueryTxBufferStatus8821AS(PADAPTER padapter);
80 extern u8 HalQueryTxOQTBufferStatus8821ASdio(PADAPTER padapter);
81 #endif // CONFIG_RTL8188E
82 
83 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
84 extern u8 RecvOnePkt(PADAPTER padapter, u32 size);
85 #endif // CONFIG_WOWLAN
86 #ifdef CONFIG_RTL8723B
87 extern void InitInterrupt8723BSdio(PADAPTER padapter);
88 extern void InitSysInterrupt8723BSdio(PADAPTER padapter);
89 extern void EnableInterrupt8723BSdio(PADAPTER padapter);
90 extern void DisableInterrupt8723BSdio(PADAPTER padapter);
91 extern u8 HalQueryTxBufferStatus8723BSdio(PADAPTER padapter);
92 extern u8 HalQueryTxOQTBufferStatus8723BSdio(PADAPTER padapter);
93 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
94 extern void DisableInterruptButCpwm28723BSdio(PADAPTER padapter);
95 extern void ClearInterrupt8723BSdio(PADAPTER padapter);
96 #endif //CONFIG_WOWLAN
97 #endif
98 
99 
100 #ifdef CONFIG_RTL8192E
101 extern void InitInterrupt8192ESdio(PADAPTER padapter);
102 extern void EnableInterrupt8192ESdio(PADAPTER padapter);
103 extern void DisableInterrupt8192ESdio(PADAPTER padapter);
104 extern void UpdateInterruptMask8192ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
105 extern u8 HalQueryTxBufferStatus8192ESdio(PADAPTER padapter);
106 extern u8 HalQueryTxOQTBufferStatus8192ESdio(PADAPTER padapter);
107 extern void ClearInterrupt8192ESdio(PADAPTER padapter);
108 #endif // CONFIG_RTL8192E
109 
110 #ifdef CONFIG_RTL8703B
111 extern void InitInterrupt8703BSdio(PADAPTER padapter);
112 extern void InitSysInterrupt8703BSdio(PADAPTER padapter);
113 extern void EnableInterrupt8703BSdio(PADAPTER padapter);
114 extern void DisableInterrupt8703BSdio(PADAPTER padapter);
115 extern u8 HalQueryTxBufferStatus8703BSdio(PADAPTER padapter);
116 extern u8 HalQueryTxOQTBufferStatus8703BSdio(PADAPTER padapter);
117 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
118 extern void DisableInterruptButCpwm28703BSdio(PADAPTER padapter);
119 extern void ClearInterrupt8703BSdio(PADAPTER padapter);
120 #endif //CONFIG_WOWLAN
121 #endif
122 
123 #ifdef CONFIG_RTL8188F
124 extern void InitInterrupt8188FSdio(PADAPTER padapter);
125 extern void InitSysInterrupt8188FSdio(PADAPTER padapter);
126 extern void EnableInterrupt8188FSdio(PADAPTER padapter);
127 extern void DisableInterrupt8188FSdio(PADAPTER padapter);
128 extern u8 HalQueryTxBufferStatus8188FSdio(PADAPTER padapter);
129 extern u8 HalQueryTxOQTBufferStatus8188FSdio(PADAPTER padapter);
130 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
131 extern void DisableInterruptButCpwm28188FSdio(PADAPTER padapter);
132 extern void ClearInterrupt8188FSdio(PADAPTER padapter);
133 #endif /* defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) */
134 #endif
135 
136 #endif // !__SDIO_OPS_H__
137 
138