flash/nor/fespi: check target type
Change-Id: I09d3ed20966b37ec63c09c2ffb0e0403986cb1e5 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7001 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
parent
1d8bc131a6
commit
a895b3b4f8
|
@ -512,6 +512,12 @@ static int fespi_write(struct flash_bank *bank, const uint8_t *buffer,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct riscv_info *riscv = riscv_info(target);
|
||||||
|
if (!is_riscv(riscv)) {
|
||||||
|
LOG_ERROR("Unexpected target type");
|
||||||
|
return ERROR_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int xlen = riscv_xlen(target);
|
unsigned int xlen = riscv_xlen(target);
|
||||||
struct working_area *algorithm_wa = NULL;
|
struct working_area *algorithm_wa = NULL;
|
||||||
struct working_area *data_wa = NULL;
|
struct working_area *data_wa = NULL;
|
||||||
|
|
Loading…
Reference in New Issue