From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] CFI: flash accessor functions used for source read too
Date: Wed, 09 Jan 2008 12:22:34 +0100 [thread overview]
Message-ID: <20080109112234.1641B6F0010@nyx.denx.de> (raw)
In-Reply-To: Your message of "Fri, 04 Jan 2008 15:42:23 +0100." <20080104154223.1b874a41@dhcp-252-066.norway.atmel.com>
Dear Haavard,
in message <20080104154223.1b874a41@dhcp-252-066.norway.atmel.com> you wrote:
>
> > Wolfgang just noticed that we (you in your original patches and myself in the
> > latest patch) use flash_read8() (etc.) to read from source location too.
> > Since this source is normally not located in FLASH, I'm not so sure anymore
> > if we should use these accessors here too.
>
> Right. I did that just to introduce as few surprises as possible --
> originally, the source data was accessed through a volatile pointer, so
> converting it to use the accessor functions seemed like the natural
> thing to do.
>
> I don't think it's really necessary though. The source data isn't
> supposed to change underneath us, so accessing it through a regular,
> non-volatile pointer should work just fine.
I'm biased - flash_read*() might, for example, contain bank switching
code on processors (like MPC5200) which have limitations on the flash
sizes thay can directly address. So for copying from flash to flash
it might actually be a good idea to use flash_read*(). But then
flash_read*() must also work when accessing RAM or PCI memory or ...
I think we should at least document the requirements for
flash_read*() - i. e. that it must be capable of reading *arbitrary*
memory areas, not only flash memory.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There is nothing in this world constant but inconstancy. - Swift
prev parent reply other threads:[~2008-01-09 11:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-26 23:09 [U-Boot-Users] CFI driver problems on MPC8260 and 440EPx systems Wolfgang Denk
2007-12-26 23:42 ` Haavard Skinnemoen
2007-12-26 23:49 ` Wolfgang Denk
2007-12-27 6:55 ` Stefan Roese
2008-01-02 10:52 ` [U-Boot-Users] CFI: flash accessor functions used for source read too Stefan Roese
2008-01-04 14:42 ` Haavard Skinnemoen
2008-01-09 11:22 ` Wolfgang Denk [this message]
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=20080109112234.1641B6F0010@nyx.denx.de \
--to=wd@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