void do_wdt_reset(void) { *(VUINT_T *)(0xd401e080) = 0xD0C1; *(VUINT_T *)(0xd401900c) &= ~(0x1<<3); udelay(1); //can't be removed. wdt_test(2, WDT_GEN_RESET); }
void ccci_exception_info_passed_pre(void) { #if defined(__MODEM_CCCI_EXIST__)&& !defined(__MODEM_CARD__) CCCI_BUFF_T *buff; qbm_gpd *p_first_gpd, *p_last_gpd; kal_uint32 gpd_num; // ensure in the exception state if(INT_QueryExceptionStatus() == KAL_FALSE) return; //- Already init in ccci_exception_handshake //- ccci_init(CCCI_CONTROL_CHANNEL, ccci_except_ack); //- ccci_init(CCCI_CONTROL_CHANNEL_ACK, ccci_except_ack); buff = CCCIDEV_GET_QBM_DATAPTR(ccci_except_polling_gpd_tx); buff->data[0] = MD_EX_MAGIC; buff->data[1] = CCMSG_ID_EXCEPTION_REC_OK; buff->channel = CCCI_CONTROL_CHANNEL; buff->reserved = MD_EX_REC_OK_CHK_ID; ccci_debug_add_seq(buff, CCCI_DEBUG_ASSERT_BIT); // add ccci seq kal_mem_cpy((void*)(buff+1), ex_log_ptr, sizeof(EX_LOG_T)); QBM_DES_SET_DATALEN(ccci_except_polling_gpd_tx, sizeof(CCCI_BUFF_T) + sizeof(EX_LOG_T)); QBM_DES_SET_DATALEN(ccci_except_polling_gpd_tx->p_data_tbd, sizeof(CCCI_BUFF_T) + sizeof(EX_LOG_T)); qbm_cal_set_checksum((kal_uint8 *)ccci_except_polling_gpd_tx); qbm_cal_set_checksum((kal_uint8 *)ccci_except_polling_gpd_tx->p_data_tbd); QBM_CACHE_FLUSH(ccci_except_polling_gpd_tx, sizeof(qbm_gpd)); QBM_CACHE_FLUSH(ccci_except_polling_gpd_tx->p_data_tbd, sizeof(qbm_gpd)); QBM_CACHE_FLUSH(buff, sizeof(CCCI_BUFF_T) + sizeof(EX_LOG_T)); // TODO:Need to revise the API, shall use exception API (after channle reset flow is done) #ifdef SWITCH_TO_EXCEPTION_IO p_first_gpd = p_last_gpd = ccci_except_polling_gpd_tx; ccci_except_set_gpd(CCCI_CONTROL_CHANNEL, p_first_gpd, p_last_gpd); gpd_num = 0; do{ ccci_except_hif_st(CCCI_CONTROL_CHANNEL); ccci_except_poll_gpd(CCCI_CONTROL_CHANNEL, (void **)&p_first_gpd, (void **)&p_last_gpd, &gpd_num); }while(0 == gpd_num); ex_set_step_logging(EX_AUTO_STEP); //0x45 CCCIDEV_RST_CCCI_COMM_GPD_LIST(p_first_gpd, p_last_gpd); #else ccci_exception_info_write_result = ccci_polling_io(CCCI_CONTROL_CHANNEL, ccci_except_polling_gpd_tx, KAL_TRUE); CCCIDEV_RST_CCCI_COMM_GPD_LIST(ccci_except_polling_gpd_tx, ccci_except_polling_gpd_tx); #endif ccci_exception_state = CCCI_EXPT_INFO_PASS_PRE_ST; #ifdef WDT_ISR_TEST wdt_test(); #endif #endif }