linux/drivers/memory
Alexander Dahl bc9b934b2f memory: atmel-ebi: Fix smc timing return value evaluation
Setting optional EBI/SMC properties through device tree always fails due
to wrong evaluation of the return value of
atmel_ebi_xslate_smc_timings().

If you put some of those properties in your dts file, but not
'atmel,smc-tdf-ns' the local variable 'required' in
atmel_ebi_xslate_smc_timings() stays on 'false' after the first 'if'
block. This leads to setting 'ret' to -EINVAL in the first run of the
following 'for' loop which is then the return value of this function.

However if you set 'atmel,smc-tdf-ns' in the dts file and everything in
atmel_ebi_xslate_smc_timings() works well, it returns the content of
'required' which is 'true' then.

So the function atmel_ebi_xslate_smc_timings() always returns non-zero
which lets its call in atmel_ebi_xslate_smc_config() always fail and
thus returning -EINVAL, so the EBI configuration for this node fails.

Judging from the following code evaluating the local 'required' variable
in atmel_ebi_xslate_smc_config() and the call of caps->xlate_config in
atmel_ebi_dev_setup() it's probably right to only let the call fail if a
negative error code is returned.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-07-26 22:37:30 +02:00
..
samsung memory: samsung: exynos-srom: Fix wrong count of registers 2016-07-06 08:16:56 +02:00
tegra memory: tegra: Add a missing 'of_node_put()' call 2017-01-25 07:57:13 +01:00
atmel-ebi.c memory: atmel-ebi: Fix smc timing return value evaluation 2017-07-26 22:37:30 +02:00
atmel-sdramc.c memory: atmel-sdramc: use builtin_platform_driver to simplify the code 2016-10-20 11:59:57 +02:00
da8xx-ddrctl.c memory: da8xx-ddrctl: drop the call to of_flat_dt_get_machine_name() 2016-11-23 20:26:42 +05:30
emif.c drivers/memory: don't check resource with devm_ioremap_resource 2013-05-18 11:55:52 +02:00
emif.h memory: emif: handle frequency and voltage change events 2012-05-02 10:52:09 -07:00
fsl-corenet-cf.c memory: fsl-corenet: Fix module autoload for OF platform driver 2015-10-05 04:44:11 +01:00
fsl_ifc.c memory: Update dependency of IFC for Layerscape 2016-07-13 17:31:10 -07:00
jz4780-nemc.c memory: jz4780-nemc: driver for the NEMC on JZ4780 SoCs 2015-03-26 23:51:36 +01:00
Kconfig MTD updates for 4.12-rc1: 2017-05-11 10:44:22 -07:00
Makefile memory: davinci: add support for da8xx DDR2/mDDR controller 2016-11-14 17:18:34 +05:30
mtk-smi.c memory/mediatek: add support for mt2701 2016-06-21 11:36:19 +02:00
mvebu-devbus.c memory: drop owner assignment from platform_drivers 2014-10-20 16:20:52 +02:00
of_memory.c fix:memory:of_memory:add missing header dependencies 2016-08-31 15:21:18 +02:00
of_memory.h memory: fix build when CONFIG_OF && !CONFIG_DDR 2012-09-05 11:57:19 -07:00
omap-gpmc.c Few improvments for GPMC (General Purpose Memory Controller) 2017-06-18 18:55:59 -07:00
pl172.c memory: pl172: add ARM PrimeCell PL176 MPMC support 2015-09-29 22:19:02 +02:00
tegra20-mc.c memory: drop owner assignment from platform_drivers 2014-10-20 16:20:52 +02:00
ti-aemif.c memory: ti-aemif: Handle return value of clk_prepare_enable 2017-06-03 19:08:14 +09:00