[Qemu-devel] [PATCH v2 14/20] arm: add Faraday FTRTC011 RTC timer support

2013-01-25 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTRTC011 is a flexible, small-area, and low-power Real Time Clock (RTC). It accepts two clock sources: APB bus clock (PCLK) and 32.768 kHz clock. When the system enters the sleep mode, the PCLK clock will be gated by the system while RTC will keep on

Re: [Qemu-devel] [PATCH v2 14/20] arm: add Faraday FTRTC011 RTC timer support

2013-01-25 Thread Paul Brook
+qemu_mod_timer(s-qtimer, +qemu_get_clock_ns(vm_clock) + get_ticks_per_sec()); This will not work reliably. You can not rely on timers triggering promptly. Plus you're loosing the time taken to execute the callback every tick. Additionally you can calculate values on demand,