Lines Matching refs:tm4

108     PXA2xxTimer4 tm4[8];  member
144 if (s->tm4[n].control & (1 << 7)) in pxa2xx_timer_update4()
149 if (!s->tm4[counter].freq) { in pxa2xx_timer_update4()
150 timer_del(s->tm4[n].tm.qtimer); in pxa2xx_timer_update4()
154 now_vm = s->tm4[counter].clock + muldiv64(now_qemu - in pxa2xx_timer_update4()
155 s->tm4[counter].lastload, in pxa2xx_timer_update4()
156 s->tm4[counter].freq, NANOSECONDS_PER_SECOND); in pxa2xx_timer_update4()
158 new_qemu = now_qemu + muldiv64((uint32_t) (s->tm4[n].tm.value - now_vm), in pxa2xx_timer_update4()
159 NANOSECONDS_PER_SECOND, s->tm4[counter].freq); in pxa2xx_timer_update4()
160 timer_mod(s->tm4[n].tm.qtimer, new_qemu); in pxa2xx_timer_update4()
195 return s->tm4[tm].tm.value; in pxa2xx_timer_read()
217 if ((tm == 9 - 4 || tm == 11 - 4) && (s->tm4[tm].control & (1 << 9))) { in pxa2xx_timer_read()
218 if (s->tm4[tm - 1].freq) in pxa2xx_timer_read()
219 s->snapshot = s->tm4[tm - 1].clock + muldiv64( in pxa2xx_timer_read()
221 s->tm4[tm - 1].lastload, in pxa2xx_timer_read()
222 s->tm4[tm - 1].freq, NANOSECONDS_PER_SECOND); in pxa2xx_timer_read()
224 s->snapshot = s->tm4[tm - 1].clock; in pxa2xx_timer_read()
227 if (!s->tm4[tm].freq) in pxa2xx_timer_read()
228 return s->tm4[tm].clock; in pxa2xx_timer_read()
229 return s->tm4[tm].clock + in pxa2xx_timer_read()
231 s->tm4[tm].lastload, s->tm4[tm].freq, in pxa2xx_timer_read()
256 return s->tm4[tm].control; in pxa2xx_timer_read()
307 s->tm4[tm].tm.value = value; in pxa2xx_timer_write()
333 s->tm4[tm].oldclock = s->tm4[tm].clock; in pxa2xx_timer_write()
334 s->tm4[tm].lastload = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); in pxa2xx_timer_write()
335 s->tm4[tm].clock = value; in pxa2xx_timer_write()
336 pxa2xx_timer_update4(s, s->tm4[tm].lastload, tm); in pxa2xx_timer_write()
362 s->tm4[tm].control = value & 0x0ff; in pxa2xx_timer_write()
365 s->tm4[tm].freq = pxa2xx_timer4_freq[value & 7]; in pxa2xx_timer_write()
367 s->tm4[tm].freq = 0; in pxa2xx_timer_write()
380 s->tm4[tm].control = value & 0x3ff; in pxa2xx_timer_write()
383 s->tm4[tm].freq = in pxa2xx_timer_write()
386 s->tm4[tm].freq = 0; in pxa2xx_timer_write()
490 s->tm4[i].tm.value = 0; in pxa2xx_timer_realize()
491 s->tm4[i].tm.info = s; in pxa2xx_timer_realize()
492 s->tm4[i].tm.num = i + 4; in pxa2xx_timer_realize()
493 s->tm4[i].freq = 0; in pxa2xx_timer_realize()
494 s->tm4[i].control = 0x0; in pxa2xx_timer_realize()
495 s->tm4[i].tm.qtimer = timer_new_ns(QEMU_CLOCK_VIRTUAL, in pxa2xx_timer_realize()
496 pxa2xx_timer_tick4, &s->tm4[i]); in pxa2xx_timer_realize()
547 VMSTATE_STRUCT_ARRAY_TEST(tm4, PXA2xxTimerInfo, 8,