MTD partitions vs erase regions

Krzeminski, Marcin (Nokia - PL/Wroclaw) marcin.krzeminski at nokia.com
Thu Oct 27 21:50:16 PDT 2016


Marek,

> -----Original Message-----
> From: Marek Vasut [mailto:marex at denx.de]
> Sent: Friday, October 28, 2016 2:15 AM
> To: Krzeminski, Marcin (Nokia - PL/Wroclaw)
> <marcin.krzeminski at nokia.com>
> Cc: linux-mtd at lists.infradead.org
> Subject: Re: MTD partitions vs erase regions
> 
> On 10/27/2016 02:19 PM, Krzeminski, Marcin (Nokia - PL/Wroclaw) wrote:
> > Hi Marek,
> 
> Hi,
> 
> > I am sending mtd partition and erase regions conflict that I had.
> > I admit I have no investigated it, since finally all is different.
> > This could make some problems with your idea of having erase sizes
> defined from DT.
> 
> Which flash is that ?

Sorry - forgot to mention: MT25Q00 (64KiB erase size).
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is disabled.

Regards,
Marcin
> 
> > Erase regions configuration:
> >
> > nor->eraseregions[0].erasesize = 4096; eraseregions[0].numblocks = 8;
> > nor->eraseregions[0].offset = 0x0;
> >
> > nor->eraseregions[1].erasesize = 32*1024; eraseregions[1].numblocks =
> > nor->1; eraseregions[1].offset = 32*1024;
> >
> > nor->eraseregions[2].erasesize = 64*1024; eraseregions[2].numblocks =
> > nor->div_u64_rem(mtd->size - 64*1024, info->sector_size, &rem);
> > nor->eraseregions[2].offset = 64*1024;
> >
> > Device tree (mtd):
> >
> > partition at 0 {
> > label = "all";
> > reg = <0x00000000 0x08000000>;
> > };
> >
> > partition at 1 {
> > label = "small";
> > reg = <0x00000000 0x00008000>;
> > };
> >
> > partition at 2 {
> > label = "rest";
> > reg = <0x00008000 0x07FF8000>;
> > };
> >
> > Logs from startup:
> >
> > [    1.187722] 0x000000000000-0x000008000000 : "all"
> > [    1.188498] device: 'mtd0': device_add
> > [    1.189563] device: 'mtd0ro': device_add
> > [    1.192359] device: '31:0': device_add
> > [    1.192810] device: 'mtdblock0': device_add
> > [    1.194504] 0x000000000000-0x000000008000 : "small"
> > [    1.195144] device: 'mtd1': device_add
> > [    1.196667] device: 'mtd1ro': device_add
> > [    1.198268] device: '31:1': device_add
> > [    1.199016] device: 'mtdblock1': device_add
> > [    1.200922] 0x000000008000-0x000008000000 : "rest"
> > [    1.201222] mtd: partition "rest" doesn't start on an erase block boundary
> -- force read-only
> > [    1.201613] device: 'mtd2': device_add
> > [    1.202541] device: 'mtd2ro': device_add
> > [    1.204659] device: '31:2': device_add
> > [    1.206233] device: 'mtdblock2': device_add
> >
> > Message is from here:
> > http://lxr.free-electrons.com/source/drivers/mtd/mtdpart.c?v=4.4#L526
> >
> > Regards,
> > Marcin
> >
> 
> 
> --
> Best regards,
> Marek Vasut



More information about the linux-mtd mailing list