From patchwork Fri Jun 21 07:10:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2760541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A2EE39F756 for ; Fri, 21 Jun 2013 07:12:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C10722015B for ; Fri, 21 Jun 2013 07:12:18 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A83202013F for ; Fri, 21 Jun 2013 07:12:17 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UpvVQ-0008JY-VH; Fri, 21 Jun 2013 07:11:37 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UpvVH-0001yJ-RQ; Fri, 21 Jun 2013 07:11:27 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UpvV1-0001vk-Be for linux-arm-kernel@lists.infradead.org; Fri, 21 Jun 2013 07:11:12 +0000 Received: from axis700.grange (dslb-084-061-108-118.pools.arcor-ip.net [84.61.108.118]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0Ls7Op-1UA9aq17Fv-013MWk; Fri, 21 Jun 2013 09:10:39 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id CB41440BB3; Fri, 21 Jun 2013 09:10:38 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1UpvUU-0002kQ-HZ; Fri, 21 Jun 2013 09:10:38 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Subject: [PATCH 4/4] ARM: shmobile: r8a73a4: add Z2 clock support Date: Fri, 21 Jun 2013 09:10:38 +0200 Message-Id: <1371798638-10530-5-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1371798638-10530-1-git-send-email-g.liakhovetski@gmx.de> References: <1371798638-10530-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:0jnPWL2o++sw+jn6jjVcAQOeUtB5sffLL49/f0JH+FY yYrf1fKxTohpVFCnySZrFIWoWZZlnUjHZOxhlEOhbv+QUk4MAy dkhtj0fCC1Q2qm12F7b1ywPTqowjcZpCSqe0mNH+nZeVLSIXzP 0HP/b1j/5timUH7kAbfVD4idoXuvP0nBY3Tq5RXp3y5PSFID0N RQ3SS1Od2zUYL8uDVIorbZPGo/iQhnJddz1x6b/6J440Gatzhv hKQscc6v9Nj+9Iq4bP7p3iHs8x22XdAk13uCg/szBB4BSqsve0 pMpYEYljsdPgYsjqsEYDWDqWlyi/waWOWb6PSplaVT5m8+HX0y 5JXUKmbZwwO3vuPSX9XNsz0CQqee34A72BoZfA14Z3iUeZPo0J CKrwWDvWDpxag== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130621_031111_670218_7CDC5F0A X-CRM114-Status: GOOD ( 12.42 ) X-Spam-Score: -3.2 (---) Cc: Guennadi Liakhovetski , Simon Horman , Magnus Damm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Z2 clock on r8a73a4 is used to clock the 4 Cortex A7 cores on the SoC. Add a definition for this clock to later use it from the arm_big_little CPUFreq driver. Signed-off-by: Guennadi Liakhovetski --- arch/arm/mach-shmobile/clock-r8a73a4.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c index 508cb1e..b717e98 100644 --- a/arch/arm/mach-shmobile/clock-r8a73a4.c +++ b/arch/arm/mach-shmobile/clock-r8a73a4.c @@ -324,6 +324,21 @@ static struct clk z_clk = { .ops = &zclk_ops, }; +/* + * It seems only 1/2 divider is usable in manual mode. 1/2 / 2/3 + * switching is only available in auto-DVFS mode + */ +SH_FIXED_RATIO_CLK(pll0_div2_clk, pll0_clk, div2); + +static struct clk z2_clk = { + .parent = &pll0_div2_clk, + .div_mask = 0x1f, + .enable_bit = 0, + /* We'll need to access FRQCRB and FRQCRC */ + .enable_reg = (void __iomem *)FRQCRB, + .ops = &zclk_ops, +}; + static struct clk *main_clks[] = { &extalr_clk, &extal1_clk, @@ -342,6 +357,8 @@ static struct clk *main_clks[] = { &pll2s_clk, &pll2h_clk, &z_clk, + &pll0_div2_clk, + &z2_clk, }; /* DIV4 */