diff options
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 7e68203fe1ba..25673eacdd88 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -768,7 +768,7 @@ static int nand_read_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
768 | uint8_t *p = buf; | 768 | uint8_t *p = buf; |
769 | uint8_t *ecc_calc = chip->buffers->ecccalc; | 769 | uint8_t *ecc_calc = chip->buffers->ecccalc; |
770 | uint8_t *ecc_code = chip->buffers->ecccode; | 770 | uint8_t *ecc_code = chip->buffers->ecccode; |
771 | int *eccpos = chip->ecc.layout->eccpos; | 771 | uint32_t *eccpos = chip->ecc.layout->eccpos; |
772 | 772 | ||
773 | chip->ecc.read_page_raw(mtd, chip, buf); | 773 | chip->ecc.read_page_raw(mtd, chip, buf); |
774 | 774 | ||
@@ -810,7 +810,7 @@ static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
810 | uint8_t *p = buf; | 810 | uint8_t *p = buf; |
811 | uint8_t *ecc_calc = chip->buffers->ecccalc; | 811 | uint8_t *ecc_calc = chip->buffers->ecccalc; |
812 | uint8_t *ecc_code = chip->buffers->ecccode; | 812 | uint8_t *ecc_code = chip->buffers->ecccode; |
813 | int *eccpos = chip->ecc.layout->eccpos; | 813 | uint32_t *eccpos = chip->ecc.layout->eccpos; |
814 | 814 | ||
815 | for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { | 815 | for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { |
816 | chip->ecc.hwctl(mtd, NAND_ECC_READ); | 816 | chip->ecc.hwctl(mtd, NAND_ECC_READ); |
@@ -1416,7 +1416,7 @@ static void nand_write_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
1416 | int eccsteps = chip->ecc.steps; | 1416 | int eccsteps = chip->ecc.steps; |
1417 | uint8_t *ecc_calc = chip->buffers->ecccalc; | 1417 | uint8_t *ecc_calc = chip->buffers->ecccalc; |
1418 | const uint8_t *p = buf; | 1418 | const uint8_t *p = buf; |
1419 | int *eccpos = chip->ecc.layout->eccpos; | 1419 | uint32_t *eccpos = chip->ecc.layout->eccpos; |
1420 | 1420 | ||
1421 | /* Software ecc calculation */ | 1421 | /* Software ecc calculation */ |
1422 | for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) | 1422 | for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) |
@@ -1442,7 +1442,7 @@ static void nand_write_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
1442 | int eccsteps = chip->ecc.steps; | 1442 | int eccsteps = chip->ecc.steps; |
1443 | uint8_t *ecc_calc = chip->buffers->ecccalc; | 1443 | uint8_t *ecc_calc = chip->buffers->ecccalc; |
1444 | const uint8_t *p = buf; | 1444 | const uint8_t *p = buf; |
1445 | int *eccpos = chip->ecc.layout->eccpos; | 1445 | uint32_t *eccpos = chip->ecc.layout->eccpos; |
1446 | 1446 | ||
1447 | for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { | 1447 | for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { |
1448 | chip->ecc.hwctl(mtd, NAND_ECC_WRITE); | 1448 | chip->ecc.hwctl(mtd, NAND_ECC_WRITE); |