[U-Boot] [RFC] Sunxi NAND support for U-Boot

Hans de Goede
2015-06-06T15:09:53Z

Hi Roy,

Thanks for your work on this!

On 05-06-15 13:52, Roy Spliet wrote:
> Following up on earlier SPL patches, here a series based on Yassin Jaffer's
> work to bring NAND support to U-boot. RFC because I know that the sunxi nand
> configuration options are dependent on a work-in-progress by Daniel - trying
> to deliver a single SPL for both MMC and NAND boot.

I've just tested Daniel's patches on a board with an eMMC, fixed 2 small bugs
related to eMMC handling and merged them into u-boot-sunxi/next.

So it would probably be best to base your next version of the patches on
top of u-boot-sunxi/next which other then having Daniel's patches is
following u-boot/master atm.

> Given I have spent the past few weeks learning how Boris' original driver
> works, I have probably grown a bit blind for potentially existing issues.
> Please provide plenty of feedback so I can bring this in good shape.
>
> Patches tested on an Olimex Lime with 4GB Hynix nand. Has a partition as
> defined in sunxi-common.h with two UBIFS partitions (boot, rootfs) set up in
> Linux. To me it feels self-explanatory how to set this up, but I've spent the
> last few weeks full-time on this, implying my view of the world and how it
> revolves around MTD is rather distorted. Feel free to ask directed questions
> if you desire assistance in setting up and/or testing.

From the sunxi side these patches look good, I've one quite minor nitpick which
I will explain in a reply to the patch in question. I think the most work here
is getting the generic mtd patches ready and accepted by Scott Wood (the u-boot
mtd maintainer), so please coordinate this further with him.

Once those bits are in I'm more then happy to merge the sunxi side of things.

As for merging the mtd bits, since the u-boot mtd code is somewhat of a copy
of the Linux mtd code it may be best to simply sync the existing mtd code
up with the upstream kernel mtd code, and work on getting the missing mtd
bits merged into the upstream kernel first, and then merge the changes
back into the u-boot mtd code, that assumes that the u-boot mtd code still
is somewhat in sync with the kernel code atm though, and from your comments
I'm getting the impression that it is not...

Anyways I will leave figuring this out between you and Scott. Note that we
could use some help with upstreaming the kernel bits regardless of this.
If you plan to work on this, please coordinate with Boris as Boris will
likely start working on the mtd kernel code again soonish.

Regards,

Hans