From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1483694849.3634.6.camel@phytec.de> Subject: Re: [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table From: Teresa Remmet To: Brian Norris , Tony Lindgren Cc: Mark Rutland , devicetree@vger.kernel.org, Brian Norris , Rob Herring , linux-mtd@lists.infradead.org, =?ISO-8859-1?Q?Beno=EEt?= Cousson , linux-omap@vger.kernel.org, Adam Ford , linux-arm-kernel@lists.infradead.org Date: Fri, 06 Jan 2017 10:27:29 +0100 In-Reply-To: <20170105175619.GA56877@google.com> References: <1483627851-17996-1-git-send-email-t.remmet@phytec.de> <1483627851-17996-2-git-send-email-t.remmet@phytec.de> <20170105153637.GA4310@atomide.com> <20170105171845.GK4310@atomide.com> <20170105175619.GA56877@google.com> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hello Brian, Am Donnerstag, den 05.01.2017, 09:56 -0800 schrieb Brian Norris: > On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote: > >=20 > > * Tony Lindgren [170105 07:37]: > > >=20 > > > * Teresa Remmet [170105 06:57]: > > > >=20 > > > > To improve NAND safety we updated the partition layout. > > > > Added barebox backup partition and removed kernel and oftree > > > > partition. They are kept in ubi now. > > > What about the users with earlier partition tables? > > >=20 > > > Please read about "flag day" changes, typically they are not > > > acceptable. > > Adding Brian and Adam to Cc. Can you guys come up with some > > solution on this? > I don't have much context for this thread, and no I don't plan to > solve > your problems for you. But I can provide tips! >=20 > >=20 > > I'm suggesting we leave the kernel nodes empty and let u-boot > > populate them, so maybe you guys can discuss this on the related > > lists. > That's an option. I've worked with platforms that did something like > this, and that's really one of the only ways you can handle putting > partition information in the device tree. You're really hamstringing > yourself when you put all the partition information in the device > tree. > And it's just dumb once that gets codified in the kernel source tree. >=20 In our case the bootloader does pass the partition table to the kernel. So it gets overwritten anyway. This was just more for backup,=C2=A0 if someone uses a different bootloader. But I'm fine with removing the nand partition table completely from the kernel device tree. Same with the SPI nor partition table. I will send patches for this. Regards, Teresa > The best solution would be to try to migrate away from static device > tree representations of partition info entirely. UBI volumes are best > where possible. If not, then some other kind of on-flash data > structures > (along the lines of a GPT) with a corresponding MTD partition parser > is > an OK alternative. Unfortunately, there isn't any good standard > format > for this on MTD, so it's typically all custom -- and so people use > the > easiest approach: device tree. And it's even more difficult with > NAND, > which has reliability problems, especially with static data (e.g., > read > disturb). >=20 > Anyway, the parser solution is helpful only if one can properly fix > the > "flag day" first. And it requires a little bit more work to be > generally > useful; I posted some work for this over a year ago, but bikeshedding > brought it down. >=20 > >=20 > > The rest of the series looks fine to me so applying it into > > omap-for-v4.11/dt. > Brian >=20 > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Teresa Remmet Subject: Re: [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table Date: Fri, 06 Jan 2017 10:27:29 +0100 Message-ID: <1483694849.3634.6.camel@phytec.de> References: <1483627851-17996-1-git-send-email-t.remmet@phytec.de> <1483627851-17996-2-git-send-email-t.remmet@phytec.de> <20170105153637.GA4310@atomide.com> <20170105171845.GK4310@atomide.com> <20170105175619.GA56877@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <20170105175619.GA56877@google.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Brian Norris , Tony Lindgren Cc: Mark Rutland , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, Rob Herring , linux-mtd@lists.infradead.org, =?ISO-8859-1?Q?Beno=EEt?= Cousson , Brian Norris , Adam Ford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1bCBvbmx5IGlmIG9uZSBjYW4gcHJvcGVybHkgZml4Cj4gdGhlCj4gImZsYWcgZGF5IiBm aXJzdC4gQW5kIGl0IHJlcXVpcmVzIGEgbGl0dGxlIGJpdCBtb3JlIHdvcmsgdG8gYmUKPiBnZW5l cmFsbHkKPiB1c2VmdWw7IEkgcG9zdGVkIHNvbWUgd29yayBmb3IgdGhpcyBvdmVyIGEgeWVhciBh Z28sIGJ1dCBiaWtlc2hlZGRpbmcKPiBicm91Z2h0IGl0IGRvd24uCj4gCj4gPiAKPiA+IFRoZSBy ZXN0IG9mIHRoZSBzZXJpZXMgbG9va3MgZmluZSB0byBtZSBzbyBhcHBseWluZyBpdCBpbnRvCj4g PiBvbWFwLWZvci12NC4xMS9kdC4KPiBCcmlhbgo+IAo+IF9fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fCj4gbGludXgtYXJtLWtlcm5lbCBtYWlsaW5nIGxpc3QK PiBsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcKPiBodHRwOi8vbGlzdHMuaW5m cmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xpbnV4LWFybS1rZXJuZWwKCl9fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCmxpbnV4LWFybS1rZXJuZWwgbWFp bGluZyBsaXN0CmxpbnV4LWFybS1rZXJuZWxAbGlzdHMuaW5mcmFkZWFkLm9yZwpodHRwOi8vbGlz dHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xpbnV4LWFybS1rZXJuZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 From: t.remmet@phytec.de (Teresa Remmet) Date: Fri, 06 Jan 2017 10:27:29 +0100 Subject: [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table In-Reply-To: <20170105175619.GA56877@google.com> References: <1483627851-17996-1-git-send-email-t.remmet@phytec.de> <1483627851-17996-2-git-send-email-t.remmet@phytec.de> <20170105153637.GA4310@atomide.com> <20170105171845.GK4310@atomide.com> <20170105175619.GA56877@google.com> Message-ID: <1483694849.3634.6.camel@phytec.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello Brian, Am Donnerstag, den 05.01.2017, 09:56 -0800 schrieb Brian Norris: > On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote: > > > > * Tony Lindgren [170105 07:37]: > > > > > > * Teresa Remmet [170105 06:57]: > > > > > > > > To improve NAND safety we updated the partition layout. > > > > Added barebox backup partition and removed kernel and oftree > > > > partition. They are kept in ubi now. > > > What about the users with earlier partition tables? > > > > > > Please read about "flag day" changes, typically they are not > > > acceptable. > > Adding Brian and Adam to Cc. Can you guys come up with some > > solution on this? > I don't have much context for this thread, and no I don't plan to > solve > your problems for you. But I can provide tips! > > > > > I'm suggesting we leave the kernel nodes empty and let u-boot > > populate them, so maybe you guys can discuss this on the related > > lists. > That's an option. I've worked with platforms that did something like > this, and that's really one of the only ways you can handle putting > partition information in the device tree. You're really hamstringing > yourself when you put all the partition information in the device > tree. > And it's just dumb once that gets codified in the kernel source tree. > In our case the bootloader does pass the partition table to the kernel. So it gets overwritten anyway. This was just more for backup,? if someone uses a different bootloader. But I'm fine with removing the nand partition table completely from the kernel device tree. Same with the SPI nor partition table. I will send patches for this. Regards, Teresa > The best solution would be to try to migrate away from static device > tree representations of partition info entirely. UBI volumes are best > where possible. If not, then some other kind of on-flash data > structures > (along the lines of a GPT) with a corresponding MTD partition parser > is > an OK alternative. Unfortunately, there isn't any good standard > format > for this on MTD, so it's typically all custom -- and so people use > the > easiest approach: device tree. And it's even more difficult with > NAND, > which has reliability problems, especially with static data (e.g., > read > disturb). > > Anyway, the parser solution is helpful only if one can properly fix > the > "flag day" first. And it requires a little bit more work to be > generally > useful; I posted some work for this over a year ago, but bikeshedding > brought it down. > > > > > The rest of the series looks fine to me so applying it into > > omap-for-v4.11/dt. > Brian > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel