This is a note to let you know that I've just added the patch titled memory: mvebu-devbus: fix the conversion of the bus width to the 3.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: memory-mvebu-devbus-fix-the-conversion-of-the-bus-width.patch and it can be found in the queue-3.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From ce965c3d2e68c5325dd5624eb101d70423022fef Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> Date: Mon, 14 Apr 2014 17:29:18 +0200 Subject: memory: mvebu-devbus: fix the conversion of the bus width From: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> commit ce965c3d2e68c5325dd5624eb101d70423022fef 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 3edad321b1bd2e6c8b5f38146c115c8982438f06 ('drivers: memory: Introduce Marvell EBU Device Bus driver'), which was merged in v3.11. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> Link: https://lkml.kernel.org/r/1397489361-5833-2-git-send-email-thomas.petazzoni@xxxxxxxxxxxxxxxxxx Fixes: 3edad321b1bd ('drivers: memory: Introduce Marvell EBU Device Bus driver') Acked-by: Ezequiel Garcia <ezequiel.garcia@xxxxxxxxxxxxxxxxxx> Acked-by: Gregory CLEMENT <gregory.clement@xxxxxxxxxxxxxxxxxx> Signed-off-by: Jason Cooper <jason@xxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/memory/mvebu-devbus.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) --- a/drivers/memory/mvebu-devbus.c +++ b/drivers/memory/mvebu-devbus.c @@ -108,8 +108,19 @@ static int devbus_set_timing_params(stru node->full_name); return err; } - /* Convert bit width to byte width */ - r.bus_width /= 8; + + /* + * The bus width is encoded into the register as 0 for 8 bits, + * and 1 for 16 bits, so we do the necessary conversion here. + */ + if (r.bus_width == 8) + r.bus_width = 0; + else if (r.bus_width == 16) + r.bus_width = 1; + else { + dev_err(devbus->dev, "invalid bus width %d\n", r.bus_width); + return -EINVAL; + } err = get_timing_param_ps(devbus, node, "devbus,badr-skew-ps", &r.badr_skew); Patches currently in stable-queue which might be from thomas.petazzoni@xxxxxxxxxxxxxxxxxx are queue-3.14/pci-mvebu-fix-off-by-one-in-the-computed-size-of-the-mbus-windows.patch queue-3.14/arm-orion5x-fix-target-id-for-crypto-sram-window.patch queue-3.14/arm-mvebu-fix-nor-bus-width-in-armada-xp-db-device-tree.patch queue-3.14/arm-mvebu-mvebu-soc-id-keep-clock-enabled-if-pcie-unit-is-enabled.patch queue-3.14/irqchip-armada-370-xp-fix-releasing-of-msis.patch queue-3.14/pci-mvebu-split-pcie-bars-into-multiple-mbus-windows-when-needed.patch queue-3.14/memory-mvebu-devbus-fix-the-conversion-of-the-bus-width.patch queue-3.14/irqchip-armada-370-xp-implement-the-check_device-msi_chip-operation.patch queue-3.14/arm-mvebu-mvebu-soc-id-add-missing-clk_put-call.patch queue-3.14/irqchip-armada-370-xp-fix-invalid-cast-of-signed-value-into-unsigned-variable.patch queue-3.14/bus-mvebu-mbus-allow-several-windows-with-the-same-target-attribute.patch queue-3.14/arm-mvebu-fix-nor-bus-width-in-armada-xp-gp-device-tree.patch queue-3.14/arm-mvebu-fix-nor-bus-width-in-armada-xp-openblocks-ax3-device-tree.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html