Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 260dc003 authored by Vimal Singh's avatar Vimal Singh Committed by David Woodhouse
Browse files

mtd: nand: fix 512 byte software ecc support



Type of 'byte_addr' needes to be 'unsigned int' for 512 byte
ECC support.

Signed-off-by: default avatarVimal Singh <vimalsingh@ti.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 6a4123e5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -428,8 +428,8 @@ EXPORT_SYMBOL(nand_calculate_ecc);
int nand_correct_data(struct mtd_info *mtd, unsigned char *buf,
		      unsigned char *read_ecc, unsigned char *calc_ecc)
{
	unsigned char b0, b1, b2;
	unsigned char byte_addr, bit_addr;
	unsigned char b0, b1, b2, bit_addr;
	unsigned int byte_addr;
	/* 256 or 512 bytes/ecc  */
	const uint32_t eccsize_mult =
			(((struct nand_chip *)mtd->priv)->ecc.size) >> 8;