blob: b063093a2c2a58ff4631163e0cf63ce06face7f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#include <linux/device.h>
#include <linux/syscalls.h>
#include <linux/module.h>
#include <linux/memblock.h>
#include <asm/memblock.h>
#include <mach/sec_osal.h>
#include <mach/mt_sec_export.h>
#include <mach/mt_boot.h>
#include <asm/setup.h>
#include <linux/of_fdt.h>
#include <mach/ccci_config.h>
#include <mach/mt_ccci_common.h>
#include "port_kernel.h"
#include "ccci_support.h"
static struct ccci_setting ccci_cfg_setting;
void ccci_reload_md_type(struct ccci_modem *md, int type)
{
if(type != md->config.load_type) {
set_modem_support_cap(md->index,type);
md->config.load_type = type;
md->config.setting |= MD_SETTING_RELOAD;
}
}
struct ccci_setting* ccci_get_common_setting(int md_id)
{
#ifdef CONFIG_EVDO_DT_SUPPORT
ccci_cfg_setting.slot1_mode = CONFIG_MTK_TELEPHONY_BOOTUP_MODE_SLOT1;
ccci_cfg_setting.slot2_mode = CONFIG_MTK_TELEPHONY_BOOTUP_MODE_SLOT2;
#endif
return &ccci_cfg_setting;
}
int ccci_store_sim_switch_mode(struct ccci_modem *md, int simmode)
{
if (ccci_cfg_setting.sim_mode!= simmode) {
ccci_cfg_setting.sim_mode = simmode;
ccci_send_virtual_md_msg(md, CCCI_MONITOR_CH, CCCI_MD_MSG_CFG_UPDATE, 1);
} else {
CCCI_INF_MSG(md->index, CORE, "same sim mode as last time(0x%x)\n", simmode);
}
return 0;
}
int ccci_get_sim_switch_mode(void)
{
return ccci_cfg_setting.sim_mode;
}
|