From patchwork Tue Mar 20 02:06:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huang lin X-Patchwork-Id: 10295915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E5003602BD for ; Tue, 20 Mar 2018 02:06:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4ECD287A6 for ; Tue, 20 Mar 2018 02:06:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C94D429590; Tue, 20 Mar 2018 02:06:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 60512287A6 for ; Tue, 20 Mar 2018 02:06:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=PZ0wTX0AINlmYA0J5dM1io/Pg1YmNjGlmUizHHkfD3Q=; b=Z1h cavEtmYlScGdCeNFwn7fhMggMNgAq8CPl29tMHp6w3S+ajgjzfmFd0DBvcmM+1IXVnILv5XRtmnCc CCOyF8kiJWmmYUp9hgMtQzig71/bgJPeD8DPU+AoV3yWNOXTUBg5YNktWG4XjJAu2xedcnxb65MdI ZgTpJ9aMZbvAcwtX5QzSQILf+hQClBZ63ZprFRBZ5yjUaNCKce8NSoPwFF1WTuh5p9vcy6t6A4eGR ohMvvgdjxUNGpqnwQNl8dCm/GJ0FzWfefNmZ7+eimNCvQQTJi44JInUhtwz1050mLEgGl0roBDEq1 gF4Kt3BJusDClb9UG6XSSUWmCAUQf2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ey6fr-0001iv-PZ; Tue, 20 Mar 2018 02:06:51 +0000 Received: from mail-pf0-f196.google.com ([209.85.192.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ey6fo-0001h1-TR for linux-rockchip@lists.infradead.org; Tue, 20 Mar 2018 02:06:50 +0000 Received: by mail-pf0-f196.google.com with SMTP id j2so38920pff.10 for ; Mon, 19 Mar 2018 19:06:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BPL3gqanZ60D47wzlz9A21sBVRnSPwrsrW96xF/wpbs=; b=Ve5jB8eRcxlN6JHq7upwiO1tpucX3F2ojwkidNgLkE5dtq/wEyIrz5eRqY5vuFiIkM ARup876ncdLnl9T/LsMk3E76F6wh4lnfKHdj6wuAQhY9ErFY/eB+PwW9idhOqCnGle1Z KBcmRamvaYjICTrIAtUpIod3TUVjOI8cu6vLEO5fE6NAuPYi2s9T2nT53Fj/qwSUH8Mp bt1/LrTkM10/aBcIlcBRMCNo722naVZNMvBZSs4DgKLgOxRtsN2+ZCyr05Arm5sm8M5Z aFwovKcATX7ypNPMdo/2D8PMi5rr0ded2mnRNrowHCwLbYV1OWBzYxTm77l2ie/PZ/hB ye9Q== X-Gm-Message-State: AElRT7H+UQxSHjdwACFpdKAyYwf4PSq2yEsw4BWm3iLHcXvvO3EJq4Je fuJm803hLyj+nQO+oSg7H9s= X-Google-Smtp-Source: AG47ELtBjVYUyOqnP6VFmUsIF+sRLpCm8pt0AsoNxTmOiM5lgndsaWBhCEq/70/yoDZhHq9G7JutuQ== X-Received: by 10.98.232.6 with SMTP id c6mr11955161pfi.242.1521511597710; Mon, 19 Mar 2018 19:06:37 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id s89sm648330pfk.54.2018.03.19.19.06.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Mar 2018 19:06:36 -0700 (PDT) From: Lin Huang To: heiko@sntech.de Subject: [PATCH v3 1/2] clk: rockchip: assign correct id for pclk_ddr and hclk_sd in rk3399 Date: Tue, 20 Mar 2018 10:06:28 +0800 Message-Id: <1521511589-17844-1-git-send-email-hl@rock-chips.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180319_190648_969755_009CC0F9 X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dbasehore@chromium.org, Lin Huang , shawn.lin@rock-chips.com, briannorris@chromium.org, dianders@chromium.org, linux-rockchip@lists.infradead.org, linux-clk@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since hclk_sd and pclk_ddr source clock from CPLL or GPLL, and these two PLL may change their frequency. If we do not assign right id to pclk_ddr and hclk_sd, they will alway use default cur register value, and may get the frequency exceed their signed off frequency. So assign correct Id for them, then we can assign frequency for them in dts. Change-Id: I6c4d15d37ddabe4ed34e2351cf26e660672ae9ee Signed-off-by: Lin Huang Reviewed-by: Douglas Anderson Reviewed-by: Shawn Lin --- Changes in v2: - add more detail in commit message Changes in v3: - None drivers/clk/rockchip/clk-rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c index 3e57c6e..bca10d6 100644 --- a/drivers/clk/rockchip/clk-rk3399.c +++ b/drivers/clk/rockchip/clk-rk3399.c @@ -671,7 +671,7 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = { RK3399_CLKGATE_CON(9), 7, GFLAGS, &rk3399_uart3_fracmux), - COMPOSITE(0, "pclk_ddr", mux_pll_src_cpll_gpll_p, CLK_IGNORE_UNUSED, + COMPOSITE(PCLK_DDR, "pclk_ddr", mux_pll_src_cpll_gpll_p, CLK_IGNORE_UNUSED, RK3399_CLKSEL_CON(6), 15, 1, MFLAGS, 8, 5, DFLAGS, RK3399_CLKGATE_CON(3), 4, GFLAGS), @@ -887,7 +887,7 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = { RK3399_CLKGATE_CON(31), 8, GFLAGS), /* sdio & sdmmc */ - COMPOSITE(0, "hclk_sd", mux_pll_src_cpll_gpll_p, 0, + COMPOSITE(HCLK_SD, "hclk_sd", mux_pll_src_cpll_gpll_p, 0, RK3399_CLKSEL_CON(13), 15, 1, MFLAGS, 8, 5, DFLAGS, RK3399_CLKGATE_CON(12), 13, GFLAGS), GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_sd", 0,