Received: by 10.192.165.148 with SMTP id m20csp2456299imm; Sun, 22 Apr 2018 07:25:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+iFQdpK3R/BnCnRM7N/012vKNCnY14sqptwNUsH+fDxAYzuhu/j2r6ubqery441P3uk1Vc X-Received: by 10.99.102.195 with SMTP id a186mr14715032pgc.207.1524407127507; Sun, 22 Apr 2018 07:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524407127; cv=none; d=google.com; s=arc-20160816; b=HAicVGqgYRzVckil81CgtCpsjdkD7DAIMTite4vlyZHICNrh6hxiKewyhsdxlGp93P 9a9oMf52PrHsWhiPn5mRpl9WgJem3nAEuT/9LO6l9SvQKgFV2vwlUeSkOfnAlnVsUBAl b6ScV7vGoJtbjI4iwPkbtb9xOXJNToeX7G0boGyVRC9cDrByvXOrHt1SXZI7TLxKrJ81 g5vP9eyvfflRrYK9+FnFkrF7L9fipGmt3fddaPpzk8PP2Yv7UwHwIeQUoIs2sUcDFWAd 8marAEa0kvtib3/dTOfF7tJo7aS7pL93w987lxC3vqKfZSIuU9XiMAYY4HV5uEo0SAk/ zVmA== 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=JNCSB9rjCZoBp6Zwi8h5TvBFyDSUGEdNn8SCIiV4u7o=; b=nlDkrEBtgOZm1kZ3XcIXhqH3efsPcKpzRA7s7HZeO7l5f3c/wz1I2UwZK7P2IoX5MO WFr06rfapmhah00yOmhVx7qIOau6WALrC6A46WHFYoPLx05JBenixqRxT4WpNg8My4jT CAj4o4QnI8jfbCgthgu/hBaXnojq9BtQZJj0n36Xr1dXXV5KKY6uhjwPaijAH7xvyuyw mYiMhAxWszC7omoT9im+W4oFDkVS8vjm90Ubj6xRUt+ZNEkLRSj1Q2Ts8ehwxRLlYdMR kclfy/Z51f4/KDsq34lN8yCXVJhm6wzllVqqho2TAK8WqVoz2L1u4X2Vkdus29Cw5wUS jyUA== 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 q1-v6si9533634plr.477.2018.04.22.07.25.13; Sun, 22 Apr 2018 07:25:27 -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 S1757859AbeDVOXl (ORCPT + 99 others); Sun, 22 Apr 2018 10:23:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33382 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757707AbeDVOWS (ORCPT ); Sun, 22 Apr 2018 10:22:18 -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 6A75CD1C; Sun, 22 Apr 2018 14:22:17 +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 3.18 28/52] clk: mvebu: armada-38x: add support for missing clocks Date: Sun, 22 Apr 2018 15:54:01 +0200 Message-Id: <20180422135316.753242336@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135315.254787616@linuxfoundation.org> References: <20180422135315.254787616@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 3.18-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},