Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp277225imw; Fri, 15 Jul 2022 03:05:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sdzMBI5i25zg2fiRob6pUM2ZplSia41sVm+fjU0gtncPAMgUamMz4HN7oJ6ZtnnrXYfCdx X-Received: by 2002:a63:5d09:0:b0:416:18b:5846 with SMTP id r9-20020a635d09000000b00416018b5846mr11726830pgb.574.1657879507431; Fri, 15 Jul 2022 03:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657879507; cv=none; d=google.com; s=arc-20160816; b=oOgbP5KLfh2q2Zp1Rn/cvZMYLXkWxkpo93RDS59srVQGWdpKtZic4H8FzqehHtHpFo KuBdL50Smx+nuAjpJn8mb1SN8Ol1pV88q+cNCgoa0jOPEgH3GiFwzE8corrjUFPrlqqx 9v0oO3o0eQAwC29nlF4YWI+jB5/aqPjN0U0nPwiFk73Z5L4wLcKKG4paRTbM7pcqFMxP WAziqzn3c4oRYn/FXnv5i3GSY46AxKJkQ2nSnWCmiTS3uwXOpqnFH4HfGa5/fTc067Gh FNhUj4smF5yMqLe088U8ifMJLh91txljx35c6pLEw/d6liMkf6JlJW84o/bV935myt7V Dx9Q== 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=Fhji57EWH1jprvh8HH/ITAAwDRsG6eEWSodd0/Pwgzw4x/AP8J9JICnO26XhKfaiyt 9nlYY7WfVns80k+g7orcGeldLOLteISrPnH+zbDYiH811ZMFoL2hb5g2p5cdpefKQKto ZHSYtXkB/lPpukzh615ox7PSLq6siTx2ahTF0UEwiAuiuegjPFwOyWLQ4OOMzOEY9b73 Y8y32k7YA1l7Lxnb57pdc1FRpwPCNRUUYa8rSkq6Bge1cE2XBnBmikjJhQ2f772M2lMc 2SOh7NLOFDT64WGuzd/FxJUmHO6EYQXTLE5GTyL++Sg7Nk+f2uwBHDpF/ezYDnmaX3Ze LFcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rvNxhMjR; 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 y23-20020a634957000000b004051797ce4asi4685712pgk.654.2022.07.15.03.04.50; Fri, 15 Jul 2022 03:05:07 -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=rvNxhMjR; 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 S231776AbiGOJXc (ORCPT + 99 others); Fri, 15 Jul 2022 05:23:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231891AbiGOJX1 (ORCPT ); Fri, 15 Jul 2022 05:23:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CF2565D6E for ; Fri, 15 Jul 2022 02:23:27 -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 AB3A462117 for ; Fri, 15 Jul 2022 09:23:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9BCDC3411E; Fri, 15 Jul 2022 09:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657877006; bh=zYaOTja4AIBD/WAKQ57pm5wPsgAuCtuZjUduy4rsppI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rvNxhMjRwcpvomEqfUu2I/STcWxYcOI0zICdthmOcc6kV2nluRIoTBraaUywHI+UC cT16yBFVX7ufZ71Pr0Ob1lxDXb2HIU6flVZ7Mkb3HcVZIPtxFFGqewszpU1zKp2Ejr 5LHj0q4KujT0lpww71Egrllijvk7tPZJiUubR76bd7u//vmguiid6nN2na6J5mGH1U S5IWc+i6HomW2fBVeHXIauXydCDW87W5fYY9/g0SZ2qo0SrEb+871wekeMRvXRF9id IYrgs23Zuz7ffEPX215wvcn7wpUtk6OS4dOuWURmRj7gzRSqkYpAowbj50ulLXeDJ5 exfdAKpPNHJiw== Date: Fri, 15 Jul 2022 11:23:21 +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: <20220715112321.6c8ba00e@dellmb> 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 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