summaryrefslogtreecommitdiff
path: root/drivers/mtd/altera_qspi.c
Commit message (Collapse)AuthorAgeLines
* altera_qspi: allow ctrl-c to abort the erase opsThomas Chou2015-12-28-0/+9
| | | | | | Allow ctrl-c to abort the erase ops. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* altera_qspi: show erase progressThomas Chou2015-12-28-0/+14
| | | | | | Show sector erase progress with dot and comma. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* altera_qspi: skip erase if the sector is blankThomas Chou2015-12-28-14/+25
| | | | | | | 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>
* altera_qspi: set fail_addr for erase opsThomas Chou2015-12-28-0/+1
| | | | | | | | 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>
* altera_qspi: call callback even if the erase failedThomas Chou2015-12-28-0/+1
| | | | | | | | 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>
* altera_qspi: initialize instr.mtd in flash_eraseThomas Chou2015-12-19-0/+1
| | | | | | | | 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>
* altera_qspi: fix erase and write error codeThomas Chou2015-12-06-2/+2
| | | | | | | | | | | | | | | | | | 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>
* altera_qspi: add lock unlock opsThomas Chou2015-12-06-0/+95
| | | | | | | | 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>
* altera_qspi: change ioremap to map_physmemThomas Chou2015-11-18-1/+1
| | | | | | | 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>
* mtd: add altera quadspi driverThomas Chou2015-11-12-0/+273
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>