From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92CAC35958; Mon, 23 Mar 2026 16:20:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774282810; cv=none; b=SxlvmxmYhF1id+1dgg3a71fA01f8I9uX+pj/Tj0wnSQRr+V+gdzl3z/uqVzUKJ3s0yqevOJwjrOuqrfC0fDGFOVK8OtadpASBVgvtjLpkLG4h7A+iD2gfSItnowmVc9Cg67xwh9SKGRszoy6O9Vk9AOtphCjqpmDoiiFOqkwtAo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774282810; c=relaxed/simple; bh=tWU6PDMZUdF1GxxQjo0WSV9SuyHNEuuEzoMtF+PAJyE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uDy65eXnxn/KBicZU7taZ1jrsNEYiUOZ7JBnMPn0QlTmznfqK3fpyR0zWxMX1VLvJKA7sNJzIebEU02MzkevGKzr1y5nbLA6Xe94eFaBJfIdVXVZ4WMkFj1MutgRC8zwDdLqWRmVFErUWVfOose+Pk1xUiElr3wwzqNzTZ8SXjM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0hCUyOrk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0hCUyOrk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C2A7C4CEF7; Mon, 23 Mar 2026 16:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774282810; bh=tWU6PDMZUdF1GxxQjo0WSV9SuyHNEuuEzoMtF+PAJyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0hCUyOrkNm0Rjy+ypHAllTqAdR9BHDyfIusJIozCEEV+NJTgmEvaaOVg10tXLoMAS hjlzxGNdEC+IPCoVqdpOUSaLpWFHRtF6ZueLFSeswdeNSeh2U14pVd7vbgB6Uv4WH7 O1hyBVPF6LxTZp9yDxdPq+tqXJYXqbXShJbUglUY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Olivier Sobrie , Miquel Raynal Subject: [PATCH 6.1 295/481] mtd: rawnand: pl353: make sure optimal timings are applied Date: Mon, 23 Mar 2026 14:44:37 +0100 Message-ID: <20260323134532.297740044@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134525.256603107@linuxfoundation.org> References: <20260323134525.256603107@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Olivier Sobrie commit b9465b04de4b90228de03db9a1e0d56b00814366 upstream. Timings of the nand are adjusted by pl35x_nfc_setup_interface() but actually applied by the pl35x_nand_select_target() function. If there is only one nand chip, the pl35x_nand_select_target() will only apply the timings once since the test at its beginning will always be true after the first call to this function. As a result, the hardware will keep using the default timings set at boot to detect the nand chip, not the optimal ones. With this patch, we program directly the new timings when pl35x_nfc_setup_interface() is called. Fixes: 08d8c62164a3 ("mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller") Signed-off-by: Olivier Sobrie Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/pl35x-nand-controller.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/mtd/nand/raw/pl35x-nand-controller.c +++ b/drivers/mtd/nand/raw/pl35x-nand-controller.c @@ -864,6 +864,9 @@ static int pl35x_nfc_setup_interface(str PL35X_SMC_NAND_TAR_CYCLES(tmgs.t_ar) | PL35X_SMC_NAND_TRR_CYCLES(tmgs.t_rr); + writel(plnand->timings, nfc->conf_regs + PL35X_SMC_CYCLES); + pl35x_smc_update_regs(nfc); + return 0; }