GNU Linux-libre 4.14.290-gnu1
[releases.git] / drivers / staging / rtlwifi / halmac / halmac_2_platform.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_2_PLATFORM_H_
26 #define _HALMAC_2_PLATFORM_H_
27
28 #include "../wifi.h"
29 #include <asm/byteorder.h>
30
31 #define HALMAC_PLATFORM_LITTLE_ENDIAN 1
32 #define HALMAC_PLATFORM_BIG_ENDIAN 0
33
34 /* Note : Named HALMAC_PLATFORM_LITTLE_ENDIAN / HALMAC_PLATFORM_BIG_ENDIAN
35  * is not mandatory. But Little endian must be '1'. Big endian must be '0'
36  */
37 #if defined(__LITTLE_ENDIAN)
38 #define HALMAC_SYSTEM_ENDIAN HALMAC_PLATFORM_LITTLE_ENDIAN
39 #elif defined(__BIG_ENDIAN)
40 #define HALMAC_SYSTEM_ENDIAN HALMAC_PLATFORM_BIG_ENDIAN
41 #else
42 #error
43 #endif
44
45 /* define the Platform SDIO Bus CLK */
46 #define PLATFORM_SD_CLK 50000000 /*50MHz*/
47
48 /* define the Rx FIFO expanding mode packet size unit for 8821C and 8822B */
49 /* Should be 8 Byte alignment */
50 #define HALMAC_RX_FIFO_EXPANDING_MODE_PKT_SIZE 16 /*Bytes*/
51
52 #endif /* _HALMAC_2_PLATFORM_H_ */