Exemple #1
0
int ccci_misc_ipo_h_restore(int md_id)
{
	int reset_mode = (0x5AA5 << 16);

	if (curr_sim_mode[md_id] != -1) {
		exec_ccci_kern_func(ID_SSW_SWITCH_MODE, (char *)(&reset_mode),
				    sizeof(unsigned int));
		CCCI_MSG_INF(md_id, "chr", "restore sim mode to %08x\n",
			     curr_sim_mode[md_id]);
		exec_ccci_kern_func(ID_SSW_SWITCH_MODE,
				    (char *)(&curr_sim_mode[md_id]),
				    sizeof(unsigned int));
	}
	return 0;
}
Exemple #2
0
static void sc_output_wake_reason(u32 wakesrc, u32 wakesta, u32 isr, u32 pause)
{
	char str[128] = { 0 };
	bool eint_wake = false, ccif_md_wake = false;

	if (wakesta & WAKE_SRC_KP)
		strcat(str, "KP ");

	if (wakesta & WAKE_SRC_MSDC1)
		strcat(str, "MSDC1 ");

	if (wakesta & WAKE_SRC_EINT) {
		strcat(str, "EINT ");
		eint_wake = true;
	}

	if (wakesta & WAKE_SRC_RTC)
		strcat(str, "RTC ");

	if (wakesta & WAKE_SRC_CCIF_MD) {
		strcat(str, "CCIF_MD ");
		ccif_md_wake = true;
	}

	if (wakesta & WAKE_SRC_ACCDET)
		strcat(str, "ACCDET ");

#ifdef CONFIG_MTK_SC_DEBUG
	if (wakesta & WAKE_SRC_TS)
		strcat(str, "TS ");

	if (wakesta & WAKE_SRC_GPT)
		strcat(str, "GPT ");

	if (wakesta & WAKE_SRC_LOW_BAT)
		strcat(str, "LOW_BAT ");

	if (wakesta & WAKE_SRC_CA9_DBG)
		strcat(str, "CA9_DBG ");

	BUG_ON(wakesta == 0x0);
#endif

	sc_info2("wake up by %s(0x%x)(0x%x)(%u)\n", str, wakesta, isr, pause);
	if (eint_wake)
		mt65xx_eint_print_status();
	if (ccif_md_wake)
		exec_ccci_kern_func(ID_GET_MD_WAKEUP_SRC, NULL, 0);
}