aboutsummaryrefslogtreecommitdiff
path: root/hw/stellaris.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-24 03:09:07 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-24 03:09:07 +0000
commite57ec0168ce21cdda48ddf45d77b76185667d9e6 (patch)
treeecc5d911db4022c5e785a3d42ce2d347e1274bd7 /hw/stellaris.c
parentaae9366a036b813d58fad2d99d28a2a478109f75 (diff)
downloadqemu-e57ec0168ce21cdda48ddf45d77b76185667d9e6.zip
qemu-e57ec0168ce21cdda48ddf45d77b76185667d9e6.tar.gz
qemu-e57ec0168ce21cdda48ddf45d77b76185667d9e6.tar.bz2
ARMv7-M SysTick fix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3727 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/stellaris.c')
-rw-r--r--hw/stellaris.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/stellaris.c b/hw/stellaris.c
index b7a0374..7936e0c 100644
--- a/hw/stellaris.c
+++ b/hw/stellaris.c
@@ -42,10 +42,6 @@ typedef const struct {
/* General purpose timer module. */
-/* Multiplication factor to convert from GPTM timer ticks to qemu timer
- ticks. */
-static int stellaris_clock_scale;
-
typedef struct gptm_state {
uint32_t config;
uint32_t mode[2];
@@ -90,7 +86,7 @@ static void gptm_reload(gptm_state *s, int n, int reset)
/* 32-bit CountDown. */
uint32_t count;
count = s->load[0] | (s->load[1] << 16);
- tick += (int64_t)count * stellaris_clock_scale;
+ tick += (int64_t)count * system_clock_scale;
} else if (s->config == 1) {
/* 32-bit RTC. 1Hz tick. */
tick += ticks_per_sec;
@@ -480,7 +476,7 @@ static void ssys_write(void *opaque, target_phys_addr_t offset, uint32_t value)
s->int_status |= (1 << 6);
}
s->rcc = value;
- stellaris_clock_scale = 5 * (((s->rcc >> 23) & 0xf) + 1);
+ system_clock_scale = 5 * (((s->rcc >> 23) & 0xf) + 1);
break;
case 0x100: /* RCGC0 */
s->rcgc[0] = value;