Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-11-23 Thread Renato Andreola
Dear Wolfgang Denk, I've sent the last patch regarding the CFI timeout underflow on 24th August 2009 and then I Have done no more activity on U-Boot for Nios2. I've done no more activity regarding the cache flush in lib_nios2/bootm.c too. As I remember, the problems with the 2 patches were related

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-11-23 Thread Wolfgang Denk
Dear Renato Andreola, In message 4b0a4d04.4030...@imagos.it you wrote: I've sent the last patch regarding the CFI timeout underflow on 24th August 2009 and then I Have done no more activity on U-Boot for Nios2. I've done no more activity regarding the cache flush in lib_nios2/bootm.c too.

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-11-22 Thread Wolfgang Denk
Dear Renato Andreola, In message 4a925011.9080...@imagos.it you wrote: From 21d84ab72266f118794233176bd356d8b1cfdf35 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Fri, 21 Aug 2009 18:05:51 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-25 Thread Shinya Kuribayashi
Renato Andreola wrote: From 21d84ab72266f118794233176bd356d8b1cfdf35 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Fri, 21 Aug 2009 18:05:51 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow problem in tout calculation With old

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-25 Thread Renato Andreola
This patch is necessary to fix the common case in which CONFIG_SYS_HZ is just below 1000 (e.g. 999 that results from an integer division between a system clock frequency like 8333Hz and a divisor like 83334). In that case the CONFIG_SYS_HZ/1000 expression returns 0 and the tout *=

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-25 Thread Stefan Roese
On Monday 24 August 2009 10:32:17 Renato Andreola wrote: From 21d84ab72266f118794233176bd356d8b1cfdf35 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Fri, 21 Aug 2009 18:05:51 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow problem in

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-25 Thread Stefan Roese
On Tuesday 25 August 2009 17:39:56 Stefan Roese wrote: + if ((ulong)CONFIG_SYS_HZ 10) + tout *= (ulong)CONFIG_SYS_HZ/1000; /* for a big HZ, avoid overflow */ Please insert spaces before and after the / above. + else + tout =

