jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / contrib / loaders / flash / armv4_5_cfi_span_16.s
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4 * Copyright (C) 2005, 2007 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
6 * Copyright (C) 2010 Spencer Oliver *
7 * spen@spen-soft.co.uk *
8 ***************************************************************************/
9
10 .text
11 .arm
12 .arch armv4
13
14 .section .init
15
16 /* input parameters - */
17 /* R0 = source address */
18 /* R1 = destination address */
19 /* R2 = number of writes */
20 /* R3 = flash write command */
21 /* R4 = constant to mask DQ7 bits (also used for Dq5 with shift) */
22 /* output parameters - */
23 /* R5 = 0x80 ok 0x00 bad */
24 /* temp registers - */
25 /* R6 = value read from flash to test status */
26 /* R7 = holding register */
27 /* unlock registers - */
28 /* R8 = unlock1_addr */
29 /* R9 = unlock1_cmd */
30 /* R10 = unlock2_addr */
31 /* R11 = unlock2_cmd */
32
33 code:
34 ldrh r5, [r0], #2
35 strh r9, [r8]
36 strh r11, [r10]
37 strh r3, [r8]
38 strh r5, [r1]
39 nop
40 busy:
41 ldrh r6, [r1]
42 eor r7, r5, r6
43 ands r7, r4, r7
44 beq cont /* b if DQ7 == Data7 */
45 ands r6, r6, r4, lsr #2
46 beq busy /* b if DQ5 low */
47 ldrh r6, [r1]
48 eor r7, r5, r6
49 ands r7, r4, r7
50 beq cont /* b if DQ7 == Data7 */
51 mov r5, #0 /* 0x0 - return 0x00, error */
52 bne done
53 cont:
54 subs r2, r2, #1 /* 0x1 */
55 moveq r5, #128 /* 0x80 */
56 beq done
57 add r1, r1, #2 /* 0x2 */
58 b code
59 done:
60 b done
61
62 .end

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)