qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] add a simple 24mhz clock for the versatile
@ 2007-03-30 16:48 Jason Wessel
  2007-03-30 17:28 ` Paul Brook
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Wessel @ 2007-03-30 16:48 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]


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: jason.wessel@windriver.com

Cheers,
Jason.

[-- Attachment #2: arm_24mhz_clock.patch --]
[-- Type: text/x-patch, Size: 524 bytes --]

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 */

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-30 23:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-30 16:48 [Qemu-devel] [PATCH] add a simple 24mhz clock for the versatile Jason Wessel
2007-03-30 17:28 ` Paul Brook
2007-03-30 17:49   ` Jonathan Kalbfeld
2007-03-30 23:30     ` Wessel, Jason
2007-03-30 23:39       ` andrzej zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).