[U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-24 Thread Renato Andreola
From 21d84ab72266f118794233176bd356d8b1cfdf35 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Fri, 21 Aug 2009 18:05:51 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow problem in tout calculation With old configuration it could happen tout=0

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-09 Thread Wolfgang Denk
Dear Renato Andreola, In message 4a7c1a8e.2080...@imagos.it you wrote: Ok, for the change. What is the preferred way to proceed? have I got to resubmit a patch for the change with the DIV_ROUND_UP macro? Yes, please. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD:

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-07 Thread Renato Andreola
Dear Wolfgang, I'd like to clarify what is the problem with the timeout and the Intel flash (even if the following comments can be obvious or already well known) and to ask you an opinion on a small code change. The flash has an internal busy flag that is polled in function

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-07 Thread Wolfgang Denk
Dear Renato Andreola, In message 4a7be28a.8080...@imagos.it you wrote: I'd like to clarify what is the problem with the timeout and the Intel flash (even if the following comments can be obvious or already well known) and to ask you an opinion on a small code change. Thanks. ... I think

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-07 Thread Renato Andreola
Ok, for the change. What is the preferred way to proceed? have I got to resubmit a patch for the change with the DIV_ROUND_UP macro? Best regards, Renato Andreola Wolfgang Denk wrote: Dear Renato Andreola, In message 4a7be28a.8080...@imagos.it you wrote: I'd like to clarify what is the

[U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Renato Andreola
From be54cb97ca26bcbbc1a908d1f2a5447b6639dc59 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Thu, 6 Aug 2009 11:40:52 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow problem in tout calculation With old configuration it could happen tout=0

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Wolfgang Denk
Dear Renato Andreola, In message 4a7aa72c.8010...@imagos.it you wrote: From be54cb97ca26bcbbc1a908d1f2a5447b6639dc59 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Thu, 6 Aug 2009 11:40:52 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Alessandro Rubini
With old configuration it could happen tout=0 if CONFIG_SYS_HZ1000 solved using an unsigned long long I had the same problem with an ancient version of a vendor-ported u-boot. There my CFG_HZ was 100, so the timeout was 0. I used this, which avoids the preprocessor conditional. Since the HZ

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Wolfgang Denk
Dear Renato Andreola, In message 4a7ab614.2020...@imagos.it you wrote: !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head Please NEVER post HTML here!! I agree with Wolfgang Denk in not using the LL type (too compiler/library/machine dependent).br I think that the code

[U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Renato Andreola
From 3723c8437d8c3d2e04bc3bc1de9c21b33072ab08 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Thu, 6 Aug 2009 14:49:59 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow problem in tout calculation With old configuration it could happen tout=0

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Wolfgang Denk
Dear Renato Andreola, In message 4a7ad624.9030...@imagos.it you wrote: From 3723c8437d8c3d2e04bc3bc1de9c21b33072ab08 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Thu, 6 Aug 2009 14:49:59 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Alessandro Rubini
+tout = tout * CONFIG_SYS_HZ / 1000 + 1; 2) There should be a Signed-off-by: from Alessandro, too. Signed-off-by: Alessandro Rubini rub...@gnudd.com 5) Omit the +1. It seems bogus to me. Since the timeout is an error condition, It's better to have it longer than shorter.

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Wolfgang Denk
Dear Alessandro Rubini, In message 20090806133110.ga26...@mail.gnudd.com you wrote: Since the timeout is an error condition, It's better to have it longer than shorter. Since integer division truncates towards 0, I'd better give my hardware more time before signalling an error (an unlikely

[U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Renato Andreola
From 341dbd88695d3514699aae612d640ed93feb8821 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Thu, 6 Aug 2009 18:05:00 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow problem in tout calculation With old configuration it could happen tout=0

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Jean-Christophe PLAGNIOL-VILLARD
On 15:09 Thu 06 Aug , Renato Andreola wrote: From 3723c8437d8c3d2e04bc3bc1de9c21b33072ab08 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Thu, 6 Aug 2009 14:49:59 +0200 Subject: [PATCH] drivers/mtd/cfi_flash: precision and underflow problem in tout

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD, In message 20090806202615.gh13...@game.jcrosoft.org you wrote: as we are all supposed to have CONFIG_SYS_HZ at 1000 (mandtory) to have cfi, tftp co working perfectly I do not thing this is a good idea Yes, this is the rule, and we would like to enforce

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Wolfgang Denk
In message 20090806205329.8a31c832e...@gemini.denx.de I wrote: However, the current situation is this: more than 60 boards (all of them ARM, it seems) use very different settings: include/configs/EB+MCF-EV123.h: 1000 include/configs/EP1C20.h:

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-08-06 Thread Jean-Christophe PLAGNIOL-VILLARD
On 22:53 Thu 06 Aug , Wolfgang Denk wrote: Dear Jean-Christophe PLAGNIOL-VILLARD, In message 20090806202615.gh13...@game.jcrosoft.org you wrote: as we are all supposed to have CONFIG_SYS_HZ at 1000 (mandtory) to have cfi, tftp co working perfectly I do not thing this is a good idea

Re: [U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-04-13 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:28 Fri 10 Apr , Renato Andreola wrote: From 6cc63851e5e4c16012d9afad70cedb41b7340de7 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Fri, 10 Apr 2009 12:52:55 +0200 Subject: drivers/mtd/cfi_flash: precision and underflow problem in tout calculation

[U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

2009-04-10 Thread Renato Andreola
From 6cc63851e5e4c16012d9afad70cedb41b7340de7 Mon Sep 17 00:00:00 2001 From: Renato Andreola renato.andre...@imagos.it Date: Fri, 10 Apr 2009 12:52:55 +0200 Subject: drivers/mtd/cfi_flash: precision and underflow problem in tout calculation With old configuration it could happen tout=0 if