void mt6573_timer_init(void) { #if 0 PDN_Power_CONA_DOWN(PDN_PERI_XGPT, KAL_FALSE); // Jau /* * Disable the GTP1 to avoid the hardware runing and ack the old interrupt * indication. */ DRV_WriteReg32(MT6573_XGPT1_CON, 0x32); DRV_WriteReg32(MT6573_XGPT_IRQACK, 0x01); /* * Disable Interrupt of GPT1 */ DRV_SetReg32(MT6573_XGPT_IRQEN, 0x00); /* * Specify the resolution */ DRV_WriteReg32(MT6573_XGPT1_PRESCALE, 0x4); /* * Set timeout count of GPT0. * We expected GPT interrupt arise every 10ms. (HZ = 100Hz) */ /* MT6573 812500/100=8125 */ //DRV_WriteReg32(MT6573_XGPT1_COMPARE, 8125); DRV_WriteReg32(MT6573_XGPT1_CON, 0x33); #else gpt4_init(TRUE); #endif // init timer system reset_timer(); }
void mtk_timer_init (void) { gpt4_init (TRUE); // init timer system reset_timer (); }