altera_qspi: initialize instr.mtd in flash_erase
Initialize instr.mtd in flash_erase(). This fixes the system hang issue when CONFIG_MTD_PARTITIONS is selected. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
11b35d557b
commit
1c0e84ca82
@ -81,6 +81,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
|
||||
int ret;
|
||||
|
||||
memset(&instr, 0, sizeof(instr));
|
||||
instr.mtd = mtd;
|
||||
instr.addr = mtd->erasesize * s_first;
|
||||
instr.len = mtd->erasesize * (s_last + 1 - s_first);
|
||||
ret = mtd_erase(mtd, &instr);
|
||||
|
Loading…
Reference in New Issue
Block a user