mtd: mxc_nand: fix truncate of unaligned oob copying
authorBaruch Siach <baruch@tkos.co.il>
Wed, 13 May 2015 08:17:38 +0000 (11:17 +0300)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 20 May 2015 22:29:53 +0000 (15:29 -0700)
Copy to/from oob io area might not be aligned to 4 bytes. When 8 bit ECC is
used, the buffer size is 26. Add memcpy16_{to,from}io, and use them to avoid
truncating the buffer. Prefer memcpy32_{to,from}io when the buffer is properly
aligned for better performance.

Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/mxc_nand.c

Simple merge