void ccci_md_mem_reserve(void)
{
	void* ptr = NULL;
	int tmp_md_id = MD_SYS1;

	parse_ccci_dfo_setting(NULL, 0);
	
#if defined(CONFIG_MTK_ENABLE_MD1)
	ptr = (void*)arm_memblock_steal(modem_size_list[tmp_md_id], SZ_32M);
	if(ptr)
	{
		md_resv_mem_addr[tmp_md_id] =(unsigned int) ptr;
		printk("[ccci/ctl] (1)md mem reserve successfully,ptr=%p,size=%d\n",ptr,modem_size_list[tmp_md_id]);
	}else{
		printk("[ccci/ctl] (1)md mem reserve fail.\n");
		md_resv_mem_addr[tmp_md_id] =0;
	}
	tmp_md_id = MD_SYS2;
	ptr = NULL;
#endif // MTK_ENABLE_MD1

#if defined(MTK_ENABLE_MD2)
	ptr = (void*)arm_memblock_steal(modem_size_list[tmp_md_id], SZ_32M);
	if(ptr)
	{
		md_resv_mem_addr[tmp_md_id] =(unsigned int) ptr;
		printk("[ccci/ctl] (2)md mem reserve successfully,ptr=%p,size=%d\n",ptr,modem_size_list[tmp_md_id]);
	}else{
		printk("[ccci/ctl] (2)md mem reserve fail.\n");
		md_resv_mem_addr[tmp_md_id] =0;
	}
#endif // MTK_ENABLE_MD2
}
//get the info about how many modem is running currently
unsigned int get_nr_modem(void)
{
    // 2 additional modems (rear end)
    parse_ccci_dfo_setting(NULL, 0);
    // return modem_num;
    return 0;
}
Esempio n. 3
0
void ccci_md_mem_reserve(void)
{
	void* ptr;

	parse_ccci_dfo_setting(NULL, 0);

	ptr = (void*)arm_memblock_steal(modem_size_list[0],SZ_32M);
	if(ptr)
	{
		md_resv_mem_addr[MD_SYS1] =(unsigned int) ptr;
		printk("[ccci/ctl] (0)md mem reserve successfully,ptr=%p,size=%d\n",ptr,modem_size_list[0]);
	}else{
		printk("[ccci/ctl] (0)md mem reserve fail.\n");
		md_resv_mem_addr[MD_SYS1] =0;
	}
}