Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3604947rwb; Tue, 20 Sep 2022 01:59:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6hZCpiI7/urjcn9xiV5r0fytN3ETu7XDX3TXuDpHsqPPLpTMWzSmkbuK6uvdEP38j22zYF X-Received: by 2002:a17:907:c22:b0:77c:32e9:f056 with SMTP id ga34-20020a1709070c2200b0077c32e9f056mr15896977ejc.768.1663664372659; Tue, 20 Sep 2022 01:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663664372; cv=none; d=google.com; s=arc-20160816; b=OyJQcL2v9fMg12BF/CbYLY/GNPSwINWyS3NaSsJyN1pqPtxUv2OP6Zn3FqVLrclWtN rFUbEjIAywGG/Z0cpfBNqHXx6tpTXjfpoHRkdDlv7xvXtkmxP2VTglhoXt83zrotd8yr pfIvevLWB9y4yD8UN5cGLDWVXWxf13K3Ag6ob2f6J6Xd4nczgGMZDrj5kY5SlCb044y6 b/7I3DDpHgURfG0KxHZbPEdVs/jYTefDNK8WGItud2PnwpKHvEEXpfyKmz+eXgafYpOL 93n/iKzvrOQesvalx8S0Z12NTG0mB9k+SHms5C0lr8YqJZU52mvuIq3NnxmhIbMMpj17 J13w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QVLy22muNBEbzcIbHIu1IOkDAC7wNvhUFUf+W0Hkpoo=; b=S1R98MqrZT2kImTLyDyFPoxH8hYigXXlGdZ3NpLBodzWtfH31dtTGOXG63jssqNNxT yWjPlYPnegqIIIA6U9PuCGkNIYFF63962LBexeV4WOcNoYgkZREVAlWJqc+A5YhIsjiP sEz0zFWp9n/OnZUhbSxbUbUn3me9NQafJioRBYQeKRFcg5UmwrSPI39lkU8Yw6BIeBHD JCWt7HY4PJn4Zd3N5iJVrNdDmb9nqYlvwrjts2rAg7GiZR9Q6rfv9ZJlmcwEHc7uw1d5 73yVDxQBl1DjG/3VTRgRHokuvQYXUOo0P9YhuKjH5UbvoI4M2XEn3a6t6wS3dnmi/+iG s3cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZP9Xgwf9; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc15-20020a1709078a0f00b00741a186e53csi948982ejc.50.2022.09.20.01.59.06; Tue, 20 Sep 2022 01:59:32 -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=@bootlin.com header.s=gm1 header.b=ZP9Xgwf9; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230438AbiITIT6 (ORCPT + 99 others); Tue, 20 Sep 2022 04:19:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231509AbiITITI (ORCPT ); Tue, 20 Sep 2022 04:19:08 -0400 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A0A065803 for ; Tue, 20 Sep 2022 01:15:50 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 62124200010; Tue, 20 Sep 2022 08:15:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1663661749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QVLy22muNBEbzcIbHIu1IOkDAC7wNvhUFUf+W0Hkpoo=; b=ZP9Xgwf9F1ZvG8cr4gEN9kc8KMHfsjkM6tHa3vZb0ElkPAlFFJ3Z7PofV6bz6KxvveYbkH dRaixZL++53s5IMFW/9aCWmP90lndia4xK3BRFXG79qiVKxBw1XyWyUkrrvnw5wahHshRO O0ssuFyYguQD8pFkpg9DKCmRx/mdogzDkmnWaFP6ecpPHoPQ4gX7tDwoCzq1MSaV71J4+E wE8OyUjCubzW0RIPrliSCRZYeUmyX9WEajciMC31GDjmq0lAwT6s34QSnWTVpm/icLqAy4 vyWgtQw9hsOfklIEoTDQi8eehLvXV8GOY8WJt5O0AuMizrb45gh1Lvc88yYfaA== From: Miquel Raynal To: =?utf-8?q?Pali_Roh=C3=A1r?= , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , =?utf-8?q?Marek_Beh=C3=BAn?= Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: rawnand: fsl_elbc: Fix none ECC mode Date: Tue, 20 Sep 2022 10:15:46 +0200 Message-Id: <20220920081547.597617-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220707184328.3845-1-pali@kernel.org> References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: b'049e43b9fd8fd2966940485da163d67e96ee3fea' Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 On Thu, 2022-07-07 at 18:43:28 UTC, =?utf-8?q?Pali_Roh=C3=A1r?= wrote: > Commit f6424c22aa36 ("mtd: rawnand: fsl_elbc: Make SW ECC work") added > support for specifying ECC mode via DTS and skipping autodetection. > > But it broke explicit specification of HW ECC mode in DTS as correct > settings for HW ECC mode are applied only when NONE mode or nothing was > specified in DTS file. > > Also it started aliasing NONE mode to be same as when ECC mode was not > specified and disallowed usage of ON_DIE mode. > > Fix all these issues. Use autodetection of ECC mode only in case when mode > was really not specified in DTS file by checking that ecc value is invalid. > Set HW ECC settings either when HW ECC was specified in DTS or it was > autodetected. And do not fail when ON_DIE mode is set. > > Fixes: f6424c22aa36 ("mtd: rawnand: fsl_elbc: Make SW ECC work") > Signed-off-by: Pali Rohár > Reviewed-by: Marek Behún > Reviewed-by: Marek Behún Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel