Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2889998rwb; Mon, 15 Aug 2022 13:24:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR56J3w8SfG8991fuZFm35pyQGck3NKNcYeAAo7NxETAswImy2IxtUpbkmD7wvPuGQz3xSc7 X-Received: by 2002:a17:906:58c9:b0:730:bc01:fd5f with SMTP id e9-20020a17090658c900b00730bc01fd5fmr10893564ejs.504.1660595045800; Mon, 15 Aug 2022 13:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660595045; cv=none; d=google.com; s=arc-20160816; b=biI54DuK0aPpEWIFGCdO+Zfg8f00VaJnUpJzPMct7AYv05HfYenuqk9/gWYqEzYafr EMj8eieBhWXQ8aXjaXbybMBdxwQ78vnlNfrL348nEf3zlGv7tTyP1+ImO6gt0S0O44E2 sr28KxzKjIliqa63mlYup10kJaBJ5iMvxMnWon7LwGzJoNsRk8VRA7mAXlVBXumdHaVN 0J3HnNX+a/xc8f3i25+xcd+5dWJp60LU7hYuNJRB0dtthac998+kIdkVXGKntZzLsZCJ eNggVjndv0oSQ0YxaIH5S6+kB+5Wd6wYKqSbBvDhJYwEB9N5feLSQpYMPmAEZ21QaPYj /msA== 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=pOPur4vBnEC1HttqrFYbXXYRCIUDlS5+NbYhfPFnx3uNbUVG7vzBJelhl/8zrKmNcF h4k36GUyUY3Zmxy4u1NTmDJRU45+jZkiFKZ981rXaxJHJSY/9cdcTr6X6ocwastfLI38 2pY5mzMQnmE06oc670jTMopnKkEQbYWmMAzD8S48Tkm2p/UUnr6aZ4JXkzMYEM5Y49uG dCxZYYn7kKWR0WaxaRM4iy+zCpl/u50m4wuXFbXq6z5QlYmMdRkPOSIMyXeMsbPQVv7T IZEC6a7Nq8lRHshTljPPyn4KXEWwz1t87vPg9TfsozfXSlqXfsrHn2alZLto7ekcgYmm 6INQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HAjyvGFB; 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 cr10-20020a056402222a00b0043cc4d599f8si7093194edb.161.2022.08.15.13.23.36; Mon, 15 Aug 2022 13:24:05 -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=HAjyvGFB; 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 S241430AbiHOURG (ORCPT + 99 others); Mon, 15 Aug 2022 16:17:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346913AbiHOUMg (ORCPT ); Mon, 15 Aug 2022 16:12:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A53788DC4; Mon, 15 Aug 2022 11:58:35 -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 40B6460A71; Mon, 15 Aug 2022 18:58:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B27BC433D7; Mon, 15 Aug 2022 18:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589914; bh=90TsjMqOUNEM4+jK+tHM4C/XBOy4yWf55oPYVu5rl94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HAjyvGFBO5y0wfhd2WeZOkJ+Tr7mZwYjKJGPrm4+s8QsfnQEJJm2I6q9VrCTN+MGG ygvtT+hZgTk11LtZZmf+YWnvamcnR3agvAEYIVKnvoxR2vMv7owF5xMcGsxXQU+/3J JuYn7tBlQ8Av/ycigeZ9+6C+B46BiY1NsWlNMxV0= 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.18 0089/1095] mtd: rawnand: arasan: Update NAND bus clock instead of system clock Date: Mon, 15 Aug 2022 19:51:28 +0200 Message-Id: <20220815180433.195876501@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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; }