xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852be/phl/hal_g6/hal_pci.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_PCI_H_
16 #define _HAL_PCI_H_
17 
18 #ifdef CONFIG_PCI_HCI
19 void hal_pci_set_io_ops(struct rtw_hal_com_t *hal, struct hal_io_ops *pops);
20 
21 #ifdef CONFIG_RTL8852A
22 #include "rtl8852a/rtl8852a.h"
23 #endif
24 
25 #ifdef CONFIG_RTL8852B
26 #include "rtl8852b/rtl8852b.h"
27 #endif
28 
29 #ifdef CONFIG_RTL8852C
30 #include "rtl8852c/rtl8852c.h"
31 #endif
32 
hal_set_ops_pci(struct rtw_phl_com_t * phl_com,struct hal_info_t * hal)33 static inline void hal_set_ops_pci(struct rtw_phl_com_t *phl_com,
34 					struct hal_info_t *hal)
35 {
36 #ifdef CONFIG_RTL8852A
37 	if (hal_get_chip_id(hal->hal_com) == CHIP_WIFI6_8852A) {
38 		hal_set_ops_8852ae(phl_com, hal);
39 		hal_hook_trx_ops_8852ae(phl_com, hal);
40 	}
41 #endif
42 
43 #ifdef CONFIG_RTL8852B
44 	if (hal_get_chip_id(hal->hal_com) == CHIP_WIFI6_8852B) {
45 		hal_set_ops_8852be(phl_com, hal);
46 		hal_hook_trx_ops_8852be(phl_com, hal);
47 	}
48 #endif
49 
50 #ifdef CONFIG_RTL8852C
51 	if (hal_get_chip_id(hal->hal_com) == CHIP_WIFI6_8852C) {
52 		hal_set_ops_8852ce(phl_com, hal);
53 		hal_hook_trx_ops_8852ce(phl_com, hal);
54 	}
55 #endif
56 
57 	/*
58 	else if (hal_get_chip_id(hal->hal_com) == CHIP_WIFI6_8834A)
59 		rtl8834ae_set_hal_ops(hal);
60 	else if (hal_get_chip_id(hal->hal_com) == CHIP_WIFI6_8852B)
61 		rtl8852be_set_hal_ops(hal);
62 	*/
63 }
64 #endif /*CONFIG_PCI_HCI*/
65 #endif /*_HAL_PCI_H_*/
66