[U-Boot] [RFC 02/11] mtd/nand: add ONFI timing mode to nand_timings converter

Roy Spliet r.spliet at ultimaker.com
Mon Jun 8 10:11:17 CEST 2015


Hello Scott et al.,

Op 06-06-15 om 00:02 schreef Scott Wood:
> On Fri, 2015-06-05 at 13:52 +0200, Roy Spliet wrote:
>> From: yassin <yassinjaffer at gmail.com>
>>
>> Signed-off-by: Roy Spliet <r.spliet at ultimaker.com>
>> ---
>>   drivers/mtd/nand/Makefile       |   2 +-
>>   drivers/mtd/nand/nand_timings.c | 252
>> ++++++++++++++++++++++++++++++++++++++++
>>   include/linux/mtd/nand.h        |   3 +
>>   3 files changed, 256 insertions(+), 1 deletion(-)
>>   create mode 100644 drivers/mtd/nand/nand_timings.c
> This code comes from Linux and yet I see no acknowledgement of that,
> much less a statement of which version of Linux this was pulled from.
Correct, my apologies as I should have clarified that "work by Boris 
Brezillon" does not
mean "upsteam work". The code comes from Boris' github tree[1] and 
contains work
that was not yet brought upstream, yet is required for NAND on sunxi to 
work.
> It would probably be better to handle this as part of a general sync
> with the Linux mtd code.
Ideally yes, but. In upstream Linux MTD we have a few issues to address 
as shown
by Boris' patch-set, most importantly:
- NAND chip timings (patch 1 to 3)
- Randomisation support (patch 6)
- Per-partition settings for ECC and randomisation (left out of my RFC, 
highly desirable
but not strictly required for U-boot booting)
- OF definition of all the above

U-Boot has the additional challenge
- Partitioning is not done the upstream way, but rather in/around 
cmd_mtdparts

We started discussion on these topics in the #mtd IRC channel (OFTC), 
and several ideas
have come up. The way I see it these issues can currently either be 
addressed by
bolting/duct-taping/tie-wrapping more layers of indirection on top of 
upstream MTD
framework, but really I feel that it might require a bit more of a 
structural approach
that may or may not break existing drivers.
The code I posted as RFC is functional. If you wish to steer towards an 
MTD sync-up, I
highly suggest first getting these issues tackled, and then making sure 
that we extend
the U-boot side of MTD with OF support for everything. This trajectory 
should include
deprecating the current implementation of cmd_mtdparts and hook that 
command up
to the "new" upstream way. In other words: now is probably not the right 
moment.

I'm afraid that as much as I'd like to, I will not have time to address 
every single one
of these issues (not to mention I am hardly the expert in MTD/NAND). I'm 
happy to
think along with designing a sustainable solution, but I will need 
someone to chime
in when it comes to carrying solutions upstream.

Roy

> -Scott

[1] https://github.com/bbrezillon/linux-sunxi/commits/sunxi-nand

-- 


IMAGINE IT >> MAKE IT

Meet us online at Twitter <http://twitter.com/ultimaker>, Facebook 
<http://facebook.com/ultimaker>, Google+ <http://google.com/+Ultimaker>

www.ultimaker.com


More information about the U-Boot mailing list