Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-07 Thread Scott Wood
On Tue, 2015-04-07 at 13:54 -0400, Bill Pringlemeir wrote: > On 7 Apr 2015, scottw...@freescale.com wrote: > > On Tue, 2015-04-07 at 10:06 -0400, Bill Pringlemeir wrote: > > >> In any case the document has, > > >> If the NAND flash supports sub-pages, then what can be done is ECC > >> codes can

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-07 Thread Bill Pringlemeir
On 7 Apr 2015, scottw...@freescale.com wrote: > On Tue, 2015-04-07 at 10:06 -0400, Bill Pringlemeir wrote: >> In any case the document has, >> If the NAND flash supports sub-pages, then what can be done is ECC >> codes can be calculated on per-sub-page basis, instead of per-NAND >> page basis. I

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-07 Thread Scott Wood
On Tue, 2015-04-07 at 10:06 -0400, Bill Pringlemeir wrote: > On 3 Apr 2015, scottw...@freescale.com wrote: > > > On Fri, 2015-04-03 at 22:28 +0200, Stefan Agner wrote: > > >> Why not? IMHO, there are valid reason to do it, since we save coping > >> data over the bus (we save copying page size -

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-07 Thread Bill Pringlemeir
On 3 Apr 2015, scottw...@freescale.com wrote: > On Fri, 2015-04-03 at 22:28 +0200, Stefan Agner wrote: >> Why not? IMHO, there are valid reason to do it, since we save coping >> data over the bus (we save copying page size - write len of bytes)... > According to http://www.linux-mtd.infradead.o

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-03 Thread Scott Wood
On Fri, 2015-04-03 at 22:28 +0200, Stefan Agner wrote: > On 2015-04-03 22:15, Scott Wood wrote: > > On Fri, 2015-04-03 at 20:09 +0200, Stefan Agner wrote: > >> On 2015-04-03 01:48, Scott Wood wrote: > >> > On Tue, 2015-03-31 at 11:02 -0400, Bill Pringlemeir wrote: > >> >> On 2015-03-31 00:15, Scott

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-03 Thread Stefan Agner
On 2015-04-03 22:15, Scott Wood wrote: > On Fri, 2015-04-03 at 20:09 +0200, Stefan Agner wrote: >> On 2015-04-03 01:48, Scott Wood wrote: >> > On Tue, 2015-03-31 at 11:02 -0400, Bill Pringlemeir wrote: >> >> On 2015-03-31 00:15, Scott Wood wrote: >> >> >> >> > Especially since you'd be doing one wr

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-03 Thread Scott Wood
On Fri, 2015-04-03 at 20:09 +0200, Stefan Agner wrote: > On 2015-04-03 01:48, Scott Wood wrote: > > On Tue, 2015-03-31 at 11:02 -0400, Bill Pringlemeir wrote: > >> On 2015-03-31 00:15, Scott Wood wrote: > >> > >> > Especially since you'd be doing one write rather than four full-page > >> > "partial

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-03 Thread Stefan Agner
On 2015-04-03 01:48, Scott Wood wrote: > On Tue, 2015-03-31 at 11:02 -0400, Bill Pringlemeir wrote: >> On 2015-03-31 00:15, Scott Wood wrote: >> >> > Especially since you'd be doing one write rather than four full-page >> > "partial" writes. Surely the bottleneck here is the NAND chip itself, >> >

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-04-02 Thread Scott Wood
On Tue, 2015-03-31 at 11:02 -0400, Bill Pringlemeir wrote: > On 2015-03-31 00:15, Scott Wood wrote: > > > Especially since you'd be doing one write rather than four full-page > > "partial" writes. Surely the bottleneck here is the NAND chip itself, > > not copying data to the buffer? > > The AHB

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-31 Thread Bill Pringlemeir
On 31 Mar 2015, scottw...@freescale.com wrote: > On Tue, 2015-03-31 at 00:24 +0200, Stefan Agner wrote: >> Actually, I just realized that the driver is not caching writes. >> >> switch (command) { >> case NAND_CMD_PAGEPROG: >> nfc->page = -1; >> +vf610_nfc_transfer_size(nfc->regs, nfc->pag

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Scott Wood
On Tue, 2015-03-31 at 00:24 +0200, Stefan Agner wrote: > Actually, I just realized that the driver is not caching writes. > > switch (command) { > case NAND_CMD_PAGEPROG: > nfc->page = -1; > +vf610_nfc_transfer_size(nfc->regs, nfc->page_sz); > vf610_nfc_send_com

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Stefan Agner
On 2015-03-31 00:15, Scott Wood wrote: > On Mon, 2015-03-30 at 23:26 +0200, Stefan Agner wrote: >> On 2015-03-30 22:48, Scott Wood wrote: >> > What is special about this controller, that caching makes sense here but >> > not on other controllers? If it makes sense everywhere, then the upper >> > l

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Scott Wood
On Mon, 2015-03-30 at 23:26 +0200, Stefan Agner wrote: > On 2015-03-30 22:48, Scott Wood wrote: > > What is special about this controller, that caching makes sense here but > > not on other controllers? If it makes sense everywhere, then the upper > > layer is the place to do it. > > > > Well, i

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Bill Pringlemeir
On 30 Mar 2015, scottw...@freescale.com wrote: > On Mon, 2015-03-30 at 22:40 +0200, Stefan Agner wrote: >> However, if removing the caching in the driver would lead to a >> performance drop, I would rather prefer to keep it... > What is special about this controller, that caching makes sense her

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Stefan Agner
On 2015-03-30 22:48, Scott Wood wrote: > On Mon, 2015-03-30 at 22:40 +0200, Stefan Agner wrote: >> On 2015-03-30 22:34, Scott Wood wrote: >> > On Mon, 2015-03-30 at 13:02 -0400, Bill Pringlemeir wrote: >> >> On 24 Mar 2015, ste...@agner.ch wrote: >> >> >> >> > The driver tries to re-use the page bu

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Scott Wood
On Mon, 2015-03-30 at 22:40 +0200, Stefan Agner wrote: > On 2015-03-30 22:34, Scott Wood wrote: > > On Mon, 2015-03-30 at 13:02 -0400, Bill Pringlemeir wrote: > >> On 24 Mar 2015, ste...@agner.ch wrote: > >> > >> > The driver tries to re-use the page buffer by storing the page > >> > number of the

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Scott Wood
On Mon, 2015-03-30 at 22:14 +0200, Stefan Agner wrote: > On 2015-03-30 19:02, Bill Pringlemeir wrote: > > On 24 Mar 2015, ste...@agner.ch wrote: > > > >> The driver tries to re-use the page buffer by storing the page > >> number of the current page in the buffer. The page is only read > >> if the

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Stefan Agner
On 2015-03-30 22:34, Scott Wood wrote: > On Mon, 2015-03-30 at 13:02 -0400, Bill Pringlemeir wrote: >> On 24 Mar 2015, ste...@agner.ch wrote: >> >> > The driver tries to re-use the page buffer by storing the page >> > number of the current page in the buffer. The page is only read >> > if the reque

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Scott Wood
On Mon, 2015-03-30 at 13:02 -0400, Bill Pringlemeir wrote: > On 24 Mar 2015, ste...@agner.ch wrote: > > > The driver tries to re-use the page buffer by storing the page > > number of the current page in the buffer. The page is only read > > if the requested page number is not currently in the buff

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Stefan Agner
On 2015-03-30 19:02, Bill Pringlemeir wrote: > On 24 Mar 2015, ste...@agner.ch wrote: > >> The driver tries to re-use the page buffer by storing the page >> number of the current page in the buffer. The page is only read >> if the requested page number is not currently in the buffer. When >> a blo

Re: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-30 Thread Bill Pringlemeir
On 24 Mar 2015, ste...@agner.ch wrote: > The driver tries to re-use the page buffer by storing the page > number of the current page in the buffer. The page is only read > if the requested page number is not currently in the buffer. When > a block is erased, the page number is marked as invalid if

[U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase

2015-03-24 Thread Stefan Agner
The driver tries to re-use the page buffer by storing the page number of the current page in the buffer. The page is only read if the requested page number is not currently in the buffer. When a block is erased, the page number is marked as invalid if the erased page equals the one currently in the