gpu: nvgpu: gm20b: Require rework for DVFS and rg

Boards require a rework to make railgating and DVFS work realiably.
The information whether the board has been reworked or not will be
available on DTS.

This patch adds a DTS check to the GPU driver initialisation. If the
rework information is not available (or the rework has been marked as
disabled), railgating and DVFS are disabled.

Bug 1555485

Change-Id: Ie86fe35fb94377403472faffcbcaec645b6e40d9
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/500218
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Arto Merilainen
2014-09-18 11:38:08 +03:00
committed by Dan Willemsen
parent fc7280ae91
commit bc10e7e47a

View File

@@ -440,6 +440,18 @@ static int gk20a_tegra_probe(struct platform_device *dev)
*platform = t132_gk20a_tegra_platform;
}
/* WAR for bug 1547668: Disable railgating and scaling irrespective of
* platform data if the rework has not been made. */
if (tegra_get_chipid() == TEGRA_CHIPID_TEGRA21) {
np = of_find_node_by_path("/gpu-dvfs-rework");
if (!(np && of_device_is_available(np))) {
platform->can_railgate = false;
platform->devfreq_governor = "";
dev_warn(&dev->dev, "board does not support scaling or powergating");
}
}
gk20a_tegra_get_clocks(dev);
return 0;