Skip to content
Snippets Groups Projects
Commit 1c0e84ca authored by Thomas Chou's avatar Thomas Chou
Browse files

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: default avatarThomas Chou <thomas@wytron.com.tw>
Acked-by: default avatarMarek Vasut <marex@denx.de>
parent 11b35d55
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment