From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 22 Oct 2008 09:03:18 +0200 Subject: [U-Boot] [PATCH] improved strmhz() In-Reply-To: <20081021191554.4F60F835694E@gemini.denx.de> References: <48FDCEB6.9040206@ronetix.at> <0E4961A3-232C-4307-91E3-B2F7CB216BFA@kernel.crashing.org> <20081021191554.4F60F835694E@gemini.denx.de> Message-ID: <200810220903.18271.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On Tuesday 21 October 2008, Wolfgang Denk wrote: > > > --- a/lib_generic/strmhz.c > > > +++ b/lib_generic/strmhz.c > > > @@ -27,7 +27,7 @@ char *strmhz (char *buf, long hz) > > > long l, n; > > > long m; > > > > > > - n = DIV_ROUND(hz, 1000000L); > > > + n = DIV_ROUND(hz, 1000) / 1000L; > > > l = sprintf (buf, "%ld", n); > > > > > > hz -= n * 1000000L; > Can you please provide the input to the strmhz() function (the "hz" > parameter) that is causing such output? This patch fixes a problem I have seen on the 1.066GHz Canyonlands. Without it I see this: CPU: AMCC PowerPC 460EX Rev. A at 1067.4294966964 MHz with it it's this: CPU: AMCC PowerPC 460EX Rev. A at 1066.667 MHz Wolfgang, can you check in the new patch version? Thanks. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================