From: Sergei Gavrikov <w3sg@SoftHome.net>
To: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>,
Andrew Lunn <andrew@lunn.ch>
Cc: ecos-patches@ecos.sourceware.org
Subject: Re: drivers for LPC2xxx on-chip peripherals
Date: Mon, 13 Aug 2007 19:07:00 -0000 [thread overview]
Message-ID: <20070813190451.GA7557@ubuntu> (raw)
In-Reply-To: <20070812235652.GA28495@grumpf.hope-2000.org>
On Mon, Aug 13, 2007 at 01:56:52AM +0200, Hans Rosenfeld wrote:
> The real problem behind this is that the flash code does AFAIK not
> directly support flash memories with more than one erase block size.
> So for those devices I would have to either pretend that all blocks:
> - use the larger block size, 4 blocks of 64k,
> that wouldn't be useful and would introduce further problems because
> the last 8k of flash are reserved on those LPCs I know, or
> - use the smaller block size,
> this would cause a dependency on malloc() or would introduce a large
> static buffer for copying stuff around for every erase cycle, and
> this would also cause a lot of unnecessary wear through extra
> erase/write cycles.
>
> I could probably implement the latter in a very simplistic way, not
> copying stuff around when erasing, and just document the odd behaviour,
> but that doesn't seem right to me. I'm also not sure that it would work
> at all with the current flash implementation. It would be better to
> rework the flash code to support multiple erase block sizes.
I would prefer to have more fake oper. cycles than any malloc(64*1024).
But that's just my opinion. And I did think yesterday even about "virtual
sector" stuff in 4 or 8K to resolve this issue. I.e. to introduce a
virtual erasing == a writing of 0xFF there (I talk about IAP oper. "Copy
RAM to Flash"). So, we would have (at first, no having the 'flash_v2'
features) a _slow_ but the _linear_ flash model.
Andrew, Does such a simplification go a far outside the eCos flash
standards?
And another solution would be to put in devs/flash/arm/lpc2xxx a generic
stub (variant low-level driver) which uses NXP IAP calls to operate with
on-chip lpc2xxx flash and a platform related code will be to use those
weak calls.
Well, it seems to me, to have anything in devs/flash/arm/lpc2xxx is the
better than to have nothing :-)
Sergei
next prev parent reply other threads:[~2007-08-13 19:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 15:22 Hans Rosenfeld
2007-08-12 21:33 ` Sergei Gavrikov
2007-08-12 23:57 ` Hans Rosenfeld
2007-08-13 7:33 ` Andrew Lunn
2007-08-13 19:07 ` Sergei Gavrikov [this message]
2007-08-20 16:26 ` Hans Rosenfeld
2007-08-21 7:15 ` Daniel Néri
2007-08-22 8:57 ` Hans Rosenfeld
2007-08-22 9:32 ` Daniel Néri
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=20070813190451.GA7557@ubuntu \
--to=w3sg@softhome.net \
--cc=andrew@lunn.ch \
--cc=ecos-patches@ecos.sourceware.org \
--cc=rosenfeld@grumpf.hope-2000.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).