- devbus: fix bus-width conversion
 
  - orion5x: fix target ID for crypto SRAM window
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTX5gJAAoJEP45WPkGe8ZnXLQP/1EpsDvA8bdCm+kspEBMScpN
 Ji3N1F6XTjYRI/YbpwvJra1UZyZDx2rNaA1ofGDLLTZiELO0pOMeE8gGouG6lZaA
 OZf1Hq5T0pKkq8XkqUhKqgZ3QNUmCjaWL2FCkAIuiFDaCFpops2aCRy1YO3nht6o
 ymhJ/MQwdvCG+pMVfaVNMmnxroA9uiu7OPLtfwru8+7kghGWfa/LNCM5H4+TOEG9
 vV5onWrBzzTQCq1X12+a5qgOsOmlRdo69EZ2j0Rq/aHg5c9+Bxa2u5OncBe0txOa
 blC42x9gTVtOY3sUTkFcyF1HMIC/PajZhWHkJKIqFJfVF11GVFc38LwWJewIsgaH
 OxSwMZQOL4CcRTGl2nwxF4L2TVefYimJgNXsjEe0i7FNahtT/pUS4gz56XDE1iK5
 sIZE//GevJ0eFDk9kCKEZYJkqiSTgrw05wHb5CVlHIy5fi5jG9prYzBqDam57Ohi
 JOpVyC9+sodY7VkLMgqZc1XW492LB0JXdSOn473k8E4j5dK2JVzLd7GljiHXFc8P
 MM/drQGmXa4O85lliD2RLTW1ca40AFbtgimHkQjBIAm1YCaUcZhEp5TUpA40BoBN
 IA+GP6TtN2ha39gk1AbMx773aaRcK28p1B+epfkF2CPuTYuaMYnp51UcVK2Xugvt
 QiD1tZJB3FpyIEqRqecS
 =k1Ts
 -----END PGP SIGNATURE-----

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: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2014-05-04 22:27:30 -07:00
Родитель 9a2044fce2 1cc9d48145
Коммит 1270f063f9
2 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -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
/*

Просмотреть файл

@ -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);