Received: by 10.192.165.148 with SMTP id m20csp2469446imm; Sun, 22 Apr 2018 07:41:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+OeC29fdDtRBxY5DmZ/wwacO4C2bRunRGVZZLBxdv7Y3O3t4bteGdhL7BhJXhrvBHJ2mt6 X-Received: by 2002:a17:902:51ce:: with SMTP id y72-v6mr17228346plh.157.1524408112665; Sun, 22 Apr 2018 07:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524408112; cv=none; d=google.com; s=arc-20160816; b=FKzNDUvgU25Ml1TT9Rxnn7Dm8i/E3BaYM1IHidxKzWiUkyMXVpqPYeggUVNUSdyTPX 5asLMClvoAWdKTrn5H9I3DWg/JycpBpot5rI0C/uNHhQ1/7eWz2Fh3ofK6MoVNqCQQfu 977w3hd5UYMjSGknOIud2Vg870xHsYmwJVP/qUu8eUHWkKYX5mIjxs8ZTxcOCCpvSI84 EV9pbs0L7HIweeaAmxwXIPqjvJgdeAqqQthCzaVjfiOm64VimpG8kCO6xy8/9giPM6Il bIpXExVd1b1KN+YZDfK+1vEmI0+wXnoeVC3ExkmCMilD/FaC+BTHP9wnqa0BLGNkha9G 5KRg== 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=byi2qTHqPQaJtFYgMhkaQPCXJHTVYzlcUlRV/pzRHN4=; b=QXhE4Wbac+qObIvUsSxWYY941AF9JbG9qyr5mBnaedA+lvxict26ba2Iq8Aq+22qXP ONin5CTZsscdLxDmA2Ewofir9yNpwOqKogLsA1kx0QbHSRXUrrT2LHM2vEU7Nkj/BJzt pmgR8usIK70iWAMuaSp3FHzPyHmTtRx5W/WaEIKz0aM9imSA14Ah6MA2auF+XNKeL7f4 WzN212uJw+O8YORcCV4uMj/mo7xTC9ca2Jwk9RitmuQVOOOMOyvDtVIJJH865U0iwR/8 wQ6Svf2tElWcrVi+sT9wJETuvNa/wwR+mmruQVY4EaXgF7a7j0fKNY1DbT5VD24ruVSx ahXg== 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 a64-v6si8192509pla.530.2018.04.22.07.41.38; Sun, 22 Apr 2018 07:41:52 -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 S1757241AbeDVOke (ORCPT + 99 others); Sun, 22 Apr 2018 10:40:34 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58642 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757169AbeDVOR6 (ORCPT ); Sun, 22 Apr 2018 10:17:58 -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 E9535C64; Sun, 22 Apr 2018 14:17:57 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Boris Brezillon , Eric Anholt , Stephen Boyd Subject: [PATCH 4.4 62/97] clk: bcm2835: De-assert/assert PLL reset signal when appropriate Date: Sun, 22 Apr 2018 15:53:40 +0200 Message-Id: <20180422135308.689207280@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: Boris Brezillon commit 753872373b599384ac7df809aa61ea12d1c4d5d1 upstream. In order to enable a PLL, not only the PLL has to be powered up and locked, but you also have to de-assert the reset signal. The last part was missing. Add it so PLLs that were not enabled by the FW/bootloader can be enabled from Linux. Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/bcm/clk-bcm2835.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -891,9 +891,7 @@ static void bcm2835_pll_off(struct clk_h const struct bcm2835_pll_data *data = pll->data; spin_lock(&cprman->regs_lock); - cprman_write(cprman, data->cm_ctrl_reg, - cprman_read(cprman, data->cm_ctrl_reg) | - CM_PLL_ANARST); + cprman_write(cprman, data->cm_ctrl_reg, CM_PLL_ANARST); cprman_write(cprman, data->a2w_ctrl_reg, cprman_read(cprman, data->a2w_ctrl_reg) | A2W_PLL_CTRL_PWRDN); @@ -929,6 +927,10 @@ static int bcm2835_pll_on(struct clk_hw cpu_relax(); } + cprman_write(cprman, data->a2w_ctrl_reg, + cprman_read(cprman, data->a2w_ctrl_reg) | + A2W_PLL_CTRL_PRST_DISABLE); + return 0; }