diff options
author | Gaƫtan Carlier <gcembed@gmail.com> | 2013-10-12 21:09:21 +0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-10-16 11:36:21 +0000 |
commit | b68bc7d95e2fcfd300a7d8d3835888951d59157c (patch) | |
tree | 4bf60eb5a6d0aeab5aa10cbff5eeae3c4dc2bd45 /src | |
parent | 8994b075fc06e2cf552a8025778853d4788cecf7 (diff) |
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 <gcembed@gmail.com>
Reviewed-on: http://openocd.zylin.com/1692
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/flash/nand/mxc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nand/mxc.c b/src/flash/nand/mxc.c index 73232de7..fb66b6d3 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); |