6c5a7583c4da13f4e72414cceee60e708e5ef6d0
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rda5990 / rda_wlan / rda5890_if_sdio.h
1 #ifndef _RDA5890_IF_SDIO_H
2 #define _RDA5890_IF_SDIO_H
3
4 #define IF_SDIO_SDIO2AHB_PKTLEN_L               0x00
5 #define IF_SDIO_SDIO2AHB_PKTLEN_H               0x01
6
7 #define IF_SDIO_AHB2SDIO_PKTLEN_L               0x02
8 #define IF_SDIO_AHB2SDIO_PKTLEN_H               0x03
9
10 #define IF_SDIO_FUN1_INT_MASK   0x04
11 #define IF_SDIO_FUN1_INT_PEND   0x05
12 #define IF_SDIO_FUN1_INT_STAT   0x06
13
14 #define   IF_SDIO_INT_AHB2SDIO  0x01
15 #define   IF_SDIO_INT_ERROR             0x04
16 #define   IF_SDIO_INT_SLEEP             0x10
17 #define   IF_SDIO_INT_AWAKE             0x20
18 #define   IF_SDIO_INT_RXCMPL    0x40
19 #define   IF_SDIO_HOST_TX_FLAG  0x80
20
21 #define IF_SDIO_FUN1_FIFO_WR    0x07
22 #define IF_SDIO_FUN1_FIFO_RD    0x08
23
24 #define IF_SDIO_FUN1_INT_TO_DEV 0x09
25
26 struct if_sdio_card {
27         struct sdio_func        *func;
28         struct rda5890_private  *priv;
29
30         u8                      buffer[2048];
31
32         spinlock_t              lock;
33         struct if_sdio_packet   *packets;
34         struct work_struct      packet_worker;
35         
36         struct workqueue_struct *work_thread;
37         atomic_t wid_complete_flag;
38 #ifdef WIFI_POWER_MANAGER
39         atomic_t              sleep_work_is_active;
40         struct delayed_work   sleep_work;
41 #endif
42 };
43
44 void export_msdc_clk_always_on(void);
45 void export_msdc_clk_always_on_off(void);
46 void export_wifi_eirq_enable(void);
47 void export_wifi_eirq_disable(void);
48
49 #endif