9
0
Fork 0
Commit Graph

30 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 d155610821 mtd: introduce ecc strength
This introduces the ecc stength fields in the structures and fills
them in, but leaves them unused right now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:14:08 +02:00
Jan Luebbe 973176d20b mtd: update NAND manufacturer names from the kernel
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 10:44:09 +02:00
Sascha Hauer 3cbe9b9ae9 mtd: nand: replace NAND_USE_FLASH_BBT with NAND_BBT_USE_FLASH
To sync with the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 11:00:33 +01:00
Sascha Hauer 611092251b mtd nand: introduce bbm.h
This file is present in current kernels. In order to get closer
to current mtd support introduce it for barebox aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 11:00:33 +01:00
Sascha Hauer 5b85daacc6 mtd: nand: register nand flashes with nand specific function
This allows us to have some NAND specific stuff during registration,
like for example adding NAND specific device parameters.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 11:00:00 +01:00
Sascha Hauer 85f4fe32cf mtd nand: implement buswidth detection
This introduces a new NAND_BUSWIDTH_AUTO flag which can be used
to automatically detect the nand buswidth. The id is always read
in 8bit mode. An additional callback is needed to switch the nand
controller into 16bit mode.
This currently depends on a safe read_byte (always) and read_buf
(for onfi-only flashes) callback. It has been tested on OMAP, but
is not something that generally works. For this reason the existence
of the set_buswidth callback is used to determine whether we are
able to do autodetection or not.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 19:32:07 +02:00
Eric Bénard 4b23222c4d nand_base: add ONFI flash detection
the code is taken from linux & u-boot implementations
Validated on an i.MX53 which gives the following log :
ONFI flash detected ... ONFI param page 0 valid
NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron MT29F8G08ABABAWP), page size: 4096, OOB size: 224

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-05 20:58:54 +02:00
Antony Pavlov f9b932fed9 fix typo funtion -> function
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 22:00:54 +02:00
Baruch Siach c470225100 mtd/nand: increase page and oob size limits
Sync these limits with the Linux kernel. This allows support for NAND devices
with page size of 4k.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-18 08:29:21 +01:00
Marek Belisko 5c495ce5e5 nand_s3c2410: Fix sparse warnings.
Patch fix following sparse warnings:
drivers/mtd/nand/nand_s3c2410.c:125:9:
warning: incorrect type in argument 1 (different base types)
	expected void const volatile [noderef] <asn:2>*<noident>
	got unsigned long

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-19 09:35:09 +01:00
Marek Belisko dbd3613394 mtd: Fix sparse warning.
Patch fix following sparse warning:
drivers/mtd/nand/nand_base.c:123:16:
warning: incorrect type in argument 1 (different address spaces)
	expected void const volatile [noderef] <asn:2>*<noident>
	got void *IO_ADDR_R

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-19 09:35:04 +01:00
Juergen Beisert dac84c7b9d documentation updates
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 11:32:02 +01:00
Sascha Hauer d9af366450 NAND: Add updated NAND support from Kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:14 +02:00
sascha 3f90fc9d3e NAND support work in progress 2007-10-20 01:13:46 +02:00
Sascha Hauer 616cf2b45a NAND WIP 2007-10-15 17:22:25 +02:00
Sascha Hauer 162484b83c svn_rev_003
remove all #if 0 and #if 1
2007-07-05 18:01:13 +02:00
Wolfgang Denk b9365a26a1 Code cleanup 2006-07-21 11:56:05 +02:00
Wolfgang Denk bfc81252c0 Minor code cleanup 2006-03-06 13:03:37 +01:00
Bartlomiej Sieka addb2e1650 Re-factoring the legacy NAND code (legacy NAND now only in board-specific
code and in SoC code). Boards using the old way have CFG_NAND_LEGACY and
BOARDLIBS = drivers/nand_legacy/libnand_legacy.a added. Build breakage for
NETTA.ERR and NETTA_ISDN - will go away when the new NAND support is
implemented for these boards.
2006-03-05 18:57:33 +01:00
Bartlomiej Sieka 038ccac511 Merge with /home/wd/git/u-boot/testing-NAND/ to add new NAND handling. 2006-02-24 09:37:22 +01:00
Wolfgang Denk ac7eb8a315 Update of new NAND code
Patch by Ladislav Michl, 13 Sep 2005
2005-09-14 23:53:32 +02:00
Wolfgang Denk 932394ac43 Rewrite of NAND code based on what is in 2.6.12 Linux kernel
Patch by Ladislav Michl, 29 Jun 2005
2005-08-17 12:55:25 +02:00
wdenk 384cc68744 Patches by Josef Wagner, 29 Oct 2004:
- Add support for MicroSys CPU87 board
- Add support for MicroSys PM854 board
2005-04-03 22:35:21 +00:00
wdenk a43278a43d * Patch by Gary Jennejohn, 11 Sep 2003:
- allow for longer timeouts for USB mass storage devices

