1 /******************************************************************************
2 *
3 * Copyright(c) 2007 - 2017 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
26 /*************************************************************
27 * include files
28 ************************************************************/
29
30 #include "mp_precomp.h"
31 #include "phydm_precomp.h"
32
phydm_init_soft_ml_setting(void * dm_void)33 void phydm_init_soft_ml_setting(void *dm_void)
34 {
35 struct dm_struct *dm = (struct dm_struct *)dm_void;
36 u32 soml_mask = BIT(31) | BIT(30) | BIT(29) | BIT(28);
37
38 #if (RTL8822B_SUPPORT == 1)
39 if (!*dm->mp_mode) {
40 if (dm->support_ic_type & ODM_RTL8822B) {
41 #if 0
42 /*odm_set_bb_reg(dm, R_0x19a8, MASKDWORD, 0xd10a0000);*/
43 #endif
44 phydm_somlrxhp_setting(dm, true);
45 dm->bsomlenabled = true;
46 }
47 }
48 #endif
49 #if (RTL8821C_SUPPORT == 1)
50 if (!*dm->mp_mode) {
51 if (dm->support_ic_type & ODM_RTL8821C)
52 odm_set_bb_reg(dm, R_0x19a8, soml_mask, 0xd);
53 }
54 #endif
55 #if (RTL8195B_SUPPORT == 1)
56 if (!*dm->mp_mode) {
57 if (dm->support_ic_type & ODM_RTL8195B)
58 odm_set_bb_reg(dm, R_0x19a8, soml_mask, 0xd);
59 }
60 #endif
61 }
62