summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-ti-qspi.c
AgeCommit message (Collapse)Author
2014-04-07Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12Scott Wood
2013-11-24spi/qspi: Fix qspi remove path.Sourav Poddar
There is a bug in qspi removal path, as a result of which qspi cannot be removed when used as a module. The patch solves the bug and qspi can be removed cleanly. The bugs fixed are: -pm_runtime used around register access. - pm_runtime_disable need to be done before removal. - spi_unregister_master need to be called to unregister the spi device. Tested on DRA7 board. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24spi/qspi: cleanup pm_runtime error check.Sourav Poddar
clean up pm_runtime error check in accordance with rest of the check in the driver. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24spi/qspi: set correct platform drvdata in ti_qspi_probe()Wei Yongjun
The ti_qspi_remove() use the platform drvdata as a type of struct ti_qspi, we should pass correct platform drvdata to platform_set_drvdata() in ti_qspi_probe(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07Merge remote-tracking branch 'spi/topic/devm' into spi-qspiMark Brown
Conflicts: drivers/spi/spi-ti-qspi.c
2013-10-07spi: ti-qspi: one only one interrupt handlerSebastian Andrzej Siewior
The here used irq and threaded irq handler is a complete non-sense. After the status register is read and the source disabled it schedules a thread (the irq thread) to read the status from the variable, invoke complete() and then renable the interrupt. Again: schedule a thread which invokes _only_ complete(). This patch removes this non-sense and we remain with one handler which invokes complete() if needed. The device remove path should now disable the interupts. This has been compile time tested. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26spi/qspi: Add dual/quad read mode bit.Sourav Poddar
Add dual/quad read mode bit flag for the master controller. These check will be used in the spi framework to determine whether the master controller can do dual/quad read respectively. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26spi: ti-qspi: use devm_spi_register_master()Jingoo Han
Use devm_spi_register_master() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-01spi/qspi: fix missing unlock on error in ti_qspi_start_transfer_one()Wei Yongjun
Add the missing unlock before return from function ti_qspi_start_transfer_one() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-27spi/qspi: Add compatible string for am4372.Sourav Poddar
Add a compatible string for am4372. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-27spi/qspi: Fix device table entrySourav Poddar
Fix module device table entry. Without this, there will be a build failure while trying to build qspi as a module. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-23spi/qspi: Add dual/quad spi read supportSourav Poddar
Support for multiple lines in SPI framework has been picked[1]. [1]: http://comments.gmane.org/gmane.linux.kernel.spi.devel/14420 Hence, adapting ti qspi driver to support multiple data lines for read. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22spi/qspi: Add qspi flash controllerSourav Poddar
The patch add basic support for the quad spi controller. QSPI is a kind of spi module that allows single, dual and quad read access to external spi devices. The module has a memory mapped interface which provide direct interface for accessing data form external spi devices. The patch will configure controller clocks, device control register and for defining low level transfer apis which will be used by the spi framework to transfer data to the slave spi device(flash in this case). Test details: ------------- Tested this on dra7 board. Test1: Ran mtd_stesstest for 40000 iterations. - All iterations went through without failure. Test2: Use mtd utilities: - flash_erase to erase the flash device - mtd_debug read to read data back. - mtd_debug write to write to the data flash. diff between the write and read data shows zero. Acked-by: Felipe Balbi<balbi@ti.com> Reviewed-by: Felipe Balbi<balbi@ti.com> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>