From patchwork Fri Sep 5 05:49:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jianqun X-Patchwork-Id: 4849811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 308DEC0338 for ; Fri, 5 Sep 2014 05:58:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3916720268 for ; Fri, 5 Sep 2014 05:58:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 429CF2020E for ; Fri, 5 Sep 2014 05:58:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPmRw-0008Rl-AB; Fri, 05 Sep 2014 05:52:44 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPmRu-0008RX-M9 for linux-arm-kernel@bombadil.infradead.org; Fri, 05 Sep 2014 05:52:42 +0000 Received: from regular1.263xmail.com ([211.150.99.131]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPmRq-0004zq-6w for linux-arm-kernel@lists.infradead.org; Fri, 05 Sep 2014 05:52:41 +0000 Received: from xjq?rock-chips.com (unknown [192.168.167.87]) by regular1.263xmail.com (Postfix) with SMTP id 12F9F1F70; Fri, 5 Sep 2014 13:51:32 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ABS-CHECKED: 4 X-KSVirus-check: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 3AD0A43B3; Fri, 5 Sep 2014 13:51:30 +0800 (CST) X-RL-SENDER: xjq@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 127.0.0.1 X-LOGIN-NAME: xjq@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: xjq@rock-chips.com X-DNS-TYPE: 1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) whith ESMTP id 3419KHNE50; Fri, 05 Sep 2014 13:51:30 +0800 (CST) From: jianqun To: heiko@sntech.de, mturquette@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] Rockchip: RK3288: CRU: swap value of bit for CORE clock pll source selection Date: Fri, 5 Sep 2014 13:49:26 +0800 Message-Id: <1409896166-32732-1-git-send-email-xjq@rock-chips.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140905_065238_854293_FD4470E2 X-CRM114-Status: UNSURE ( 8.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.4 (/) Cc: huangtao@rock-chips.com, yzq@rock-chips.com, kever.yang@rock-chips.com, cf@rock-chips.com, xjq@rock-chips.com, kfx@rock-chips.com, zyw@rock-chips.com, zhenfu.fang@rock-chips.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD,UNPARSEABLE_RELAY,URIBL_BLACK 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 From: xujianqun For RK3288, core clock pll source select APLL when bit value is 1, select GPLL when bit value is 0; CRU_CLKSEL0_CON [15] - core_clk_pll_sel - CORE clock pll source selection -- 1'b1: select ARM PLL -- 1'b0: select GENERAL PLL BUG=none TEST= "cat /sys/kernel/debug/clk/clk_summary |grep apll" check parent of core clock Change-Id: I44a528af256da1fad573b4ccf9d0a20ad4cf6d68 Signed-off-by: xujianqun --- drivers/clk/rockchip/clk-cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/rockchip/clk-cpu.c b/drivers/clk/rockchip/clk-cpu.c index c5b14e9..1725ac7 100644 --- a/drivers/clk/rockchip/clk-cpu.c +++ b/drivers/clk/rockchip/clk-cpu.c @@ -136,7 +136,7 @@ static int rockchip_cpuclk_pre_rate_change(struct rockchip_cpuclk *cpuclk, } /* select alternate parent */ - writel(HIWORD_UPDATE(1, 1, reg_data->mux_core_shift), + writel(HIWORD_UPDATE(0, 1, reg_data->mux_core_shift), cpuclk->reg_base + reg_data->core_reg); /* alternate parent is active now. set the dividers */ @@ -163,7 +163,7 @@ static int rockchip_cpuclk_post_rate_change(struct rockchip_cpuclk *cpuclk, spin_lock(cpuclk->lock); /* post-rate change event, re-mux back to primary parent */ - writel(HIWORD_UPDATE(0, 1, reg_data->mux_core_shift), + writel(HIWORD_UPDATE(1, 1, reg_data->mux_core_shift), cpuclk->reg_base + RK2928_CLKSEL_CON(0)); /* remove any core dividers */