Lines Matching refs:pTimer
207 static void wd_toggleintr(struct wd_timer* pTimer, int enable);
208 static void wd_pingtimer(struct wd_timer* pTimer);
209 static void wd_starttimer(struct wd_timer* pTimer);
210 static void wd_resetbrokentimer(struct wd_timer* pTimer);
211 static void wd_stoptimer(struct wd_timer* pTimer);
213 static int wd_getstatus(struct wd_timer* pTimer);
344 struct wd_timer* pTimer = (struct wd_timer*)file->private_data; in wd_ioctl() local
351 if(NULL == pTimer) { in wd_ioctl()
371 wd_pingtimer(pTimer); in wd_ioctl()
384 wd_stoptimer(pTimer); in wd_ioctl()
387 wd_starttimer(pTimer); in wd_ioctl()
395 setopt = wd_getstatus(pTimer); in wd_ioctl()
401 wd_starttimer(pTimer); in wd_ioctl()
409 wd_stoptimer(pTimer); in wd_ioctl()
422 struct wd_timer* pTimer = (struct wd_timer*)file->private_data; in wd_write() local
424 if(NULL == pTimer) { in wd_write()
432 wd_pingtimer(pTimer); in wd_write()
523 static void wd_toggleintr(struct wd_timer* pTimer, int enable) in wd_toggleintr() argument
527 (NULL == pTimer) ? in wd_toggleintr()
529 (pTimer->intr_mask); in wd_toggleintr()
544 static void wd_pingtimer(struct wd_timer* pTimer) in wd_pingtimer() argument
546 if(wd_readb(&pTimer->regs->status) & WD_S_RUNNING) { in wd_pingtimer()
547 wd_readw(&pTimer->regs->dcntr); in wd_pingtimer()
557 static void wd_stoptimer(struct wd_timer* pTimer) in wd_stoptimer() argument
559 if(wd_readb(&pTimer->regs->status) & WD_S_RUNNING) { in wd_stoptimer()
560 wd_toggleintr(pTimer, WD_INTR_OFF); in wd_stoptimer()
563 pTimer->runstatus |= WD_STAT_BSTOP; in wd_stoptimer()
579 static void wd_starttimer(struct wd_timer* pTimer) in wd_starttimer() argument
582 pTimer->runstatus &= ~WD_STAT_BSTOP; in wd_starttimer()
584 pTimer->runstatus &= ~WD_STAT_SVCD; in wd_starttimer()
586 wd_writew(pTimer->timeout, &pTimer->regs->limit); in wd_starttimer()
587 wd_toggleintr(pTimer, WD_INTR_ON); in wd_starttimer()
593 static void wd_resetbrokentimer(struct wd_timer* pTimer) in wd_resetbrokentimer() argument
595 wd_toggleintr(pTimer, WD_INTR_ON); in wd_resetbrokentimer()
596 wd_writew(WD_BLIMIT, &pTimer->regs->limit); in wd_resetbrokentimer()
695 static int wd_getstatus(struct wd_timer* pTimer) in wd_getstatus() argument
697 unsigned char stat = wd_readb(&pTimer->regs->status); in wd_getstatus()
710 if(intr & pTimer->intr_mask) { in wd_getstatus()
725 if(wd_dev.isbaddoggie && (pTimer->runstatus & WD_STAT_BSTOP)) { in wd_getstatus()
726 if(pTimer->runstatus & WD_STAT_SVCD) { in wd_getstatus()
741 if(pTimer->runstatus & WD_STAT_SVCD) { in wd_getstatus()