From: Marek Vasut <marex@denx.de>
To: "Krzeminski, Marcin (Nokia - PL/Wroclaw)" <marcin.krzeminski@nokia.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: MTD partitions vs erase regions
Date: Fri, 28 Oct 2016 02:14:58 +0200 [thread overview]
Message-ID: <35c63aa4-d686-e06a-a12f-408c25895a22@denx.de> (raw)
In-Reply-To: <AM4PR0701MB21304CE213B5F0B0534AB52FFEAA0@AM4PR0701MB2130.eurprd07.prod.outlook.com>
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 ?
> Erase regions configuration:
>
> nor->eraseregions[0].erasesize = 4096;
> nor->eraseregions[0].numblocks = 8;
> nor->eraseregions[0].offset = 0x0;
>
> nor->eraseregions[1].erasesize = 32*1024;
> nor->eraseregions[1].numblocks = 1;
> nor->eraseregions[1].offset = 32*1024;
>
> nor->eraseregions[2].erasesize = 64*1024;
> nor->eraseregions[2].numblocks = div_u64_rem(mtd->size - 64*1024, info->sector_size, &rem);
> nor->eraseregions[2].offset = 64*1024;
>
> Device tree (mtd):
>
> partition@0 {
> label = "all";
> reg = <0x00000000 0x08000000>;
> };
>
> partition@1 {
> label = "small";
> reg = <0x00000000 0x00008000>;
> };
>
> partition@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
next prev parent reply other threads:[~2016-10-28 1:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 12:19 MTD partitions vs erase regions Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-10-28 0:14 ` Marek Vasut [this message]
2016-10-28 4:50 ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-10-28 5:08 ` Marek Vasut
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=35c63aa4-d686-e06a-a12f-408c25895a22@denx.de \
--to=marex@denx.de \
--cc=linux-mtd@lists.infradead.org \
--cc=marcin.krzeminski@nokia.com \
/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