mtd: rawnand: qcom: update last code word register
PATCH v2 1/1 mtd: rawnand: qcom: update last code word register
From QPIC version 2.0 onwards new register got added to read last codeword. This change will update the same.
For first three code word READ_LOCATION_n register will be use.For last code wrod READ_LOCATION_LAST_CW_n register will be use.
---
[V2]
* Fixed alignment for NAND_READ_LOCATION_LAST_CW_n reg macro
* Changed number of register write to 1 when NAND_READ_LOCATION_LAST_CW_n register will use
drivers/mtd/nand/raw/qcom_nandc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/mtd/nand/raw/qcom_nandc.c +5 -5
@@ -48,10 +48,10 @@#define NAND_READ_LOCATION_1 0xf24#define NAND_READ_LOCATION_2 0xf28#define NAND_READ_LOCATION_3 0xf2c -#define NAND_READ_LOCATION_LAST_CW_0 0xf40 -#define NAND_READ_LOCATION_LAST_CW_1 0xf44 -#define NAND_READ_LOCATION_LAST_CW_2 0xf48 -#define NAND_READ_LOCATION_LAST_CW_3 0xf4c +#define NAND_READ_LOCATION_LAST_CW_0 0xf40 +#define NAND_READ_LOCATION_LAST_CW_1 0xf44 +#define NAND_READ_LOCATION_LAST_CW_2 0xf48 +#define NAND_READ_LOCATION_LAST_CW_3 0xf4c/* dummy register offsets, used by write_reg_dma */ #define NAND_DEV_CMD1_RESTORE 0xdead
@@ -1125,7 +1125,7 @@ config_nand_cw_read(struct qcom_nand_controller *nandc, bool use_ecc)if (nandc->props->is_bam) {if (nandc->props->qpic_v2)write_reg_dma (nandc,NAND_READ_LOCATION_LAST_CW_0 , -4 ,NAND_BAM_NEXT_SGL ); +1 ,NAND_BAM_NEXT_SGL );write_reg_dma (nandc,NAND_READ_LOCATION_0 ,4 ,NAND_BAM_NEXT_SGL ); }
Signature · 6 lines
2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Miquel Raynal
maintainerHello,
Md Sadre Alam <[email protected]> wrote on Tue, 5 Jan 2021 00:01:18 +0530:
Quoted 5 lines
From QPIC version 2.0 onwards new register got added to read last codeword. This change will update the same.
For first three code word
READ_LOCATION_nregister will be use.For last code wrodREAD_LOCATION_LAST_CW_nregister will be
s/wrod/word
Quoted 2 lines
use.
Please add a Fixes tag here
Quoted 14 lines
Signed-off-by Md Sadre Alam <[email protected]>---
[V2]
* Fixed alignment forNAND_READ_LOCATION_LAST_CW_nreg macro
* Changed number of register write to 1 whenNAND_READ_LOCATION_LAST_CW_nregister will usedrivers/mtd/nand/raw/qcom_nandc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/mtd/nand/raw/qcom_nandc.c +0
-0@@ -48,10 +48,10 @@#define NAND_READ_LOCATION_1 0xf24
drivers/mtd/nand/raw/qcom_nandc.c line 54
Quoted 10 lines
drivers/mtd/nand/raw/qcom_nandc.c +4
-4#define NAND_READ_LOCATION_2 0xf28#define NAND_READ_LOCATION_3 0xf2c -#define NAND_READ_LOCATION_LAST_CW_0 0xf40 -#define NAND_READ_LOCATION_LAST_CW_1 0xf44 -#define NAND_READ_LOCATION_LAST_CW_2 0xf48 -#define NAND_READ_LOCATION_LAST_CW_3 0xf4c +#define NAND_READ_LOCATION_LAST_CW_0 0xf40 +#define NAND_READ_LOCATION_LAST_CW_1 0xf44 +#define NAND_READ_LOCATION_LAST_CW_2 0xf48 +#define NAND_READ_LOCATION_LAST_CW_3 0xf4c
It looks like you forgot to squash this to you original patch :)
drivers/mtd/nand/raw/qcom_nandc.c config_nand_cw_read(struct qcom_nand_controller *nandc, bool use_ecc) · line 1131
Quoted 12 lines
drivers/mtd/nand/raw/qcom_nandc.c +1
-1/* dummy register offsets, used by write_reg_dma */ #define NAND_DEV_CMD1_RESTORE 0xdead@@ -1125,7 +1125,7 @@ config_nand_cw_read(struct qcom_nand_controller *nandc, bool use_ecc)if (nandc->props->is_bam) {if (nandc->props->qpic_v2)write_reg_dma (nandc,NAND_READ_LOCATION_LAST_CW_0 , -4 ,NAND_BAM_NEXT_SGL ); +1 ,NAND_BAM_NEXT_SGL );write_reg_dma (nandc,NAND_READ_LOCATION_0 ,4 ,NAND_BAM_NEXT_SGL ); }
Thanks,
Miquèl