From: Kumar Gala Date: Tue, 29 Apr 2008 09:04:24 -0500 Subject: [U-Boot-Users] [PATCH] ppc flush_cache: add watch-dog triggering into the loops. In-Reply-To: <20080429134714.0C51824681@gemini.denx.de> References: <20080429134714.0C51824681@gemini.denx.de> Message-ID: <8AF9326F-636B-44B5-A39B-CB470E0CED2A@kernel.crashing.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Apr 29, 2008, at 8:47 AM, Wolfgang Denk wrote: > Dear Kumar, > > in message > you wrote: >> >>> Some boards (e.g. lwmon5) need rather a frequent watch-dog >>> kicking. Since the time it takes for the flush_cache() function >>> to complete its job depends on the size of data being flushed, one >>> may encounter watch-dog resets on such boards when, for example, >>> download big files over ethernet. >> >> is this because the size argument being passed to flush_cache is well >> beyond the size of the cache itself? > > Yes - the thing is that after a TFTP download flush_cache() is called > for the size of the downloaded filr; this may be 8 or 32 MiB or more > ;-) Seems like we should have a max flush size that is know to flush the whole cache. Something like: void flush_cache (ulong start_addr, ulong size) { #ifndef CONFIG_5xx ulong addr, end_addr; size = MIN(MAX_CACHE_SIZE_TO_FLUSH, size); end_addr = start_addr + size; ... oh well. - k