Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-06-20 Thread Abhishek Sahu
On 2018-06-18 17:05, Miquel Raynal wrote: Hi Abhishek, Boris, one question for you below :) >> >> >> So for last CW, the 464 is BBM (i.e 2048th byte) in >> >> full page. >> >> >> > >> >> clear_bam_transaction(nandc); >> >> >> -ret = copy_last_cw(host, page); >> >> >> -if

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-06-20 Thread Abhishek Sahu
On 2018-06-18 17:05, Miquel Raynal wrote: Hi Abhishek, Boris, one question for you below :) >> >> >> So for last CW, the 464 is BBM (i.e 2048th byte) in >> >> full page. >> >> >> > >> >> clear_bam_transaction(nandc); >> >> >> -ret = copy_last_cw(host, page); >> >> >> -if

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-06-18 Thread Miquel Raynal
Hi Abhishek, Boris, one question for you below :) > >> >> >> So for last CW, the 464 is BBM (i.e 2048th byte) in > >> >> full page. > >> >> >> > >> >> clear_bam_transaction(nandc); > >> >> >> -ret = copy_last_cw(host, page); > >> >> >> -if (ret) > >> >> >> +

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-06-18 Thread Miquel Raynal
Hi Abhishek, Boris, one question for you below :) > >> >> >> So for last CW, the 464 is BBM (i.e 2048th byte) in > >> >> full page. > >> >> >> > >> >> clear_bam_transaction(nandc); > >> >> >> -ret = copy_last_cw(host, page); > >> >> >> -if (ret) > >> >> >> +

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-06-11 Thread Abhishek Sahu
On 2018-06-07 18:23, Miquel Raynal wrote: Hi Abhishek, On Mon, 28 May 2018 15:40:52 +0530, Abhishek Sahu wrote: On 2018-05-28 12:33, Miquel Raynal wrote: > Hi Abhishek, > >> >> /* implements ecc->read_page() */ >> >> static int qcom_nandc_read_page(struct mtd_info *mtd, struct >>

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-06-11 Thread Abhishek Sahu
On 2018-06-07 18:23, Miquel Raynal wrote: Hi Abhishek, On Mon, 28 May 2018 15:40:52 +0530, Abhishek Sahu wrote: On 2018-05-28 12:33, Miquel Raynal wrote: > Hi Abhishek, > >> >> /* implements ecc->read_page() */ >> >> static int qcom_nandc_read_page(struct mtd_info *mtd, struct >>

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-06-07 Thread Miquel Raynal
Hi Abhishek, On Mon, 28 May 2018 15:40:52 +0530, Abhishek Sahu wrote: > On 2018-05-28 12:33, Miquel Raynal wrote: > > Hi Abhishek, > > >> >> /* implements ecc->read_page() */ > >> >> static int qcom_nandc_read_page(struct mtd_info *mtd, struct >> > >> >> nand_chip *chip, > >> >>

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-06-07 Thread Miquel Raynal
Hi Abhishek, On Mon, 28 May 2018 15:40:52 +0530, Abhishek Sahu wrote: > On 2018-05-28 12:33, Miquel Raynal wrote: > > Hi Abhishek, > > >> >> /* implements ecc->read_page() */ > >> >> static int qcom_nandc_read_page(struct mtd_info *mtd, struct >> > >> >> nand_chip *chip, > >> >>

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Abhishek Sahu
On 2018-05-28 12:33, Miquel Raynal wrote: Hi Abhishek, >> /* implements ecc->read_page() */ >> static int qcom_nandc_read_page(struct mtd_info *mtd, struct >> nand_chip *chip, >>uint8_t *buf, int oob_required, int page) >> @@ -2118,6 +2083,7 @@ static int

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Abhishek Sahu
On 2018-05-28 12:33, Miquel Raynal wrote: Hi Abhishek, >> /* implements ecc->read_page() */ >> static int qcom_nandc_read_page(struct mtd_info *mtd, struct >> nand_chip *chip, >>uint8_t *buf, int oob_required, int page) >> @@ -2118,6 +2083,7 @@ static int

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Miquel Raynal
Hi Abhishek, On Mon, 28 May 2018 11:46:47 +0530, Abhishek Sahu wrote: > On 2018-05-26 14:28, Miquel Raynal wrote: > > Hi Abhishek, > > > >> @@ -2141,12 +2127,10 @@ static int qcom_nandc_block_bad(struct >> > > > >> mtd_info *mtd, loff_t ofs) > >>goto err;

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Miquel Raynal
Hi Abhishek, On Mon, 28 May 2018 11:46:47 +0530, Abhishek Sahu wrote: > On 2018-05-26 14:28, Miquel Raynal wrote: > > Hi Abhishek, > > > >> @@ -2141,12 +2127,10 @@ static int qcom_nandc_block_bad(struct >> > > > >> mtd_info *mtd, loff_t ofs) > >>goto err; > >>} > >> >> -

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Miquel Raynal
Hi Abhishek, > >> /* implements ecc->read_page() */ > >> static int qcom_nandc_read_page(struct mtd_info *mtd, struct >> nand_chip > >> *chip, > >>uint8_t *buf, int oob_required, int page) > >> @@ -2118,6 +2083,7 @@ static int qcom_nandc_block_bad(struct mtd_info >>

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Miquel Raynal
Hi Abhishek, > >> /* implements ecc->read_page() */ > >> static int qcom_nandc_read_page(struct mtd_info *mtd, struct >> nand_chip > >> *chip, > >>uint8_t *buf, int oob_required, int page) > >> @@ -2118,6 +2083,7 @@ static int qcom_nandc_block_bad(struct mtd_info >>

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Abhishek Sahu
On 2018-05-26 14:28, Miquel Raynal wrote: Hi Abhishek, @@ -2141,12 +2127,10 @@ static int qcom_nandc_block_bad(struct mtd_info *mtd, loff_t ofs) goto err; } - bbpos = mtd->writesize - host->cw_size * (ecc->steps - 1); - - bad = nandc->data_buffer[bbpos]

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Abhishek Sahu
On 2018-05-26 14:28, Miquel Raynal wrote: Hi Abhishek, @@ -2141,12 +2127,10 @@ static int qcom_nandc_block_bad(struct mtd_info *mtd, loff_t ofs) goto err; } - bbpos = mtd->writesize - host->cw_size * (ecc->steps - 1); - - bad = nandc->data_buffer[bbpos]

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Abhishek Sahu
On 2018-05-26 14:16, Miquel Raynal wrote: Hi Abhishek, On Fri, 25 May 2018 17:51:41 +0530, Abhishek Sahu wrote: The QCOM NAND controller layout is such that, the bad block byte offset for last codeword will come to first byte in spare area. "is the first spare byte"?

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-28 Thread Abhishek Sahu
On 2018-05-26 14:16, Miquel Raynal wrote: Hi Abhishek, On Fri, 25 May 2018 17:51:41 +0530, Abhishek Sahu wrote: The QCOM NAND controller layout is such that, the bad block byte offset for last codeword will come to first byte in spare area. "is the first spare byte"? Currently, the raw

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-26 Thread Miquel Raynal
Hi Abhishek, > @@ -2141,12 +2127,10 @@ static int qcom_nandc_block_bad(struct mtd_info *mtd, > loff_t ofs) > goto err; > } > > - bbpos = mtd->writesize - host->cw_size * (ecc->steps - 1); > - > - bad = nandc->data_buffer[bbpos] != 0xff; > + bad =

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-26 Thread Miquel Raynal
Hi Abhishek, > @@ -2141,12 +2127,10 @@ static int qcom_nandc_block_bad(struct mtd_info *mtd, > loff_t ofs) > goto err; > } > > - bbpos = mtd->writesize - host->cw_size * (ecc->steps - 1); > - > - bad = nandc->data_buffer[bbpos] != 0xff; > + bad =

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-26 Thread Miquel Raynal
Hi Abhishek, On Fri, 25 May 2018 17:51:41 +0530, Abhishek Sahu wrote: > The QCOM NAND controller layout is such that, the bad block byte > offset for last codeword will come to first byte in spare area. "is the first spare byte"? > Currently, the raw read for last

Re: [PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-26 Thread Miquel Raynal
Hi Abhishek, On Fri, 25 May 2018 17:51:41 +0530, Abhishek Sahu wrote: > The QCOM NAND controller layout is such that, the bad block byte > offset for last codeword will come to first byte in spare area. "is the first spare byte"? > Currently, the raw read for last codeword is being done with

[PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-25 Thread Abhishek Sahu
The QCOM NAND controller layout is such that, the bad block byte offset for last codeword will come to first byte in spare area. Currently, the raw read for last codeword is being done with copy_last_cw function. It does following 2 things: 1. Read the last codeword bytes from NAND chip to NAND

[PATCH v3 13/16] mtd: rawnand: qcom: minor code reorganization for bad block check

2018-05-25 Thread Abhishek Sahu
The QCOM NAND controller layout is such that, the bad block byte offset for last codeword will come to first byte in spare area. Currently, the raw read for last codeword is being done with copy_last_cw function. It does following 2 things: 1. Read the last codeword bytes from NAND chip to NAND