aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-22 17:26:13 -0400
committerJason Cooper <jason@lakedaemon.net>2014-04-29 09:17:10 -0400
commit0456d3300edba52e47c6b5582cfe9d87756f5590 (patch)
tree1ee7546cebd4f327e73d7e9c48332692b3402573 /drivers/memory
parentc4ec7430c30a4012a04aa5535919845f543f075d (diff)
memory: mvebu-devbus: add a devbus, keep-config property
Currently, the mvebu-devbus Device Tree binding makes defining the timing parameters mandatory. However, in practice, when converting Orion5x platforms to the Device Tree, we may not necessarily have easy access to the hardware platforms to fetch those values which were not defined in old-style board files: all these platforms rely on the bootloader setting the timing parameters correctly. In order to facilitate the migration to the Device Tree of this platform, this commit relaxes the mvebu-devbus Device Tree binding by introducing a 'devbus,keep-config' boolean property, which, if defined, will ignore all timing parameters passed in the Device Tree, and simply rely on the timing values already defined by the bootloader. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Link: https://lkml.kernel.org/r/1398202002-28530-10-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/mvebu-devbus.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c
index c8f3dad8a825..ff7138fd66d1 100644
--- a/drivers/memory/mvebu-devbus.c
+++ b/drivers/memory/mvebu-devbus.c
@@ -310,16 +310,18 @@ static int mvebu_devbus_probe(struct platform_device *pdev)
310 dev_dbg(devbus->dev, "Setting timing parameter, tick is %lu ps\n", 310 dev_dbg(devbus->dev, "Setting timing parameter, tick is %lu ps\n",
311 devbus->tick_ps); 311 devbus->tick_ps);
312 312
313 /* Read the Device Tree node */ 313 if (!of_property_read_bool(node, "devbus,keep-config")) {
314 err = devbus_get_timing_params(devbus, node, &r, &w); 314 /* Read the Device Tree node */
315 if (err < 0) 315 err = devbus_get_timing_params(devbus, node, &r, &w);
316 return err; 316 if (err < 0)
317 return err;
317 318
318 /* Set the new timing parameters */ 319 /* Set the new timing parameters */
319 if (of_device_is_compatible(node, "marvell,orion-devbus")) 320 if (of_device_is_compatible(node, "marvell,orion-devbus"))
320 devbus_orion_set_timing_params(devbus, node, &r, &w); 321 devbus_orion_set_timing_params(devbus, node, &r, &w);
321 else 322 else
322 devbus_armada_set_timing_params(devbus, node, &r, &w); 323 devbus_armada_set_timing_params(devbus, node, &r, &w);
324 }
323 325
324 /* 326 /*
325 * We need to create a child device explicitly from here to 327 * We need to create a child device explicitly from here to