aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/flash/nor/fespi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/flash/nor/fespi.c b/src/flash/nor/fespi.c
index d33c526..c61b708 100644
--- a/src/flash/nor/fespi.c
+++ b/src/flash/nor/fespi.c
@@ -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);
struct working_area *algorithm_wa = NULL;
struct working_area *data_wa = NULL;