From patchwork Fri May 16 13:02:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 30327 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AA1BD202E4 for ; Fri, 16 May 2014 13:06:21 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f73sf18530426yha.3 for ; Fri, 16 May 2014 06:06:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=vW+cX7n7jgjjmFpK8ZMMnY0Fd6L9/2ONVRIEQQZoG5U=; b=Pnl10oe4Dm5RvxDcW0ypBkR0Iz+h1j/79QOJFnIJAZRaUMLiNs7+I4Um4gp/NmDjtl kvmk44/g8xvwcFJZiKKVGcQD1SvKf42N3mKAxeC8HgJnECeKeQ6Uv/wSL1fd0LbsTb4y 158LLHLRMOjxpwa4BmUbhwiiLMpy0CRyBAST8HCWOkQpGeQJIQIKXd+0xt1LeZ6iWET9 qpNjTXc9Cr/LGHwyFzJ8kMJTudvhk4/FGpQjCqLQhsl3cqcWL/LZljHnZwfVctwpr3BU cmf9EHj3hXTYOE+AAq0WNCrc666oBNymrD06FeFaWfZe2dhvWJxUSy2gqKfCRo9GbLOC EOFQ== X-Gm-Message-State: ALoCoQnO7FJi75fOD8b+1AD3ifIXtn3zBSptBbu6SAECTHsOHW2Yu0XPFSeGZ84tS8e4Xavlf90+ X-Received: by 10.236.39.20 with SMTP id c20mr57481yhb.24.1400245581296; Fri, 16 May 2014 06:06:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.131 with SMTP id d3ls706887qge.52.gmail; Fri, 16 May 2014 06:06:21 -0700 (PDT) X-Received: by 10.58.243.39 with SMTP id wv7mr555083vec.51.1400245581014; Fri, 16 May 2014 06:06:21 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id kr17si1568617vcb.133.2014.05.16.06.06.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 May 2014 06:06:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jz11so3007285veb.35 for ; Fri, 16 May 2014 06:06:20 -0700 (PDT) X-Received: by 10.58.186.207 with SMTP id fm15mr13872838vec.4.1400245580945; Fri, 16 May 2014 06:06:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp51239vcb; Fri, 16 May 2014 06:06:20 -0700 (PDT) X-Received: by 10.69.25.69 with SMTP id io5mr21146148pbd.22.1400245579851; Fri, 16 May 2014 06:06:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tr6si9050858pab.17.2014.05.16.06.06.19; Fri, 16 May 2014 06:06:19 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757298AbaEPNGK (ORCPT + 27 others); Fri, 16 May 2014 09:06:10 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:51848 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754323AbaEPNDT (ORCPT ); Fri, 16 May 2014 09:03:19 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s4GD3ISA029191; Fri, 16 May 2014 08:03:18 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4GD3IfB000820; Fri, 16 May 2014 08:03:18 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Fri, 16 May 2014 08:03:18 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4GD3FkH022880; Fri, 16 May 2014 08:03:17 -0500 From: Kishon Vijay Abraham I To: CC: , Subject: [PATCH 01/11] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk" Date: Fri, 16 May 2014 18:32:56 +0530 Message-ID: <1400245387-14445-2-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400245387-14445-1-git-send-email-kishon@ti.com> References: <1400245387-14445-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kishon@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Roger Quadros 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 Signed-off-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/phy-omap-usb2.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index a2205a8..7007c11 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) if (IS_ERR(phy_provider)) return PTR_ERR(phy_provider); - phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k"); + phy->wkupclk = devm_clk_get(phy->dev, "wkupclk"); if (IS_ERR(phy->wkupclk)) { - dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n"); - return PTR_ERR(phy->wkupclk); + dev_warn(&pdev->dev, "unable to get wkupclk, trying old name\n"); + phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k"); + if (IS_ERR(phy->wkupclk)) { + dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n"); + return PTR_ERR(phy->wkupclk); + } else { + dev_warn(&pdev->dev, + "found usb_phy_cm_clk32k, please fix DTS\n"); + } } clk_prepare(phy->wkupclk); - phy->optclk = devm_clk_get(phy->dev, "usb_otg_ss_refclk960m"); - if (IS_ERR(phy->optclk)) - dev_vdbg(&pdev->dev, "unable to get refclk960m\n"); - else + phy->optclk = devm_clk_get(phy->dev, "refclk"); + if (IS_ERR(phy->optclk)) { + dev_dbg(&pdev->dev, "unable to get refclk, trying old name\n"); + phy->optclk = devm_clk_get(phy->dev, "usb_otg_ss_refclk960m"); + if (IS_ERR(phy->optclk)) { + dev_dbg(&pdev->dev, + "unable to get usb_otg_ss_refclk960m\n"); + } else { + dev_warn(&pdev->dev, + "found usb_otg_ss_refclk960m, please fix DTS\n"); + } + } else { clk_prepare(phy->optclk); + } usb_add_phy_dev(&phy->phy);