qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] add a simple 24mhz clock for the versatile
Date: Fri, 30 Mar 2007 11:48:13 -0500	[thread overview]
Message-ID: <460D3F4D.10400@windriver.com> (raw)

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

             reply	other threads:[~2007-03-30 16:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-30 16:48 Jason Wessel [this message]
2007-03-30 17:28 ` [Qemu-devel] [PATCH] add a simple 24mhz clock for the versatile Paul Brook
2007-03-30 17:49   ` Jonathan Kalbfeld
2007-03-30 23:30     ` Wessel, Jason
2007-03-30 23:39       ` andrzej zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=460D3F4D.10400@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).