public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] Change ECC algorithm from userspace
@ 2011-10-28  9:42 Javier Martinez Canillas
  2011-10-28 10:30 ` Matthieu CASTET
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Javier Martinez Canillas @ 2011-10-28  9:42 UTC (permalink / raw)
  To: linux-mtd, linux-omap; +Cc: Enric Balletbo i Serra

Hello,

We've a custom board using an ARM OMAP DM3730 whose ROM boot loader
only supports 1-bit ECC correction using Hamming algorithm.

So, in order to be able to boot from the NAND, we have to configure
the GPMC (OMAP's memory controller that interfaces with NAND devices)
to use 1-bit HW ECC and write the loader binary to the first NAND
sector. That way the ROM boot will take this sector as valid and load
the loader binary to RAM.

The problem is that the SLC NAND device that we are using has a
minimum required ECC of 4-bit correction per each 512 bytes.

I want to be able to use 1-bit ECC for the first partition where I
save the loader binary and has to be accessed by the ROM boot but use
a 4-bit ECC for my rootfs partition.

Does anyone have this same issue?

What is the best approach to store data in a NAND device using
different ECC techniques?

I've think of two approaches:

1- Adding an ioctl to mtdchar (something like ECCSETBITS) to change
the ECC technique used.
2- Use a platform data field to notify the omap2 nand driver that the
ROM boot only supports 1-bit ECC. So it can use a 1-bit ECC to write
and read the first 4 sectors but a 4-bit ECC for the rest.

Of course both approaches can only be used if the none of the nand
memory partitions are mounted.

Thank you and best regards,

-- 
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-11-01 10:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-28  9:42 [RFC] Change ECC algorithm from userspace Javier Martinez Canillas
2011-10-28 10:30 ` Matthieu CASTET
2011-10-28 11:10   ` Javier Martinez Canillas
2011-10-28 11:51     ` Matthieu CASTET
2011-10-28 12:00       ` Javier Martinez Canillas
2011-10-31  9:02   ` Florian Fainelli
2011-10-28 10:33 ` Jon Povey
2011-10-28 10:40   ` Matthieu CASTET
2011-10-28 11:13   ` Javier Martinez Canillas
2011-11-01  4:18     ` DaVinci NAND writing utility release, was: " Jon Povey
2011-11-01 10:34       ` Javier Martinez Canillas
2011-10-31  8:04   ` Ricard Wanderlof
2011-10-28 10:43 ` Atlant Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox