This patch implements a simple 24mhz clock for the versatile board such that functions in the linux kernel can make use of these stamps. An example user of this is the printk time stamps when using the "time" parameter on the kernel boot line.

signed-off-by: [EMAIL PROTECTED]

Cheers,
Jason.
Index: qemu/hw/arm_sysctl.c
===================================================================
--- qemu.orig/hw/arm_sysctl.c
+++ qemu/hw/arm_sysctl.c
@@ -71,8 +71,10 @@ static uint32_t arm_sysctl_read(void *op
     case 0x58: /* BOOTCS */
         return 0;
     case 0x5c: /* 24MHz */
-        /* ??? not implemented.  */
-        return 0;
+    {   
+        uint64_t now = qemu_get_clock(vm_clock);
+        return (uint32_t)(now*.024);
+    }
     case 0x60: /* MISC */
         return 0;
     case 0x84: /* PROCID0 */

Reply via email to