Received: by 10.192.165.148 with SMTP id m20csp2484675imm; Sun, 22 Apr 2018 08:01:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx49LgfPEdVuMUVfMV0ReVZ4y4REYQUr1nCYkjFAGWu4NGMkMVV2SzMB71+/C3B7Wkzy33ukc X-Received: by 2002:a17:902:a24:: with SMTP id 33-v6mr17763603plo.72.1524409284622; Sun, 22 Apr 2018 08:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524409284; cv=none; d=google.com; s=arc-20160816; b=wnGnaR3oay0BpQhaP/1nqmYeKyDu+8od5azHB1/l/jDrYQ50YTnkkO+9cLTLamh5he uHftacr5yFdtl9QMOgDdXoN7SPK40b3lQDt22Sz+1tCpylUClDOjOrt4KDCaKp2Nv1VK Rg1wMRU1Ux5Yt3lvrvfARummhPsq0tovj9Z4hCtYSEPxwQkDmzorVdFLVqfrp7ddIYND X+gxIzd3muieQmrxcnO917zdmrMPH+Yrlm4SQhUDhlrZKwk4cjtIyEYzicYoYqAiwHO5 gYj+BL9+wpi9L6CcONob4KeDnKenFbUmT/IjiT0PrIwrR2Xd7qKkBa+JJSS3F6yHonit Uodg== 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=8mk9VWPCQgEgWfwpnN6e1EQVtckD0NqFI2U4ToBlHxo=; b=iEaLiYlPyCvzKvnwE+Z8NhIs+tSzNB1p9OAfYt8RpJrd0pB0kxX+5wkkJVRmqp7R+q b+cRMZEeFpUN/U8HtPHN1W3cN6JYarbBSEhWHeGpBzMijQWzR06bVzpYrg7mFRetdFY1 bFFNAocry8tIJSErTTisa7YZdsjjVnwnxkH1HrlZ04R0AY8p60a91ENkpfDlJmFUI1le 1Nu14cozZzf6l9pIUPUfICq9qMYG52fVLvt2iPBZ4oYyrz0y6EVgHBz9CAuNJPG6pkE4 WkkoAsUsfQox9fVYs7kWO9KUUE4u3hy22DaatsWaeeSaEmm6EwFPIao9vGoN+xB7omxB W38Q== 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 m26si7918652pfa.45.2018.04.22.08.01.10; Sun, 22 Apr 2018 08:01:24 -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 S1754362AbeDVO7A (ORCPT + 99 others); Sun, 22 Apr 2018 10:59:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55590 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756784AbeDVONP (ORCPT ); Sun, 22 Apr 2018 10:13:15 -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 6BCE2CCE; Sun, 22 Apr 2018 14:13:14 +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.9 54/95] clk: bcm2835: De-assert/assert PLL reset signal when appropriate Date: Sun, 22 Apr 2018 15:53:23 +0200 Message-Id: <20180422135212.631400939@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135210.432103639@linuxfoundation.org> References: <20180422135210.432103639@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.9-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 @@ -545,9 +545,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); @@ -583,6 +581,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; }