summaryrefslogtreecommitdiff
path: root/drivers/memory/atmel-ebi.c
AgeCommit message (Collapse)Author
2017-03-15memory/atmel-ebi: Fix ns <-> cycles conversionsBoris Brezillon
commit ee194289502a6901cc77dc9a893bf2afd351ac5e upstream. at91sam9_ebi_get_config() is incorrectly converting timings in clock cycles into timings in nanoseconds by multiplying the cycle values by the clk rate instead of the clk period. at91sam9_ebi_xslate_config() has the same problem for the tdf_ns -> tdf_cycles conversion. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reported-by: Chris Leahy <leahycm@gmail.com> Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver") Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-08memory: atmel-ebi: use PTR_ERR_OR_ZERO() to simplify the codeWei Yongjun
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Generated by coccinelle. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-21memory: atmel-ebi: make it explicitly non-modularPaul Gortmaker
The Kconfig currently controlling compilation of this code is: drivers/memory/Kconfig:config ATMEL_EBI drivers/memory/Kconfig: bool "Atmel EBI driver" ...meaning that it currently is not being built as a module by anyone. Lets remove the few remaining modular references, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-02memory: add Atmel EBI (External Bus Interface) driverBoris Brezillon
The EBI (External Bus Interface) is used to access external peripherals (NOR, SRAM, NAND, and other specific devices like ethernet controllers). Each device is assigned a CS line and an address range and can have its own configuration (timings, access mode, bus width, ...). This driver provides a generic DT binding to configure a device according to its requirements. For specific device controllers (like the NAND one) the SMC timings should be configured by the controller driver through the matrix and smc syscon regmaps. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>