diff options
author | Thomas Chou <thomas@wytron.com.tw> | 2015-12-18 21:35:08 +0800 |
---|---|---|
committer | Thomas Chou <thomas@wytron.com.tw> | 2015-12-19 09:51:19 +0800 |
commit | 1c0e84ca829a09948a61107744402296566aa076 (patch) | |
tree | cbc0e973020a46ce279c37da9eefc4e2a05f7d3b /drivers/mtd/altera_qspi.c | |
parent | 11b35d557b3c9e66090925e2369161cfe3690db1 (diff) | |
download | u-boot-imx-1c0e84ca829a09948a61107744402296566aa076.zip u-boot-imx-1c0e84ca829a09948a61107744402296566aa076.tar.gz u-boot-imx-1c0e84ca829a09948a61107744402296566aa076.tar.bz2 |
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>
Diffstat (limited to 'drivers/mtd/altera_qspi.c')
-rw-r--r-- | drivers/mtd/altera_qspi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c index 617bf5d..c7e37ad 100644 --- a/drivers/mtd/altera_qspi.c +++ b/drivers/mtd/altera_qspi.c @@ -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); |