[PATCH v5 09/11] mtd: parse out the ECC info for the full-id nand chips

2013-05-15 Thread Huang Shijie
Parse out the ECC information for the full-id nand chips. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 41e5c07..359e105 100644

[PATCH v5 08/11] mtd: add ECC info for nand_flash_dev{}

2013-05-15 Thread Huang Shijie
Add an instance of an anonymous struct to store the ECC infor for full id nand chips. @ecc.strength: ECC correctability from the datasheet. @ecc.step: ECC size required by the @ecc.strength, Also add the necessary macros to make the code simple and clean. Signed-off-by: Huang

[PATCH v5 07/11] mtd: replace the hardcode with the onfi_feature()

2013-05-15 Thread Huang Shijie
The current code uses the hardcode to detect the 16-bit bus width. Use the onfi_feature() to replace it. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand

[PATCH v5 06/11] mtd: get the ECC info from the Extended Parameter Page

2013-05-15 Thread Huang Shijie
-by: Huang Shijie --- drivers/mtd/nand/nand_base.c | 77 ++ 1 files changed, 77 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 15630ef..e98ea69 100644 --- a/drivers/mtd/nand/nand_base.c +++ b

[PATCH v5 02/11] mtd: increase max OOB size to 744

2013-05-15 Thread Huang Shijie
The oob size of Micron's MT29F64G08CBABAWP is 744 bytes. So increase the NAND_MAX_OOBSIZE to 744. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 134d470

[PATCH v5 01/11] mtd: add datasheet's ECC information to nand_chip{}

2013-05-15 Thread Huang Shijie
hy do not re-use the @strength and @size in the nand_ecc_ctrl{}? The @strength and @size in nand_ecc_ctrl{} is used by the nand controller driver, while the @ecc_strength and @ecc_step are get from the datasheet. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h |8 1 fil

[PATCH v5 00/11] mtd: add datasheet's ECC information to nand_chip{}

2013-05-15 Thread Huang Shijie
i_ prefix for the extend parameter page data structures. [3] rename the onfi_get_feature() to onfi_feature(). [4] I re-test this patch set again. Huang Shijie (11): mtd: add datasheet's ECC information to nand_chip{} mtd: increase max OOB size to 744 mtd: get the ECC info from the

