From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VuXjs-0008Qp-5Y for mharc-grub-devel@gnu.org; Sat, 21 Dec 2013 20:21:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuXjm-0008QL-DG for grub-devel@gnu.org; Sat, 21 Dec 2013 20:21:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VuXjh-0006yb-B8 for grub-devel@gnu.org; Sat, 21 Dec 2013 20:21:46 -0500 Received: from benson.vm.bytemark.co.uk ([212.110.190.137]:41800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuXjh-0006yP-61 for grub-devel@gnu.org; Sat, 21 Dec 2013 20:21:41 -0500 Received: from cpc22-cmbg14-2-0-cust482.5-4.cable.virginm.net ([86.6.25.227] helo=[192.168.1.7]) by benson.vm.bytemark.co.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1VuXje-0006bf-Tk; Sun, 22 Dec 2013 01:21:38 +0000 Message-ID: <1387675298.17491.14.camel@dagon.hellion.org.uk> Subject: Re: [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units From: Ian Campbell To: Vladimir =?UTF-8?Q?=27=CF=86-coder/phcoder=27?= Serbinenko Date: Sun, 22 Dec 2013 01:21:38 +0000 In-Reply-To: <52B614E6.1090100@gmail.com> References: <1387121014-19415-1-git-send-email-ijc@hellion.org.uk> <52B614E6.1090100@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-4+b1 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.110.190.137 Cc: grub-devel@gnu.org, Leif Lindholm X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 01:21:51 -0000 On Sat, 2013-12-21 at 23:23 +0100, Vladimir '=CF=86-coder/phcoder' Serbinen= ko wrote: > On 15.12.2013 16:23, Ian Campbell wrote: > > From: Ian Campbell > >=20 > > u-boot's API_GET_TIMER returns the current time in ms by directly expos= ing the > > internal get_timer which is in ms, which isn't all that clearly documen= ted but > > is obvious from the use within u-boot and is mentioned in > > http://www.denx.de/wiki/U-Boot/TaskTimerAPI. > >=20 > During tests on my raspberry pi, I actually experienced the exact > opposite. On PI timer API is in microseconds. > Are you sure you made no mistake? I'm quite sure that on the Midway platform get_timer was returning ms and the 5s grub countdown took 5s after my fix and some interminably long time before it. Sadly actual documentation of the u-boot API is a bit thin on the ground, but get_timer=3D=3Dms is also corroborated by some ad-hoc googling = I did (e.g. resulting in the above link) as well as inspection of some random u-boot ports. Some ports have an explicit get_timer_us function, which adds credence to the idea that get_timer is in ms instead. Ian.