diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-24 03:09:07 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-24 03:09:07 +0000 |
commit | e57ec0168ce21cdda48ddf45d77b76185667d9e6 (patch) | |
tree | ecc5d911db4022c5e785a3d42ce2d347e1274bd7 /hw/armv7m_nvic.c | |
parent | aae9366a036b813d58fad2d99d28a2a478109f75 (diff) |
ARMv7-M SysTick fix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3727 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/armv7m_nvic.c')
-rw-r--r-- | hw/armv7m_nvic.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c index 99ea9873a7..fc60487dee 100644 --- a/hw/armv7m_nvic.c +++ b/hw/armv7m_nvic.c @@ -48,14 +48,15 @@ typedef struct { #define SYSTICK_CLKSOURCE (1 << 2) #define SYSTICK_COUNTFLAG (1 << 16) -/* Conversion factor from qemu timer to SysTick frequencies. - QEMU uses a base of 1GHz, so these give 20MHz and 1MHz for core and - reference frequencies. */ +/* Multiplication factor to convert from system clock ticks to qemu timer + ticks. */ +int system_clock_scale; +/* Conversion factor from qemu timer to SysTick frequencies. */ static inline int64_t systick_scale(nvic_state *s) { if (s->systick.control & SYSTICK_CLKSOURCE) - return 50; + return system_clock_scale; else return 1000; } |