public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] nand: Fix cache and memory inconsistent issue
Date: Mon, 1 Dec 2008 20:38:44 +0100	[thread overview]
Message-ID: <200812012038.44613.sr@denx.de> (raw)
In-Reply-To: <20081201171111.GA14519@ld0162-tx32.am.freescale.net>

On Monday 01 December 2008, Scott Wood wrote:
> Please factor this out into arch code, and make it shareable with other
> NAND code (such as nand_boot.c).

Yes, please.

> > +	/*
> > +	 * We need clean dcache and invalidate
> > +	 * to sync between icache and dcache
> > +	 * before jump to RAM. make sure all of
> > +	 * NAND data write to memory.
>
> "Clean d-cache and invalidate i-cache, to make sure that
> no stale data is executed."

And the function name is not perfectly fitting for my taste. Why not extract 2 
functions, flush_dcache_range() and invalidate_icache_range(). This reminds 
me that some architectures/platforms already have those functions defined 
(PPC4xx at least does). But the 2nd parameter is not size but end ("stolen" 
from the Linux kernel). Perhaps it makes sense to use these functions here as 
well.

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
=====================================================================

  reply	other threads:[~2008-12-01 19:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 12:16 [U-Boot] [PATCH v2] nand: Fix cache and memory inconsistent issue Dave Liu
2008-12-01 17:11 ` Scott Wood
2008-12-01 19:38   ` Stefan Roese [this message]
2008-12-01 22:47     ` Liu Dave

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812012038.44613.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox