From patchwork Thu Jun 6 12:17:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 17637 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f197.google.com (mail-gg0-f197.google.com [209.85.161.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2DCD520F47 for ; Thu, 6 Jun 2013 12:18:11 +0000 (UTC) Received: by mail-gg0-f197.google.com with SMTP id x14sf2627745ggx.8 for ; Thu, 06 Jun 2013 05:18:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=oEcnlgVdYKtGyV7+KcXvozupPcGDR38jWHkeIEu/M6w=; b=g8wG0Mr7cbgxcI/RKm/i2vVn0QxAuff0dc78Hp/ZCLedB01UJOAUgafjJam1ksTPcM orvJtcDcrr6QMDMPG2+a2bG/dRsmXkxgL5ftHxnw6osOrzHTh5CjqZ7sA0QeclGrUd8M KvzVzwHo+eZ/ZvHWSCxZGqXZ+x4OH2Cyt3wfkD+yQQ7ZLLb/UD67xnis5CJO5DoMIvXR sjyV2/gWy4ojmL9wjqvI/EUaLzdTCDIj++KQHbgjvK/FZeWHZh20oNKeUt80Ds3DOVff iOUrbArwtBw6M08QQUtx1p4FuWazRLJnNfFSfPZfZAnTU2V+od11NwFRMky563aCXZt7 e4ag== X-Received: by 10.236.170.74 with SMTP id o50mr590000yhl.8.1370521090980; Thu, 06 Jun 2013 05:18:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.117.104 with SMTP id kd8ls1328074qeb.93.gmail; Thu, 06 Jun 2013 05:18:10 -0700 (PDT) X-Received: by 10.58.234.161 with SMTP id uf1mr4939341vec.57.1370521090792; Thu, 06 Jun 2013 05:18:10 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id p19si29439629vco.1.2013.06.06.05.18.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Jun 2013 05:18:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hr11so1929059vcb.34 for ; Thu, 06 Jun 2013 05:18:10 -0700 (PDT) X-Received: by 10.52.36.115 with SMTP id p19mr18642336vdj.8.1370521090721; Thu, 06 Jun 2013 05:18:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp64403vcb; Thu, 6 Jun 2013 05:18:10 -0700 (PDT) X-Received: by 10.194.79.102 with SMTP id i6mr774194wjx.91.1370521089765; Thu, 06 Jun 2013 05:18:09 -0700 (PDT) Received: from mail-we0-x236.google.com (mail-we0-x236.google.com [2a00:1450:400c:c03::236]) by mx.google.com with ESMTPS id dj2si6972507wib.24.2013.06.06.05.18.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Jun 2013 05:18:09 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::236 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::236; Received: by mail-we0-f182.google.com with SMTP id p60so291090wes.13 for ; Thu, 06 Jun 2013 05:18:09 -0700 (PDT) X-Received: by 10.194.170.168 with SMTP id an8mr150027wjc.72.1370521089245; Thu, 06 Jun 2013 05:18:09 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPSA id d10sm15436140wik.0.2013.06.06.05.18.07 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Jun 2013 05:18:08 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, srinidhi.kasagar@stericsson.com, Lee Jones , Mike Turquette , Ulf Hansson Subject: [PATCH 23/33] clk: ux500: Add Device Tree support for the TWD clock Date: Thu, 6 Jun 2013 13:17:11 +0100 Message-Id: <1370521041-32318-24-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1370521041-32318-1-git-send-email-lee.jones@linaro.org> References: <1370521041-32318-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQklC6D9xIlLUUI3FwwT59P+GxnpyP4Y2pqaMWqUGsuRBEnpLneJNhDiuI368E/aipyze9lu X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch enables the TWD fixed factor clock to be specified from Device Tree via phandles to the "smp-twd-clock" node. Cc: Mike Turquette Cc: Ulf Hansson Signed-off-by: Lee Jones --- drivers/clk/ux500/u8500_clk.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c index ebd0381..b890067 100644 --- a/drivers/clk/ux500/u8500_clk.c +++ b/drivers/clk/ux500/u8500_clk.c @@ -60,7 +60,7 @@ void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, struct device_node *np = NULL; struct device_node *child = NULL; const char *sgaclk_parent = NULL; - struct clk *clk, *rtc_clk; + struct clk *clk, *rtc_clk, *twd_clk; /* Clock sources */ clk = clk_reg_prcmu_gate("soc0_pll", NULL, PRCMU_PLLSOC0, @@ -283,9 +283,9 @@ void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, PRCMU_ARMSS, 0, CLK_IS_ROOT|CLK_IGNORE_UNUSED); clk_register_clkdev(clk, "armss", NULL); - clk = clk_register_fixed_factor(NULL, "smp_twd", "armss", + twd_clk = clk_register_fixed_factor(NULL, "smp_twd", "armss", CLK_IGNORE_UNUSED, 1, 2); - clk_register_clkdev(clk, NULL, "smp_twd"); + clk_register_clkdev(twd_clk, NULL, "smp_twd"); /* * FIXME: Add special handled PRCMU clocks here: @@ -693,5 +693,8 @@ void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, if (!of_node_cmp(child->name, "rtc32k-clock")) of_clk_add_provider(child, of_clk_src_simple_get, rtc_clk); + + if (!of_node_cmp(child->name, "smp-twd-clock")) + of_clk_add_provider(child, of_clk_src_simple_get, twd_clk); } }