From patchwork Mon Jul 12 06:02:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 474097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FD5FC07E99 for ; Mon, 12 Jul 2021 06:58:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F37861409 for ; Mon, 12 Jul 2021 06:58:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242528AbhGLHBf (ORCPT ); Mon, 12 Jul 2021 03:01:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:35698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239457AbhGLHA6 (ORCPT ); Mon, 12 Jul 2021 03:00:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E184E61132; Mon, 12 Jul 2021 06:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626073089; bh=H7iqm+NQ4y2X2+Gx7MVopqODNNQ0ttsLJOZX2Qcms0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y45v70weiMCX8Cz9a/plnOo/jQu6mgf6nIQFErMxlBUmKDY2VrzuXFC2iBYl9h4EC 0Cpu+0As1rNPh2GM+MhAYjS9sKV8q8EKEBslynz3AS6gQcjvFnv8GUMMgy4u5pCpAa gmVuJtgARkIrbEEMJIdZVaR7euVaHtsGtbWfS6Ts= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Damien Le Moal , Stephen Boyd Subject: [PATCH 5.12 080/700] clk: k210: Fix k210_clk_set_parent() Date: Mon, 12 Jul 2021 08:02:43 +0200 Message-Id: <20210712060935.997867660@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Damien Le Moal commit faa0e307948594b4379a86fff7fb2409067aed6f upstream. In k210_clk_set_parent(), add missing writel() call to update the mux register of a clock to change its parent. This also fixes a compilation warning with clang when compiling with W=1. Fixes: c6ca7616f7d5 ("clk: Add RISC-V Canaan Kendryte K210 clock driver") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20210622064502.14841-1-damien.lemoal@wdc.com Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/clk-k210.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/clk/clk-k210.c +++ b/drivers/clk/clk-k210.c @@ -722,6 +722,7 @@ static int k210_clk_set_parent(struct cl reg |= BIT(cfg->mux_bit); else reg &= ~BIT(cfg->mux_bit); + writel(reg, ksc->regs + cfg->mux_reg); spin_unlock_irqrestore(&ksc->clk_lock, flags); return 0;