Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2879727rwb; Mon, 15 Aug 2022 13:11:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR5tzSfS9fMX3CDT4zLJ3Pe4cUB4SLOAUeqHzVhB7ocUzE3R3iS972x8TG77VtR5HoxVmzm5 X-Received: by 2002:a17:907:8a09:b0:731:610:ff8d with SMTP id sc9-20020a1709078a0900b007310610ff8dmr11316680ejc.399.1660594260694; Mon, 15 Aug 2022 13:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594260; cv=none; d=google.com; s=arc-20160816; b=aIVxJxGevsAA5/VYucT4huy59EeD/gzxH+qcJm53dNq3UWep9ZrEDctAEANRZ6kGNR VWvY1cO1fpIf+eW5NEK/WHCzdk1sJvWOiDz/1+O8wc/gBDkSYxqrJcxsl53YoaQtqP0N L0BSDLIv7pHMQlp+R8oSyTYKrEVcMqrqh5gsgW30P8Y03UrHv3UuhR526Y0/Fp1GZq4b mUDh35fcAOcqQaiV2mL8LWdmgkWrxJMPoNv1fp7f2eP4g68jhjco1O3iZm9iz/y86ZKU o6fW8MMmxVGtOmSMTHtG/6lbNrWofJY+Lfhel6lt6Defr2SnLG3WMW9mDFo7nAQQAWxe pTDg== 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=E8zIPjpO5dYqZr8OJ5/QfQl/67yyuhg0D07IHBIP34LOCUqqNhRAe8pTJx81/gI85N 0uegnGgOjMEi0lTymqDEpfaUIX9lsXiQNE6kPaxvld4Hokgydwf9ztGyIy5LEMY0OfXj onr77YKmkqmYc5kmBssEwPogA+A5lKhfT2LVmCr1+Nmo6z5H4AAM+kEWA+vhnZObY3Di 1x6dLA8rMbCoqdYCQ1NEi5zHkT5dPHsErBT7w7g0yCFZUQJ5K8ltoKKAC5a7JQWu1trI 7dqNBnPVoc4s3mlEuQqESGtUAId/rZnweWcEpnU+o3ObVpkKgVRuBou02/qG+c2+xsSY GhNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iTTAmk6f; 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 hr40-20020a1709073fa800b007386f4ab2a2si1274650ejc.638.2022.08.15.13.10.34; Mon, 15 Aug 2022 13:11:00 -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=iTTAmk6f; 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 S240770AbiHOSVj (ORCPT + 99 others); Mon, 15 Aug 2022 14:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232271AbiHOSUX (ORCPT ); Mon, 15 Aug 2022 14:20:23 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F21E52AE27; Mon, 15 Aug 2022 11:16: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 sin.source.kernel.org (Postfix) with ESMTPS id 44FFACE125B; Mon, 15 Aug 2022 18:16:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A171C433D6; Mon, 15 Aug 2022 18:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587397; bh=90TsjMqOUNEM4+jK+tHM4C/XBOy4yWf55oPYVu5rl94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iTTAmk6fW1n3bnvoLp3QTbd56Sg7hJQwbe/Wj64PQeu2U2n+MbMzUknGvsU9qoyiX tFcP37X1GTp9zktFDdxOteC2hqHOLYt2pJTnOQP2tfs8+zE3Vt2gLHc2LVx3g4bmN1 DipenXouxP53bgosaKE5zP17lEAHAh6K7+wddqp0= 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.15 073/779] mtd: rawnand: arasan: Update NAND bus clock instead of system clock Date: Mon, 15 Aug 2022 19:55:17 +0200 Message-Id: <20220815180340.420762155@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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; }