From patchwork Fri Feb 1 06:46:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Zhang X-Patchwork-Id: 217353 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 69E9D2C007E for ; Fri, 1 Feb 2013 18:48:44 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U1BJh-0001iQ-2b; Fri, 01 Feb 2013 07:45:45 +0000 Received: from co1ehsobe001.messaging.microsoft.com ([216.32.180.184] helo=co1outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U1BJe-0001i1-BN for linux-arm-kernel@lists.infradead.org; Fri, 01 Feb 2013 07:45:42 +0000 Received: from mail170-co1-R.bigfish.com (10.243.78.219) by CO1EHSOBE020.bigfish.com (10.243.66.83) with Microsoft SMTP Server id 14.1.225.23; Fri, 1 Feb 2013 07:45:40 +0000 Received: from mail170-co1 (localhost [127.0.0.1]) by mail170-co1-R.bigfish.com (Postfix) with ESMTP id B3DB76C0100; Fri, 1 Feb 2013 07:45:40 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 6 X-BigFish: VS6(zcb8kzzz1ee6h1de0h1202h1e76h1d1ah1d2ah1082kzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h1155h) Received: from mail170-co1 (localhost.localdomain [127.0.0.1]) by mail170-co1 (MessageSwitch) id 1359704738928317_3419; Fri, 1 Feb 2013 07:45:38 +0000 (UTC) Received: from CO1EHSMHS028.bigfish.com (unknown [10.243.78.217]) by mail170-co1.bigfish.com (Postfix) with ESMTP id E0778860048; Fri, 1 Feb 2013 07:45:38 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS028.bigfish.com (10.243.66.38) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 1 Feb 2013 07:45:37 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.2.318.3; Fri, 1 Feb 2013 07:45:36 +0000 Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r117jVuM013604; Fri, 1 Feb 2013 00:45:33 -0700 From: Gary Zhang To: , , Subject: [PATCH 2/2] ARM: imx: set CKO1 parent clock source in imx6q sabresd Date: Fri, 1 Feb 2013 14:46:57 +0800 Message-ID: <1359701217-23931-1-git-send-email-b13634@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130201_024542_581004_2B52E165 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.180.184 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org in imx6q sabresd board, set ahb as CKO1 parent clock sourrce Signed-off-by: Gary Zhang --- arch/arm/mach-imx/mach-imx6q.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 4eb1b3a..860e272 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -119,7 +119,7 @@ static int ksz9021rn_phy_fixup(struct phy_device *phydev) return 0; } -static void __init imx6q_sabrelite_cko1_setup(void) +static void __init cko1_setup(unsigned long freq) { struct clk *cko1_sel, *ahb, *cko1; unsigned long rate; @@ -132,8 +132,10 @@ static void __init imx6q_sabrelite_cko1_setup(void) goto put_clk; } clk_set_parent(cko1_sel, ahb); - rate = clk_round_rate(cko1, 16000000); + rate = clk_round_rate(cko1, freq); clk_set_rate(cko1, rate); + + return; put_clk: if (!IS_ERR(cko1_sel)) clk_put(cko1_sel); @@ -148,7 +150,12 @@ static void __init imx6q_sabrelite_init(void) if (IS_BUILTIN(CONFIG_PHYLIB)) phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, ksz9021rn_phy_fixup); - imx6q_sabrelite_cko1_setup(); + cko1_setup(16000000); +} + +static void __init imx6q_sabresd_init(void) +{ + cko1_setup(24000000); } static void __init imx6q_1588_init(void) @@ -193,6 +200,8 @@ static void __init imx6q_init_machine(void) { if (of_machine_is_compatible("fsl,imx6q-sabrelite")) imx6q_sabrelite_init(); + else if (of_machine_is_compatible("fsl,imx6q-sabresd")) + imx6q_sabresd_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);