aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/omap35xx
diff options
context:
space:
mode:
authorHamish Guthrie <hcg@openwrt.org>2011-03-23 08:23:04 +0000
committerHamish Guthrie <hcg@openwrt.org>2011-03-23 08:23:04 +0000
commit4a3f0f9769f6aae7db8e6cef325a00cbd22d85cc (patch)
tree362b7f7623b1409eeb1d576aa05c384ea42fc331 /target/linux/omap35xx
parentee7f3d21f416c540b8b8b271b7174efaf6c4f658 (diff)
downloadupstream-4a3f0f9769f6aae7db8e6cef325a00cbd22d85cc.tar.gz
upstream-4a3f0f9769f6aae7db8e6cef325a00cbd22d85cc.tar.bz2
upstream-4a3f0f9769f6aae7db8e6cef325a00cbd22d85cc.zip
Add patch to correct sub-page alignment
SVN-Revision: 26274
Diffstat (limited to 'target/linux/omap35xx')
-rw-r--r--target/linux/omap35xx/patches-2.6.36/004-nand_subpage_align.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/omap35xx/patches-2.6.36/004-nand_subpage_align.patch b/target/linux/omap35xx/patches-2.6.36/004-nand_subpage_align.patch
new file mode 100644
index 0000000000..4bb854db6d
--- /dev/null
+++ b/target/linux/omap35xx/patches-2.6.36/004-nand_subpage_align.patch
@@ -0,0 +1,22 @@
+diff -urN linux-2.6.38.old/drivers/mtd/nand/omap2.c linux-2.6.38/drivers/mtd/nand/omap2.c
+--- linux-2.6.38.old/drivers/mtd/nand/omap2.c 2011-03-15 02:20:32.000000000 +0100
++++ linux-2.6.38/drivers/mtd/nand/omap2.c 2011-03-21 15:05:21.000000000 +0100
+@@ -245,6 +245,18 @@
+ int ret = 0;
+ u32 *p = (u32 *)buf;
+
++ /* u32 align the buffer and read */
++ /* NB: This assumes the buf ptr can be aligned *down* which is a valid.
++ * Assumption when dealing with ecc buffers etc.
++ */
++ u32 addr = (u32)p;
++
++ int diff = addr & 3;
++ addr -= diff;
++ len += diff;
++ len = (len + 3) & ~3;
++ p = (u32 *)addr;
++
+ /* take care of subpage reads */
+ if (len % 4) {
+ if (info->nand.options & NAND_BUSWIDTH_16)