* erase questions
@ 2001-06-07 11:03 Abraham vd Merwe
2001-06-07 11:12 ` David Woodhouse
0 siblings, 1 reply; 2+ messages in thread
From: Abraham vd Merwe @ 2001-06-07 11:03 UTC (permalink / raw)
To: MTD for Linux
[-- Attachment #1: Type: text/plain, Size: 1396 bytes --]
Hi!
I have a couple of questions about mtd_info->erase which isn't covered in
the MTD API:
From the MTD API docs, it seems the erase function can only be called
erase_info->len == mtd->erasesize. This is obviously not true anymore since
there can be multiple erase regions with multiple erase sizes and the user
might request an erase on one of the smaller blocks.
So can I assume that I only have to deal (read: allow) with erases where
erase_info->addr == START_OF_SOME_BLOCK and erase_info->len ==
LENGTH_OF_THAT_BLOCK?
So basically it boils down to 2 questions. Is ->addr always equal to the
start of a block and is ->len always equal to the size of that block or may
->len span multiple blocks.
If ->len may span multiple blocks, must it be equal to the size of all the
blocks (e.g. if you we're to erase a 2x 4k + 3x 8k consecutive blocks, must
len be equal to 32k)?
--
Regards
Abraham
Reading is to the mind what exercise is to the body.
__________________________________________________________
Abraham vd Merwe - 2d3D, Inc.
Device Driver Development, Outsourcing, Embedded Systems
Cell: +27 82 565 4451 Snailmail:
Tel: +27 21 761 7549 Block C, Antree Park
Fax: +27 21 761 7648 Doncaster Road
Email: abraham@2d3d.co.za Kenilworth, 7700
Http: http://www.2d3d.com South Africa
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: erase questions
2001-06-07 11:03 erase questions Abraham vd Merwe
@ 2001-06-07 11:12 ` David Woodhouse
0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2001-06-07 11:12 UTC (permalink / raw)
To: Abraham vd Merwe; +Cc: MTD for Linux
abraham@2d3d.co.za said:
> If ->len may span multiple blocks, must it be equal to the size of
> all the blocks (e.g. if you we're to erase a 2x 4k + 3x 8k consecutive
> blocks, must len be equal to 32k)?
The only constraints are that both <start> and <start+len> must be aligned
with erase block boundaries.
If you have a chip with 8*8K erase blocks followed by 15*64K erase blocks,
then an erase of length 72K at offset 56K is permitted - you'd erase the
last of the small blocks and the first of the big blocks.
--
dwmw2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-07 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-07 11:03 erase questions Abraham vd Merwe
2001-06-07 11:12 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox