Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5765043imm; Mon, 23 Jul 2018 05:48:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdbZ5G7NSD1ztSoIFHnVclVNA8r7kVdM029+ppP4skdVI8x4JOdjjf7O/vvSRVAejVXhInk X-Received: by 2002:a63:a619:: with SMTP id t25-v6mr11871482pge.288.1532350137431; Mon, 23 Jul 2018 05:48:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532350137; cv=none; d=google.com; s=arc-20160816; b=WDxLWMy2413ShVnugpSjPI5cHga6pjUruiBBLp81D/B/z1jGn+oxzUUH37I88QN4Ox eE+nipg4lFdJND6yaova9mMa6jDLjIgDokfw21efWMN9KL0daEG0v/dxBAbAOBn4ViCl 3FXCKWZm5q/OkTStSvwzXoNUHFcWPN/e9wUOl/UQTFb5EZQuPcoqLtD6j26FOIylKvh7 Ke6k21nEUpJbEkCykVv6iCvbHTzXy5FbQpbQiFb17IcezSi9n1WqeuaFqpEcs5Odg9hv 2BL6xXTJgx3zf3Z3mD/w4LPa68tAWQ0jEvn05Nxz40Kr/PAMNQSDVOBcYzGffqoYk3uz 0ymQ== 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=aaujc+Xq7p+XHkMdxjaD7b9Hc3+9un5kK3IHtd7NSY8=; b=kOhAktVVS/pSbCczlkBPL54/eBmPsmS4Fb++NtBvvOmfWVxUJf5bFKAih3+BVc6Y6j TZzZa+lsMngtYmtQ8xMGe2VwfFzPHfe8JdfA7/Pc6F0p4qVtA4s1xyZSGZK44HlhuJqY 8d2O0tlNVAn/YY4HUXIt/x9Q4gMBRjvgsAU+NTKgR5L/ifA7/3mFjmysvDJDrEl6dIQA NLF8h98MoEj08Mr7jvcHvPAErKY7ckZ/bj5skn2NcTmOOogQR5/1mevC6MMlodbc3KpP YwPPxAkjRVZNjf7JpBBhl9itBSYtCo32UxXpvEQiNpoE4HjH44LzDqUqiWUYM/FkMgmV DL/w== 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 q3-v6si8095794plb.238.2018.07.23.05.48.42; Mon, 23 Jul 2018 05:48: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 S2389729AbeGWNsT (ORCPT + 99 others); Mon, 23 Jul 2018 09:48:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51904 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388264AbeGWNsR (ORCPT ); Mon, 23 Jul 2018 09:48:17 -0400 Received: from localhost (LFbn-1-12238-233.w90-92.abo.wanadoo.fr [90.92.53.233]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6B60BBB3; Mon, 23 Jul 2018 12:47:13 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lucas Stach , Thierry Reding , Jon Hunter Subject: [PATCH 4.4 101/107] clk: tegra: Fix PLL_U post divider and initial rate on Tegra30 Date: Mon, 23 Jul 2018 14:42:35 +0200 Message-Id: <20180723122418.571880390@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180723122413.003644357@linuxfoundation.org> References: <20180723122413.003644357@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: Lucas Stach commit 797097301860c64b63346d068ba4fe4992bd5021 upstream. The post divider value in the frequency table is wrong as it would lead to the PLL producing an output rate of 960 MHz instead of the desired 480 MHz. This wasn't a problem as nothing used the table to actually initialize the PLL rate, but the bootloader configuration was used unaltered. If the bootloader does not set up the PLL it will fail to come when used under Linux. To fix this don't rely on the bootloader, but set the correct rate in the clock driver. Signed-off-by: Lucas Stach Signed-off-by: Thierry Reding [jonathanh@nvidia.com: Back-ported to stable v4.4.y] Signed-off-by: Jon Hunter Signed-off-by: Greg Kroah-Hartman --- drivers/clk/tegra/clk-tegra30.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) --- a/drivers/clk/tegra/clk-tegra30.c +++ b/drivers/clk/tegra/clk-tegra30.c @@ -333,11 +333,11 @@ static struct pdiv_map pllu_p[] = { }; static struct tegra_clk_pll_freq_table pll_u_freq_table[] = { - { 12000000, 480000000, 960, 12, 0, 12}, - { 13000000, 480000000, 960, 13, 0, 12}, - { 16800000, 480000000, 400, 7, 0, 5}, - { 19200000, 480000000, 200, 4, 0, 3}, - { 26000000, 480000000, 960, 26, 0, 12}, + { 12000000, 480000000, 960, 12, 2, 12 }, + { 13000000, 480000000, 960, 13, 2, 12 }, + { 16800000, 480000000, 400, 7, 2, 5 }, + { 19200000, 480000000, 200, 4, 2, 3 }, + { 26000000, 480000000, 960, 26, 2, 12 }, { 0, 0, 0, 0, 0, 0 }, }; @@ -1372,6 +1372,7 @@ static struct tegra_clk_init_table init_ {TEGRA30_CLK_GR2D, TEGRA30_CLK_PLL_C, 300000000, 0}, {TEGRA30_CLK_GR3D, TEGRA30_CLK_PLL_C, 300000000, 0}, {TEGRA30_CLK_GR3D2, TEGRA30_CLK_PLL_C, 300000000, 0}, + { TEGRA30_CLK_PLL_U, TEGRA30_CLK_CLK_MAX, 480000000, 0 }, {TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0}, /* This MUST be the last entry. */ };