Received: by 10.192.165.148 with SMTP id m20csp2482768imm; Sun, 22 Apr 2018 08:00:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx49uziQde0k/x5bILMWvfEsJlcHHBqsdkDuNblGGTr1y76UUD9EJIbalVJMbRnkHwb/URNsW X-Received: by 10.99.148.1 with SMTP id m1mr14430153pge.140.1524409201386; Sun, 22 Apr 2018 08:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524409201; cv=none; d=google.com; s=arc-20160816; b=vyGamX6yxjnoZJaJO+Xb2PVlXg7J1BJv2WLfYFkaQrmE7bY8VvIwnMQusiw4CxvnKw KD/KoRuE/BMd0b0QDFelPBNFMehaJCMTEnK5MXfiResRo1QsO8Yor53vBDOVDQNd8H1c doQufcs9gWUvgTt3Hbs9Y/radywnr3zUG29cT8Vo494GRryhL5Gn/vhY6VMkftiCDT0D egt9no+2Vp5/kQSTJ2/behSDN+irOfwBUSWbVu3W3Etxre98L29h1K36bmf4Ngd7Htfk 5XCDFY6kMF7D70ybvGuuUGRe9FnHttmw3sYdHEmxc8Bp89jS0ILyblD/nT6huDcwnSw/ JCSg== 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=qLR0vo/OCNFDGLJvAU5sesnE/Kvlj3SpziB6uda31Mc=; b=of3dCFAzXtevpiDYEiqy7pcGuj7LnjU/CsEsEiqpOdU3xnhEnCk6JS2zs5dj3WO+SJ nuoD9y8312krpHaUhEjj6XtzY71di7W3X46sotw2GTSJmJMW/dWXKcVScl08M36xUdgd d5xQQeg5g9jOIYPAKvNZdXdT3VV/7tQhRuU5BmdVC/KRwP9q/T+OkGqdcGugcp1GoRKd F+Xyx5C3KUsf4s1N7XWWebyzgXesVn3LUzt1NfFbWCETjYDNcFzSfOzUW9NDUiMnN0Ur ckkvP6pr9nf853eu/KS3JKeQSaXfJDJE1dL89zQXWuctLfX/uxlugPXLAHP0ZbLhvFRg t2jw== 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 j10-v6si9953612plg.396.2018.04.22.07.59.46; Sun, 22 Apr 2018 08:00:01 -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 S1756827AbeDVONQ (ORCPT + 99 others); Sun, 22 Apr 2018 10:13:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55528 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756799AbeDVONJ (ORCPT ); Sun, 22 Apr 2018 10:13:09 -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 1155DCCE; Sun, 22 Apr 2018 14:13:08 +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.9 52/95] clk: mvebu: armada-38x: add support for missing clocks Date: Sun, 22 Apr 2018 15:53:21 +0200 Message-Id: <20180422135212.540461097@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135210.432103639@linuxfoundation.org> References: <20180422135210.432103639@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.9-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},