Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5678909rwb; Tue, 9 Aug 2022 02:07:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR5K/9XPMdE2QnHBl7GfKH+jF7sNjOsbQE3ZQLyfkHZBwJH/siKjgNAjrUng8O71X01D8vmy X-Received: by 2002:a17:907:2d91:b0:731:2aeb:793d with SMTP id gt17-20020a1709072d9100b007312aeb793dmr9337490ejc.212.1660036066671; Tue, 09 Aug 2022 02:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660036066; cv=none; d=google.com; s=arc-20160816; b=gMNVoX+j9+UqQm44FR9o15vDpk6JNu5ZXPxuzZsy3slJzQa4SsIMwMW+f1hSpxBBoz wCPVLekY7jCL3F3jyvf0W533D6sqblh8Y31R3H3nnWQ5wDIiyfKW3Bz1v2AbSQo0uNbV 3EqwhH/tOEHrNJsf7HLM8a0MY+5QJkd3X+RbWKS9CHYenm3UPs/f0w7ybN+AFeGvjCIB +7QY8FFJBJakfAdgAPSauOtlVk7UtvLoUfk2FGAKD18W0MHnnTt78NQGxgrddaYtRgyz INO7XqMqaaMfYddu96DKMHTjlkJWTBa9VChNT9ThjXhccGCx9HR7STuO1oM8SiQcHa+V NRuQ== 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:subject:cc:to:from:date :dkim-signature; bh=OKXWfAENLDKaibwMH8ppoJ1CVkExi3A6U8NP5zvgofY=; b=P5rBYph20ZSoVsvsKj/D6Leh+dFp6E/lkpw0Jtdl8ZvtAzj4uv5YSbgsBvDq03z7Or ClZo39i5iETn0zYAa/3e5STk6UzL10QopXeGxMPdAg+5xSpwvMhKkmNynS9Bm4ydX0Q5 MmwnaaLBLyDaX/6CksVyIvWqDyyIWceYM8yzAzho1WLR65j1kQwvWbpPoiVS9SRKt1wr DmhkcJQjsqE0mTvRm/oW8TRo3qvdSPKlmCUd0LWrpw6pTjWT5u68dOdhjGq8YqJy1T6Q UrmBkByHZ785iHaw/zglVW1x7euTbgt9PwWloJsoci35F7d4SLonBQD6HbEPFUQPB0C/ JGRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NEE2o3kJ; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds12-20020a170907724c00b0072afc15af40si1607718ejc.39.2022.08.09.02.07.21; Tue, 09 Aug 2022 02:07:46 -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=@kernel.org header.s=k20201202 header.b=NEE2o3kJ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239266AbiHIIm2 (ORCPT + 99 others); Tue, 9 Aug 2022 04:42:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230519AbiHIIm1 (ORCPT ); Tue, 9 Aug 2022 04:42:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 311221EC78 for ; Tue, 9 Aug 2022 01:42:26 -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 C492D61314 for ; Tue, 9 Aug 2022 08:42:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 398D8C433C1; Tue, 9 Aug 2022 08:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660034545; bh=zYaOTja4AIBD/WAKQ57pm5wPsgAuCtuZjUduy4rsppI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NEE2o3kJElgOO5kP4ieMEncdEyYu2gZlpT66wmKLnQurYorKcfwC+SnRfrkLvsp6C mjWZScnGZLtaeCkDKx5lF5+UVSMKhpyM6Tywx5lv1CsbFacpEMpyCa+ubQoUkhKwMH Ls/kWVR9bfp4TKXcR7kViO9tgYjud+TSul5DjVfbfXWWXvuog1+Lnh1vTtiLA3IKSN ap/FaqWE/myBrcf3iFhpyaD0myrWJHm4VlefQ9yWSuQy8hjVcwdhJcp5i4VCKWHQi+ Y3q/z0QVYeqHNuE85g6LyqTL4AKQ1c3K+NfrtNJxJmvbCHy+J9zscleS1Aj2HYbwxR FimJxna+angiA== Date: Tue, 9 Aug 2022 10:42:00 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: rawnand: fsl_elbc: Fix none ECC mode Message-ID: <20220809104200.3dca43ef@thinkpad> In-Reply-To: <20220707184328.3845-1-pali@kernel.org> References: <20220707184328.3845-1-pali@kernel.org> X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.7 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 On Thu, 7 Jul 2022 20:43:28 +0200 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. >=20 > 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. >=20 > Also it started aliasing NONE mode to be same as when ECC mode was not > specified and disallowed usage of ON_DIE mode. >=20 > 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 invali= d. > 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. >=20 > Fixes: f6424c22aa36 ("mtd: rawnand: fsl_elbc: Make SW ECC work") > Signed-off-by: Pali Roh=C3=A1r Reviewed-by: Marek Beh=C3=BAn