static int mtk_mdm_enable(void) { #if MTK_TS_PA_THPUT_VIA_CCCI == 1 // Register the data send back function // MD will receive the data by cb //#ifdef CONFIG_MTK_ENABLE_MD1 if (get_modem_is_enabled(0)) { if(!(is_meta_mode() | is_advanced_meta_mode())){ register_ccci_sys_call_back(0, ID_REG_TXPOWER_CB, MDM_CB(0)); } register_ccci_sys_call_back(0, ID_REG_RFTEMP_CB, MDM_CB(2)); register_ccci_sys_call_back(0, ID_REG_RFTEMP_3G_CB, MDM_CB(4)); } //#endif //#ifdef CONFIG_MTK_ENABLE_MD2 if (get_modem_is_enabled(1)) { if(!(is_meta_mode() | is_advanced_meta_mode())){ register_ccci_sys_call_back(1, ID_REG_TXPOWER_CB, MDM_CB(1)); } register_ccci_sys_call_back(1, ID_REG_RFTEMP_CB, MDM_CB(3)); register_ccci_sys_call_back(1, ID_REG_RFTEMP_3G_CB, MDM_CB(5)); } //#endif init_timer(&txpwr_timer); txpwr_timer.function = (void *)&mtk_stats_txpwr; //txpwr_timer.data = (unsigned long) &wmt_stats_info; txpwr_timer.expires = jiffies + signal_period * HZ; add_timer(&txpwr_timer); #endif mtk_mdm_dprintk("ENABLE MDM_TxPower Function\n"); return 0; }
static int send_get_md_all_msg(void) { char mode[1]; if(!(is_meta_mode() | is_advanced_meta_mode())){ mode[0] = MTK_THERMAL_GET_TX_POWER; #ifdef MTK_ENABLE_MD1 exec_ccci_kern_func_by_md_id(0, ID_GET_TXPOWER, mode, 0); #endif #ifdef MTK_ENABLE_MD2 exec_ccci_kern_func_by_md_id(1, ID_GET_TXPOWER, mode, 0); #endif } mode[0] = MTK_THERMAL_GET_RF_TEMP_2G; #ifdef MTK_ENABLE_MD1 exec_ccci_kern_func_by_md_id(0, ID_GET_TXPOWER, mode, 0); #endif #ifdef MTK_ENABLE_MD2 exec_ccci_kern_func_by_md_id(1, ID_GET_TXPOWER, mode, 0); #endif mode[0] = MTK_THERMAL_GET_RF_TEMP_3G; #ifdef MTK_ENABLE_MD1 exec_ccci_kern_func_by_md_id(0, ID_GET_TXPOWER, mode, 0); #endif #ifdef MTK_ENABLE_MD2 exec_ccci_kern_func_by_md_id(1, ID_GET_TXPOWER, mode, 0); #endif return 0; }
/* * @brief Configure the modem runtime data structure. * @param * buffer [in] The buffer containing modem runtime data. * @return Size of the modem runtime data structure is returned always. */ KAL_INT32 eemcs_md_runtime_cfg(void *buffer) { struct file *filp = NULL; LOGGING_MODE mdlog_flag = MODE_IDLE; struct MODEM_RUNTIME_st *runtime = NULL; int ret = 0; KAL_ASSERT(buffer != NULL); runtime = (struct MODEM_RUNTIME_st *)buffer; memset(runtime, 0, sizeof(struct MODEM_RUNTIME_st)); runtime->Prefix = 0x46494343; //"CCIF" runtime->Postfix = 0x46494343; //"CCIF" runtime->BootChannel = CH_CTRL_RX; runtime->DriverVersion = 0x20110118; filp = filp_open(MDLOGGER_FILE_PATH, O_RDONLY, 0777); if (!IS_ERR(filp)) { ret = kernel_read(filp, 0, (char*)&mdlog_flag, sizeof(int)); if (ret != sizeof(int)) mdlog_flag = MODE_IDLE; } else { DBGLOG(BOOT, ERR, "open %s fail: %ld", MDLOGGER_FILE_PATH, PTR_ERR(filp)); filp = NULL; } if (filp != NULL) { filp_close(filp, NULL); } if (is_meta_mode() || is_advanced_meta_mode()) runtime->BootingStartID = ((char)mdlog_flag << 8 | META_BOOT_ID); else runtime->BootingStartID = ((char)mdlog_flag << 8 | NORMAL_BOOT_ID); DBGLOG(BOOT, INF, "send /data/extmdl/mdl_config =%d to modem!", mdlog_flag); return sizeof(struct MODEM_RUNTIME_st); }
static int send_get_md_all_msg(void) { char mode[1]; if (!(is_meta_mode() | is_advanced_meta_mode())) { mode[0] = MTK_THERMAL_GET_TX_POWER; /* #ifdef CONFIG_MTK_ENABLE_MD1 */ if (get_modem_is_enabled(0)) exec_ccci_kern_func_by_md_id(0, ID_GET_TXPOWER, mode, 0); /* #endif */ /* #ifdef CONFIG_MTK_ENABLE_MD2 */ if (get_modem_is_enabled(1)) exec_ccci_kern_func_by_md_id(1, ID_GET_TXPOWER, mode, 0); /* #endif */ } mode[0] = MTK_THERMAL_GET_RF_TEMP_2G; /* #ifdef CONFIG_MTK_ENABLE_MD1 */ if (get_modem_is_enabled(0)) exec_ccci_kern_func_by_md_id(0, ID_GET_TXPOWER, mode, 0); /* #endif */ /* #ifdef CONFIG_MTK_ENABLE_MD2 */ if (get_modem_is_enabled(1)) exec_ccci_kern_func_by_md_id(1, ID_GET_TXPOWER, mode, 0); /* #endif */ mode[0] = MTK_THERMAL_GET_RF_TEMP_3G; /* #ifdef CONFIG_MTK_ENABLE_MD1 */ if (get_modem_is_enabled(0)) exec_ccci_kern_func_by_md_id(0, ID_GET_TXPOWER, mode, 0); /* #endif */ /* #ifdef CONFIG_MTK_ENABLE_MD2 */ if (get_modem_is_enabled(1)) exec_ccci_kern_func_by_md_id(1, ID_GET_TXPOWER, mode, 0); /* #endif */ return 0; }
static void ccci_tty_read(unsigned long arg) { int part, size, accept, ret; unsigned read, write; tty_instance_t *tty_instance = (tty_instance_t *) arg; if (tty_instance->tty == NULL) { has_pending_read = 1; CCCI_MSG_INF("tty", "NULL tty @ read\n"); return; } else if ((tty_instance->tty->index == CCCI_TTY_MODEM) && (is_meta_mode()||is_advanced_meta_mode())) { // Do not allow writes to the modem when in Meta Mode. // Otherwise, the modem firmware will crash. CCCI_MSG_INF("tty", "Attempted read from modem while in meta mode\n"); return; } read = tty_instance->shared_mem->rx_control.read; write = tty_instance->shared_mem->rx_control.write; size = write - read; /*ALPS00241537: if there is no data in share memory, not copy and send message to MD*/ /*because total size is (length-1) which is handled in MD write API, size=0 only indicates memory is empty*/ if(size == 0) { //CCCI_MSG_INF("tty", "ttyC%d share memory is empty! \n", tty_instance->tty->index); return; } if (size < 0) { size += tty_instance->shared_mem->rx_control.length; } if(tty_debug_enable & (1UL << tty_instance->tty->index)) CCCI_MSG_INF("tty", "[before Read]:[RX] tty=%04d data_len=%04d write=%04d read=%04d \n", tty_instance->tty->index, size, write, read); if (read > write) { part = tty_instance->shared_mem->rx_control.length - read; memcpy(tty_instance->flip_string, &tty_instance->shared_mem->rx_buffer[read], part); accept = tty_insert_flip_string(tty_instance->tty, tty_instance->flip_string, part); if (accept < part) { size -= accept; read += accept; goto __ccci_read_ack; } else { size -= part; read = 0; } } memcpy(tty_instance->flip_string, &tty_instance->shared_mem->rx_buffer[read], size); accept = tty_insert_flip_string(tty_instance->tty, tty_instance->flip_string, size); if (accept < size) { size -= accept; read += accept; } else { size = 0; read += accept; } __ccci_read_ack: tty_instance->shared_mem->rx_control.read = read; ret = ccci_write_mailbox(tty_instance->uart_rx_ack, tty_instance->channel); if (ret != CCCI_SUCCESS) { CCCI_MSG_INF("tty", "ccci_write_mailbox for %d fail: %d\n", tty_instance->tty->index, ret); ccci_channel_status(tty_instance->uart_rx_ack); // axs: mask assert which will induce device reboot //ASSERT(0); // axs: mask assert which will induce device reboot } if(tty_debug_enable & (1UL << tty_instance->tty->index)) CCCI_MSG_INF("tty", "[after Read]:[RX] tty=%04d data_len=%04d write=%04d read=%4d\n", tty_instance->tty->index, accept, tty_instance->shared_mem->rx_control.write, tty_instance->shared_mem->rx_control.read); wake_lock_timeout(&tty_instance->wake_lock, HZ / 2); tty_flip_buffer_push(tty_instance->tty); }
static int ccci_tty_write(struct tty_struct *tty, const unsigned char *buf, int len) { int size, over, total, ret; unsigned read, write, length, write_back, tmp_write; unsigned char *ptr; tty_instance_t *tty_instance = (tty_instance_t *) tty->driver_data; int has_free_space = 1; int retry_times, time_out; int xmit_retry=0; if (tty_instance == NULL) { CCCI_MSG_INF("tty", "NULL tty @ write\n"); return -EIO; } else if ((tty_instance->tty->index == CCCI_TTY_MODEM) && (is_meta_mode())) { // Do not allow writes to the modem when in Meta Mode. // Otherwise, the modem firmware will crash. CCCI_MSG_INF("tty", "Attempted write to modem while in meta mode\n"); return -EIO; } else if (len == 0) { CCCI_MSG_INF("tty", "Write Length is zero, return directly\n"); return 0; } //mutex_lock(&ccci_tty_lock); mutex_lock(&tty_instance->ccci_tty_mutex); size = 0; ptr = (unsigned char *) buf; //if (wait_event_interruptible(*tty_instance->write_waitq, tty_instance->ready == 1) == 0) /* Check free space */ read = tty_instance->shared_mem->tx_control.read; write = tty_instance->shared_mem->tx_control.write; length = tty_instance->shared_mem->tx_control.length; over = length - write; write_back = write; if (read == write) { size = length; } else if (read < write) { size = length - write; size += read; } else { size = read - write; } if(size >= 1) size-=1; else CCCI_MSG_INF("tty", "Size is Zero 1\n"); if(tty_debug_enable & (1UL << tty_instance->tty->index)) CCCI_MSG_INF("tty", "[before Write]:[TX] tty=%04d data_len=%04d write=%04d read=%04d over=%04d\n", tty_instance->tty->index, len, write, read, size); if (0 == size){ /* No space to write, wait MD side read data out to free memory */ has_free_space = 0; retry_times = 2; time_out = 2*HZ; while(1){ if(wait_event_interruptible_timeout(*tty_instance->write_waitq, read != tty_instance->shared_mem->tx_control.read, time_out) == 0) { if(retry_times){ CCCI_MSG_INF("tty", "ttyC%d write timeout, rp=%04d wp=%04d len=%04d\n", tty_instance->tty->index, tty_instance->shared_mem->tx_control.read, tty_instance->shared_mem->tx_control.write, tty_instance->shared_mem->tx_control.length); retry_times--; } else { /* If retry counter decrease to 0, set time out time to 1 hour from 2s. */ time_out = 60*60*HZ; CCCI_MSG_INF("tty", "ttyC%d change write timeout to 1 hour\n", tty_instance->tty->index); } } else { /* MD side has read data out or get a signal */ if(read != tty_instance->shared_mem->tx_control.read){ has_free_space = 1; /* Re-calculate free space */ read = tty_instance->shared_mem->tx_control.read; if (read == write){ size = length; } else if (read < write) { size = length - write; size += read; } else { size = read - write; } if(size>=1) size-=1; else CCCI_MSG_INF("tty", "Size is Zero 2\n"); CCCI_MSG_INF("tty", "ttyC%d has space to write, S:%d\n", tty_instance->tty->index, size); }/* else{ We get a signal, be interrupted } */ break; } } } if(has_free_space){ if (len > size) { CCCI_TTY_MSG("Really Write %dbytes for %d bytes\n",size,len); len = size; total = size; } total = len; if (over < len) { memcpy(&tty_instance->shared_mem->tx_buffer[write], (void *) ptr, over); len -= over; ptr += over; write = 0; } memcpy(&tty_instance->shared_mem->tx_buffer[write], (void *) ptr, len); /*ALPS00233095(CMUX FCS error issue): write buffer will out of order for optimization, */ /* update write pointer->memcpy, so need add dsb() between them*/ //dsb(); mb(); tmp_write = write + len; if (tmp_write >= length) { tmp_write -= length; } tty_instance->shared_mem->tx_control.write = tmp_write; tty_instance->ready = 0; len = total; if(tty_debug_enable & (1UL << tty_instance->tty->index)) CCCI_MSG_INF("tty", "[after Write]:[TX] tty=%04d data_len=%04d write=%04d read=%4d\n", tty_instance->tty->index, len, tty_instance->shared_mem->tx_control.write, tty_instance->shared_mem->tx_control.read); do{ ret = ccci_write_stream(tty_instance->uart_tx, (unsigned int) NULL, len); if(ret == CCCI_SUCCESS) break; if(ret == CCCI_NO_PHY_CHANNEL){ xmit_retry++; msleep(10); if( (xmit_retry%10) == 0){ CCCI_MSG_INF("tty", "[No Physical Channel]ttyC%d retry %d times fail\n", tty_instance->tty->index, xmit_retry); } } else { break; } }while(1); if (ret != CCCI_SUCCESS) { CCCI_MSG_INF("tty", "ttyC%d write stream fail, tx write pointer will roll back[%d-->%d]\n", tty_instance->tty->index, tty_instance->shared_mem->tx_control.write, write_back); tty_instance->ready = 1; tty_instance->shared_mem->tx_control.write = write_back; if (ret == CCCI_MD_NOT_READY || ret == CCCI_RESET_NOT_READY) { CCCI_MSG_INF("tty", "ttyC%d write fail when Modem not ready\n", tty_instance->tty->index); //mutex_unlock(&ccci_tty_lock); mutex_unlock(&tty_instance->ccci_tty_mutex); return ret; } CCCI_MSG_INF("tty", "ttyC%d write fail: %d\n", tty_instance->tty->index, ret); ccci_channel_status(tty_instance->uart_tx); // axs: mask assert which will induce device reboot //ASSERT(0); // axs: mask assert which will induce device reboot //mutex_unlock(&ccci_tty_lock); mutex_unlock(&tty_instance->ccci_tty_mutex); return ret; } } else { CCCI_MSG_INF("tty", "Fail write to %d\n", tty_instance->tty->index); len = 0; //mutex_unlock(&ccci_tty_lock); mutex_unlock(&tty_instance->ccci_tty_mutex); return -1; } //mutex_unlock(&ccci_tty_lock); mutex_unlock(&tty_instance->ccci_tty_mutex); return len; }
/*need modify according to dummy ap*/ int md_ccif_let_md_go(struct ccci_modem *md) { struct md_ccif_ctrl *md_ctrl = (struct md_ccif_ctrl *)md->private_data; if (MD_IN_DEBUG(md)) { CCCI_INF_MSG(md->index, TAG, "DBG_FLAG_JTAG is set\n"); return -1; } CCCI_INF_MSG(md->index, TAG, "md_ccif_let_md_go\n"); switch (md->index) { case MD_SYS2: /*set the start address to let modem to run */ /*make boot vector programmable */ ccif_write32(md_ctrl->md_boot_slave_Key, 0, MD2_BOOT_VECTOR_KEY_VALUE); /*after remap, MD ROM address is 0 from MD's view */ ccif_write32(md_ctrl->md_boot_slave_Vector, 0, MD2_BOOT_VECTOR_VALUE); /*make boot vector take effect */ ccif_write32(md_ctrl->md_boot_slave_En, 0, MD2_BOOT_VECTOR_EN_VALUE); break; case MD_SYS3: /*check if meta mode */ if (is_meta_mode() || get_boot_mode() == FACTORY_BOOT) { ccif_write32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_CONFIG, (ccif_read32 (md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_CONFIG) | ETS_SEL_BIT)); } /*step 1: set C2K boot mode */ ccif_write32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_CONFIG, (ccif_read32 (md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_CONFIG) & (~(0x7 << 8))) | (0x5 << 8)); CCCI_INF_MSG(md->index, TAG, "C2K_CONFIG = 0x%x\n", ccif_read32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_CONFIG)); /*step 2: config srcclkena selection mask */ ccif_write32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL, ccif_read32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL) & (~(0x3 << 4))); ccif_write32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL, ccif_read32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL) | (0x2 << 4)); CCCI_INF_MSG(md->index, TAG, "C2K_SPM_CTRL = 0x%x\n", ccif_read32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL)); ccif_write32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON, ccif_read32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON) | 0xc); ccif_write32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON, ccif_read32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON) & (~(0x1 << 14))); ccif_write32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON, ccif_read32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON) | (0x1 << 12)); ccif_write32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON, ccif_read32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON) | (0x1 << 27)); CCCI_INF_MSG(md->index, TAG, "SLEEP_CLK_CON = 0x%x\n", ccif_read32(md_ctrl->hw_info->sleep_base, SLEEP_CLK_CON)); /*step 3: PMIC VTCXO_1 enable */ pmic_config_interface(0x0A02, 0xA12E, 0xFFFF, 0x0); /*step 4: reset C2K */ #if 0 ccif_write32(md_ctrl->hw_info->toprgu_base, TOP_RGU_WDT_SWSYSRST, (ccif_read32 (md_ctrl->hw_info->toprgu_base, TOP_RGU_WDT_SWSYSRST) | 0x88000000) & (~(0x1 << 15))); #else mtk_wdt_set_c2k_sysrst(1); #endif CCCI_INF_MSG(md->index, TAG, "[C2K] TOP_RGU_WDT_SWSYSRST = 0x%x\n", ccif_read32(md_ctrl->hw_info->toprgu_base, TOP_RGU_WDT_SWSYSRST)); /*step 5: mpu already set */ /*step 6: wake up C2K */ ccif_write32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL, ccif_read32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL) | 0x1); while (! ((ccif_read32 (md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_STATUS) >> 1) & 0x1)) { CCCI_INF_MSG(md->index, TAG, "[C2K] C2K_STATUS = 0x%x\n", ccif_read32(md_ctrl->hw_info-> infra_ao_base, INFRA_AO_C2K_STATUS)); } ccif_write32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL, ccif_read32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL) & (~0x1)); CCCI_INF_MSG(md->index, TAG, "[C2K] C2K_SPM_CTRL = 0x%x, C2K_STATUS = 0x%x\n", ccif_read32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_SPM_CTRL), ccif_read32(md_ctrl->hw_info->infra_ao_base, INFRA_AO_C2K_STATUS)); break; } return 0; }
static int set_md_runtime(void) { int i, addr, len; struct modem_runtime_t *runtime = (struct modem_runtime_t *)MD_RUNTIME_ADDR; volatile int *base = (int*)(MD_RUNTIME_ADDR+sizeof(struct modem_runtime_t)); struct file *filp = NULL; LOGGING_MODE mdlog_flag = MODE_IDLE; int ret = 0; do { base--; CCCI_WRITEL(base,0); } while (base > (int*)MD_RUNTIME_ADDR); CCCI_WRITEL(&runtime->Prefix, 0x46494343); // "CCIF" CCCI_WRITEL(&runtime->Postfix, 0x46494343); // "CCIF" CCCI_WRITEL(&runtime->BootChannel, CCCI_CONTROL_RX); #if 0 if (is_meta_mode()||is_advanced_meta_mode()) { CCCI_WRITEL(&runtime->BootingStartID ,META_BOOT_ID); } else { CCCI_WRITEL(&runtime->BootingStartID ,NORMAL_BOOT_ID); } #endif #ifdef AP_MD_EINT_SHARE_DATA CCCI_WRITEL(&runtime->DriverVersion, 0x00000929); CCCI_WRITEL(&runtime->SysShareMemBase ,ccci_sys_smem_base_phy); CCCI_WRITEL(&runtime->SysShareMemSize ,ccci_sys_smem_size); #endif platform_set_runtime_data(runtime); CCCI_WRITEL(&runtime->ExceShareMemBase ,ccci_exp_smem_base_phy); CCCI_WRITEL(&runtime->ExceShareMemSize ,ccci_exp_smem_size); ccci_mdlog_base_req((void *)&addr, &len); CCCI_WRITEL(&runtime->MdlogShareMemBase ,addr); CCCI_WRITEL(&runtime->MdlogShareMemSize , len); ccci_pcm_base_req((void *)&addr, &len); CCCI_WRITEL(&runtime->PcmShareMemBase ,addr); CCCI_WRITEL(&runtime->PcmShareMemSize ,len); ccci_pmic_base_req((void *)&addr, &len); CCCI_WRITEL(&runtime->PmicShareMemBase ,addr); CCCI_WRITEL(&runtime->PmicShareMemSize ,len); ccci_fs_base_req((void *)&addr, &len); CCCI_WRITEL(&runtime->FileShareMemBase ,addr); CCCI_WRITEL(&runtime->FileShareMemSize ,len); ccci_rpc_base_req((void *)&addr, &len); CCCI_WRITEL(&runtime->RpcShareMemBase, addr); CCCI_WRITEL(&runtime->RpcShareMemSize,len); ccci_ipc_base_req((void*)&addr,&len); CCCI_WRITEL(&runtime->IPCShareMemBase,addr); CCCI_WRITEL(&runtime->IPCShareMemSize,len); for (i = 0; i < CCCI_TTY_BUFF_NR; i++) { ccci_uart_base_req(i, (void *)&addr, &len); if (addr == 0 || len == 0) { break; } else { CCCI_WRITEL(&runtime->UartShareMemBase[i] ,addr); CCCI_WRITEL(&runtime->UartShareMemSize[i] ,len); } } CCCI_WRITEL(&runtime->UartPortNum ,i); //add a new attribute of mdlogger auto start info to notify md filp = filp_open(MDLOGGER_FILE_PATH, O_RDONLY, 0777); if (IS_ERR(filp)) { CCCI_MSG_INF("ctl", "open /data/mdl/mdl_config fail:%ld\n", PTR_ERR(filp)); filp=NULL; } else { ret = kernel_read(filp, 0, (char*)&mdlog_flag,sizeof(int)); if (ret != sizeof(int)) { CCCI_MSG_INF("ctl", "read /data/mdl/mdl_config fail:ret=%d!\n", ret); mdlog_flag = MODE_IDLE; } } if(filp != NULL) { //CCCI_MSG_INF("ctl", "close /data/mdl/mdl_config!\n"); //filp_close(filp, current->files); filp_close(filp, NULL); } if (is_meta_mode() || is_advanced_meta_mode()) CCCI_WRITEL(&runtime->BootingStartID, ((char)mdlog_flag <<8 | META_BOOT_ID)); else CCCI_WRITEL(&runtime->BootingStartID, ((char)mdlog_flag <<8 | NORMAL_BOOT_ID)); CCCI_MSG_INF("ctl", "send /data/mdl/mdl_config =%d to modem!\n", mdlog_flag); DUMP_CCCI_MD_DATA(); return 0; }