diff for duplicates of <4EDEE3AC.7060000@freescale.com> diff --git a/a/1.txt b/N1/1.txt index 62208e9..1d1d0f1 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,10 +1,14 @@ -于 2011年12月07日 08:09, Scott Wood 写道: +=E4=BA=8E 2011=E5=B9=B412=E6=9C=8807=E6=97=A5 08:09, Scott Wood =E5=86=99= +=E9=81=93: > On 12/03/2011 10:31 PM, shuo.liu@freescale.com wrote: >> From: Liu Shuo<shuo.liu@freescale.com> >> ->> Freescale FCM controller has a 2K size limitation of buffer RAM. In order ->> to support the Nand flash chip whose page size is larger than 2K bytes, ->> we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB and save +>> Freescale FCM controller has a 2K size limitation of buffer RAM. In or= +der +>> to support the Nand flash chip whose page size is larger than 2K bytes= +, +>> we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB and sa= +ve >> them to a large buffer. >> >> Signed-off-by: Liu Shuo<shuo.liu@freescale.com> @@ -13,22 +17,24 @@ >> -remove page_size of struct fsl_elbc_mtd. >> -do a oob write by NAND_CMD_RNDIN. >> ->> drivers/mtd/nand/fsl_elbc_nand.c | 243 ++++++++++++++++++++++++++++++++++---- +>> drivers/mtd/nand/fsl_elbc_nand.c | 243 ++++++++++++++++++++++++++++= +++++++---- >> 1 files changed, 218 insertions(+), 25 deletions(-) > What is the plan for bad block marker migration? -This patch has been ported to uboot now, I think we can make a special +This patch has been ported to uboot now, I think we can make a special=20 uboot image for bad block marker migration when first use the chip. ->> @@ -473,13 +568,72 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command, +>> @@ -473,13 +568,72 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mt= +d, unsigned int command, >> * write so the HW generates the ECC. >> */ ->> if (elbc_fcm_ctrl->oob || elbc_fcm_ctrl->column != 0 || ->> - elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) +>> if (elbc_fcm_ctrl->oob || elbc_fcm_ctrl->column !=3D 0 || +>> - elbc_fcm_ctrl->index !=3D mtd->writesize + mtd->oobsize) >> - out_be32(&lbc->fbcr, >> - elbc_fcm_ctrl->index - elbc_fcm_ctrl->column); >> - else ->> + elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) { +>> + elbc_fcm_ctrl->index !=3D mtd->writesize + mtd->oobsize) { >> + if (elbc_fcm_ctrl->oob&& mtd->writesize> 2048) { >> + out_be32(&lbc->fbcr, 64); >> + } else { @@ -36,25 +42,27 @@ block marker migration when first use the chip. >> + - elbc_fcm_ctrl->column); >> + } > We need to limit ourselves to the regions that have actually been -> written to in the buffer. fbcr needs to be set separately for first and +> written to in the buffer. fbcr needs to be set separately for first an= +d > last subpages, with intermediate subpages having 0, 64, or 2112 as -> appropriate. Subpages that are entirely before column or entirely after +> appropriate. Subpages that are entirely before column or entirely afte= +r > column + index should be skipped. I have considered this case, but I don't think it is useful. - 1.There isn't a 'length' parameter in driver interface, although we + 1.There isn't a 'length' parameter in driver interface, although we=20 can get it from 'index - column'. - 2.To see nand_do_write_oob() in nand_base.c, it fill '0xff' to -entire oob area first and write the user data by nand_fill_oob(), then -call ecc.write_oob (default is nand_write_oob_std()). 'column' is -mtd->writesize and 'length' of write_buf() is mtd->oobsize. So I don't + 2.To see nand_do_write_oob() in nand_base.c, it fill '0xff' to=20 +entire oob area first and write the user data by nand_fill_oob(), then=20 +call ecc.write_oob (default is nand_write_oob_std()). 'column' is=20 +mtd->writesize and 'length' of write_buf() is mtd->oobsize. So I don't=20 think we need to deal with it there. >> + } else { >> + out_be32(&lbc->fir, FIR_OP_WB<< FIR_OP1_SHIFT); ->> + for (i = 1; i< n; i++) { ->> + if (i == n - 1) { ->> + elbc_fcm_ctrl->use_mdr = 1; +>> + for (i =3D 1; i< n; i++) { +>> + if (i =3D=3D n - 1) { +>> + elbc_fcm_ctrl->use_mdr =3D 1; >> + out_be32(&lbc->fir, >> + (FIR_OP_WB<< FIR_OP1_SHIFT) | >> + (FIR_OP_CM3<< FIR_OP2_SHIFT) | @@ -62,7 +70,8 @@ think we need to deal with it there. >> + (FIR_OP_RS<< FIR_OP4_SHIFT)); > Please explicitly show the (FIR_OP_NOP<< FIR_OP0_SHIFT) compenent. > ->> + } else if (mtd->writesize>= 2048&& mtd->writesize<= 16 * 1024) { +>> + } else if (mtd->writesize>=3D 2048&& mtd->writesize<=3D 16 * 1024) = +{ >> + >> setbits32(&lbc->bank[priv->bank].or, OR_FCM_PGS); > Don't insert a blank line here. diff --git a/a/content_digest b/N1/content_digest index 2f734a1..d0e4aeb 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -11,17 +11,20 @@ shuo.liu@freescale.com linux-mtd@lists.infradead.org akpm@linux-foundation.org - leoli@freescale.com " dwmw2@infradead.org\0" "\00:1\0" "b\0" - "\344\272\216 2011\345\271\26412\346\234\21007\346\227\245 08:09, Scott Wood \345\206\231\351\201\223:\n" + "=E4=BA=8E 2011=E5=B9=B412=E6=9C=8807=E6=97=A5 08:09, Scott Wood =E5=86=99=\n" + "=E9=81=93:\n" "> On 12/03/2011 10:31 PM, shuo.liu@freescale.com wrote:\n" ">> From: Liu Shuo<shuo.liu@freescale.com>\n" ">>\n" - ">> Freescale FCM controller has a 2K size limitation of buffer RAM. In order\n" - ">> to support the Nand flash chip whose page size is larger than 2K bytes,\n" - ">> we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB and save\n" + ">> Freescale FCM controller has a 2K size limitation of buffer RAM. In or=\n" + "der\n" + ">> to support the Nand flash chip whose page size is larger than 2K bytes=\n" + ",\n" + ">> we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB and sa=\n" + "ve\n" ">> them to a large buffer.\n" ">>\n" ">> Signed-off-by: Liu Shuo<shuo.liu@freescale.com>\n" @@ -30,22 +33,24 @@ ">> -remove page_size of struct fsl_elbc_mtd.\n" ">> -do a oob write by NAND_CMD_RNDIN.\n" ">>\n" - ">> drivers/mtd/nand/fsl_elbc_nand.c | 243 ++++++++++++++++++++++++++++++++++----\n" + ">> drivers/mtd/nand/fsl_elbc_nand.c | 243 ++++++++++++++++++++++++++++=\n" + "++++++----\n" ">> 1 files changed, 218 insertions(+), 25 deletions(-)\n" "> What is the plan for bad block marker migration?\n" - "This patch has been ported to uboot now, I think we can make a special \n" + "This patch has been ported to uboot now, I think we can make a special=20\n" "uboot image for bad\n" "block marker migration when first use the chip.\n" "\n" - ">> @@ -473,13 +568,72 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,\n" + ">> @@ -473,13 +568,72 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mt=\n" + "d, unsigned int command,\n" ">> \t\t * write so the HW generates the ECC.\n" ">> \t\t */\n" - ">> \t\tif (elbc_fcm_ctrl->oob || elbc_fcm_ctrl->column != 0 ||\n" - ">> -\t\t elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize)\n" + ">> \t\tif (elbc_fcm_ctrl->oob || elbc_fcm_ctrl->column !=3D 0 ||\n" + ">> -\t\t elbc_fcm_ctrl->index !=3D mtd->writesize + mtd->oobsize)\n" ">> -\t\t\tout_be32(&lbc->fbcr,\n" ">> -\t\t\t\telbc_fcm_ctrl->index - elbc_fcm_ctrl->column);\n" ">> -\t\telse\n" - ">> +\t\t elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) {\n" + ">> +\t\t elbc_fcm_ctrl->index !=3D mtd->writesize + mtd->oobsize) {\n" ">> +\t\t\tif (elbc_fcm_ctrl->oob&& mtd->writesize> 2048) {\n" ">> +\t\t\t\tout_be32(&lbc->fbcr, 64);\n" ">> +\t\t\t} else {\n" @@ -53,25 +58,27 @@ ">> +\t\t\t\t\t\t- elbc_fcm_ctrl->column);\n" ">> +\t\t\t}\n" "> We need to limit ourselves to the regions that have actually been\n" - "> written to in the buffer. fbcr needs to be set separately for first and\n" + "> written to in the buffer. fbcr needs to be set separately for first an=\n" + "d\n" "> last subpages, with intermediate subpages having 0, 64, or 2112 as\n" - "> appropriate. Subpages that are entirely before column or entirely after\n" + "> appropriate. Subpages that are entirely before column or entirely afte=\n" + "r\n" "> column + index should be skipped.\n" "\n" "I have considered this case, but I don't think it is useful.\n" - " 1.There isn't a 'length' parameter in driver interface, although we \n" + " 1.There isn't a 'length' parameter in driver interface, although we=20\n" "can get it from 'index - column'.\n" - " 2.To see nand_do_write_oob() in nand_base.c, it fill '0xff' to \n" - "entire oob area first and write the user data by nand_fill_oob(), then \n" - "call ecc.write_oob (default is nand_write_oob_std()). 'column' is \n" - "mtd->writesize and 'length' of write_buf() is mtd->oobsize. So I don't \n" + " 2.To see nand_do_write_oob() in nand_base.c, it fill '0xff' to=20\n" + "entire oob area first and write the user data by nand_fill_oob(), then=20\n" + "call ecc.write_oob (default is nand_write_oob_std()). 'column' is=20\n" + "mtd->writesize and 'length' of write_buf() is mtd->oobsize. So I don't=20\n" "think we need to deal with it there.\n" "\n" ">> +\t\t} else {\n" ">> +\t\t\tout_be32(&lbc->fir, FIR_OP_WB<< FIR_OP1_SHIFT);\n" - ">> +\t\t\tfor (i = 1; i< n; i++) {\n" - ">> +\t\t\t\tif (i == n - 1) {\n" - ">> +\t\t\t\t\telbc_fcm_ctrl->use_mdr = 1;\n" + ">> +\t\t\tfor (i =3D 1; i< n; i++) {\n" + ">> +\t\t\t\tif (i =3D=3D n - 1) {\n" + ">> +\t\t\t\t\telbc_fcm_ctrl->use_mdr =3D 1;\n" ">> +\t\t\t\t\tout_be32(&lbc->fir,\n" ">> +\t\t\t\t\t\t(FIR_OP_WB<< FIR_OP1_SHIFT) |\n" ">> +\t\t\t\t\t\t(FIR_OP_CM3<< FIR_OP2_SHIFT) |\n" @@ -79,7 +86,8 @@ ">> +\t\t\t\t\t\t(FIR_OP_RS<< FIR_OP4_SHIFT));\n" "> Please explicitly show the (FIR_OP_NOP<< FIR_OP0_SHIFT) compenent.\n" ">\n" - ">> +\t} else if (mtd->writesize>= 2048&& mtd->writesize<= 16 * 1024) {\n" + ">> +\t} else if (mtd->writesize>=3D 2048&& mtd->writesize<=3D 16 * 1024) =\n" + "{\n" ">> +\n" ">> \t\tsetbits32(&lbc->bank[priv->bank].or, OR_FCM_PGS);\n" "> Don't insert a blank line here.\n" @@ -89,4 +97,4 @@ "-LiuShuo\n" > -Scott -2b9ccb9641c10dc6da84100afb9f9010cea6ded892ea29997eeef42a66041078 +7a1d84582f7733ca3cd756f67dec70a8806a2fe153d98b6480f07d1f660e4a1a
diff --git a/a/content_digest b/N2/content_digest index 2f734a1..094834d 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -5,14 +5,14 @@ "Subject\0Re: [PATCH 3/3] mtd/nand : workaround for Freescale FCM to support large-page Nand chip\0" "Date\0Wed, 7 Dec 2011 11:55:24 +0800\0" "To\0Scott Wood <scottwood@freescale.com>\0" - "Cc\0Artem.Bityutskiy@nokia.com" - linuxppc-dev@lists.ozlabs.org - linux-kernel@vger.kernel.org - shuo.liu@freescale.com - linux-mtd@lists.infradead.org - akpm@linux-foundation.org - leoli@freescale.com - " dwmw2@infradead.org\0" + "Cc\0<shuo.liu@freescale.com>" + <dwmw2@infradead.org> + <Artem.Bityutskiy@nokia.com> + <linux-mtd@lists.infradead.org> + <linuxppc-dev@lists.ozlabs.org> + <akpm@linux-foundation.org> + <linux-kernel@vger.kernel.org> + " <leoli@freescale.com>\0" "\00:1\0" "b\0" "\344\272\216 2011\345\271\26412\346\234\21007\346\227\245 08:09, Scott Wood \345\206\231\351\201\223:\n" @@ -89,4 +89,4 @@ "-LiuShuo\n" > -Scott -2b9ccb9641c10dc6da84100afb9f9010cea6ded892ea29997eeef42a66041078 +5fad905184082e62b9a5687e2f1c3d0bb3246cc0b9da88df51f710756d7e99ed
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.