Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3028435rwb; Mon, 15 Aug 2022 16:26:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR6KeyepeKxC/IZw+EuqMX8tiVzaVA80usblXHta8yxjxg0RQDuv9DOal5rwJVO1jf0DPNEP X-Received: by 2002:a17:907:2c78:b0:730:df57:1237 with SMTP id ib24-20020a1709072c7800b00730df571237mr11307100ejc.196.1660605890484; Mon, 15 Aug 2022 16:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605890; cv=none; d=google.com; s=arc-20160816; b=US5QKU5fPtRrePRw+FTcxbyXc+vLMBaMSWKPIAHvZcKH3rUk/MOQbvwMf0rcUGgC7Z V00ZTv01+mZ8Jah3Vl9nP2zv4y0PQjYt78rn7fJGoNfWfxwZNqGdPcsutzIC23uODj+f vjBD7Tag0I4Y15apOZWRNMuOLHfqRrXXDG2oFoKrHDWPan9RmOs4nRm/ZFzTQfAzMVLl gZc7mLIivPTOMhMEnJuexrY+LNWoD1Tp+QRvCQp9ADRlwSmPGbesGLVCxMlZhIiVkqso I0JPgp+0Qeyz2MYf7EIerCFFRCjGPovPT4Oga0Kfz5INq4KAgIaQYa7pToQllxOitSLf t3rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CHVgo1PC4TfE9feHirv2W08mQtwVPeLPzQs+SUmH7QU=; b=UzYQEd2R1Pk24d17c+0mDzZav/R3WizON0boh0lNJANy7mW2TLnOxuoTD0vjZf+W/u AiN1OxX+88urbAikPq9u6+HVbgCunm0cB63CCVg4/V0EJGt48Rv+d2Y9uPkGSDmWkgj1 /d0W4lHqUI/dzGIzau1iGqVuqJSPLdjTF7lzwU8wIpLW8jsLirWKRBCXYsKlQ18k/qsz Ml9rReX2IZ/8xPvrMoYoOg/aE8/lfXrwQtQgREoPALM2kXyZqHejYp/ovq94Xwq8VdDw DXO9n/RboZDpoez1KXw2vf87GgbiHaGAvGNQ9Kpr9blUT+6zolnv/ufnhppIMM8C15Q+ LfCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0d+nwjey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gh33-20020a1709073c2100b007308bd44018si6492758ejc.550.2022.08.15.16.24.25; Mon, 15 Aug 2022 16:24:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0d+nwjey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244969AbiHOWPl (ORCPT + 99 others); Mon, 15 Aug 2022 18:15:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241302AbiHOWOk (ORCPT ); Mon, 15 Aug 2022 18:14:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5DE7786E4; Mon, 15 Aug 2022 12:39:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A81E961209; Mon, 15 Aug 2022 19:39:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8ABF2C43470; Mon, 15 Aug 2022 19:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592357; bh=90TsjMqOUNEM4+jK+tHM4C/XBOy4yWf55oPYVu5rl94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0d+nwjey5AARcbza4/PsVLrZnXCiiLNgttJk1s2nMwjKIytPnBGGbFNbgh2MmllQ/ 9FpB3F3SsiZDw8Z9eSNd+aF3Yil5ahLyvUN8xKHMUySHdFv3RUI/QdzHPXFn3ltbzA tsB9jTWuDp7mdatam3Z0ox6EVUKbCY9eiWa9+mlE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Amit Kumar Mahapatra , Miquel Raynal Subject: [PATCH 5.19 0098/1157] mtd: rawnand: arasan: Update NAND bus clock instead of system clock Date: Mon, 15 Aug 2022 19:50:54 +0200 Message-Id: <20220815180443.545707764@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amit Kumar Mahapatra commit 7499bfeedb47efc1ee4dc793b92c610d46e6d6a6 upstream. In current implementation the Arasan NAND driver is updating the system clock(i.e., anand->clk) in accordance to the timing modes (i.e., SDR or NVDDR). But as per the Arasan NAND controller spec the flash clock or the NAND bus clock(i.e., nfc->bus_clk), need to be updated instead. This patch keeps the system clock unchanged and updates the NAND bus clock as per the timing modes. Fixes: 197b88fecc50 ("mtd: rawnand: arasan: Add new Arasan NAND controller") CC: stable@vger.kernel.org # 5.8+ Signed-off-by: Amit Kumar Mahapatra Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220628154824.12222-2-amit.kumar-mahapatra@xilinx.com Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/arasan-nand-controller.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/mtd/nand/raw/arasan-nand-controller.c +++ b/drivers/mtd/nand/raw/arasan-nand-controller.c @@ -347,17 +347,17 @@ static int anfc_select_target(struct nan /* Update clock frequency */ if (nfc->cur_clk != anand->clk) { - clk_disable_unprepare(nfc->controller_clk); - ret = clk_set_rate(nfc->controller_clk, anand->clk); + clk_disable_unprepare(nfc->bus_clk); + ret = clk_set_rate(nfc->bus_clk, anand->clk); if (ret) { dev_err(nfc->dev, "Failed to change clock rate\n"); return ret; } - ret = clk_prepare_enable(nfc->controller_clk); + ret = clk_prepare_enable(nfc->bus_clk); if (ret) { dev_err(nfc->dev, - "Failed to re-enable the controller clock\n"); + "Failed to re-enable the bus clock\n"); return ret; }