Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1270f063 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'mvebu-fixes-3.15' of git://git.infradead.org/linux-mvebu into fixes

From Jason Cooper:
mvebu fixes for v3.15

 - devbus: fix bus-width conversion

 - orion5x: fix target ID for crypto SRAM window

* tag 'mvebu-fixes-3.15' of git://git.infradead.org/linux-mvebu

:
  ARM: orion5x: fix target ID for crypto SRAM window
  memory: mvebu-devbus: fix the conversion of the bus width

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 9a2044fc 1cc9d481
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ struct mv_sata_platform_data;
#define ORION_MBUS_DEVBUS_BOOT_ATTR   0x0f
#define ORION_MBUS_DEVBUS_TARGET(cs)  0x01
#define ORION_MBUS_DEVBUS_ATTR(cs)    (~(1 << cs))
#define ORION_MBUS_SRAM_TARGET        0x00
#define ORION_MBUS_SRAM_TARGET        0x09
#define ORION_MBUS_SRAM_ATTR          0x00

/*
+13 −2
Original line number Diff line number Diff line
@@ -108,8 +108,19 @@ static int devbus_set_timing_params(struct devbus *devbus,
			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);