Linux-libre 4.14.145-gnu
[librecmc/linux-libre.git] / drivers / staging / rtlwifi / halmac / halmac_88xx / halmac_api_88xx_sdio.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2016  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  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 #ifndef _HALMAC_API_88XX_SDIO_H_
26 #define _HALMAC_API_88XX_SDIO_H_
27
28 #include "../halmac_2_platform.h"
29 #include "../halmac_type.h"
30
31 enum halmac_ret_status
32 halmac_init_sdio_cfg_88xx(struct halmac_adapter *halmac_adapter);
33
34 enum halmac_ret_status
35 halmac_deinit_sdio_cfg_88xx(struct halmac_adapter *halmac_adapter);
36
37 enum halmac_ret_status
38 halmac_cfg_rx_aggregation_88xx_sdio(struct halmac_adapter *halmac_adapter,
39                                     struct halmac_rxagg_cfg *phalmac_rxagg_cfg);
40
41 u8 halmac_reg_read_8_sdio_88xx(struct halmac_adapter *halmac_adapter,
42                                u32 halmac_offset);
43
44 enum halmac_ret_status
45 halmac_reg_write_8_sdio_88xx(struct halmac_adapter *halmac_adapter,
46                              u32 halmac_offset, u8 halmac_data);
47
48 u16 halmac_reg_read_16_sdio_88xx(struct halmac_adapter *halmac_adapter,
49                                  u32 halmac_offset);
50
51 enum halmac_ret_status
52 halmac_reg_write_16_sdio_88xx(struct halmac_adapter *halmac_adapter,
53                               u32 halmac_offset, u16 halmac_data);
54
55 u32 halmac_reg_read_32_sdio_88xx(struct halmac_adapter *halmac_adapter,
56                                  u32 halmac_offset);
57
58 enum halmac_ret_status
59 halmac_reg_write_32_sdio_88xx(struct halmac_adapter *halmac_adapter,
60                               u32 halmac_offset, u32 halmac_data);
61
62 enum halmac_ret_status
63 halmac_get_sdio_tx_addr_88xx(struct halmac_adapter *halmac_adapter,
64                              u8 *halmac_buf, u32 halmac_size, u32 *pcmd53_addr);
65
66 enum halmac_ret_status
67 halmac_cfg_tx_agg_align_sdio_88xx(struct halmac_adapter *halmac_adapter,
68                                   u8 enable, u16 align_size);
69
70 enum halmac_ret_status halmac_cfg_tx_agg_align_sdio_not_support_88xx(
71         struct halmac_adapter *halmac_adapter, u8 enable, u16 align_size);
72
73 enum halmac_ret_status
74 halmac_tx_allowed_sdio_88xx(struct halmac_adapter *halmac_adapter,
75                             u8 *halmac_buf, u32 halmac_size);
76
77 u32 halmac_reg_read_indirect_32_sdio_88xx(struct halmac_adapter *halmac_adapter,
78                                           u32 halmac_offset);
79
80 u8 halmac_reg_read_nbyte_sdio_88xx(struct halmac_adapter *halmac_adapter,
81                                    u32 halmac_offset, u32 halmac_size,
82                                    u8 *halmac_data);
83
84 #endif /* _HALMAC_API_88XX_SDIO_H_ */