mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
host: vi: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider nvhost API deprecation while maintaining equivalent functionality. The VI driver does not register prepare_poweroff, poweron_reset, finalize_poweron callbacks nor set the clock gating regs with nvhost, so the runtime operations will only call clk APIs. Bug 4921620 Change-Id: I639d428f5ea1ed1071d4502a877841b7049b9cd2 Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320983 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Frank Chen <frankc@nvidia.com> Tested-by: FNU Raunak <fraunak@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: FNU Raunak <fraunak@nvidia.com> Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
6e5aec9ce4
commit
c84bc1ebe7
@@ -515,21 +515,18 @@ static int vi_runtime_suspend(struct device *dev)
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct nvhost_device_data *info = platform_get_drvdata(pdev);
|
||||
struct host_vi5 *vi5 = info->private_data;
|
||||
int err;
|
||||
int err = 0;
|
||||
|
||||
if (nvhost_module_pm_ops.runtime_suspend != NULL) {
|
||||
err = nvhost_module_pm_ops.runtime_suspend(dev);
|
||||
if (!err && vi5->icc_write) {
|
||||
clk_bulk_disable_unprepare(info->num_clks, info->clks);
|
||||
|
||||
if (vi5->icc_write) {
|
||||
err = icc_set_bw(vi5->icc_write, 0, 0);
|
||||
if (err)
|
||||
dev_warn(dev,
|
||||
"failed to set icc_write bw: %d\n", err);
|
||||
return 0;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
return -EOPNOTSUPP;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int vi_runtime_resume(struct device *dev)
|
||||
@@ -537,21 +534,23 @@ static int vi_runtime_resume(struct device *dev)
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct nvhost_device_data *pdata = platform_get_drvdata(pdev);
|
||||
struct host_vi5 *vi5 = pdata->private_data;
|
||||
int err;
|
||||
int err = 0;
|
||||
|
||||
if (nvhost_module_pm_ops.runtime_resume != NULL) {
|
||||
err = nvhost_module_pm_ops.runtime_resume(dev);
|
||||
if (!err && vi5->icc_write) {
|
||||
|
||||
err = clk_bulk_prepare_enable(pdata->num_clks, pdata->clks);
|
||||
if (err) {
|
||||
dev_warn(dev, "failed to enable clocks: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
if (vi5->icc_write) {
|
||||
err = icc_set_bw(vi5->icc_write, 0, UINT_MAX);
|
||||
if (err)
|
||||
dev_warn(dev,
|
||||
"failed to set icc_write bw: %d\n", err);
|
||||
return 0;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
return -EOPNOTSUPP;
|
||||
return err;
|
||||
}
|
||||
|
||||
const struct dev_pm_ops vi_pm_ops = {
|
||||
|
||||
Reference in New Issue
Block a user