xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852bs/phl/hal_g6/hal_sdio.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c)2019 Realtek Corporation.
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  *****************************************************************************/
15 #ifndef _HAL_SDIO_H_
16 #define _HAL_SDIO_H_
17 
18 #ifdef CONFIG_SDIO_HCI
19 /* Follow mac team suggestion, default I/O fail return value is 0xFF */
20 void hal_sdio_set_io_ops(struct rtw_hal_com_t *h, struct hal_io_ops *pops);
21 
22 #ifdef CONFIG_RTL8852A
23 #include "rtl8852a/rtl8852a.h"
24 #endif
25 
26 #ifdef CONFIG_RTL8852B
27 #include "rtl8852b/rtl8852b.h"
28 #endif
29 
30 #ifdef CONFIG_RTL8852C
31 #include "rtl8852c/rtl8852c.h"
32 #endif
33 
hal_set_ops_sdio(struct rtw_phl_com_t * phl_com,struct hal_info_t * hal)34 static inline void hal_set_ops_sdio(struct rtw_phl_com_t *phl_com,
35 						struct hal_info_t *hal)
36 {
37 	#ifdef CONFIG_RTL8852A
38 	if (hal_get_chip_id(hal->hal_com) == CHIP_WIFI6_8852A) {
39 		hal_set_ops_8852as(phl_com, hal);
40 		hal_hook_trx_ops_8852as(hal);
41 	}
42 	#endif
43 	#ifdef CONFIG_RTL8852A
44 	if (hal_get_chip_id(hal->hal_com) == CHIP_WIFI6_8834A){
45 	}
46 	#endif
47 
48 	#ifdef CONFIG_RTL8852B
49 	if (hal_get_chip_id(hal->hal_com) == CHIP_WIFI6_8852B){
50 		hal_set_ops_8852bs(phl_com, hal);
51 		hal_hook_trx_ops_8852bs(hal);
52 	}
53 	#endif
54 }
55 #endif /*CONFIG_SDIO_HCI*/
56 
57 #endif /* _HAL_SDIO_H_ */
58