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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24431C6FA86 for ; Thu, 22 Sep 2022 13:39:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0387584CF4; Thu, 22 Sep 2022 15:39:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="p1Cx5mes"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5018C84CF2; Thu, 22 Sep 2022 15:39:42 +0200 (CEST) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1E1CE84839 for ; Thu, 22 Sep 2022 15:39:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@amarulasolutions.com Received: by mail-ej1-x62c.google.com with SMTP id lc7so21299087ejb.0 for ; Thu, 22 Sep 2022 06:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=11kTXmCvyeo4l1vrZ/wlZX81Ipt6YUsY9sIrDkwvVPY=; b=p1Cx5mesWABZqLihAvqSh/DaCzbD7EB7B5QSpKMMWU2UmXAKhgfCqmEwdcZmJUhtRe EiRnejsm1xkLjPTmB1iZ+63ojSf4VO/R1xhF6vRfnRHs3C6HK471JTW0pLacbRPnqCKF x8TlGK5n4WYVfUggN1Zo4dK412e99xBkJAIMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=11kTXmCvyeo4l1vrZ/wlZX81Ipt6YUsY9sIrDkwvVPY=; b=koinAu+6YtySBJkEERQQNWBlnpLp6t7CkJTNMy0jRuTAJMzt5mY0DXz/Aa4WuoUrYC EncLel2x9Foyv2HEVimJwkgttXQCkCemuN3dmxIrO+FDiCcJh9l9ehWCm32guwIdgK1X VOHLMgq+mROQ0QrdApmYruW/y+8Mi1Al7TF9RBQ8rzZyCMROajQ56sZjUWIKYHpkOoDR Pua7AYwjiXoG5D1PvIEJPLtjy+xOmPgBhhjuQlM+0EFomREDr0LEgTxJ9XRSKuOHZDis ZoJJnFhK+MDiKHyE49rDgip+SyRwwnzoB6YZQ5m5IOGMHgYE423D/1Tu5h1j7lb/4w+E TxVg== X-Gm-Message-State: ACrzQf13ke8/tEFMRcN/Q11G320VZEWGrMov/SSP2L6ofX1SNOLzkLfw bZZsRCZ+dy3VDEw8KCwi5kkX4qhWRdUNxg== X-Google-Smtp-Source: AMsMyM4MY8J1wSB36mmxMDApXI2aV62ovn8gTrZz3CN8HPrin2xhcXqmcP+S28C/kruWVDBwjvxenA== 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 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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 --- 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); -- 2.34.1