flash: nor: {pic32mx,cfi}: fix register names
Commit fd43be0726
introduced a
regression: since the register names were changed from those
traditional for MIPS to common GDB scheme the code that makes use of
them needs to be changed accordingly.
This commit restores pic32mx flash driver functionality.
Change-Id: Id18c739390fae36737a02dc30c363d0444f53b96
Reported-by: Louis Rannou <louson@users.sf.net>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/3206
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
__archive__
parent
afbad69d97
commit
61493083bc
|
@ -1529,16 +1529,16 @@ static int cfi_spansion_write_block_mips(struct flash_bank *bank, const uint8_t
|
|||
}
|
||||
;
|
||||
|
||||
init_reg_param(®_params[0], "a0", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[1], "a1", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[2], "a2", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[3], "a3", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[4], "t0", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[5], "t1", 32, PARAM_IN);
|
||||
init_reg_param(®_params[6], "t4", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[7], "t5", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[8], "t6", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[9], "t7", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[0], "r4", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[1], "r5", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[2], "r6", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[3], "r7", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[4], "r8", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[5], "r9", 32, PARAM_IN);
|
||||
init_reg_param(®_params[6], "r12", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[7], "r13", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[8], "r14", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[9], "r15", 32, PARAM_OUT);
|
||||
|
||||
while (count > 0) {
|
||||
uint32_t thisrun_count = (count > buffer_size) ? buffer_size : count;
|
||||
|
|
|
@ -472,9 +472,9 @@ static int pic32mx_write_block(struct flash_bank *bank, const uint8_t *buffer,
|
|||
mips32_info.common_magic = MIPS32_COMMON_MAGIC;
|
||||
mips32_info.isa_mode = MIPS32_ISA_MIPS32;
|
||||
|
||||
init_reg_param(®_params[0], "a0", 32, PARAM_IN_OUT);
|
||||
init_reg_param(®_params[1], "a1", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[2], "a2", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[0], "r4", 32, PARAM_IN_OUT);
|
||||
init_reg_param(®_params[1], "r5", 32, PARAM_OUT);
|
||||
init_reg_param(®_params[2], "r6", 32, PARAM_OUT);
|
||||
|
||||
int row_offset = offset % row_size;
|
||||
uint8_t *new_buffer = NULL;
|
||||
|
|
Loading…
Reference in New Issue