Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-14 Thread Boris Brezillon
On 14 Jun 2016 05:07:26 -0400 "George Spelvin" wrote: > Boris Brezillon wrote: > > On 12 Jun 2016 16:24:53 George Spelvin wrote: > >> Boris Brezillon wrote: > >> My problem is that I don't really understand MLC programming. > > > I came to the same conclusion: we really have these 2 cases in

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-14 Thread Boris Brezillon
On 14 Jun 2016 05:07:26 -0400 "George Spelvin" wrote: > Boris Brezillon wrote: > > On 12 Jun 2016 16:24:53 George Spelvin wrote: > >> Boris Brezillon wrote: > >> My problem is that I don't really understand MLC programming. > > > I came to the same conclusion: we really have these 2 cases in

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-14 Thread George Spelvin
Boris Brezillon wrote: > On 12 Jun 2016 16:24:53 George Spelvin wrote: >> Boris Brezillon wrote: >> My problem is that I don't really understand MLC programming. > I came to the same conclusion: we really have these 2 cases in the > wild, which makes it even more complicated to define a standard >

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread Boris Brezillon
On Sun, 12 Jun 2016 23:13:14 +0200 Boris Brezillon wrote: > On 12 Jun 2016 16:24:53 -0400 > "George Spelvin" wrote: > > > Boris Brezillon wrote: > > > On 12 Jun 2016 08:25:49 -0400 > > > "George Spelvin" wrote: > > >> (In fact, an interesting > > >> question is whether bad pages should b

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread Boris Brezillon
On 12 Jun 2016 16:24:53 -0400 "George Spelvin" wrote: > Boris Brezillon wrote: > > On 12 Jun 2016 08:25:49 -0400 > > "George Spelvin" wrote: > >> (In fact, an interesting > >> question is whether bad pages should be skipped or not!) > > > > There's no such thing. We have bad blocks, but whe

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread George Spelvin
Boris Brezillon wrote: > On 12 Jun 2016 08:25:49 -0400 > "George Spelvin" wrote: >> (In fact, an interesting >> question is whether bad pages should be skipped or not!) > > There's no such thing. We have bad blocks, but when a block is bad all > the pages inside this block are considered bad. If

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread Boris Brezillon
On Sun, 12 Jun 2016 14:42:15 +0200 Boris Brezillon wrote: > > > > >> Also, the data sheets are a real PITA to find. I have yet to > > >> see an actual data sheet that documents the stride-3 pairing scheme. > > > > > Yes, that's a real problem. Here is a Samsung NAND data sheet > > > de

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread Boris Brezillon
On 12 Jun 2016 08:25:49 -0400 "George Spelvin" wrote: > >> (Another thing I thought of, but am less sure of, is packing the group > >> and pair numbers into a register-passable int rather than a structure. > >> Even 2 bits for the group is probably the most that will ever be needed, > >> but it's

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread George Spelvin
>> (Another thing I thought of, but am less sure of, is packing the group >> and pair numbers into a register-passable int rather than a structure. >> Even 2 bits for the group is probably the most that will ever be needed, >> but it's easy to say the low 4 bits are the group and the high 28 are >>

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread Boris Brezillon
On 12 Jun 2016 05:23:13 -0400 "George Spelvin" wrote: > >> It also applies an offset of +1, to avoid negative numbers and the > >> problems of signed divides. > > > It seems to cover all cases. > > I wasn't sure why you used a signed int for the interface. No real reason other than consist

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread George Spelvin
>> It also applies an offset of +1, to avoid negative numbers and the >> problems of signed divides. > It seems to cover all cases. I wasn't sure why you used a signed int for the interface. (Another thing I thought of, but am less sure of, is packing the group and pair numbers into a register-p

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-12 Thread Boris Brezillon
+ Brian and the MTD ML Hi George, On 11 Jun 2016 18:30:04 -0400 "George Spelvin" wrote: > I was just browsing LKML history and wanted to understand this > concept, but while reading I think I spotted an error. > > > +static void nand_pairing_dist3_get_info(struct mtd_info *mtd, int page, > +

Re: [PATCH 2/4] mtd: nand: implement two pairing scheme

2016-06-11 Thread George Spelvin
I was just browsing LKML history and wanted to understand this concept, but while reading I think I spotted an error. +static void nand_pairing_dist3_get_info(struct mtd_info *mtd, int page, + struct mtd_pairing_info *info) +{ + int lastpage = (mtd->era

[PATCH 2/4] mtd: nand: implement two pairing scheme

2016-04-25 Thread Boris Brezillon
Implement two common pairing scheme (found on many MLC devices), and name them in reference to the paired pages distance (3 or 6 pages). Signed-off-by: Boris Brezillon Signed-off-by: Richard Weinberger --- drivers/mtd/nand/nand_base.c | 96 include/l