]> Git Repo - qemu.git/blobdiff - hw/pl031.c
Merge remote branch 'mst/for_anthony' into staging
[qemu.git] / hw / pl031.c
index 671491fba24f2fe5c88372f2c564868b0981d230..45b7032c5002f278cb6b38ed2a751da5e848a2f9 100644 (file)
@@ -67,7 +67,7 @@ static uint32_t pl031_get_count(pl031_state *s)
 {
     /* This assumes qemu_get_clock returns the time since the machine was
        created.  */
-    return s->tick_offset + qemu_get_clock(vm_clock) / ticks_per_sec;
+    return s->tick_offset + qemu_get_clock(vm_clock) / get_ticks_per_sec();
 }
 
 static void pl031_set_alarm(pl031_state *s)
@@ -76,7 +76,7 @@ static void pl031_set_alarm(pl031_state *s)
     uint32_t ticks;
 
     now = qemu_get_clock(vm_clock);
-    ticks = s->tick_offset + now / ticks_per_sec;
+    ticks = s->tick_offset + now / get_ticks_per_sec();
 
     /* The timer wraps around.  This subtraction also wraps in the same way,
        and gives correct results when alarm < now_ticks.  */
@@ -86,7 +86,7 @@ static void pl031_set_alarm(pl031_state *s)
         qemu_del_timer(s->timer);
         pl031_interrupt(s);
     } else {
-        qemu_mod_timer(s->timer, now + (int64_t)ticks * ticks_per_sec);
+        qemu_mod_timer(s->timer, now + (int64_t)ticks * get_ticks_per_sec());
     }
 }
 
@@ -183,7 +183,7 @@ static CPUReadMemoryFunc * const  pl031_readfn[] = {
     pl031_read
 };
 
-static void pl031_init(SysBusDevice *dev)
+static int pl031_init(SysBusDevice *dev)
 {
     int iomemtype;
     pl031_state *s = FROM_SYSBUS(pl031_state, dev);
@@ -202,6 +202,7 @@ static void pl031_init(SysBusDevice *dev)
     s->tick_offset = mktimegm(&tm);
 
     s->timer = qemu_new_timer(vm_clock, pl031_interrupt, s);
+    return 0;
 }
 
 static void pl031_register_devices(void)
This page took 0.025876 seconds and 4 git commands to generate.