* Patch by Denis Peter, 11 Sep 2003:
  - fix USB data pointer assignment for bulk only transfer.
  - prevent to display erased directories in FAT filesystem.

* Change output format for NAND flash - make it look like for other
  memory, too
2003-09-11 19:48:06 +00:00
wdenk 1f4bb37d6b * Patch by Scott McNutt, 21 Jul 2003:
Add support for LynuxWorks Kernel Downloadable Images (KDIs).
  Both LynxOS and BlueCat linux KDIs are supported.

* Patch by Richard Woodruff, 25 Jul 2003:
  use more reliable reset for OMAP/925T

* Patch by Nye Liu, 25 Jul 2003:
  fix typo in mpc8xx.h

* Patch by Richard Woodruff, 24 Jul 2003:
  Fixes for cmd_nand.c:
  - Fixed null dereferece which could result in incorrect ECC values.
  - Added support for devices with no Ready/Busy signal hooked up.
  - Added OMAP1510 read/write protect handling.
  - Fixed nand.h's ECCPOS. A conflict existed with POS5 and badblock
    for non-JFFS2.
  - Switched default ECC to be JFFS2.
2003-07-27 00:21:01 +00:00
wdenk 8bde7f776c * Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
  - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
  - major rework of command structure
    (work done mostly by Michal Cendrowski and Joakim Kristiansen)
2003-06-27 21:31:46 +00:00
wdenk 7a8e9bed17 * Patch by Marc Singer, 29 May 2003:
Fixed rarp boot method for IA32 and other little-endian CPUs.

* Patch by Marc Singer, 28 May 2003:
  Added port I/O commands.

* Patch by Matthew McClintock, 28 May 2003
  - cpu/mpc824x/start.S: fix relocation code when booting from RAM
  - minor patches for utx8245

* Patch by Daniel Engstrm, 28 May 2003:
  x86 update

* Patch by Dave Ellis, 9 May 2003 + 27 May 2003:
  add nand flash support to SXNI855T configuration
  fix/extend nand flash support:
  - fix 'nand erase' command so does not erase bad blocks
  - fix 'nand write' command so does not write to bad blocks
  - fix nand_probe() so handles no flash detected properly
  - add doc/README.nand
  - add .jffs2 and .oob options to nand read/write
  - add 'nand bad' command to list bad blocks
  - add 'clean' option to 'nand erase' to write JFFS2 clean markers
  - make NAND read/write faster

* Patch by Rune Torgersen, 23 May 2003:
  Update for MPC8266ADS board
2003-05-31 18:35:21 +00:00
wdenk dc7c9a1a52 * Patch by Rick Bronson, 16 Mar 2003:
Add support for Atmel AT91RM9200DK w/NAND

* Patches by Robert Schwebel, 19 Mar 2003:
  - use arm-linux-gcc as default compiler for ARM
  - fix i2c fixup code
  - fix missing baudrate setting
  - added $loadaddr / CFG_LOAD_ADDR support to loadb
  - moved "ignoring trailing characters" _before_ u-boot wants to
    print out diagnostics messages; removes bogus characters at the
    end of transmission

* Patch by John Zhan, 18 Mar 2003:
  Add support for SinoVee Microsystems SC8xx boards

* Patch by Rolf Offermanns, 21 Mar 2003:
  ported the dnp1110 related changes from the current armboot cvs to
  current u-boot cvs. smc91111 does not work. problem marked in
  smc91111.c, grep for "FIXME".

* Patch by Brian Auld, 25 Mar 2003:
  Add support for STM flash chips on ebony board

 * Add PCI support for MPC8250 Boards (PM825 module)

 * Patch by Stefan Roese, 25 Mar 2003:
2003-03-26 06:55:25 +00:00
wdenk e221174377 Initial revision 2002-11-02 23:30:20 +00:00