diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-12-10 19:37:39 +0000 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-12-10 19:37:39 +0000 |
commit | cbf48bed6a26279900ad00e6d6462a7f29676175 (patch) | |
tree | 69ca68e7b57c4f5de115dbd7205d8a2df5891257 /src/flash/nor | |
parent | 9a76c68563a199e673b15aca91d4e054f611ba78 (diff) | |
download | openocd+libswd-cbf48bed6a26279900ad00e6d6462a7f29676175.tar.gz openocd+libswd-cbf48bed6a26279900ad00e6d6462a7f29676175.tar.bz2 openocd+libswd-cbf48bed6a26279900ad00e6d6462a7f29676175.tar.xz openocd+libswd-cbf48bed6a26279900ad00e6d6462a7f29676175.zip |
contrib: add source to the cfi flash loaders
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/flash/nor')
-rw-r--r-- | src/flash/nor/cfi.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 4165166f..74362c4f 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -1226,6 +1226,7 @@ static int cfi_intel_write_block(struct flash_bank *bank, uint8_t *buffer, * r6: error test pattern */ + /* see contib/loaders/flash/armv4_5_cfi_intel_32.s for src */ static const uint32_t word_32_code[] = { 0xe4904004, /* loop: ldr r4, [r0], #4 */ 0xe5813000, /* str r3, [r1] */ @@ -1243,6 +1244,7 @@ static int cfi_intel_write_block(struct flash_bank *bank, uint8_t *buffer, 0xeafffffe /* done: b -2 */ }; + /* see contib/loaders/flash/armv4_5_cfi_intel_16.s for src */ static const uint32_t word_16_code[] = { 0xe0d040b2, /* loop: ldrh r4, [r0], #2 */ 0xe1c130b0, /* strh r3, [r1] */ @@ -1260,6 +1262,7 @@ static int cfi_intel_write_block(struct flash_bank *bank, uint8_t *buffer, 0xeafffffe /* done: b -2 */ }; + /* see contib/loaders/flash/armv4_5_cfi_intel_8.s for src */ static const uint32_t word_8_code[] = { 0xe4d04001, /* loop: ldrb r4, [r0], #1 */ 0xe5c13000, /* strb r3, [r1] */ @@ -1487,6 +1490,7 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, /* R10 = unlock2_addr */ /* R11 = unlock2_cmd */ + /* see contib/loaders/flash/armv4_5_cfi_span_32.s for src */ static const uint32_t word_32_code[] = { /* 00008100 <sp_32_code>: */ 0xe4905004, /* ldr r5, [r0], #4 */ @@ -1519,9 +1523,10 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, /* */ /* 00008154 <sp_32_done>: */ 0xeafffffe /* b 8154 <sp_32_done> */ - }; + }; - static const uint32_t word_16_code[] = { + /* see contib/loaders/flash/armv4_5_cfi_span_16.s for src */ + static const uint32_t word_16_code[] = { /* 00008158 <sp_16_code>: */ 0xe0d050b2, /* ldrh r5, [r0], #2 */ 0xe1c890b0, /* strh r9, [r8] */ @@ -1553,9 +1558,10 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, /* */ /* 000081ac <sp_16_done>: */ 0xeafffffe /* b 81ac <sp_16_done> */ - }; + }; - static const uint32_t word_16_code_dq7only[] = { + /* see contib/loaders/flash/armv4_5_cfi_span_16_dq7.s for src */ + static const uint32_t word_16_code_dq7only[] = { /* <sp_16_code>: */ 0xe0d050b2, /* ldrh r5, [r0], #2 */ 0xe1c890b0, /* strh r9, [r8] */ @@ -1578,9 +1584,10 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, /* */ /* 000081ac <sp_16_done>: */ 0xeafffffe /* b 81ac <sp_16_done> */ - }; + }; - static const uint32_t word_8_code[] = { + /* see contib/loaders/flash/armv4_5_cfi_span_8.s for src */ + static const uint32_t word_8_code[] = { /* 000081b0 <sp_16_code_end>: */ 0xe4d05001, /* ldrb r5, [r0], #1 */ 0xe5c89000, /* strb r9, [r8] */ |