Received: by 10.192.165.148 with SMTP id m20csp2469492imm; Sun, 22 Apr 2018 07:41:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx49+t24HxGdtyyzYHSYcvNcyJ9oq7cXG5ca/F5g0bmOnEx+aeMnz0BO74p39lSexO84dERfN X-Received: by 10.98.180.2 with SMTP id h2mr16788026pfn.189.1524408117872; Sun, 22 Apr 2018 07:41:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524408117; cv=none; d=google.com; s=arc-20160816; b=GSgbc5+oAr61bHWWM4d+/sd2POndw8v91J+uEOz/mrFm+D3Lx58KNk0Ryy2ftFL6vz 9tzYGmInsxTBr5wA750tFpDdgFIXYJCkaseIPa/IgU2bGkN2nN5dSkEy5stL5ZRU/3EK vuvEPn2/8yp7YL/azJNSfoOrNIXlrOl2cRhd7VFqwbFJJoi/EbfnDUqHRuuyP5ayAwBj 3Aro/rjzVkogzavB6VjbLGjnbEpQhbNZYC9Wh9Itb0MWK2ZEQI7EWQ4S3ivT84zJ17OM vxRaX2H5OtppTVU40WykEMzcs1z8twze9kjTXT7fkECPoiOGseERnG0k+ECjme/Zj/jj 0yxg== 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=Z6ePdZMP8LKJFwvjnb8r9KjsnneuEGdnddgCLMTIm78=; b=FNsPBwJEG6zG/GF1MaUQubmwSn7jgQZ0aUNmqKZT9ScZ9bHpH6w8qJ4qpSWgMcXwV+ T6mezZbxMatUBi6Hyspay6Bx6MGFlQD0bZvsQW7L2mFZVJxovjUdPRG80J7GNxecegdw M4RdYZUiqzJi0HSklRKNBaI1wHuI5fB7VkR0ib+86aunDIgBVSnAOOsp0HryZWROseMf ap7kkvmmBVkoK6Dvj3RJRXGYHuqIYsweKV9zEEp8qwVEU9d/YjR6oQCTIhnSbuuAQass keSxBL197dm3vbGqotitr0cVaoydkDwPQ2qbpQYpEJ9oIcPMEoUhOMu+36TkNxhh5ewJ f0Qg== 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 g3-v6si10194666pld.309.2018.04.22.07.41.43; Sun, 22 Apr 2018 07:41:57 -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 S1757181AbeDVOR7 (ORCPT + 99 others); Sun, 22 Apr 2018 10:17:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58594 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757146AbeDVORx (ORCPT ); Sun, 22 Apr 2018 10:17:53 -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 8A3ACCF3; Sun, 22 Apr 2018 14:17:52 +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.4 61/97] clk: mvebu: armada-38x: add support for missing clocks Date: Sun, 22 Apr 2018 15:53:39 +0200 Message-Id: <20180422135308.641539726@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@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.4-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},