Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41B8EC433F5 for ; Fri, 19 Nov 2021 18:43:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D4BC604DC for ; Fri, 19 Nov 2021 18:43:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235599AbhKSSqr (ORCPT ); Fri, 19 Nov 2021 13:46:47 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:44837 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234697AbhKSSqo (ORCPT ); Fri, 19 Nov 2021 13:46:44 -0500 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id F37EE40002; Fri, 19 Nov 2021 18:43:39 +0000 (UTC) From: Miquel Raynal To: Christian Eggers , Michael Trimarchi , Miquel Raynal , Stefan Riedmueller , Han Xu , Greg Ungerer Cc: Sascha Hauer , Christian Hemp , Boris Brezillon , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, "Stefan Riedmueller" , stable@vger.kernel.org Subject: Re: [PATCH 2/2] gpmi-nand: Add ERR007117 protection for nfc_apply_timings Date: Fri, 19 Nov 2021 19:43:39 +0100 Message-Id: <20211119184339.1404232-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211102202022.15551-2-ceggers@arri.de> References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: b'f53d4c109a666bf1a4883b45d546fba079258717' Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-11-02 at 20:20:22 UTC, Christian Eggers wrote: > gpmi_io clock needs to be gated off when changing the parent/dividers of > enfc_clk_root (i.MX6Q/i.MX6UL) respectively qspi2_clk_root (i.MX6SX). > Otherwise this rate change can lead to an unresponsive GPMI core which > results in DMA timeouts and failed driver probe: > > [ 4.072318] gpmi-nand 112000.gpmi-nand: DMA timeout, last DMA > ... > [ 4.370355] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -110 > ... > [ 4.375988] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22 > [ 4.381524] gpmi-nand 112000.gpmi-nand: Error in ECC-based read: -22 > [ 4.387988] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22 > [ 4.393535] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22 > ... > > Other than stated in i.MX 6 erratum ERR007117, it should be sufficient > to gate only gpmi_io because all other bch/nand clocks are derived from > different clock roots. > > The i.MX6 reference manuals state that changing clock muxers can cause > glitches but are silent about changing dividers. But tests showed that > these glitches can definitely happen on i.MX6ULL. For i.MX7D/8MM in turn, > the manual guarantees that no glitches can happen when changing > dividers. > > Co-developed-by: Stefan Riedmueller > Signed-off-by: Stefan Riedmueller > Signed-off-by: Christian Eggers > Cc: stable@vger.kernel.org > Acked-by: Han Xu Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel