aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-ti-pipe3.c
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2014-03-06 09:38:42 -0500
committerKishon Vijay Abraham I <kishon@ti.com>2014-03-09 03:15:10 -0400
commit9c7f04436088b00727fa389e2b97b182d8488123 (patch)
tree9457fe9fb026f10b6d311258c8d063d3b26f84cb /drivers/phy/phy-ti-pipe3.c
parent61f546747715683c334ef231fd648522312dc5ff (diff)
phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY
SATA PHY doesn't need 'wkupclk; and 'refclk' so don't try to get them for SATA PHY. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/phy-ti-pipe3.c')
-rw-r--r--drivers/phy/phy-ti-pipe3.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c
index f141237131c3..baa3f78d62bc 100644
--- a/drivers/phy/phy-ti-pipe3.c
+++ b/drivers/phy/phy-ti-pipe3.c
@@ -294,16 +294,22 @@ static int ti_pipe3_probe(struct platform_device *pdev)
294 294
295 phy->dev = &pdev->dev; 295 phy->dev = &pdev->dev;
296 296
297 phy->wkupclk = devm_clk_get(phy->dev, "wkupclk"); 297 if (!of_device_is_compatible(node, "ti,phy-pipe3-sata")) {
298 if (IS_ERR(phy->wkupclk)) { 298
299 dev_err(&pdev->dev, "unable to get wkupclk\n"); 299 phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
300 return PTR_ERR(phy->wkupclk); 300 if (IS_ERR(phy->wkupclk)) {
301 } 301 dev_err(&pdev->dev, "unable to get wkupclk\n");
302 return PTR_ERR(phy->wkupclk);
303 }
302 304
303 phy->refclk = devm_clk_get(phy->dev, "refclk"); 305 phy->refclk = devm_clk_get(phy->dev, "refclk");
304 if (IS_ERR(phy->refclk)) { 306 if (IS_ERR(phy->refclk)) {
305 dev_err(&pdev->dev, "unable to get refclk\n"); 307 dev_err(&pdev->dev, "unable to get refclk\n");
306 return PTR_ERR(phy->refclk); 308 return PTR_ERR(phy->refclk);
309 }
310 } else {
311 phy->wkupclk = ERR_PTR(-ENODEV);
312 phy->refclk = ERR_PTR(-ENODEV);
307 } 313 }
308 314
309 phy->sys_clk = devm_clk_get(phy->dev, "sysclk"); 315 phy->sys_clk = devm_clk_get(phy->dev, "sysclk");