partitions and erase regions
David Woodhouse
dwmw2 at infradead.org
Mon Apr 23 10:10:36 EDT 2001
kd at flaga.is said:
> For my chip I have to fit bootrom in the first 0x20000 kb. The first
> 0x10000 are 8 0x2000 sized sectors while the next 0x10000 is one
> sector of size 0x10000. Because of the "stupid" way of reporting the
> chip with only one sectorsize (mtd.erasesize) I am unable to erase
> and otherwaise manage this part of the chip. The natural solution to
> me is to make the first part of the chip a partition with two erase
> regions, i.e. the first with erase size 0x2000 and 8 sectors and the
> next with erase size 0x10000 and 1 sector.
(delayed reaction)
How about the following rules/behaviour for MTD partitions:
1. For a partition to be writable, there must be a number usable as 'major'
erasesize (mtd->erasesize), such that a naïve user of MTD can get
erases at offsets such that offset % erasesize == 0 to work.
2. If a partition covers regions of the master which have differing
erasesizes, the information about the exact erase regions should
be made available in the slave.
So... given a master device with 'major' erasesize 64K, which is actually
8*8K, 15*64K, this would be the result of some example partitions...
Partition range Erase size(s) Writable?
000000 - 020000 64K (8*8K, 1*16K) Yes
020000 - 100000 64K Yes
000000 - 008000 8K Yes
008000 - 100000 - No (no usable 'major' erasesize)
000000 - 010000 8K Yes
010000 - 100000 64K Yes
008000 - 010000 8K Yes
Kári, if this is acceptable for your purposes (and I think it is), then we
should just implement this behaviour and not have any conditional code at
all.
/me wanders off to kick some sense into the new Red Hat 7.1 installation,
which has taken it upon itself to randomly start correcting my spelling to
some foreign language, and no longer approves of the word 'behaviour'.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list