9
0
Fork 0
Commit Graph

22 Commits

Author SHA1 Message Date
Sascha Hauer 66891566cc mtd: nand: update to v3.11-rc1
This updates the NAND stuff to Linux-3.11-rc1. It is synchronized
as best as we can get:

- locks removed
- The splitting in different files we had to better support different
  features has been dropped. Instead this is now done mostly with the
  use of __maybe_unused

Some barebox adjustments are forward ported, like:

- Allow partial page writes
- Optionally allow to erase bad blocks
- check for all_ff before writing a page

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +02:00
Sascha Hauer 545453ddae mtd: nand: Add command to generate a flash BBT
With 2k NAND flashes the data layout in memory is not what is
written on the flash device. This leads to the result that the
factory provided bad block markers are not recognized correctly.

To preserve the factory bad block information the i.MX NAND driver
will not scan for the bad blocks itself when there is no flash based
bbt available, because the mtd layer would do so based on wrong
information. Instead, a new command is introduced which allows to
manually create a flash bbt based on the correct information.

As this command is tightly coupled to mtd and the i.MX NAND driver
the command is placed under drivers/mtd/nand/ instead of commands/
where a command normally belongs to.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-09 20:15:57 +01:00
Sascha Hauer 95423f8af2 ARM boards: Make boards pbl safe
With pbl support enabled most boards need a pbl-y for their lowlevel
stuff.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:22 +02:00
Sascha Hauer 1145c2fb1e mtd: remove dead disk-on-chip support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:28 +02:00
Juergen Beisert b47220d7f7 NAND/Samsung: remove a leftover from architeture clean ups
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2012-07-20 08:41:35 +02:00
Wolfram Sang eb76c8e827 mtd nand: add mxs-nand driver
Based on the U-Boot version. Changed to kernel style register layout, added
MX23 support (WIP!), made MMU aware and adapted to barebox.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-06-30 12:53:36 +02:00
Juergen Beisert b29b8f43d5 MACH SAMSUNG/S3C: Use the correct CPU family name to reflect NAND driver's usage
The aready existing NAND controller driver in Barebox is for the S3C24XX family
only. Change the name of the file to reflect this fact (and free the way to add
more recent Samsung NAND controllers)

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Robert Jarzmik 88ce7ef769 drivers/mtd: transfer NAND notions to MTD core
Change NAND_WRITE into MTD_WRITE.
Change "page_shift" references in the core, which are purely
NAND, into mtd->writesize which is MTD generic.
Rename all "info" (struct mtd_info) into "mtd".

Also provide a parameter to add_mtd_device() so that legacy
nand devices still appear as nand<N>.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Robert Jarzmik 8ccde79470 drivers/mtd: move nand.c into core.c
Move nand core into the global MTD core.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Sascha Hauer 027db60302 nand: move bb handling code to drivers/mtd/nand
It's good to seperate the code which others can use from commands.
This way other users do not depend on the command being compiled in.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:54:56 +02:00
Sascha Hauer 09da8d4bab nand: remove unused nand_util file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:08 +02:00
Sascha Hauer 8dfebf96d7 Merge branch 'nand-pu' into next 2011-04-06 09:21:56 +02:00
Sascha Hauer b672f87cc0 nand: make bbt support optional
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:42:19 +02:00
Sascha Hauer 8f5b0e497a nand: Make different ecc modes optional
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:41:38 +02:00
Sascha Hauer eb133335e6 nand: Make write support optional
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:41:32 +02:00
Sascha Hauer 779ea89baf nand: factor out nand write support
In order to make it optional later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:41:17 +02:00
Sascha Hauer c8e395def8 nand: factor out syndrome support to seperate file
In order to make it optional later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:41:10 +02:00
Sascha Hauer f6647d3c02 nand: factor out software ecc support to seperate file
in order to make it optional later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:41:00 +02:00
Sascha Hauer 535d444788 nand: Factor out hw ecc support to seperate file
In order make hwecc support optional later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:40:32 +02:00
Sascha Hauer 6e7eba2c61 mtd nand omap: Add BCH ecc support
This patch adds BCH ecc support to the omap nand driver. The BCH
error correction allows for up to 8 bit error correction. It is
also needed for booting from nand on omap4.

This is based on code from Sukumar Ghorai <s-ghorai@ti.com>:

[PATCH] omap3: nand: bch ecc support added

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 15:28:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7192259daa nand: driver for Nomadik 8815 SoC
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Andrea GALLO <andrea.gallo@stericsson.com>
Cc: Gael SALLES <gael.salles@stericsson.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-06 19:09:39 +02:00
Sascha Hauer b332d8565d move drivers/nand to drivers/mtd/nand
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 13:00:01 +02:00