From patchwork Wed Sep 18 12:14:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 20426 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E2001246E9 for ; Wed, 18 Sep 2013 12:15:29 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id r5sf7105570qcx.8 for ; Wed, 18 Sep 2013 05:15:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=kYCYaGRbqBJHbgqf7+FotEpmewiE4RvbhtrwNIv2pu4=; b=fK9Nfq1p1Ykolog1Sd1d33wlYocJDTMf9yn/O4BVn8727oie3YyoAgehXIBrNTq31a AGqd56kVdb4pCVUoVORY5iri1YdWvJ4x5VsBMDzA7SwInQBGGDHldoSd1E40U03uTCwP mZFHDbIIPtu80k0zoa3Q9yD1gjFugZltgEL3Yes+S0buwIZ4BRjRy/zi0Ok6HfqVjFyC Y1x/Wx5L89NMgL7kGk4e5Ta0/8RbQcdYuaRJTnaoi6IKqHL108zPz47Gl4LmQtX4GrCG PexPWImn3E4XfZfbJTlIdPI2D7hdgueegdmgzJ/zsobZ8ABwTYOu8lklIsDImv6UO9y2 yHRQ== X-Gm-Message-State: ALoCoQmDR3OHVRmb5+XHnn71oebVmhKTBXiUu99HfSJLUxC+rMs73QTi3/Ndh6WQf+1TBTmsoxUI X-Received: by 10.236.24.195 with SMTP id x43mr14445006yhx.3.1379506529794; Wed, 18 Sep 2013 05:15:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.209 with SMTP id x17ls3469956qeu.83.gmail; Wed, 18 Sep 2013 05:15:29 -0700 (PDT) X-Received: by 10.220.105.199 with SMTP id u7mr36751336vco.1.1379506529705; Wed, 18 Sep 2013 05:15:29 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id ch11si443677ved.25.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 05:15:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 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.178; Received: by mail-vc0-f178.google.com with SMTP id ha12so5354502vcb.9 for ; Wed, 18 Sep 2013 05:15:29 -0700 (PDT) X-Received: by 10.52.165.131 with SMTP id yy3mr5781028vdb.25.1379506529633; Wed, 18 Sep 2013 05:15:29 -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.220.174.196 with SMTP id u4csp214531vcz; Wed, 18 Sep 2013 05:15:29 -0700 (PDT) X-Received: by 10.15.94.201 with SMTP id bb49mr59829769eeb.23.1379506528726; Wed, 18 Sep 2013 05:15:28 -0700 (PDT) Received: from mail-ea0-f179.google.com (mail-ea0-f179.google.com [209.85.215.179]) by mx.google.com with ESMTPS id o7si1497087eep.198.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 05:15:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.179 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.215.179; Received: by mail-ea0-f179.google.com with SMTP id b10so3357324eae.24 for ; Wed, 18 Sep 2013 05:15:16 -0700 (PDT) X-Received: by 10.15.95.9 with SMTP id bc9mr387968eeb.97.1379506516157; Wed, 18 Sep 2013 05:15:16 -0700 (PDT) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginmedia.com. [92.233.57.238]) by mx.google.com with ESMTPSA id b45sm2382210eef.4.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 05:15:15 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@linaro.org, Lee Jones Subject: [PATCH 29/41] clk: ux500: Add Device Tree support for the TWD clock Date: Wed, 18 Sep 2013 13:14:26 +0100 Message-Id: <1379506478-16625-30-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1379506478-16625-1-git-send-email-lee.jones@linaro.org> References: <1379506478-16625-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 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. Acked-by: Mike Turquette Signed-off-by: Lee Jones --- drivers/clk/ux500/u8500_of_clk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c index fc647cf..0769db8 100644 --- a/drivers/clk/ux500/u8500_of_clk.c +++ b/drivers/clk/ux500/u8500_of_clk.c @@ -60,7 +60,7 @@ void u8500_of_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; if (of_have_populated_dt()) np = of_find_matching_node(NULL, u8500_clk_of_match); @@ -234,7 +234,7 @@ void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, clk = clk_reg_prcmu_scalable_rate("armss", NULL, PRCMU_ARMSS, 0, CLK_IS_ROOT|CLK_IGNORE_UNUSED); - clk = clk_register_fixed_factor(NULL, "smp_twd", "armss", + twd_clk = clk_register_fixed_factor(NULL, "smp_twd", "armss", CLK_IGNORE_UNUSED, 1, 2); /* @@ -551,5 +551,8 @@ void u8500_of_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); } }