1 /* SPDX-License-Identifier: GPL-2.0-or-later */
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 ***************************************************************************/
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 */
45 subs r2, r2, #1 /* 0x1 */
46 moveq r5, #128 /* 0x80 */
48 add r1, r1, #2 /* 0x2 */