summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tegra
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2015-04-27 16:04:26 +0300
committerThierry Reding <treding@nvidia.com>2015-08-13 14:47:51 +0300
commit4dbdc740c4beec653920e81470a6e6d69c6ab064 (patch)
treee4660f9f714358ab54ffad4f66a1f5c2c4caa28f /drivers/gpu/drm/tegra
parenta9a9e4fd7c923707a11b1b386cc31156d474039c (diff)
downloadlinux-4dbdc740c4beec653920e81470a6e6d69c6ab064.tar.xz
drm/tegra: sor: Provide error messages in probe
When probing the SOR device fails, output proper error messages to help diagnose the cause of the failure. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r--drivers/gpu/drm/tegra/sor.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 65088ddeeae9..7df7328f9fed 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1599,8 +1599,10 @@ static int tegra_sor_probe(struct platform_device *pdev)
}
err = tegra_output_probe(&sor->output);
- if (err < 0)
+ if (err < 0) {
+ dev_err(&pdev->dev, "failed to probe output: %d\n", err);
return err;
+ }
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
sor->regs = devm_ioremap_resource(&pdev->dev, regs);
@@ -1608,24 +1610,39 @@ static int tegra_sor_probe(struct platform_device *pdev)
return PTR_ERR(sor->regs);
sor->rst = devm_reset_control_get(&pdev->dev, "sor");
- if (IS_ERR(sor->rst))
+ if (IS_ERR(sor->rst)) {
+ dev_err(&pdev->dev, "failed to get reset control: %ld\n",
+ PTR_ERR(sor->rst));
return PTR_ERR(sor->rst);
+ }
sor->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(sor->clk))
+ if (IS_ERR(sor->clk)) {
+ dev_err(&pdev->dev, "failed to get module clock: %ld\n",
+ PTR_ERR(sor->clk));
return PTR_ERR(sor->clk);
+ }
sor->clk_parent = devm_clk_get(&pdev->dev, "parent");
- if (IS_ERR(sor->clk_parent))
+ if (IS_ERR(sor->clk_parent)) {
+ dev_err(&pdev->dev, "failed to get parent clock: %ld\n",
+ PTR_ERR(sor->clk_parent));
return PTR_ERR(sor->clk_parent);
+ }
sor->clk_safe = devm_clk_get(&pdev->dev, "safe");
- if (IS_ERR(sor->clk_safe))
+ if (IS_ERR(sor->clk_safe)) {
+ dev_err(&pdev->dev, "failed to get safe clock: %ld\n",
+ PTR_ERR(sor->clk_safe));
return PTR_ERR(sor->clk_safe);
+ }
sor->clk_dp = devm_clk_get(&pdev->dev, "dp");
- if (IS_ERR(sor->clk_dp))
+ if (IS_ERR(sor->clk_dp)) {
+ dev_err(&pdev->dev, "failed to get DP clock: %ld\n",
+ PTR_ERR(sor->clk_dp));
return PTR_ERR(sor->clk_dp);
+ }
INIT_LIST_HEAD(&sor->client.list);
sor->client.ops = &sor_client_ops;