From cbf48bed6a26279900ad00e6d6462a7f29676175 Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Fri, 10 Dec 2010 19:37:39 +0000 Subject: contrib: add source to the cfi flash loaders Signed-off-by: Spencer Oliver --- src/flash/nor/cfi.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/flash/nor') 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 : */ 0xe4905004, /* ldr r5, [r0], #4 */ @@ -1519,9 +1523,10 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, /* */ /* 00008154 : */ 0xeafffffe /* b 8154 */ - }; + }; - 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 : */ 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 : */ 0xeafffffe /* b 81ac */ - }; + }; - 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[] = { /* : */ 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 : */ 0xeafffffe /* b 81ac */ - }; + }; - 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 : */ 0xe4d05001, /* ldrb r5, [r0], #1 */ 0xe5c89000, /* strb r9, [r8] */ -- cgit v1.2.3