Re: [PATCH V4 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-05-15 Thread Huang Shijie
于 2013年05月15日 15:42, Artem Bityutskiy 写道: You did not send v4 thus far, is this because you are busy or you did not have any requests to address? I am not busy. I just thought the v4 is enough. but now i will send out the v5. thanks Huang Shijie -- To unsubscribe from this list: send

Re: [PATCH 1/4] mtd: add a new field to mtd_info{}

2013-05-15 Thread Huang Shijie
于 2013年05月15日 15:47, Artem Bityutskiy 写道: On Fri, 2013-05-03 at 14:21 +0800, Huang Shijie wrote: In order to implement the NAND boot for some Freescale's chips, such as imx23/imx28/imx50/imx6, we use a tool (called kobs-ng) to burn the uboot and some metadata to nand chip. And the ROM code

Re: [PATCH V4 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-05-15 Thread Huang Shijie
于 2013年05月15日 15:27, Artem Bityutskiy 写道: On Fri, 2013-04-26 at 17:08 +0800, Huang Shijie wrote: Add more commit for ecc_strength and ecc_size fields. We can treat the comment as the initial semantics for the two fields. Signed-off-by: Huang Shijie Huang, let me drop the 3 patches I already

[PATCH v2 append] mtd: update the ABI document about the ecc step

2013-05-15 Thread Huang Shijie
We add a new sys node for ecc step. So update the ABI document about it. Signed-off-by: Huang Shijie b32...@freescale.com --- Documentation/ABI/testing/sysfs-class-mtd | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-mtd b

[PATCH v5 fix] mtd: get the ECC info from the Extended Parameter Page

2013-05-15 Thread Huang Shijie
Signed-off-by: Huang Shijie b32...@freescale.com --- fix the case: If a value of 0 is reported then this ECC Information Block is invalid and should not be used. --- drivers/mtd/nand/nand_base.c | 80 ++ 1 files changed, 80 insertions(+), 0 deletions

[PATCH v5 fix] mtd: gpmi: set the BCH's geometry with the ecc info

2013-05-15 Thread Huang Shijie
info case. Signed-off-by: Huang Shijie b32...@freescale.com --- fixes: [1] the typos. [2] add the O in the diagram. --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 132 +++- 1 files changed, 131 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi

Re: [PATCH V4 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-05-15 Thread Huang Shijie
于 2013年05月15日 15:27, Artem Bityutskiy 写道: On Fri, 2013-04-26 at 17:08 +0800, Huang Shijie wrote: Add more commit for ecc_strength and ecc_size fields. We can treat the comment as the initial semantics for the two fields. Signed-off-by: Huang Shijieb32...@freescale.com Huang, let me drop the 3

Re: [PATCH 1/4] mtd: add a new field to mtd_info{}

2013-05-15 Thread Huang Shijie
于 2013年05月15日 15:47, Artem Bityutskiy 写道: On Fri, 2013-05-03 at 14:21 +0800, Huang Shijie wrote: In order to implement the NAND boot for some Freescale's chips, such as imx23/imx28/imx50/imx6, we use a tool (called kobs-ng) to burn the uboot and some metadata to nand chip. And the ROM code

Re: [PATCH V4 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-05-15 Thread Huang Shijie
于 2013年05月15日 15:42, Artem Bityutskiy 写道: You did not send v4 thus far, is this because you are busy or you did not have any requests to address? I am not busy. I just thought the v4 is enough. but now i will send out the v5. thanks Huang Shijie -- To unsubscribe from this list: send

[PATCH v5 00/11] mtd: add datasheet's ECC information to nand_chip{}

2013-05-15 Thread Huang Shijie
] rename the onfi_get_feature() to onfi_feature(). [4] I re-test this patch set again. Huang Shijie (11): mtd: add datasheet's ECC information to nand_chip{} mtd: increase max OOB size to 744 mtd: get the ECC info from the parameter page for ONFI nand mtd: add data structures for Extended

[PATCH v5 01/11] mtd: add datasheet's ECC information to nand_chip{}

2013-05-15 Thread Huang Shijie
in the nand_ecc_ctrl{}? The @strength and @size in nand_ecc_ctrl{} is used by the nand controller driver, while the @ecc_strength and @ecc_step are get from the datasheet. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h |8 1 files changed, 8 insertions(+), 0

[PATCH v5 02/11] mtd: increase max OOB size to 744

2013-05-15 Thread Huang Shijie
The oob size of Micron's MT29F64G08CBABAWP is 744 bytes. So increase the NAND_MAX_OOBSIZE to 744. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd

[PATCH v5 07/11] mtd: replace the hardcode with the onfi_feature()

2013-05-15 Thread Huang Shijie
The current code uses the hardcode to detect the 16-bit bus width. Use the onfi_feature() to replace it. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b

[PATCH v5 06/11] mtd: get the ECC info from the Extended Parameter Page

2013-05-15 Thread Huang Shijie
Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c | 77 ++ 1 files changed, 77 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 15630ef..e98ea69 100644

[PATCH v5 08/11] mtd: add ECC info for nand_flash_dev{}

2013-05-15 Thread Huang Shijie
Add an instance of an anonymous struct to store the ECC infor for full id nand chips. @ecc.strength: ECC correctability from the datasheet. @ecc.step: ECC size required by the @ecc.strength, Also add the necessary macros to make the code simple and clean. Signed-off-by: Huang

[PATCH v5 09/11] mtd: parse out the ECC info for the full-id nand chips

2013-05-15 Thread Huang Shijie
Parse out the ECC information for the full-id nand chips. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 41e5c07..359e105

[PATCH v5 04/11] mtd: add data structures for Extended Parameter Page

2013-05-15 Thread Huang Shijie
{} for the Extended Parameter Page. Acked-by: Pekon Gupta pe...@ti.com Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include

[PATCH v5 05/11] mtd: add a helper to get the supported features for ONFI nand

2013-05-15 Thread Huang Shijie
From: Huang Shijie shij...@gmail.com add a helper to get the supported features for ONFI nand. Also add the neccessary macros. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include

[PATCH v5 03/11] mtd: get the ECC info from the parameter page for ONFI nand

2013-05-15 Thread Huang Shijie
From the ONFI spec, we can just get the ECC info from the @ecc_bits field of the parameter page. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers

[PATCH v2 0/4] Export the ecc step size to user applications

2013-05-15 Thread Huang Shijie
, the kobs-ng can gets the ecc step size now. v1 -- v2: [1] rename the ecc_size to ecc_step. [2] rebase on the latest l2-mtd. Huang Shijie (4): mtd: add a new field to mtd_info{} mtd: add a new sys node to show the ecc step size mtd: set the ecc step size for master/slave mtd_info

[PATCH v2 2/4] mtd: add a new sys node to show the ecc step size

2013-05-15 Thread Huang Shijie
Add a new sys node to show the ecc step size. The application then can uses this node to get the ecc step size. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/mtdcore.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/mtdcore.c b

[PATCH v2 1/4] mtd: add a new field to mtd_info{}

2013-05-15 Thread Huang Shijie
for the next patches. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/mtd.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index a5cf4e8..effdd41 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd

[PATCH v2 4/4] mtd: gpmi: update the ecc step size for mtd_info{}

2013-05-15 Thread Huang Shijie
update the ecc step size when we have already get the right value. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi

[PATCH v2 3/4] mtd: set the ecc step size for master/slave mtd_info

2013-05-15 Thread Huang Shijie
Set the ecc step size for master/slave mtd_info{}. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/mtdpart.c|1 + drivers/mtd/nand/nand_base.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index

[PATCH v5 11/11] mtd: gpmi: set the BCH's geometry with the ecc info

2013-05-15 Thread Huang Shijie
info case. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 128 +++- 1 files changed, 127 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index

[PATCH v5 10/11] mtd: add the ecc info for some full-id nand chips

2013-05-15 Thread Huang Shijie
Add the ecc info for TC58NVG2S0F, TC58NVG3S0F, TC58NVG5D2 and TC58NVG6D2. From these chips' datasheets, we know that: The TC58NVG2S0F and TC58NVG3S0F require 4bit ECC for per 512byte. The TC58NVG5D2 and TC58NVG6D2 require 40bits ECC for per 1024byte. Signed-off-by: Huang Shijie b32

Re: [PATCH v5 01/11] mtd: add datasheet's ECC information to nand_chip{}

2013-05-15 Thread Huang Shijie
于 2013年05月15日 20:11, Artem Bityutskiy 写道: On Wed, 2013-05-15 at 16:40 +0800, Huang Shijie wrote: + * @ecc_strength: [INTERN] ECC correctability from the datasheet. + * Minimum amount of bit errors per @ecc_step guaranteed to + * be correctable

[PATCH 4/4] mtd: gpmi: update the ecc step size for mtd_info{}

2013-05-03 Thread Huang Shijie
update the ecc step size when we have already get the right value. Signed-off-by: Huang Shijie --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c

[PATCH 2/4] mtd: add a new sys node to show the ecc step size

2013-05-03 Thread Huang Shijie
Add a new sys node to show the ecc step size. The application then can uses this node to get the ecc step size. Signed-off-by: Huang Shijie --- drivers/mtd/mtdcore.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c

[PATCH 0/4] Export the ecc step size to user applications

2013-05-03 Thread Huang Shijie
, the kobs-ng can gets the ecc step size now. Huang Shijie (4): mtd: add a new field to mtd_info{} mtd: add a new sys node to show the ecc step size mtd: set the ecc step size for master/slave mtd_info mtd: gpmi: update the ecc step size for mtd_info{} drivers/mtd/mtdcore.c

[PATCH 3/4] mtd: set the ecc step size for master/slave mtd_info

2013-05-03 Thread Huang Shijie
Set the ecc step size for master/slave mtd_info{}. Signed-off-by: Huang Shijie --- drivers/mtd/mtdpart.c|1 + drivers/mtd/nand/nand_base.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 3014933..e948eb6

[PATCH 1/4] mtd: add a new field to mtd_info{}

2013-05-03 Thread Huang Shijie
for the next patches. Signed-off-by: Huang Shijie --- include/linux/mtd/mtd.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 183a304..b93035f 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -173,6

[PATCH 1/4] mtd: add a new field to mtd_info{}

2013-05-03 Thread Huang Shijie
for the next patches. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/mtd.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 183a304..b93035f 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd

[PATCH 0/4] Export the ecc step size to user applications

2013-05-03 Thread Huang Shijie
, the kobs-ng can gets the ecc step size now. Huang Shijie (4): mtd: add a new field to mtd_info{} mtd: add a new sys node to show the ecc step size mtd: set the ecc step size for master/slave mtd_info mtd: gpmi: update the ecc step size for mtd_info{} drivers/mtd/mtdcore.c

[PATCH 3/4] mtd: set the ecc step size for master/slave mtd_info

2013-05-03 Thread Huang Shijie
Set the ecc step size for master/slave mtd_info{}. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/mtdpart.c|1 + drivers/mtd/nand/nand_base.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index

[PATCH 2/4] mtd: add a new sys node to show the ecc step size

2013-05-03 Thread Huang Shijie
Add a new sys node to show the ecc step size. The application then can uses this node to get the ecc step size. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/mtdcore.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/mtdcore.c b

[PATCH 4/4] mtd: gpmi: update the ecc step size for mtd_info{}

2013-05-03 Thread Huang Shijie
update the ecc step size when we have already get the right value. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi

Re: [PATCH V4 4/9] mtd: get the ECC info from the Extended Parameter Page

2013-05-02 Thread Huang Shijie
tw: Could you check you email client? I failed several times for the HTML issue. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/

Re: [PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

2013-05-02 Thread Huang Shijie
, though we introduce a little redandancy. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FA

Re: [PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

2013-05-02 Thread Huang Shijie
, though we introduce a little redandancy. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH V4 4/9] mtd: get the ECC info from the Extended Parameter Page

2013-05-02 Thread Huang Shijie
? I failed several times for the HTML issue. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

2013-05-01 Thread Huang Shijie
places, such as some drivers. That's reason why i added this helper. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/m

Re: [PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

2013-05-01 Thread Huang Shijie
his patch. :) This patch is just replace the hardcode for 16-bit onfi nand check. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/major

Re: [PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

2013-05-01 Thread Huang Shijie
is just replace the hardcode for 16-bit onfi nand check. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

2013-05-01 Thread Huang Shijie
i added this helper. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH V4 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-04-26 Thread Huang Shijie
Add more commit for ecc_strength and ecc_size fields. We can treat the comment as the initial semantics for the two fields. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include

[PATCH V4 3/9] mtd: add a helper to get the supported features for ONFI nand

2013-04-26 Thread Huang Shijie
From: Huang Shijie add a helper to get the supported features for ONFI nand. Also add the neccessary macros. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd

[PATCH V4 4/9] mtd: get the ECC info from the Extended Parameter Page

2013-04-26 Thread Huang Shijie
of the extended parameter page to retrieve the ECC requirements for this device. This patch implement the reading of the Extended Parameter Page, and parses the sections for ECC type, and get the ECC info from the ECC section. Tested this patch with Micron MT29F64G08CBABAWP. Signed-off-by: Huang Shijie

[PATCH V4 2/9] mtd: add data structures for Extended Parameter Page

2013-04-26 Thread Huang Shijie
{} for the Extended Parameter Page. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index a0c486b..9bad296 100644

[PATCH V4 0/9] mtd: add datasheet's ECC information to nand_chip{}

2013-04-26 Thread Huang Shijie
version 2. [1] add NAND_ prefix for macros used by the full-id nands. [2] add onfi_ prefix for the extend parameter page data structures. [3] rename the onfi_get_feature() to onfi_feature(). [4] I re-test this patch set again. *** BLURB HERE *** Huang Shijie (9

[PATCH V4 6/9] mtd: add ECC info for nand_flash_dev{}

2013-04-26 Thread Huang Shijie
Add an instance of an anonymous struct to store the ECC infor for full id nand chips. @ecc.strength: ECC correctability from the datasheet. @ecc.size: ECC size required by the @ecc.strength, Also add the necessary macros to make the code simple and clean. Signed-off-by: Huang

[PATCH V4 8/9] mtd: add the ecc info for some full-id nand chips

2013-04-26 Thread Huang Shijie
Add the ecc info for TC58NVG2S0F, TC58NVG3S0F, TC58NVG5D2 and TC58NVG6D2. >From these chips' datasheets, we know that: The TC58NVG2S0F and TC58NVG3S0F require 4bit ECC for per 512byte. The TC58NVG5D2 and TC58NVG6D2 require 40bits ECC for per 1024byte. Signed-off-by: Huang Shi

[PATCH V4 7/9] mtd: parse out the ECC info for the full-id nand chips

2013-04-26 Thread Huang Shijie
Parse out the ECC information for the full-id nand chips. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index bc3442a..5fe65ad 100644

[PATCH V4 9/9] mtd: gpmi: set the BCH's geometry with the ecc info

2013-04-26 Thread Huang Shijie
info case. Signed-off-by: Huang Shijie Signed-off-by: Huang Shijie --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 128 +++- 1 files changed, 127 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c

[PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

2013-04-26 Thread Huang Shijie
The current code uses the hardcode to detect the 16-bit bus width. Use the onfi_feature() to replace it. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand

Re: [PATCH V3 6/9] mtd: add a new field for ecc info in the nand_flash_dev{}

2013-04-26 Thread Huang Shijie
于 2013年04月26日 14:15, Brian Norris 写道: > How does that look? It's actually quite similar to the construct Artem > used with mfr_id and dev_id, except that we give the struct a name. > And this time, it actually compiles! > It's ok to me. :) I will use it in the next version. thanks

Re: [PATCH V3 6/9] mtd: add a new field for ecc info in the nand_flash_dev{}

2013-04-26 Thread Huang Shijie
于 2013年04月26日 14:15, Brian Norris 写道: How does that look? It's actually quite similar to the construct Artem used with mfr_id and dev_id, except that we give the struct a name. And this time, it actually compiles! It's ok to me. :) I will use it in the next version. thanks Huang Shijie

[PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

2013-04-26 Thread Huang Shijie
The current code uses the hardcode to detect the 16-bit bus width. Use the onfi_feature() to replace it. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b

[PATCH V4 9/9] mtd: gpmi: set the BCH's geometry with the ecc info

2013-04-26 Thread Huang Shijie
info case. Signed-off-by: Huang Shijie b32...@freescale.com Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 128 +++- 1 files changed, 127 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b

[PATCH V4 8/9] mtd: add the ecc info for some full-id nand chips

2013-04-26 Thread Huang Shijie
Add the ecc info for TC58NVG2S0F, TC58NVG3S0F, TC58NVG5D2 and TC58NVG6D2. From these chips' datasheets, we know that: The TC58NVG2S0F and TC58NVG3S0F require 4bit ECC for per 512byte. The TC58NVG5D2 and TC58NVG6D2 require 40bits ECC for per 1024byte. Signed-off-by: Huang Shijie b32

[PATCH V4 7/9] mtd: parse out the ECC info for the full-id nand chips

2013-04-26 Thread Huang Shijie
Parse out the ECC information for the full-id nand chips. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index bc3442a..5fe65ad

[PATCH V4 6/9] mtd: add ECC info for nand_flash_dev{}

2013-04-26 Thread Huang Shijie
Add an instance of an anonymous struct to store the ECC infor for full id nand chips. @ecc.strength: ECC correctability from the datasheet. @ecc.size: ECC size required by the @ecc.strength, Also add the necessary macros to make the code simple and clean. Signed-off-by: Huang

[PATCH V4 2/9] mtd: add data structures for Extended Parameter Page

2013-04-26 Thread Huang Shijie
{} for the Extended Parameter Page. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index a0c486b

[PATCH V4 0/9] mtd: add datasheet's ECC information to nand_chip{}

2013-04-26 Thread Huang Shijie
by the full-id nands. [2] add onfi_ prefix for the extend parameter page data structures. [3] rename the onfi_get_feature() to onfi_feature(). [4] I re-test this patch set again. *** BLURB HERE *** Huang Shijie (9): mtd: add more comment for ecc_strength/ecc_size mtd: add data

[PATCH V4 4/9] mtd: get the ECC info from the Extended Parameter Page

2013-04-26 Thread Huang Shijie
of the extended parameter page to retrieve the ECC requirements for this device. This patch implement the reading of the Extended Parameter Page, and parses the sections for ECC type, and get the ECC info from the ECC section. Tested this patch with Micron MT29F64G08CBABAWP. Signed-off-by: Huang Shijie b32

[PATCH V4 3/9] mtd: add a helper to get the supported features for ONFI nand

2013-04-26 Thread Huang Shijie
From: Huang Shijie shij...@gmail.com add a helper to get the supported features for ONFI nand. Also add the neccessary macros. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include

[PATCH V4 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-04-26 Thread Huang Shijie
Add more commit for ecc_strength and ecc_size fields. We can treat the comment as the initial semantics for the two fields. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd

Re: [PATCH V3 6/9] mtd: add a new field for ecc info in the nand_flash_dev{}

2013-04-25 Thread Huang Shijie
spilit to two fields. It makes the nand_flash_ids[] less readable. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 063e517..f4c 100644

Re: [PATCH V3 0/9] mtd: add datasheet's ECC information to nand_chip{}

2013-04-25 Thread Huang Shijie
reviews. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH V3 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-04-25 Thread Huang Shijie
于 2013年04月25日 14:32, Brian Norris 写道: How about just: "minimum number of bits correctability, if known; if unknown, set to 0 ok. no problem. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@

Re: [PATCH V3 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-04-25 Thread Huang Shijie
于 2013年04月25日 14:32, Brian Norris 写道: * @numchips: [INTERN] number of physical chips > * @chipsize: [INTERN] the size of one chip for multichip arrays > * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 Brian -- To unsubscribe from

Re: [PATCH V3 4/9] mtd: get the ECC info from the Extended Parameter Page

2013-04-25 Thread Huang Shijie
chip->cmdfunc == nand_command) chip->cmdfunc = nand_command_lp; I will send a fix patch about this patch. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH V3 4/9] mtd: get the ECC info from the Extended Parameter Page

2013-04-25 Thread Huang Shijie
) chip-cmdfunc = nand_command_lp; I will send a fix patch about this patch. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH V3 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-04-25 Thread Huang Shijie
于 2013年04月25日 14:32, Brian Norris 写道: * @numchips: [INTERN] number of physical chips * @chipsize: [INTERN] the size of one chip for multichip arrays * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 Brian -- To unsubscribe from

Re: [PATCH V3 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-04-25 Thread Huang Shijie
于 2013年04月25日 14:32, Brian Norris 写道: How about just: minimum number of bits correctability, if known; if unknown, set to 0 ok. no problem. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH V3 0/9] mtd: add datasheet's ECC information to nand_chip{}

2013-04-25 Thread Huang Shijie
reviews. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH V3 6/9] mtd: add a new field for ecc info in the nand_flash_dev{}

2013-04-25 Thread Huang Shijie
)) But if we add the brackets, we will meet a compiler error. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

[PATCH V3 1/9] mtd: add more comment for ecc_strength/ecc_size

2013-04-23 Thread Huang Shijie
Add more commit for ecc_strength and ecc_size fields. We can treat the comment as the initial semantics for the two fields. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include

[PATCH V3 3/9] mtd: add a helper to get the supported features for ONFI nand

2013-04-23 Thread Huang Shijie
From: Huang Shijie add a helper to get the supported features for ONFI nand. Also add the neccessary macros. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd

[PATCH V3 6/9] mtd: add a new field for ecc info in the nand_flash_dev{}

2013-04-23 Thread Huang Shijie
Add the @ecc_info in the nand_flash_dev{}. The lower 16 bits are used to store the ECC bits, while the upper 16 bits are used to store the ECC data chunk size. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff

[PATCH V3 9/9] mtd: gpmi: set the BCH's geometry with the ecc info

2013-04-23 Thread Huang Shijie
info case. Signed-off-by: Huang Shijie Signed-off-by: Huang Shijie --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 128 +++- 1 files changed, 127 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c

[PATCH V3 5/9] mtd: replace the hardcode with the onfi_feature()

2013-04-23 Thread Huang Shijie
The current code uses the hardcode to detect the 16-bit bus width. Use the onfi_feature() to replace it. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand

[PATCH V3 7/9] mtd: parse out the ECC info for the full-id nand chips

2013-04-23 Thread Huang Shijie
Parse out the ECC information for the full-id nand chips. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 8b2a792..b873220 100644

[PATCH V3 4/9] mtd: get the ECC info from the Extended Parameter Page

2013-04-23 Thread Huang Shijie
of the extended parameter page to retrieve the ECC requirements for this device. This patch implement the reading of the Extended Parameter Page, and parses the sections for ECC type, and get the ECC info from the ECC section. Tested this patch with Micron MT29F64G08CBABAWP. Signed-off-by: Huang Shijie

[PATCH V3 8/9] mtd: add the ecc info for some full-id nand chips

2013-04-23 Thread Huang Shijie
Add the ecc info for TC58NVG2S0F, TC58NVG3S0F, TC58NVG5D2 and TC58NVG6D2. >From these chips' datasheets, we know that: The TC58NVG2S0F and TC58NVG3S0F require 4bit ECC for per 512byte. The TC58NVG5D2 and TC58NVG6D2 require 40bits ECC for per 1024byte. Signed-off-by: Huang Shi

[PATCH V3 2/9] mtd: add data structures for Extended Parameter Page

2013-04-23 Thread Huang Shijie
{} for the Extended Parameter Page. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c1cc690..3f47ad9 100644

[PATCH V3 0/9] mtd: add datasheet's ECC information to nand_chip{}

2013-04-23 Thread Huang Shijie
nands. [2] add onfi_ prefix for the extend parameter page data structures. [3] rename the onfi_get_feature() to onfi_feature(). [4] I re-test this patch set again. Huang Shijie (9): mtd: add more comment for ecc_strength/ecc_size mtd: add data structures for Extende

Re: [PATCH v2 3/8] mtd: get the ECC info from the Extended Parameter Page

2013-04-23 Thread Huang Shijie
we detect the ONFI nand, we actually use the nand_command() to issue the command which does not works with CHANGE READ COLUMN command. I use the nand_command_lp() to issue the CHANGE READ COLUMN command, it works fine. I can remove the "last" argument now. thanks Brian. Huang Shiji

Re: [PATCH v2 3/8] mtd: get the ECC info from the Extended Parameter Page

2013-04-23 Thread Huang Shijie
the ONFI nand, we actually use the nand_command() to issue the command which does not works with CHANGE READ COLUMN command. I use the nand_command_lp() to issue the CHANGE READ COLUMN command, it works fine. I can remove the last argument now. thanks Brian. Huang Shijie -- To unsubscribe from

[PATCH V3 0/9] mtd: add datasheet's ECC information to nand_chip{}

2013-04-23 Thread Huang Shijie
for the extend parameter page data structures. [3] rename the onfi_get_feature() to onfi_feature(). [4] I re-test this patch set again. Huang Shijie (9): mtd: add more comment for ecc_strength/ecc_size mtd: add data structures for Extended Parameter Page mtd: add a helper to get

[PATCH V3 2/9] mtd: add data structures for Extended Parameter Page

2013-04-23 Thread Huang Shijie
{} for the Extended Parameter Page. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c1cc690

[PATCH V3 4/9] mtd: get the ECC info from the Extended Parameter Page

2013-04-23 Thread Huang Shijie
of the extended parameter page to retrieve the ECC requirements for this device. This patch implement the reading of the Extended Parameter Page, and parses the sections for ECC type, and get the ECC info from the ECC section. Tested this patch with Micron MT29F64G08CBABAWP. Signed-off-by: Huang Shijie b32

[PATCH V3 8/9] mtd: add the ecc info for some full-id nand chips

2013-04-23 Thread Huang Shijie
Add the ecc info for TC58NVG2S0F, TC58NVG3S0F, TC58NVG5D2 and TC58NVG6D2. From these chips' datasheets, we know that: The TC58NVG2S0F and TC58NVG3S0F require 4bit ECC for per 512byte. The TC58NVG5D2 and TC58NVG6D2 require 40bits ECC for per 1024byte. Signed-off-by: Huang Shijie b32

<    1   2   3   4   5   6   7   8   9   >