linux/drivers/memory
Thomas Petazzoni fc94eff9a9 memory: mvebu-devbus: fix the conversion of the bus width
commit ce965c3d2e upstream.

According to the Armada 370 and Armada XP datasheets, the part of the
Device Bus register that configure the bus width should contain 0 for
a 8 bits bus width, and 1 for a 16 bits bus width (other values are
unsupported/reserved).

However, the current conversion done in the driver to convert from a
bus width in bits to the value expected by the register leads to
setting the register to 1 for a 8 bits bus, and 2 for a 16 bits bus.

This mistake was compensated by a mistake in the existing Device Tree
files for Armada 370/XP platforms: they were declaring a 8 bits bus
width, while the hardware in fact uses a 16 bits bus width.

This commit fixes that by adjusting the conversion logic.

This patch fixes a bug that was introduced in
3edad321b1 ('drivers: memory: Introduce
Marvell EBU Device Bus driver'), which was merged in v3.11.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1397489361-5833-2-git-send-email-thomas.petazzoni@free-electrons.com
Fixes: 3edad321b1 ('drivers: memory: Introduce Marvell EBU Device Bus driver')
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 10:28:22 -07:00
..
Kconfig drivers: memory: Introduce Marvell EBU Device Bus driver 2013-05-21 10:11:56 -07:00
Makefile drivers: memory: Introduce Marvell EBU Device Bus driver 2013-05-21 10:11:56 -07:00
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
mvebu-devbus.c memory: mvebu-devbus: fix the conversion of the bus width 2014-06-07 10:28:22 -07:00
of_memory.c memory: emif: add device tree support to emif driver 2012-09-04 16:14:31 -07:00
of_memory.h memory: fix build when CONFIG_OF && !CONFIG_DDR 2012-09-05 11:57:19 -07:00
tegra20-mc.c tegra: simplify use of devm_ioremap_resource 2013-08-15 16:04:42 -06:00
tegra30-mc.c tegra: simplify use of devm_ioremap_resource 2013-08-15 16:04:42 -06:00