From patchwork Thu Sep 22 13:39:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 2376 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A2F7C3F054 for ; Thu, 22 Sep 2022 15:39:41 +0200 (CEST) Received: by mail-ej1-f72.google.com with SMTP id oz30-20020a1709077d9e00b0077239b6a915sf4534147ejc.11 for ; Thu, 22 Sep 2022 06:39:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663853981; cv=pass; d=google.com; s=arc-20160816; b=HztM8gE1xIXhUJYCzt4/+zWzxUud2PS+1iVP3CgvJcy2RmbLAx7mZHGWLK0rbix1Tt +D6AT8ODwFmY/MgnmLAlVVIfdn152YJwxtp+4G9BEPxhRw1op7F2ITUuwYjLHVAlI2Iw v1024tZW2BjUXmEgL7ccabZLzX4ABdXCM0QIqc6Epoa1pg2ksrFx76v74q50YWEp0tJ1 l9c8w966SJLKsWmDCR3JGvwDPy2mZP9lc7cCk6mIR04+4ldSSfdLzK1dNZbjT3zs14G7 +ZTygnmRB8pZdbLMhtLBZLV2SYuVOl/rlSFQD9FWziE4NlygloXTubVkWk8iRC+bSEiQ GwRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=ZNymVO5K4clBssyjvrtvFHNPTCawyWTlzCm9wviXfo8=; b=IOViu+kipFDltIxHtt2d3jlYkJ13Chj8yotDvxfWM3nkkpSflIvaTwKjYr5FBb1STu EC5KZSOrlVX24CZZuls5OYizHtJfRgP5uBrCme4+78J5etKf6FXkAIY7KfolGUNFoT1u unt9tgExAQEUDoUdcOzu52jl4X5fhC4M5AtZJj6DfIfEg710oxXljOZ8/v3alhShDER4 zqRxPxeDv5cLAmOql3yOd7N3rTRm3Rhwmc+g+6ei7/2ajYpF1t1bbtXLdh41Mwq9M3Nr Tl/YT30tD7icQQJyyRCvCr+vKXZEg68OIGnz2s+M9yspRryS+j2/PP8mzSMefyk5jUKX WWww== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=p1Cx5mes; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date; bh=ZNymVO5K4clBssyjvrtvFHNPTCawyWTlzCm9wviXfo8=; b=EEIkGLymI+saO13SXeZ45HbXHZE/i5ryyjwfMPG0vAw2+yoYh2GMQbb5dq362b/MlC VTEVVFnKwSwAOTQ3MUME87AlBXjqYw6U3ZaWAYI6C4iYzV1Doz4q2dYGQFLmuIrcRn5n SO5yvZby4Qm5R8lc0YLuDNx8laE74/4mi8vEo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ZNymVO5K4clBssyjvrtvFHNPTCawyWTlzCm9wviXfo8=; b=i3tAi2FNTrU3vrk41T0zIPuL8x9QoFxxhXdNCDVngwYuzYIyv5Mvw/vm2Wk4iCbQ4i eeyb8EAUq12V4G5cVKPGknCEnf+uQizOxlJ4v8ihyRJ3oJJMZrK6x8jlw1ptWadatNYJ vHzunQsWAPxTGt/RgdSxNc0Vvc59Mb+fbvSV7qxwy4DBWd+LF9CtsbqCka8kTzrqHdeO ps/GS8lStlDmFAgKpJiU3nyB4+Dzi+deROlzgrGS6wSElw8bLcUMg6JCmbxkG+enybYE x0pvaGccLOVcptlhRazouyJzXriZiYuXPtFcHdqPxrFnsmEcT26d1fph02Lopqp/583N nqvg== X-Gm-Message-State: ACrzQf2Hx6XDQ9b9mjR6ZsM543xL9jVtOfkWYEpaOGoCLxpXn7hBHO/J 8p49pIhh3Z69NFrzRNAXdszONuyv X-Google-Smtp-Source: AMsMyM4BanjAJtbYtu8f9tZcu7adcmwZ21F14azXO3Xx8RU+Ig663RnjDZDy+PMm1EpbN59c5yKPfQ== X-Received: by 2002:a05:6402:b6c:b0:44e:2faf:1ba4 with SMTP id cb12-20020a0564020b6c00b0044e2faf1ba4mr3443632edb.191.1663853981192; Thu, 22 Sep 2022 06:39:41 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:520a:b0:448:77f2:6859 with SMTP id s10-20020a056402520a00b0044877f26859ls5109218edd.3.-pod-prod-gmail; Thu, 22 Sep 2022 06:39:40 -0700 (PDT) X-Received: by 2002:aa7:d488:0:b0:454:646a:4f98 with SMTP id b8-20020aa7d488000000b00454646a4f98mr3395717edr.408.1663853979772; Thu, 22 Sep 2022 06:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663853979; cv=none; d=google.com; s=arc-20160816; b=raqauILHi3YTOW3HA9XwcdoIE2nrJRhiceMdxkrmmTUZWD1BjW65b1d06L1qu+eOkb mwWuuuIEOE88+NW+rdjcRuUbrIl6jER4225s4kX+8ohW+CKC3V+jMhMJiqNDm0YF2At+ Yibwoy4b4ELV/5qxDLhl2no+vog/qwXvuZI7l/p6V5hRJvWOQkdqGoCX9OBwPa+XTF64 Xlypayo5VUbQjpQShJWHBZog1mqQHlltqI2CuitXEg7An2HkQZFzwLEIGp5aVy5OiX7K Hota29niIOmUdRbdZAEBjdSJCGJ10gfbsf2QTAGeQcUthkMRRvPN4PXaz2mdPNc8SMF4 ViRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=11kTXmCvyeo4l1vrZ/wlZX81Ipt6YUsY9sIrDkwvVPY=; b=qAuDVHmxviNHcO/aTqMRkYyMNxGGvLsiuqIJs1f5CSFZeo5p2bFyrm719DWFagOyb6 +N2jJ/40S/FLpejLey8h4/YE6d6PpX/TKpfLu/ykbgOEFeu8jRSaQs3fz9OfeFyAFf7C X5pZFkcbpMaQMEZ7n6gTYht0mEHk8tODZt+a2B0s9fJqDKWx06tvjuMViYTa9mLQCSd3 Uea9qjBpLl0t80IAYx6wZN4YsqGe5B8KOqZXjtF8CC01Ph5O+TjUKoo8bm37KsrCSNJT 2wsGZ8gS4ldgML1umzASfCktTw6Ri0rX+o+B6n40IFkK2Lcx8OPuuLWh4o3G5XZBB2ib yaDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=p1Cx5mes; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id m12-20020a1709060d8c00b0077080d3fe15sor2810014eji.38.2022.09.22.06.39.39 for (Google Transport Security); Thu, 22 Sep 2022 06:39:39 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:8a0b:b0:77a:be0e:f19c with SMTP id sc11-20020a1709078a0b00b0077abe0ef19cmr2841341ejc.397.1663853979447; Thu, 22 Sep 2022 06:39:39 -0700 (PDT) Received: from panicking.amarulasolutions.com ([95.75.34.209]) by smtp.gmail.com with ESMTPSA id d5-20020aa7c1c5000000b004518ee90b4dsm3761245edp.1.2022.09.22.06.39.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 06:39:38 -0700 (PDT) From: Michael Trimarchi To: u-boot@lists.denx.de, Balamanikandan Gunasundar Cc: Dario Binacchi , linux-amarula@amarulasolutions.com Subject: [PATCH] cmd: nand: Extend nand info to print ecc information Date: Thu, 22 Sep 2022 15:39:37 +0200 Message-Id: <20220922133937.277463-1-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=p1Cx5mes; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Extract the information about ecc strength and ecc step size from mtd controller. This information is usefull to check if what we think as ecc is what we really configured. Signed-off-by: Michael Trimarchi Reviewed-by: Dario Binacchi --- cmd/nand.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cmd/nand.c b/cmd/nand.c index e730484d0b..9a9794684b 100644 --- a/cmd/nand.c +++ b/cmd/nand.c @@ -417,12 +417,14 @@ static void nand_print_and_set_info(int idx) printf("%dx ", chip->numchips); printf("%s, sector size %u KiB\n", mtd->name, mtd->erasesize >> 10); - printf(" Page size %8d b\n", mtd->writesize); - printf(" OOB size %8d b\n", mtd->oobsize); - printf(" Erase size %8d b\n", mtd->erasesize); - printf(" subpagesize %8d b\n", chip->subpagesize); - printf(" options 0x%08x\n", chip->options); - printf(" bbt options 0x%08x\n", chip->bbt_options); + printf(" Page size %8d b\n", mtd->writesize); + printf(" OOB size %8d b\n", mtd->oobsize); + printf(" Erase size %8d b\n", mtd->erasesize); + printf(" ecc strength %8d bits\n", mtd->ecc_strength); + printf(" ecc step size %8d b\n", mtd->ecc_step_size); + printf(" subpagesize %8d b\n", chip->subpagesize); + printf(" options 0x%08x\n", chip->options); + printf(" bbt options 0x%08x\n", chip->bbt_options); /* Set geometry info */ env_set_hex("nand_writesize", mtd->writesize);