mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Raphaël Poggi" <poggi.raph@gmail.com>
To: barebox@lists.infradead.org
Cc: "Raphaël Poggi" <poggi.raph@gmail.com>
Subject: [PATCH 3/5] mtd: atmel_nand: retrieve ecc_mode from pdata
Date: Tue,  5 Aug 2014 11:14:47 +0200	[thread overview]
Message-ID: <1407230089-26948-4-git-send-email-poggi.raph@gmail.com> (raw)
In-Reply-To: <1407230089-26948-1-git-send-email-poggi.raph@gmail.com>

By retrieving the ecc_mode from pdata we can use the same code for device tree and
non device tree probing. Which was not possible before, because ecc_mode was arbitrarily set to
NAND_ECC_SOFT.

Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
---
 drivers/mtd/nand/atmel_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 3ec6450..780d266 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1157,7 +1157,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
 		}
 	}
 
-	nand_chip->ecc.mode = NAND_ECC_SOFT;
+	nand_chip->ecc.mode = pdata->ecc_mode;
 
 	if (IS_ENABLED(CONFIG_NAND_ECC_HW) &&
 	    pdata->ecc_mode == NAND_ECC_HW) {
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-08-05  9:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05  9:14 [PATCH v2 0/5] Add device tree support of Atmel NAND driver Raphaël Poggi
2014-08-05  9:14 ` [PATCH 1/5] mtd: nand: remove NAND_ATMEL_PMECC Raphaël Poggi
2014-08-06  4:08   ` Jean-Christophe PLAGNIOL-VILLARD
2014-08-06  7:21     ` Raphaël Poggi
2014-09-01  9:49       ` Sascha Hauer
2014-08-05  9:14 ` [PATCH 2/5] board: atmel: initialise the has_pmecc member Raphaël Poggi
2014-08-05  9:14 ` Raphaël Poggi [this message]
2014-08-05  9:14 ` [PATCH 4/5] board: atmel: initialise ecc_mode Raphaël Poggi
2014-09-01  9:54   ` Sascha Hauer
2014-08-05  9:14 ` [PATCH 5/5] mtd: atmel_nand: add support for device tree Raphaël Poggi
2014-08-05  9:40 ` [PATCH v2 0/5] Add device tree support of Atmel NAND driver Raphaël Poggi

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=1407230089-26948-4-git-send-email-poggi.raph@gmail.com \
    --to=poggi.raph@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox