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>
This commit is contained in:
committed by
Jason Cooper
parent
c4ec7430c3
commit
0456d3300e
@@ -310,16 +310,18 @@ static int mvebu_devbus_probe(struct platform_device *pdev)
|
||||
dev_dbg(devbus->dev, "Setting timing parameter, tick is %lu ps\n",
|
||||
devbus->tick_ps);
|
||||
|
||||
/* Read the Device Tree node */
|
||||
err = devbus_get_timing_params(devbus, node, &r, &w);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (!of_property_read_bool(node, "devbus,keep-config")) {
|
||||
/* Read the Device Tree node */
|
||||
err = devbus_get_timing_params(devbus, node, &r, &w);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* Set the new timing parameters */
|
||||
if (of_device_is_compatible(node, "marvell,orion-devbus"))
|
||||
devbus_orion_set_timing_params(devbus, node, &r, &w);
|
||||
else
|
||||
devbus_armada_set_timing_params(devbus, node, &r, &w);
|
||||
/* Set the new timing parameters */
|
||||
if (of_device_is_compatible(node, "marvell,orion-devbus"))
|
||||
devbus_orion_set_timing_params(devbus, node, &r, &w);
|
||||
else
|
||||
devbus_armada_set_timing_params(devbus, node, &r, &w);
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to create a child device explicitly from here to
|
||||
|
Reference in New Issue
Block a user