Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3398763imm; Thu, 17 May 2018 08:10:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq5nC+JtYSUaWIcjZizJ82SS2kKjv4hETDdAKvFbUQcQg2qbzxKOQiTzh8EgEA7EvcfCjNT X-Received: by 2002:a63:6887:: with SMTP id d129-v6mr4480111pgc.128.1526569808977; Thu, 17 May 2018 08:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526569808; cv=none; d=google.com; s=arc-20160816; b=yQWEhqWltKIUNVI2q9ZKyDctYXmTwV8aNX42tDv2KwgFl3thfs7pe731nXQSalNYVf jAIBAs53YucDUdYsIvHZTCRIujS4akfR9BO8nj1yfZLgMUEtb0pRxe2QA6OzjX8AmxY0 9MyU/7wM5HxRbKx20chsd/RYkV3JRLbG8dLVnyKhb+Umng3wvGH9PwMHKDR0aCJs1XdY +lHOp+px9AcO8LDUNxTJBZoCAnBOAuXhzqJvX5MOTBDYr6DUH40McuGgb4Mv3gj1kyNN DYLgaEx08rGUfiMR//6l3Gpak10YjLpV2xWGiYe8bYRBdxHA/ok4ttn+0I0KA1nr77hm qhZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=50luxYi4ZQukB6+s9n5k4ZUQ4fNoltlq/VMcKVMTnUI=; b=oIN1ulLXnLh08ovZVl04ofVHOR8GqYhlXNo48TlpDhjtf4DiKqdmgL/Z4IRI8IUmup W2jVjczxIO8xJfesxrikQ7jfcY5fI5BXjE1RgH9x4iwxlNNTbOCzoBCBwnDz1VB0F0CU 7OFgHZ/4KXh+BbL7OdRRSu+fkErwitR/COyNuve3C7hACOJras8PTF0D0luJHSHV/qD/ Nd5XoUOSVSRQnMUlNl/vjzxsAvny6X3IaeLq9opbaxYoFiKZhWOxRkPneGpxqe/cb4a1 bOqK3jQpHaoQHNuNgu6zHZB9I3A7ExrITDVsZLMfh3k0K1iRcA/p9GHgwfqxdoWPBAVx jRhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=0IVIYLHS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v201-v6si4160039pgb.295.2018.05.17.08.09.54; Thu, 17 May 2018 08:10:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=0IVIYLHS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752506AbeEQPJk (ORCPT + 99 others); Thu, 17 May 2018 11:09:40 -0400 Received: from vern.gendns.com ([206.190.152.46]:58650 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751798AbeEQPJi (ORCPT ); Thu, 17 May 2018 11:09:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=50luxYi4ZQukB6+s9n5k4ZUQ4fNoltlq/VMcKVMTnUI=; b=0IVIYLHSLgqbQjQ3Q4J0BAty6n 7BJkCIfWYIAgYH43kJ1vzifcDZmLNs8/PpRXQ+qZC+3JcmE/PEu+L7oim88GdhQ4+KWm8Wy3eSX89 pk7ugBx+2u5OpeDYV7GeQPGpmHWpAWjahQbe2q1a3tB79894DJqQFCeEAwtMZhXvhN4lhHdwF9nhR z+l0hihnEJxe5iRTmVB7OUTra7ekGwTS96MbZPlpWdQinizRe7jgHws2rrZ8PnqGuPz8qKLU1roAx BEeICDbYV7fjZ/YO+LGHBdma1upQmvurOu8uK46nHeXX6rt/xKO6MUapZ7j8pPMbODk4833rdSM37 vlGxhwlA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:47180 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1fJKXA-00BUiq-6u; Thu, 17 May 2018 11:09:36 -0400 Subject: Re: [PATCH v10 25/27] ARM: davinci: add device tree support to timer To: Sekhar Nori , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , linux-kernel@vger.kernel.org References: <20180509172606.29387-1-david@lechnology.com> <20180509172606.29387-26-david@lechnology.com> <8fa98514-7651-58cb-595e-6c7f713540b8@ti.com> From: David Lechner Message-ID: <1162de58-00bc-fdfa-eef1-48a094834ac3@lechnology.com> Date: Thu, 17 May 2018 10:09:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <8fa98514-7651-58cb-595e-6c7f713540b8@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/17/2018 09:35 AM, Sekhar Nori wrote: > Hi David, > > On Wednesday 09 May 2018 10:56 PM, David Lechner wrote: >> This adds device tree support to the davinci timer so that when clocks >> are moved to device tree, the timer will still work. >> >> Signed-off-by: David Lechner >> --- > >> +static int __init of_davinci_timer_init(struct device_node *np) >> +{ >> + struct clk *clk; >> + >> + clk = of_clk_get(np, 0); >> + if (IS_ERR(clk)) { >> + struct of_phandle_args clkspec; >> + >> + /* >> + * Fall back to using ref_clk if the actual clock is not >> + * available. There will be problems later if the real clock >> + * source is disabled. >> + */ >> + >> + pr_warn("%s: falling back to ref_clk\n", __func__); >> + >> + clkspec.np = of_find_node_by_name(NULL, "ref_clk"); >> + if (IS_ERR(clkspec.np)) { >> + pr_err("%s: No clock available for timer!\n", __func__); >> + return PTR_ERR(clkspec.np); >> + } >> + clk = of_clk_get_from_provider(&clkspec); >> + of_node_put(clkspec.np); >> + } > > Do we need this error path now? > > Thanks, > Sekhar > No, not really.