Received: by 10.223.185.116 with SMTP id b49csp6307070wrg; Thu, 8 Mar 2018 05:25:00 -0800 (PST) X-Google-Smtp-Source: AG47ELvMoV6GuO0XkId+0vp+n3pEMsSHIiaqBcXnrSPXcOHXL/XGZ6jgtnm+Yn8kbfJ0fp2SDrb7 X-Received: by 10.99.117.6 with SMTP id q6mr21012807pgc.146.1520515500082; Thu, 08 Mar 2018 05:25:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520515500; cv=none; d=google.com; s=arc-20160816; b=E04a9EAGdQMJLPEZwG26T0HdckRqCw2QKPCuzr8jN8WT/59fdteG87V9yBGJJfipGw BZLQSBbVlQNlw0m9HIr4PYVn8l+WTsBplAqq005EQl5zDsuo3Y+5D5a7SY0P3TJoQZDn KjONrMDWbcsjMhtV1Db2StNcWCV/Tp4zf2xTC+EJOkg6psx5ctpxMrpgwDSUBcDdyvVG XI8wl9vUDoHWy2MwxyWdfrPKqGUz4i53F8oVULDXVPSrqkpOd1GMoCNrfXFJjrZzlSvT kRkWEuwaYgVao0cxo+KVx3fjrZQyElxURjio4T+ndgF6czMjPBBj5TT2rUojXfoxjDj3 5g6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=4Si+KBkeKbCKtqd02NjIc0B8omRkbSjDBMXlDQWu3Jo=; b=g/Q5/OybWHcTTOwOYE7/kZnh0PeCxJ3EmdWyrblA9FyYCT2EgjciC9fOvRmx3bv0dw JJwwqAq/pyHLGZYYEY+EgzM32/9imSLvvM9OzYnK6YO9/Dj/NHoEfFOda8MxTeVQPhgc 5/duxIJq/zKsuDDgQBVlZhV1XHx/hOP1caMvVktnYCKJoa2amnqpKBQHoUzSQpmzX0Om Uk9dD7Tou0Ok4DP6tPxTulAhNTcz1fA515/KTCTZEoytTbKqoCIxlkel5UPYRpoiiyZt TOm/OQjHEGLKjHI5hBWtz2OtWWcZ3QBY7qbBrdLaVy6nAkTvMdszwAc8wyf77/oGsMDO oyzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8-v6si3583862pli.528.2018.03.08.05.24.45; Thu, 08 Mar 2018 05:25:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935780AbeCHNX4 (ORCPT + 99 others); Thu, 8 Mar 2018 08:23:56 -0500 Received: from mail.bootlin.com ([62.4.15.54]:48630 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652AbeCHNXz (ORCPT ); Thu, 8 Mar 2018 08:23:55 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 6DCFD2075C; Thu, 8 Mar 2018 14:23:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 08E3B2037F; Thu, 8 Mar 2018 14:23:42 +0100 (CET) From: Gregory CLEMENT To: Richard Genoud Cc: Stephen Boyd , Michael Turquette , Gregory CLEMENT , Ralph Sennhauser , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: mvebu: armada-38x: add support for missing clocks References: <20180308090300.23544-1-richard.genoud@gmail.com> <87h8pq4s92.fsf@bootlin.com> Date: Thu, 08 Mar 2018 14:23:43 +0100 In-Reply-To: <87h8pq4s92.fsf@bootlin.com> (Gregory CLEMENT's message of "Thu, 08 Mar 2018 14:22:01 +0100") Message-ID: <877eqm4s68.fsf@bootlin.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On jeu., mars 08 2018, Gregory CLEMENT wrote: > Hi Richard, > > On jeu., mars 08 2018, Richard Genoud wrote: > >> Clearfog boards can come with a CPU clocked at 1600MHz (commercial) >> or 1333MHz (industrial). >> >> They have also some dip-switches to select a different clock (666, 800, >> 1066, 1200). > > The patch looks goo and it will also be usefull for any other board > using these frequencies, thanks for this. I have only one small comment, > see below. I forgot to mention that you can add my Acked-by: Gregory CLEMENT Thanks, Gregory > > >> >> The funny thing is that the recovery button is on the MPP34 fq selector. >> So, when booting an industrial board with this button down, the frequency >> 666MHz is selected (and the kernel didn't boot). >> >> This patch add all the missing clocks. >> >> The only mode I didn't test is 2GHz (uboot found 4294MHz instead :/ ). >> >> Signed-off-by: Richard Genoud >> --- >> drivers/clk/mvebu/armada-38x.c | 14 +++++++------- >> 1 file changed, 7 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/clk/mvebu/armada-38x.c b/drivers/clk/mvebu/armada-38x.c >> index 394aa6f03f01..9ff4ea63932d 100644 >> --- a/drivers/clk/mvebu/armada-38x.c >> +++ b/drivers/clk/mvebu/armada-38x.c >> @@ -46,11 +46,11 @@ static u32 __init armada_38x_get_tclk_freq(void __iomem *sar) >> } >> >> static const u32 armada_38x_cpu_frequencies[] __initconst = { >> - 0, 0, 0, 0, >> - 1066 * 1000 * 1000, 0, 0, 0, >> + 666 * 1000 * 1000, 0, 800 * 1000 * 1000, 0, >> + 1066 * 1000 * 1000, 0, 1200 * 1000 * 1000, 0, >> 1332 * 1000 * 1000, 0, 0, 0, >> 1600 * 1000 * 1000, 0, 0, 0, >> - 1866 * 1000 * 1000, >> + 1866 * 1000 * 1000, 0, 0, 2000 * 1000 * 1000, > > Maybe you could add a comment here to say that the 2GHz mode didn't have > been tested. > > Thanks, > Gregory > > >> }; >> >> static u32 __init armada_38x_get_cpu_freq(void __iomem *sar) >> @@ -76,11 +76,11 @@ static const struct coreclk_ratio armada_38x_coreclk_ratios[] __initconst = { >> }; >> >> static const int armada_38x_cpu_l2_ratios[32][2] __initconst = { >> - {0, 1}, {0, 1}, {0, 1}, {0, 1}, >> - {1, 2}, {0, 1}, {0, 1}, {0, 1}, >> - {1, 2}, {0, 1}, {0, 1}, {0, 1}, >> + {1, 2}, {0, 1}, {1, 2}, {0, 1}, >> + {1, 2}, {0, 1}, {1, 2}, {0, 1}, >> {1, 2}, {0, 1}, {0, 1}, {0, 1}, >> {1, 2}, {0, 1}, {0, 1}, {0, 1}, >> + {1, 2}, {0, 1}, {0, 1}, {1, 2}, >> {0, 1}, {0, 1}, {0, 1}, {0, 1}, >> {0, 1}, {0, 1}, {0, 1}, {0, 1}, >> {0, 1}, {0, 1}, {0, 1}, {0, 1}, >> @@ -91,7 +91,7 @@ static const int armada_38x_cpu_ddr_ratios[32][2] __initconst = { >> {1, 2}, {0, 1}, {0, 1}, {0, 1}, >> {1, 2}, {0, 1}, {0, 1}, {0, 1}, >> {1, 2}, {0, 1}, {0, 1}, {0, 1}, >> - {1, 2}, {0, 1}, {0, 1}, {0, 1}, >> + {1, 2}, {0, 1}, {0, 1}, {7, 15}, >> {0, 1}, {0, 1}, {0, 1}, {0, 1}, >> {0, 1}, {0, 1}, {0, 1}, {0, 1}, >> {0, 1}, {0, 1}, {0, 1}, {0, 1}, > > -- > Gregory Clement, Bootlin (formerly Free Electrons) > Embedded Linux and Kernel engineering > http://bootlin.com -- Gregory Clement, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com