[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1426162518-7405-16-git-send-email-vinceh@nvidia.com>
Date: Thu, 12 Mar 2015 20:15:16 +0800
From: Vince Hsu <vinceh@...dia.com>
To: thierry.reding@...il.com, pdeschrijver@...dia.com,
swarren@...dotorg.org, gnurou@...il.com, jroedel@...e.de,
p.zabel@...gutronix.de, mturquette@...aro.org, pgaikwad@...dia.com,
sboyd@...eaurora.org, robh+dt@...nel.org, pawel.moll@....com,
mark.rutland@....com, ijc+devicetree@...lion.org.uk,
galak@...eaurora.org, linux@....linux.org.uk,
tbergstrom@...dia.com, airlied@...ux.ie, bhelgaas@...gle.com,
tj@...nel.org, arnd@...db.de, robh@...nel.org, will.deacon@....com
CC: linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-pm@...r.kernel.org, rjw@...ysocki.net,
viresh.kumar@...aro.org, Vince Hsu <vinceh@...dia.com>
Subject: [PATCH v2 15/17] drm/tegra: remove GR3D power sequence from driver
We have the generic PM domain support for Tegra SoCs now. So remove the
duplicated power sequence here.
Signed-off-by: Vince Hsu <vinceh@...dia.com>
---
drivers/gpu/drm/tegra/gr3d.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c
index 0b3f2b977ba0..fd8642cdc42f 100644
--- a/drivers/gpu/drm/tegra/gr3d.c
+++ b/drivers/gpu/drm/tegra/gr3d.c
@@ -281,21 +281,17 @@ static int gr3d_probe(struct platform_device *pdev)
}
}
- err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D, gr3d->clk,
- gr3d->rst);
- if (err < 0) {
- dev_err(&pdev->dev, "failed to power up 3D unit\n");
+ err = clk_prepare_enable(gr3d->clk);
+ if (err) {
+ dev_err(&pdev->dev, "failed to enable clk\n");
return err;
}
if (gr3d->clk_secondary) {
- err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D1,
- gr3d->clk_secondary,
- gr3d->rst_secondary);
- if (err < 0) {
- dev_err(&pdev->dev,
- "failed to power up secondary 3D unit\n");
- return err;
+ err = clk_prepare_enable(gr3d->clk_secondary);
+ if (err) {
+ dev_err(&pdev->dev, "failed to enable secondary clk\n");
+ goto err_clk_sec;
}
}
@@ -313,7 +309,7 @@ static int gr3d_probe(struct platform_device *pdev)
if (err < 0) {
dev_err(&pdev->dev, "failed to register host1x client: %d\n",
err);
- return err;
+ goto err_host1x;
}
/* initialize address register map */
@@ -323,6 +319,13 @@ static int gr3d_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, gr3d);
return 0;
+
+err_clk_sec:
+ clk_disable_unprepare(gr3d->clk);
+err_host1x:
+ clk_disable_unprepare(gr3d->clk_secondary);
+
+ return err;
}
static int gr3d_remove(struct platform_device *pdev)
@@ -337,12 +340,9 @@ static int gr3d_remove(struct platform_device *pdev)
return err;
}
- if (gr3d->clk_secondary) {
- tegra_powergate_power_off(TEGRA_POWERGATE_3D1);
+ if (gr3d->clk_secondary)
clk_disable_unprepare(gr3d->clk_secondary);
- }
- tegra_powergate_power_off(TEGRA_POWERGATE_3D);
clk_disable_unprepare(gr3d->clk);
return 0;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists