From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Mon, 15 Jun 2015 10:00:46 +0200 Subject: [U-Boot] [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions In-Reply-To: <20150614133113.47b29959@bbrezillon> References: <1433505164-24112-1-git-send-email-r.spliet@ultimaker.com> <1433505164-24112-12-git-send-email-r.spliet@ultimaker.com> <55755472.5080008@ultimaker.com> <55755C3E.8090601@ultimaker.com> <213E9959-2EE7-4AE4-A95E-CC86FA5984B3@gmail.com> <55757DE8.6070708@ultimaker.com> <20150614133113.47b29959@bbrezillon> Message-ID: <557E862E.7050408@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 14-06-15 13:31, Boris Brezillon wrote: > Roy, Yassin, > > On Mon, 08 Jun 2015 13:35:04 +0200 > Roy Spliet wrote: > >> Hello Yassin, >> >> Op 08-06-15 om 12:48 schreef Yassin: >>> Hi Roy >>> Thank you for working on this, I would like to suggest if you could implement separate control commands to switch ECC and Randomisation modes per partitions. I know this is not the best approach but it will provide more controls. >> Thanks for the suggestion. However, for now I do not see the immediate >> need for this in U-boot. U-boot should really only care about one thing: >> load Linux. Therefore, the only partition it needs to be able to read is >> whatever partition is used for storing boot data on. And if we only care >> about one NAND partition, we don't need per-partition settings. >> I agree that it would be nice to have eventually, but I think this >> problem first needs to be solved in Linux properly. Then in U-boot we >> can sync MTD up with Linux and we get the support we need "for free". >> I'd personally recommend to take this approach over now first hacking up >> all sorts of new commands in U-boot, as the latter will create more >> problems with syncing up MTD and doing the right thing on the longer run. > > Actually, the more I think about the more I agree with Yassin's > suggestion. We currently don't have any standard way to attach a > specific setting to a partition (even in Linux, and I hope I'll be able > to work on this aspect soon). > So for now, I really think we should reuse the existing/standard way of > declaring partitions in u-boot (mtdparts + mtdids variables + the > mtdparts command) and a sunxi specific commands to configure the ECC > and Randomizer config. > Once we have settled on something in Linux, we will be able to port it > to u-boot and get rid of these sunxi specific command, but in the > meantime this will allow us to boot a linux kernel (and even flash an > SPL) from u-boot without introducing heavy changes in the u-boot MTD > layer. Ack, note we do not even need any sunxi specific commands, we will have separate nand code for the SPL and uboot itself, since the SPL needs a simple mini read-only implementation. So we can compile the parameters for the boot block vs the rest into the spl resp. uboot binary directly. Regards, Hans