aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-omap-usb2.c
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2014-05-05 05:54:40 -0400
committerKishon Vijay Abraham I <kishon@ti.com>2014-05-08 09:52:16 -0400
commit9f1d8ed227670c592dac606bc5f3bf8dfcfade16 (patch)
treec21496e3e54e38b253e7bae5c7ada6cd10370e14 /drivers/phy/phy-omap-usb2.c
parent38583f095c5a8138ae2a1c9173d0fd8a9f10e8aa (diff)
phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
As clocks might be named differently on multiple platforms, use a generic name in the driver and allow device tree node to specify the platform specific clock name. Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/phy-omap-usb2.c')
-rw-r--r--drivers/phy/phy-omap-usb2.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
index a2205a841e5e..7007c11fe07d 100644
--- a/drivers/phy/phy-omap-usb2.c
+++ b/drivers/phy/phy-omap-usb2.c
@@ -275,18 +275,34 @@ static int omap_usb2_probe(struct platform_device *pdev)
275 if (IS_ERR(phy_provider)) 275 if (IS_ERR(phy_provider))
276 return PTR_ERR(phy_provider); 276 return PTR_ERR(phy_provider);
277 277
278 phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k"); 278 phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
279 if (IS_ERR(phy->wkupclk)) { 279 if (IS_ERR(phy->wkupclk)) {
280 dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n"); 280 dev_warn(&pdev->dev, "unable to get wkupclk, trying old name\n");
281 return PTR_ERR(phy->wkupclk); 281 phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
282 if (IS_ERR(phy->wkupclk)) {
283 dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
284 return PTR_ERR(phy->wkupclk);
285 } else {
286 dev_warn(&pdev->dev,
287 "found usb_phy_cm_clk32k, please fix DTS\n");
288 }
282 } 289 }
283 clk_prepare(phy->wkupclk); 290 clk_prepare(phy->wkupclk);
284 291
285 phy->optclk = devm_clk_get(phy->dev, "usb_otg_ss_refclk960m"); 292 phy->optclk = devm_clk_get(phy->dev, "refclk");
286 if (IS_ERR(phy->optclk)) 293 if (IS_ERR(phy->optclk)) {
287 dev_vdbg(&pdev->dev, "unable to get refclk960m\n"); 294 dev_dbg(&pdev->dev, "unable to get refclk, trying old name\n");
288 else 295 phy->optclk = devm_clk_get(phy->dev, "usb_otg_ss_refclk960m");
296 if (IS_ERR(phy->optclk)) {
297 dev_dbg(&pdev->dev,
298 "unable to get usb_otg_ss_refclk960m\n");
299 } else {
300 dev_warn(&pdev->dev,
301 "found usb_otg_ss_refclk960m, please fix DTS\n");
302 }
303 } else {
289 clk_prepare(phy->optclk); 304 clk_prepare(phy->optclk);
305 }
290 306
291 usb_add_phy_dev(&phy->phy); 307 usb_add_phy_dev(&phy->phy);
292 308