From 5c105d9f3fd086aff195d3849dcf847d6b0bd927 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 5 Oct 2012 10:12:53 +0000 Subject: branch Attitude Adjustment git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-2.6.36/004-nand_subpage_align.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 target/linux/omap35xx/patches-2.6.36/004-nand_subpage_align.patch (limited to 'target/linux/omap35xx/patches-2.6.36/004-nand_subpage_align.patch') 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 000000000..4bb854db6 --- /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) -- cgit v1.2.3