This is an automated email from Gerrit.

Gaëtan Carlier (gcem...@gmail.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/1692

-- gerrit

commit d9b0de4477464a9ab9bc61956016f8432acb6f35
Author: Gaëtan Carlier <gcem...@gmail.com>
Date:   Sat Oct 12 21:09:21 2013 +0200

    flash: mxc nfc(v1) : fix incorrect address in spare area for biswap command
    
    For NFC v1 (i.MX27), swapping must be done between offset 464 of Main
    buffer and offset 4 of Spare buffer.
    
    Change-Id: I09c2036e88770032da87d5846cd2094847f47b46
    Signed-off-by: Gaetan Carlier <gcem...@gmail.com>

diff --git a/jimtcl b/jimtcl
index 2c1eba9..411e92f 160000
--- a/jimtcl
+++ b/jimtcl
@@ -1 +1 @@
-Subproject commit 2c1eba991e21a6f0b531fb0f83e21f9e6ee7c515
+Subproject commit 411e92fea9621630eb350e0c2bb43543e553b84f
diff --git a/src/flash/nand/mxc.c b/src/flash/nand/mxc.c
index 73232de..fb66b6d 100644
--- a/src/flash/nand/mxc.c
+++ b/src/flash/nand/mxc.c
@@ -543,7 +543,7 @@ static int mxc_write_page(struct nand_device *nand, 
uint32_t page,
                swap2 = (swap1 << 8) | (swap2 & 0xFF);
                target_write_u16(target, MXC_NF_MAIN_BUFFER3 + 464, new_swap1);
                if (nfc_is_v1())
-                       target_write_u16(target, MXC_NF_V1_SPARE_BUFFER3, 
swap2);
+                       target_write_u16(target, MXC_NF_V1_SPARE_BUFFER3 + 4, 
swap2);
                else
                        target_write_u16(target, MXC_NF_V2_SPARE_BUFFER3, 
swap2);
        }
@@ -662,7 +662,7 @@ static int mxc_read_page(struct nand_device *nand, uint32_t 
page,
                /* BI-swap -  work-around of mxc NFC for NAND device with page 
== 2k */
                target_read_u16(target, MXC_NF_MAIN_BUFFER3 + 464, &swap1);
                if (nfc_is_v1())
-                       SPARE_BUFFER3 = MXC_NF_V1_SPARE_BUFFER3;
+                       SPARE_BUFFER3 = MXC_NF_V1_SPARE_BUFFER3 + 4;
                else
                        SPARE_BUFFER3 = MXC_NF_V2_SPARE_BUFFER3;
                target_read_u16(target, SPARE_BUFFER3, &swap2);

-- 

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to