Received: by 10.192.165.148 with SMTP id m20csp2527460imm; Sun, 22 Apr 2018 08:54:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4//yLcHcqNAtWJljtH9lBrwOtJjMICLoOC7lll6pfVilk98I90BTeTKJxVl7LZYvVE8wlm1 X-Received: by 10.99.115.14 with SMTP id o14mr14764204pgc.121.1524412483464; Sun, 22 Apr 2018 08:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524412483; cv=none; d=google.com; s=arc-20160816; b=JXLYwiS12kxSr+8x367+uCQ7WYvzNjh8SsvgcE0oPUTpZjdrj/i7sW0lOGxFS9oDl8 PRQSSabW3u5snQ/OmNLAvFvAcVYakJZ9GUICp5yTzwnPkKpd3qXL926cUlwmo7JFs7ot Q4+s3EOEoVIZ1fvUJlRSeLxdMxy7nHVsBCYHN+AB3O7WGATrEJV2bffcyIb5wXrhC8NO iTJ/DgMCTNzCwXwgcPngfM8r8V7PEW8hbXAPJGx4PExU1YgnPCu1sb69t8qnd25gQ6tD d44rB93GQJodu3nv4+owulwk2zG6EYPETdb9qgnfG1gKosOx/P181xCcKl0XjucCw9oq 3rwA== 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:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=B/3WqXaWeyOa03SoS336UIE3OPXwc+2qHrDzlA7P+jI=; b=DB9ujxNEpuaEUFbhquFM8sIM+kq4DavOq64LpwA9aN3GJHJY72p0+JnO+b0A/OtjZG MYm9nNxGNZ6gvuY38eoQap33f7SQtixAGL9myU5as59Rc7HCV+gChT/qNiWxCR8N/FW1 w6ARLD9EP07mDD0BJiCii9svyc6AJQcoTVj2o+OoB/2t8ru2fdYF15Dl6/b13zPie35D JN0zzhzUfDjgxSpTqqC9iW9MU0vgfZCiZ2vyLN4wchIoCNH93dMQTb373upU/h5/r8yL mYMoDX+ClSStswHyTYHoXKctOWWk06HZp58+Fysp5x0bXELyoyUHeM9xsWLw32n4l8hs 11lA== 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 i4si8372042pgr.362.2018.04.22.08.54.29; Sun, 22 Apr 2018 08:54:43 -0700 (PDT) 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 S1754667AbeDVPwB (ORCPT + 99 others); Sun, 22 Apr 2018 11:52:01 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47488 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754546AbeDVOAh (ORCPT ); Sun, 22 Apr 2018 10:00:37 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BF52BBC8; Sun, 22 Apr 2018 14:00:36 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Richard Genoud , Gregory CLEMENT , Stephen Boyd Subject: [PATCH 4.16 139/196] clk: mvebu: armada-38x: add support for missing clocks Date: Sun, 22 Apr 2018 15:52:39 +0200 Message-Id: <20180422135111.426563695@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Richard Genoud commit 6a4a4595804548e173f0763a0e7274a3521c59a9 upstream. 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 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 :/ ). Fixes: 0e85aeced4d6 ("clk: mvebu: add clock support for Armada 380/385") Cc: # 3.16.x: 9593f4f56cf5: clk: mvebu: armada-38x: add support for 1866MHz variants Cc: # 3.16.x Signed-off-by: Richard Genoud Acked-by: Gregory CLEMENT Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/mvebu/armada-38x.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- 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_fr } 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, }; static u32 __init armada_38x_get_cpu_freq(void __iomem *sar) @@ -76,11 +76,11 @@ static const struct coreclk_ratio armada }; 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_rati {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},