summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-01-06 13:48:36 -0500
committerTom Rini <trini@ti.com>2014-01-06 13:48:36 -0500
commit895ec893a9df56b915b6ca1fa2ceba8fad7faf3d (patch)
treed9fe1b4a5b7f6c8f33bb2af91a688316fa64e47c
parent2d51bc30366a2f1df86309fe6bb572107743f9dd (diff)
parent9b56942f7d2f67e620662cfeb4269a9a938d55da (diff)
downloadblackbird-obmc-uboot-895ec893a9df56b915b6ca1fa2ceba8fad7faf3d.tar.gz
blackbird-obmc-uboot-895ec893a9df56b915b6ca1fa2ceba8fad7faf3d.zip
Merge branch 'master' of git://git.denx.de/u-boot-onenand
-rw-r--r--drivers/mtd/onenand/onenand_base.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 979e4af7c5..e33e8d38e7 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -91,7 +91,13 @@ static struct nand_ecclayout onenand_oob_32 = {
.oobfree = { {2, 3}, {14, 2}, {18, 3}, {30, 2} }
};
-static const unsigned char ffchars[] = {
+/*
+ * Warning! This array is used with the memcpy_16() function, thus
+ * it must be aligned to 2 bytes. GCC can make this array unaligned
+ * as the array is made of unsigned char, which memcpy16() doesn't
+ * like and will cause unaligned access.
+ */
+static const unsigned char __aligned(2) ffchars[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 */
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
OpenPOWER on IntegriCloud