From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HXKJ1-0007KJ-HT for qemu-devel@nongnu.org; Fri, 30 Mar 2007 12:50:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HXKIz-0007K4-5m for qemu-devel@nongnu.org; Fri, 30 Mar 2007 12:50:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXKIy-0007Jy-S7 for qemu-devel@nongnu.org; Fri, 30 Mar 2007 11:50:24 -0500 Received: from mail.windriver.com ([147.11.1.11] helo=mail.wrs.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HXKGG-0001B1-1u for qemu-devel@nongnu.org; Fri, 30 Mar 2007 12:47:36 -0400 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.wrs.com (8.13.6/8.13.6) with ESMTP id l2UGlXEx022877 for ; Fri, 30 Mar 2007 09:47:33 -0700 (PDT) Message-ID: <460D3F4D.10400@windriver.com> Date: Fri, 30 Mar 2007 11:48:13 -0500 From: Jason Wessel MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010404010301070904090905" Subject: [Qemu-devel] [PATCH] add a simple 24mhz clock for the versatile Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------010404010301070904090905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------010404010301070904090905 Content-Type: text/x-patch; name="arm_24mhz_clock.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="arm_24mhz_clock.patch" 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 */ --------------010404010301070904090905--