summaryrefslogtreecommitdiff
path: root/drivers/mtd/altera_qspi.c
AgeCommit message (Collapse)Author
2015-12-28altera_qspi: allow ctrl-c to abort the erase opsThomas Chou
Allow ctrl-c to abort the erase ops. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-12-28altera_qspi: show erase progressThomas Chou
Show sector erase progress with dot and comma. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-12-28altera_qspi: skip erase if the sector is blankThomas Chou
Skip erase if the sector is blank. The sector erase is slow, and may take 0.7 sec typically or up to 3 sec worst-case. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-12-28altera_qspi: set fail_addr for erase opsThomas Chou
If the erase fails, fail_addr might indicate exactly which block failed. If fail_addr = MTD_FAIL_ADDR_UNKNOWN, the failure was not at the device level or was not specific to any particular block. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-12-28altera_qspi: call callback even if the erase failedThomas Chou
Erase is an asynchronous operation. Device drivers are supposed to call instr->callback() whenever the operation completes, even if it completes with a failure. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2015-12-19altera_qspi: initialize instr.mtd in flash_eraseThomas Chou
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>
2015-12-06altera_qspi: fix erase and write error codeThomas Chou
Fix erase and write error code, which should be "protected". From the "Embedded Peripherals IP User Guide" of Altera, The "Illegal write" flag indicates that a write instruction is targeting a protected sector on the flash memory. This bit is set to indicate that the IP has cancelled a write instruction. The "Illegal erase" flag indicates that an erase instruction has been set to a protected sector on the flash memory. This bit is set to indicate that the IP has cancelled the erase instruction. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Chin Liang See <clsee@altera.com> Reviewed-by: Marek Vasut <marex@denx.de>
2015-12-06altera_qspi: add lock unlock opsThomas Chou
Add lock() and unlock() mtd ops to altera_qspi. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Chin Liang See <clsee@altera.com> Reviewed-by: Marek Vasut <marex@denx.de>
2015-11-18altera_qspi: change ioremap to map_physmemThomas Chou
Change ioremap() to map_physmem(), as it is more used in u-boot. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de>
2015-11-12mtd: add altera quadspi driverThomas Chou
Add Altera Generic Quad SPI Controller support. The controller converts SPI NOR flash to parallel flash interface. So it is not like other SPI flash, but rather like CFI flash. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>