All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 4/5] mtd: nand: mxs_nand: report correct ECC parameters
Date: Wed, 11 Apr 2018 18:04:51 +0200	[thread overview]
Message-ID: <20180411160452.2087-5-stefan@agner.ch> (raw)
In-Reply-To: <20180411160452.2087-1-stefan@agner.ch>

From: Stefan Agner <stefan.agner@toradex.com>

Report correct ECC parameters back to the stack. Do not report
bytes as we have it not immeaditly available and the Linux version
also does not report it. It seems to have no aversive effect.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---

Changes in v3: None
Changes in v2:
- Extend the patchset with "report correct ECC parameters" patch

 drivers/mtd/nand/mxs_nand.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index aa4c5a6526..2696b543ef 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -1212,9 +1212,8 @@ void board_nand_init(void)
 
 	nand->ecc.layout	= &fake_ecc_layout;
 	nand->ecc.mode		= NAND_ECC_HW;
-	nand->ecc.bytes		= 9;
-	nand->ecc.size		= 512;
-	nand->ecc.strength	= 8;
+	nand->ecc.size		= nand_info->bch_geometry.ecc_chunk_size;
+	nand->ecc.strength	= nand_info->bch_geometry.ecc_strength;
 
 	/* second phase scan */
 	err = nand_scan_tail(mtd);
-- 
2.17.0

  parent reply	other threads:[~2018-04-11 16:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 16:04 [U-Boot] [PATCH v3 0/5] mtd: nand: mxs_nand: improve ECC support Stefan Agner
2018-04-11 16:04 ` [U-Boot] [PATCH v3 1/5] mtd: nand: mxs_nand: use self init Stefan Agner
2018-04-11 16:04 ` [U-Boot] [PATCH v3 2/5] mtd: nand: mxs_nand: allow to enable BBT support Stefan Agner
2018-04-11 16:04 ` [U-Boot] [PATCH v3 3/5] mtd: nand: mxs_nand: use structure for BCH geometry Stefan Agner
2018-04-11 16:04 ` Stefan Agner [this message]
2018-04-11 16:04 ` [U-Boot] [PATCH v3 5/5] mtd: nand: mxs_nand: add minimal ECC support Stefan Agner
2018-04-27  7:31   ` Stefano Babic
2018-04-30  8:08     ` Stefan Agner
2018-05-30 14:51       ` Stefan Agner
2018-06-21 11:46         ` Stefan Agner
2018-06-21 15:22           ` Tom Rini
2018-06-21 16:39             ` Stefano Babic
2018-06-22  8:46               ` Stefano Babic
2018-06-22 11:36                 ` Stefan Agner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180411160452.2087-5-stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.