Received: by 10.192.165.148 with SMTP id m20csp2433084imm; Sun, 22 Apr 2018 07:02:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx49VXive9n2rBvxx2awnarpTDlBJlquYQVO0QTB7OriiAjQSm4kA/DjcvkXzQDx6NBwqN4/O X-Received: by 10.99.45.70 with SMTP id t67mr14149303pgt.439.1524405736414; Sun, 22 Apr 2018 07:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524405736; cv=none; d=google.com; s=arc-20160816; b=pmOdNjoVOOy+NKBi1rjZmloPrv4pcAGeFy44BodcisZxTbnvByDKI/6LuQ92+Ff4ro 9ATkPLXhV9PH22pQOPC5YI6N4woB/mzg8RlBv1DD436dpWGk+I8KTA0TjcimLR/52MVt xo0CytL55G2cQCODR6pVxoe/ukBYnEnD9778Fl8svvPme13y5vUBls8rFBXXSpgBI/8T UDeZSTPlNoIpSo2NawkEY2/G/0qm2HDUDfrsXIERyJ6Z+eWyf739E/KX8V6Wn5B0k1YC 6g8tRhoPmBcvKhUeBNtzpB96GzMQwFgbsyTtikkvaLh6NW8pqmQNneHZFBNURoxiskPN 9Fzg== 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=963wc504ovvP9hLMqUq9dWGHBsOsuBGDQY+mZGdkukI=; b=ISB+OxAsTVLJ6F1xRrhRgqmm/2VSqlVuvGsn1aRHs4H0kX+ez+6DlFKti/M47/E8OS 4+B6IX++YUCOJTgESq5y0PGi6dg0Au5shyeRnME5HscYOpE53M2/GtLEH8/PHBFjryMh OcYo8wH7dAaNQTcqoHbK6Pdfa5GpKDm+OW9hmwDHpcLR7xlGjHzxyhxH3/XozmMp0lX3 B2EVxJRgV42ra9MOcQ4bX4NIBYLoS4eUnvjyw2dF1jmgsTiM+9GFyFY7BNp355gzs5zb grxWuCXOAJsClSFg4NEifLscCq/hWytK07hoTiC64UvXzHP/0ytGn/X+fWABpubAMMpM m89w== 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 b60-v6si10314975plc.270.2018.04.22.07.02.01; Sun, 22 Apr 2018 07:02:16 -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 S1754595AbeDVOAu (ORCPT + 99 others); Sun, 22 Apr 2018 10:00:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47608 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753979AbeDVOAp (ORCPT ); Sun, 22 Apr 2018 10:00:45 -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 B5CA0C24; Sun, 22 Apr 2018 14:00:44 +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.16 142/196] clk: bcm2835: De-assert/assert PLL reset signal when appropriate Date: Sun, 22 Apr 2018 15:52:42 +0200 Message-Id: <20180422135111.587185330@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@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.16-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 @@ -602,9 +602,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); @@ -640,6 +638,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; }