Commit Graph

537 Commits

Author SHA1 Message Date
Adrian Hunter 9359ea461b MTD: nandsim: suppress unnecessary warning
nand_base sometimes reads only 2 bytes of a 4 byte id.
It is OK.  Do not print a warning in that case.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:35:19 +00:00
Denis V. Lunev e93f1be503 [MTD] [NAND] fix OOPS accessing flash operations over STM flash on PXA
STM 2Gb flash is a large-page NAND flash.  Set operations accordingly.
This field is dereferenced without a check in several places resulting in
OOPS.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Eric Miao <ymiao3@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-03 10:47:20 +00:00
Russell King c5b84b3bb0 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
Conflicts:

	arch/arm/mach-pxa/pxa25x.c
2008-12-02 22:07:40 +00:00
Julia Lawall d947629891 [MTD] [NAND] drivers/mtd/nand/pasemi_nand.c: Add missing pci_dev_put
pci_get_device increments a reference count that should be decremented
using pci_dev_put.

The semantic patch that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S,S1;
position p1,p2,p3;
expression E,E1;
type T,T1;
expression *ptr != NULL;
@@

(
 if ((x@p1 = pci_get_device(...)) == NULL) S
|
 x@p1 = pci_get_device(...);
)
 ... when != pci_dev_put(...,(T)x,...)
     when != if (...) { <+... pci_dev_put(...,(T)x,...) ...+> }
     when != true x == NULL || ...
     when != x = E
     when != E = (T)x
     when any
(
 if (x == NULL || ...) S1
|
 if@p2 (...) {
  ... when != pci_dev_put(...,(T1)x,...)
      when != if (...) { <+... pci_dev_put(...,(T1)x,...) ...+> }
      when != x = E1
      when != E1 = (T1)x
(
  return \(0\|<+...x...+>\|ptr\);
|
  return@p3 ...;
)
}
)

@ script:python @
p1 << r.p1;
p3 << r.p3;
@@

print "* file: %s pci_get_device: %s return: %s" % (p1[0].file,p1[0].line,p3[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-02 10:45:19 +00:00
Eric Miao afb5b5c9ad [ARM] pxa: explicit #include <mach/dma.h> in various drivers
Where 'pxa_dma_desc' and 'pxa_{request,free}_dma' are referenced.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:26 +08:00
Russell King fba670013d Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2008-11-29 19:35:07 +00:00
Russell King e902be56cb Merge branches 'core' and 'clks' into devel 2008-11-27 12:39:14 +00:00
Russell King e0d8b13ae1 [ARM] pxa: don't pass a consumer clock name for devices with unique clocks
Where devices only have one consumer, passing a consumer clock ID
has no real benefit.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-27 12:38:23 +00:00
Russell King 59f0cb0fdd [ARM] remove memzero()
As suggested by Andrew Morton, remove memzero() - it's not supported
on other architectures so use of it is a potential build breaking bug.
Since the compiler optimizes memset(x,0,n) to __memzero() perfectly
well, we don't miss out on the underlying benefits of memzero().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-27 12:37:59 +00:00
Wolfgang Grandegger 29b65861fb [MTD] [NAND] fsl_upm: fix build problem with 2.6.28-rc2
The patch fixes following build error:

  CC      drivers/mtd/nand/fsl_upm.o
drivers/mtd/nand/fsl_upm.c: In function 'fun_chip_init':
drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 2 of 'of_mtd_parse_partitions' from incompatible pointer type
drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 3 of 'of_mtd_parse_partitions' from incompatible pointer type
drivers/mtd/nand/fsl_upm.c:168: error: too many arguments to function 'of_mtd_parse_partitions'
make[1]: *** [drivers/mtd/nand/fsl_upm.o] Error 1

The breakage was introduced in 69fd3a8d09
("[MTD] remove unused mtd parameter in of_mtd_parse_partitions()").

While at it, also add a check for the of_mtd_parse_partitions() return
value.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-11-27 09:46:13 +00:00
Ben Dooks 7926b5a325 [ARM] S3C: Move nand headers to arch/arm/plat-s3c/include/plat
Move nand headers to arch/arm/plat-s3c/include/plat
ready to clean out the old include directories.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-30 10:17:13 +00:00
Dmitry Baryshkov 6af7a8eb1e [MTD] sharpsl-nand: move registration to board code
Finally move registration of sharpsl-nand device to board-specific code.
sharpsl nand driver is now clean and simple.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
2008-10-29 21:08:37 +03:00
Dmitry Baryshkov a20c7ab570 [MTD] sharpsl-nand: use platform_data for model-specific values
Add platform_data which holds all model-specific values, like badblocks
pattern, oobinfo, partitions.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
2008-10-29 21:06:38 +03:00
Dmitry Baryshkov c176d0ca8b [MTD] sharpsl-nand: cleanup partitions support
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
2008-10-29 21:06:38 +03:00
Dmitry Baryshkov a4e4f29cbe [MTD] sharpsl_nand: move io addr to struct sharpsl_nand
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
2008-10-29 21:06:37 +03:00
Dmitry Baryshkov 2206ef1c5f [MTD] sharpsl_nand: make drvdata non-static
Merge mtd_info and nand_chip info special struct and
make it drvdata instead of plain static variable.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
2008-10-29 21:06:37 +03:00
Dmitry Baryshkov 26615249da [MTD] sharpsl_nand: switch to driver model usage.
Start cleanup of sharpsl_nand driver. Convert it to platform driver.
Corresponding device is temprorary registered in sharpsl.c but will be
later moved to corresponding board files.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
2008-10-29 21:06:37 +03:00
Linus Torvalds 2be508d847 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (69 commits)
  Revert "[MTD] m25p80.c code cleanup"
  [MTD] [NAND] GPIO driver depends on ARM... for now.
  [MTD] [NAND] sh_flctl: fix compile error
  [MTD] [NOR] AT49BV6416 has swapped erase regions
  [MTD] [NAND] GPIO NAND flash driver
  [MTD] cmdlineparts documentation change - explain where mtd-id comes from
  [MTD] cfi_cmdset_0002.c: Add Macronix CFI V1.0 TopBottom detection
  [MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.c
  [JFFS2] Write buffer offset adjustment for NOR-ECC (Sibley) flash
  [MTD] mtdoops: Fix a bug where block may not be erased
  [MTD] mtdoops: Add a magic number to logged kernel oops
  [MTD] mtdoops: Fix an off by one error
  [JFFS2] Correct parameter names of jffs2_compress() in comments
  [MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTL
  [MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly written
  [MTD] [MAPS] Remove unused variable after ROM API cleanup.
  [MTD] m25p80.c extended jedec support (v2)
  [MTD] remove unused mtd parameter in of_mtd_parse_partitions()
  [MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGE
  [MTD] [NAND] driver extension to support NAND on TQM85xx modules
  ...
2008-10-20 09:03:12 -07:00
David Woodhouse 7d28e0d1e5 [MTD] [NAND] GPIO driver depends on ARM... for now.
Not all architectures provide readsb(). We should probably move to using
ioread8_rep() instead.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-20 09:24:43 +01:00
Yoshihiro Shimoda 35a347991c [MTD] [NAND] sh_flctl: fix compile error
Fix compile error because the first patch was broken -- the file got
truncated.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-20 09:23:19 +01:00
Mike Rapoport aaf7ea2000 [MTD] [NAND] GPIO NAND flash driver
The patch adds support for NAND flashes connected to GPIOs.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-18 12:48:42 +01:00
Manish Katiyar 6b8520296d [MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.c
Below patch fixes the following compilation warnings.
drivers/mtd/nand/cs553x_nand.c:293: warning: unused variable 'mtd_parts'
drivers/mtd/nand/cs553x_nand.c:292: warning: unused variable 'mtd_parts_nb'

Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-18 12:39:17 +01:00
Greg Kroah-Hartman b887265c16 USB: remove info() macro from usb mtd drivers
USB should not be having it's own printk macros, so remove info() and
use the system-wide standard of dev_info() wherever possible.

Acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17 14:41:10 -07:00
David Brownell 93a22f8b95 omap drivers: switch to standard GPIO calls
This updates most of the OMAP drivers which are in mainline to switch to
using the cross-platform GPIO calls instead of the older OMAP-specific
ones.

This is all fairly brainless/obvious stuff.  Probably the most interesting
bit is to observe that the omap-keypad code seems to now have a portable
core that could work with non-OMAP matrix keypads.  (That would improve
with hardware IRQ debouncing enabled, of course...)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 11:21:40 -07:00
Yoshihiro Shimoda 6028aa01f7 [MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTL
Several Renesas SuperH CPU has FLCTL. The FLCTL support NAND Flash.
This driver support SH7723.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-14 13:33:05 +01:00
Richard Genoud 3fc2389847 [MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly written
The functions that write the OOB info (on hardware ECC only) use the 
HW_SYNDROME method.

This is not correct : the start position is "pos = eccsize + chunk" and 
should be eccsize. So, the standard (nand_write_oob_std) function should 
be used. This patch corrects this by using NAND_ECC_HW instead of 
NAND_ECC_HW_SYNDROME.

This has only been tested on small pages nand flash.
(if anyone can test it on large pages that would be great).

kernel version : 2.6.27-rc2 (current git mtd-2.6)

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-14 11:07:57 +01:00
David Woodhouse e758936e02 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	include/asm-x86/statfs.h
2008-10-13 17:13:56 +01:00
Sebastian Andrzej Siewior 69fd3a8d09 [MTD] remove unused mtd parameter in of_mtd_parse_partitions()
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-13 15:01:42 +01:00
Kumar Gala 52551beb05 [MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGE
Removed the Kconfig associated with 'NDFC NanD Flash Controller'.
We can't enable !CONFIG_PPC_MERGE so there is no way to enable
this.  Additionally the code needs to get updated for arch/powerpc.

For the time being lets just remove the Kconfig option so we can
actually remove CONFIG_PPC_MERGE.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-10 07:39:29 +01:00
Wolfgang Grandegger 13f5369704 [MTD] [NAND] driver extension to support NAND on TQM85xx modules
This patch extends the FSL UPM NAND driver from Anton Vorontsov to
support hardware which does not have the R/B pin of the NAND chip
connected, like the TQM8548 module:

- The OF_GPIO dependency has been removed from the Kconfig option
  because GPIO is not needed. The relevant gpio_* function are then
  stubbed out in <linux/gpio.h>.

- It re-introduces the chip-delay property to define an appropriate
  maximum delay time (tR) required for read operations. The binding
  will be documented in a separate patch.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-10 07:29:00 +01:00
Anton Vorontsov 95ebffd749 [MTD] [NAND] fsl_upm: update driver for the new OF bindings
- Get rid of fsl,wait-pattern and fsl,wait-write. I think this isn't
  chip-specific, and we should always do waits. I saw one board that
  didn't need fsl,wait-pattern, but I assume this was the exception
  that proves the rule;
- Get rid of chip-delay. Today there are no users for this, and if
  anyone really need this they should push the OF bindings beforehand;
- Now flash chips should be child nodes of the FSL UPM NAND controller;
- Implement OF partition parsing.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-10 07:24:05 +01:00
Russell King 3f30a09a61 Merge branch 'pxa-all' into devel
Conflicts:

	arch/arm/mach-pxa/Kconfig
	arch/arm/mach-pxa/corgi.c
	arch/arm/mach-pxa/include/mach/hardware.h
	arch/arm/mach-pxa/spitz.c
2008-10-09 21:33:02 +01:00
Russell King 35437b6192 Merge branches 'metronomefb', 'pxa-cm2xx', 'pxa-gumstix', 'pxa-misc', 'pxa-mitac', 'pxa-mp900', 'pxa-zylonite' and 'pxa-zaurus' into pxa-machines
Conflicts:

	arch/arm/mach-pxa/poodle.c
2008-10-07 19:06:22 +01:00
Mike Rapoport a7f3f0309b [ARM] 5282/1: pxa: add CM-X255 support
Signed-off-by: Russ Dill <russ.dill@gmail.com>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-07 12:05:07 +01:00
Andrew Victor 3d73e89328 [ARM] 5265/3: [AT91] Add copyright info
Add copyright information for some of the AT91 header files.

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-21 23:01:18 +01:00
Karl Beldan ef89a88013 [MTD] [NAND] nand_base.c: reset chip first
Some chips require a RESET after power-up (e.g. Micron MT29FxGxxxxx).
The first command sent is NAND_CMD_READID.
Issue a NAND_CMD_RESET in nand_scan_ident before reading the device id.
Tested with an MT29F4G08AAC.

Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-16 08:18:12 -07:00
Dmitry Baryshkov 076c7f4c6c [MTD] [NAND] tmio_nand: fix base address programming
Fix offset of second word used for programming base address of memory
window. Also program tmio with offset of the FCR, not with physical
memory location.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-05 15:34:35 +01:00
David Woodhouse 514fca4373 [MTD] [NAND] Define and use PCI_DEVICE_ID_MARVELL_88ALP01_NAND for CAFÉ
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-04 09:45:38 +01:00
Sascha Hauer 34f6e15786 [MTD] [NAND] Freescale i.MX2 NAND driver
This patch adds support for the integrated NAND flash controller of the
i.MX2 and i.MX3 family. It is tested on MX27 but should work on MX3
aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-02 22:35:36 +01:00
Enrico Scholz 2675e9447b [MTD] [NAND] pxa3xx_nand: added warning which tells id of detected NAND
Minor patch to help debugging of NAND detection.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01 21:38:44 +01:00
Enrico Scholz c8c17c888d [MTD] [NAND] pxa3xx_nand: moved some helper variables out from platform data
This patch moves some attributes out from the platform data into the
dynamically created nand device.   This results into a cleaner interface
and allows to use constant pxa3xx_nand_flash definitions.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01 21:38:34 +01:00
Enrico Scholz 7dad482ed0 [MTD] [NAND] pxa3xx_nand: added some 'const' annotations to the exported API
This patch marks some attributes as 'const' which are set only once and
never be modified by the driver.  There are some changes in parameter
list and variable declarations too which mark them as 'const'.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01 21:37:51 +01:00
Enrico Scholz 80ebf20f34 [MTD] [NAND] pxa3xx_nand: allow to disable builtin flash-type table
This patch adds a MTD_NAND_PXA3xx_BUILTIN configuration variables which
allows to disable usage of builtin flash-type table.  Not enabling this
option saves some space in the generated driver.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01 21:37:39 +01:00
Enrico Scholz c8ac3f818e [MTD] [NAND] pxa3xx_nand: allow to define flash types in the platform data
This patch adds 'flash' and 'num_flash' attributes to the platform data.
There was added code in the driver to iterate across these attributes in the
detect-flash routine.  This is done similarly to the existing method
which uses a 'builtin_flash_types' field.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01 21:31:34 +01:00
Enrico Scholz 43035338ad [MTD] [NAND] pxa3xx_nand: moved nand definitions into shared platform header
This patch moves the exported datastructures from the pxa3xx_nand.c driver
into the <mach/pxa3xx_nand.h> header. This is a plain movement without
any modification of the attributes.

This is the first one of a set of patches which:

 * allows to specify used NAND flash in the platform code and allows to turn
   off the old way to specify NAND characteristics in the driver.  This way did
   not worked well as these characteristics depend on the platform and can not be
   derived from NAND id alone.

   E.g.  some NAND chips share the same ID (e.g.  K9K8G08U0A and K9NBG08U5A) but
   have different timings (which are written in the common driver currently and
   must be modified there).

 * adds 'const' annotations at various places

Further patches will be sent to the mtd-list.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01 21:27:32 +01:00
Semun Lee 4262bd2981 [MTD] [NAND] pxa3xx_nand_flash: Add definition of STM2GbX16 NAND flashes
Signed-off-by: Semun Lee <semun.lee@samsung.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01 11:49:27 +01:00
David Woodhouse 9d7548d4ca Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-09-01 11:32:13 +01:00
Singh, Vimal d68156cfad [MTD] [NAND] nand_ecc.c: adding support for 512 byte ecc
Support 512 byte ECC calculation

[FM: updated two comments]

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-25 12:23:36 +01:00
Huang Weiyi dffc8d6654 [MTD] [NAND] au1550nd.c: remove unused #include <version.h>
It doesn't use LINUX_VERSION_CODE nor KERNEL_VERSION.

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-25 12:20:53 +01:00
Adrian Bunk 7a8fc9b248 removed unused #include <linux/version.h>'s
This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-23 12:14:12 -07:00
Alexey Korolev 17c1d2be28 [MTD] [NAND] Fix missing kernel-doc
[Reported by Randy Dunlap]

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-20 22:35:40 +01:00
frans 1077be58ad [MTD] [NAND] nand_ecc.c: fix big endian, strengthen test, add printk
This patch for nand_ecc.c fixes three issues

- fix code so it also works on big endian architectures
- added a printk in case of an uncorrectable ecc error
- strengthen the test for correctable errors (decreasing the chance
  that multiple bit faults by accident will be seen as correctable)

Note: the big endian code is only tested in a testbed (running on big endian
hardware) as I cannot rebuild and test a big endian kernel at the moment.
However the only thing that can go wrong is if <asm/byteorder.h> does not
give __BIG_ENDIAN in that case. In my eyes very unlikely.

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-20 20:58:56 +01:00
Linus Torvalds 9c0d2a20fe Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (38 commits)
  [ARM] 5191/1: ARM: remove CVS keywords
  [ARM] pxafb: fix the warning of incorrect lccr when lcd_conn is specified
  [ARM] pxafb: add flag to specify output format on LDD pins when base is RGBT16
  [ARM] pxafb: fix the incorrect configuration of GPIO77 as ACBIAS for TFT LCD
  [ARM] 5198/1: PalmTX: PCMCIA fixes
  [ARM] Fix a pile of broken watchdog drivers
  [ARM] update mach-types
  [ARM] 5196/1: fix inline asm constraints for preload
  [ARM] 5194/1: update .gitignore
  [ARM] add proc-macros.S include to proc-arm940 and proc-arm946
  [ARM] 5192/1: ARM TLB: add v7wbi_{possible,always}_flags to {possible,always}_tlb_flags
  [ARM] 5193/1: Wire up missing syscalls
  [ARM] traps: don't call undef hook functions with spinlock held
  [ARM] 5183/2: Provide Poodle LoCoMo GPIO names
  [ARM] dma-mapping: provide sync_range APIs
  [ARM] dma-mapping: improve type-safeness of DMA translations
  [ARM] Kirkwood: instantiate the orion_spi driver in the platform code
  [ARM] prevent crashing when too much RAM installed
  [ARM] Kirkwood: Instantiate mv_xor driver
  [ARM] Orion: Instantiate mv_xor driver for 5182
  ...
2008-08-16 16:48:45 -07:00
David Woodhouse ccbcd6cba5 [MTD] [NAND] Minor cleanup of nand_ecc.c
Make the standalone stuff a little cleaner, fix some checkpatch warnings.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-16 11:01:31 +01:00
frans e6cf5df183 [MTD] [NAND] nand_ecc.c: rewrite for improved performance
This patch improves the performance of the ecc generation code by a 
factor of 18 on an INTEL D920 CPU, a factor of 7 on MIPS and a factor of 5 
on ARM (NSLU2)

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-16 10:55:33 +01:00
David Woodhouse 742c52533b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	include/asm-arm/arch-omap/onenand.h
2008-08-12 11:28:00 +01:00
Adrian Hunter bb0eb217c9 [MTD] Define and use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-12 11:02:15 +01:00
Huang Weiyi d483492cb5 [MTD] [NAND] drivers/mtd/nand/nandsim.c: remove duplicated #include
Removed duplicated include <asm/div64.h> in
drivers/mtd/nand/nandsim.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-11 17:31:32 +01:00
Samuel Ortiz 1c2c30acc5 mfd: have TMIO drivers and subdevices depend on ARM
The TMIO chips are only found (and thus tested) on ARM machines.
Moreover, we don't want the TMIO cells to be built if one of the TMIO
driver is not selected (which indirectly make the TMIO cells drivers
depend on ARM as well).

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-08-10 23:30:34 +02:00
Ian Molton ec43b8161b mfd: driver for the TMIO NAND controller
This patch adds support for the NAND controller commonly found in
TMIO based MFDs.

Signed-off-by: Ian Molton <spyro@f2s.com>
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-08-10 23:30:09 +02:00
Lennert Buytenhek 6f088f1d21 [ARM] Move include/asm-arm/plat-orion to arch/arm/plat-orion/include/plat
This patch performs the equivalent include directory shuffle for
plat-orion, and fixes up all users.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-09 13:44:58 +02:00
Russell King a09e64fbc0 [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:55:48 +01:00
Russell King 4fb8af10d0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes 2008-08-07 09:55:03 +01:00
Russell King be50972935 [ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:40:08 +01:00
David Woodhouse 16e00b609a [MTD] Remove references to TI 'toto' platform.
This was a reference board for which support never got merged upstream.
Kill it off, at rmk's suggestion.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-04 11:30:07 +01:00
Andrew Morton e4c094a595 [MTD] [NAND] drivers/mtd/nand/nandsim.c: fix printk warnings
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:44:42 +01:00
Bryan Wu 4f0ca70e52 [MTD] [NAND] Blackfin NFC Driver: Cleanup the error exit path of bf5xx_nand_probe function
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:44:22 +01:00
Mike Frysinger 0ee002b041 [MTD] [NAND] Blackfin NFC Driver: use standard dev_err() rather than printk()
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:43:53 +01:00
Mike Frysinger a0dd20184b [MTD] [NAND] Blackfin NFC Driver: enable Blackfin nand HWECC support by default
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:43:33 +01:00
Mike Frysinger 2445af3853 [MTD] [NAND] Blackfin NFC Driver: add proper devinit/devexit markings to probe/remove functions
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:43:14 +01:00
Mike Frysinger fcb90ba7e9 [MTD] [NAND] Blackfin NFC Driver: add support for the ECC layout the Blackfin bootrom uses
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:42:55 +01:00
Mike Frysinger cf840392e8 [MTD] [NAND] Blackfin NFC Driver: fix bug - hw ecc calc by making sure we extract 11 bits from each register instead of 10
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:40:42 +01:00
Mike Frysinger e274f025e2 [MTD] [NAND] Blackfin NFC Driver: fix bug - do not clobber the status from the first 256 bytes if operating on 512 pages
Singed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:40:21 +01:00
Harvey Harrison 963724462a [MTD] [NAND] diskonchip.c fix sparse endian warnings
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:34:16 +01:00
Andrew Morton fc1f397b2c [MTD] [NAND] drivers/mtd/nand/nandsim.c needs div64.h
drivers/mtd/nand/nandsim.c: In function 'divide':
drivers/mtd/nand/nandsim.c:462: error: implicit declaration of function 'do_div'

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01 15:33:32 +01:00
akpm@linux-foundation.org 650da9d0b7 [MTD] [NAND] fsl_elbc_nand.c: fix printk warning
drivers/mtd/nand/fsl_elbc_nand.c:890: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-30 12:02:34 +01:00
Artem Bityutskiy 74216be41a [MTD] [NAND] nandsim: support random page read command
Commit 3d45955962 ("subpage read feature
as a way to improve performance") broke nandsim because nandsim does not
support the "random page read" NAND command. This patch adds
corresponding support.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-30 12:01:03 +01:00
Alexey Korolev 3d45955962 [MTD] [NAND] subpage read feature as a way to increase performance.
This patch enables NAND subpage read functionality.
If upper layer drivers are requesting to read non page aligned data NAND
subpage-read functionality reads the only whose ECC regions which include
requested data when original code reads whole page.
This significantly improves performance in many cases.

Here are some digits :

UBI volume mount time
No subpage reads: 5.75 seconds
Subpage read patch: 2.42 seconds

Open/stat time for files on JFFS2 volume:
No subpage read  0m 5.36s
Subpage read     0m 2.88s

Signed-off-by Alexey Korolev <akorolev@infradead.org>
Acked-by: Artem Bityutskiy <dedekind@infradead.org>
Acked-by: Jörn Engel <joern@logfs.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-25 10:49:50 -04:00
David Woodhouse ff877ea80e Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 2008-07-25 10:40:14 -04:00
Ben Dooks 30821fee4f CPUFREQ: S3C24XX NAND driver frequency scaling support.
Add support for CPU frequency scalling to the S3C24XX NAND driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-25 10:10:21 -04:00
Yoichi Yuasa ee39a0e61b [MTD][NAND] au1550nd: remove unused variable
Remove unused variable from au1550 NAND driver.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-25 10:03:35 -04:00
Anton Vorontsov 55679df30d [MTD] [NAND] fsl_elbc_nand: fix section mismatch with CONFIG_MTD_OF_PARTS=y
With CONFIG_MTD_OF_PARTS=y I'm getting this new section mismatch in reference
from the function fsl_elbc_chip_probe() to the function
.devinit.text:of_mtd_parse_partitions()

This patch fixes the mismatch by providing __devinit annotation to the
fsl_elbc_chip_probe() function.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-By: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-25 09:43:54 -04:00
Russell King 044e5f45e4 Merge branch 'pxa' into devel
Conflicts:

	arch/arm/configs/em_x270_defconfig
	arch/arm/configs/xm_x270_defconfig
2008-07-13 12:05:49 +01:00
Russell King a9da4f7ed6 Merge branches 'pxa-ian' and 'pxa-xm270' into pxa
Conflicts:

	MAINTAINERS
2008-07-12 21:42:04 +01:00
Milton Miller f63af11ddb [MTD] [NAND] remove __PPC__ hardcoded address from DiskOnChip drivers
Such a hardcoded address can cause a checkstop or machine check if
the driver is in the kernel but the address is not acknowledged.

Both drivers allow an address to be specified as either a module
parameter or config option.   Any future powerpc board should either
use one of these methods or find the address in the device tree.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11 18:21:54 +01:00
Anton Vorontsov 0acf944c68 [MTD] [NAND] fsl_elbc_nand: ecclayout cleanups
This patch deletes oobavail assignments, they're calculated by the nand
core code in nand_scan_tail, plus current oobavail values are wrong for
the LP NANDs.

Also remove mtd->ecclayout and mtd->oobavail assignments, mtd core
handles this all by itself.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11 18:17:51 +01:00
Anton Vorontsov ec6e0ea3bd [MTD] [NAND] fsl_elbc_nand: implement support for flash-based BBT
This patch implements support for flash-based BBT for chips working
through ELBC NAND controller, so that NAND core will not have to re-scan
for bad blocks on every boot.

Because ELBC controller may provide HW-generated ECCs we should adjust
bbt pattern and bbt version positions in the OOB free area.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11 18:16:16 +01:00
Anton Vorontsov 452db27243 [MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chips
For large page chips, nand_bbt is looking into OOB area, and checking
for "0xff 0xff" pattern at OOB offset 0. That is, two bytes should be
reserved for bbt means.

But ELBC driver is specifying ecclayout so that oobfree area starts at
offset 1, so only one byte left for the bbt purposes.

This causes problems with any OOB users, namely JFFS2: after first mount
JFFS2 will fill all OOBs with "erased marker", so OOBs will contain:

  OOB Data: ff 19 85 20 03 00 ff ff ff 00 00 08 ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

And on the next boot, NAND core will rescan for bad blocks, then will
see "0xff 0x19" pattern, and will mark all blocks as bad ones.

To fix the issue we should implement our own bad block pattern: just one
byte at OOB start. Though, this will work only for x8 chips. For x16
chips two bytes must be checked. Since ELBC driver does not support x16
NANDs (yet), we're safe for now.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11 18:12:01 +01:00
David Brownell bd5a43822b [MTD] [NAND] atmel_nand can be modular
There's no reason to prevent the Atmel NAND driver from
building as a module.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11 14:52:54 +01:00
Haavard Skinnemoen d6248fddf7 [MTD] [NAND] atmel_nand: Work around AT32AP7000 ECC erratum
The ALE signal isn't correctly wired up to the ECC controller on the
AP7000, so it starts calculating ECC during the address cycles.

Work around this by resetting the ECC controller between the address and
data cycles.

Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11 14:52:02 +01:00
David Brownell 23a346ca4a [MTD] [NAND] atmel_nand speedup via {read,write}s{b,w}()
This uses __raw_{read,write}s{b,w}() primitives to access data on NAND
chips for more efficient I/O.

On an arm926 with memory clocked at 100 MHz, this reduced the elapsed time
for a 64 MiB read by 16%.  ("dd" /dev/mtd0 to /dev/null, with an 8-bit
NAND using hardware ECC and 128KiB blocksize.)

Also some minor section tweaks:

  - Use platform_driver_probe() so no pointer to probe() lingers
    after that code has been removed at run-time.

  - Use __exit and __exit_p so the remove() code will normally be
    removed by the linker.

Since these buffer read/write calls are new, this increases the runtime
code footprint (by 88 bytes on my build, after the section tweaks).

[haavard.skinnemoen@atmel.com: rebase onto atmel_nand rename]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11 14:51:21 +01:00
David Woodhouse a8931ef380 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-11 14:36:25 +01:00
Mike Rapoport 70eb33d67a [ARM] 5105/1: CM-X270: update NAND flash driver to use gpio_lib
Update CM-X270 NAND flash driver to use gpio_lib.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-09 21:33:49 +01:00
Saeed Bishara f4db56ffd4 [MTD] orion_nand: add chip_delay parameter
Some SoCs need a different chip_delay value.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Acked-by: Jörn Engel <joern@logfs.org>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-06-30 16:04:45 -04:00
David Woodhouse 90574d0a4d [MTD] [NAND] Fix checkpatch warnings which showed up when atmel_nand.c moved
Some of them, at least.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07 08:49:00 +01:00
Håvard Skinnemoen 984290ded4 [MTD] [NAND] atmel_nand: make available on AVR32
Make the atmel_nand driver selectable on AVR32, and update the Kconfig
help text to reflect this.

Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07 08:45:45 +01:00
Håvard Skinnemoen cc0c72e173 [MTD] [NAND] atmel_nand: Clean up and fix probe() error path
This fixes several bugs in the atmel_nand_probe() error path, including
at least one memory leak.

Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07 08:43:11 +01:00
Håvard Skinnemoen 3c3796cc32 [MTD] [NAND] rename at91_nand -> atmel_nand: internal symbols
This is basically s/at91_nand/atmel_nand/g with some manual inspection.

Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07 08:43:00 +01:00
Håvard Skinnemoen d4f4c0aa8e [MTD] [NAND] rename at91_nand -> atmel_nand: file names and Kconfig
The AT91 NAND driver needs just a few tiny modifications to work on
AVR32 as well. Rename it atmel_nand to reflect this.

Also move the ECC register definitions into drivers/mtd/nand since they
are only useful to the atmel_nand driver, and get rid of the useless
filename at the top of each file.

Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07 08:42:51 +01:00
Håvard Skinnemoen 62fd71fe71 [MTD] [NAND] at91_nand: Convert to generic GPIO API
No point in using an AT91-specific GPIO API when the generic API works
just as well.

Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07 08:42:38 +01:00
Anton Vorontsov aa83570e23 [MTD] [NAND] fsl_elbc_nand: fix section mismatch between probe and remove
WARNING: drivers/mtd/nand/built-in.o(.devinit.text+0x114): Section mismatch
in reference from the function fsl_elbc_ctrl_probe() to the function
.devexit.text:fsl_elbc_ctrl_remove()

__devinit functions should not call functions with __devexit. Since probe
function calls remove in case of errors, we want to remove __devexit
attribute from it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07 08:36:19 +01:00
Randy Dunlap 4474573a90 [MTD] [NAND] nandsim: missing header for do_div
Fix nandsim build error, missing #include:

linux-next-20080605/drivers/mtd/nand/nandsim.c: In function 'divide':
linux-next-20080605/drivers/mtd/nand/nandsim.c:462: error: implicit declaration of function 'do_div'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-05 19:45:19 +01:00
Ben Dooks 7e74a5076e [MTD] [NAND] S3C2410: Remove changelog and tidy header
The changelog on the driver is superflous given this
is being kept under revision control. Remove the other
cruft in the header and update the copyright and the
supported device list.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 18:02:56 +01:00
Ben Dooks 451d33993b [MTD] [NAND] S3C2410: Change printk() into dev_dbg()
Fix a minor problem with what should have been
debug output by changing printk() to dev_dbg()
inside s3c2410_nand_update_chip().

Thanks to David Woodhouse for pointing this out.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 18:00:58 +01:00
Adrian Bunk 59018b6d2a MTD/JFFS2: remove CVS keywords
Once upon a time, the MTD repository was using CVS.

This patch therefore removes all usages of the no longer updated CVS
keywords from the MTD code.

This also includes code that printed them to the user.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 17:50:17 +01:00
Adrian Hunter 6eda7a55f7 [MTD] [NAND] nandsim: allow for 64-bit size
Amend nandsim so that it does not assume 32-bit flash size.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 17:47:52 +01:00
Adrian Hunter 07293b2008 [MTD] [NAND] nandsim: fix overridesize
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 17:47:43 +01:00
Adrian Hunter af3deccfa6 [MTD] [NAND] nandsim: fix size bug
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 17:47:35 +01:00
Eric Miao 9b62d86431 [MTD] [NAND] pxa: fix incorrect calling of pxa3xx_nand_config() on resume path
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 17:37:25 +01:00
Robert P. J. Day ff0de61c36 [MTD] [NAND] excite_nandflash: simplify code using ARRAY_SIZE() macro.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 17:28:03 +01:00
Toralf Förster 437d0d299f [MTD] [NAND] fix 2 "unused variable" warnings in cafe_nand.c
Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04 17:27:20 +01:00
Atsushi Nemoto 8136508cd6 [MTD] [NAND] at91_nand: use at91_nand_{en,dis}able consistently.
Use at91_nand_enable(), at91_nand_disable() to manipulate enable_pin.
No functional changes.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-26 18:41:16 +01:00
Michael Hennerich afc4bca639 [MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=4053

Singed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-25 09:10:55 +01:00
Atsushi Nemoto 2314488e81 [MTD] [NAND] at91_nand: control NCE signal
This driver did not control NCE signal during normal operations (only
enable NCE on probing and disable NCE on removing).  This patch make
NCE signal inactive on idle state.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-25 09:08:05 +01:00
Richard Genoud d43fa14996 [MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260
The sam926x docs allegedly don't list an "ECC_PARITY" field, and the 
header files in the upstream kernel don't have it either.

Masking with it was useless anyway, so just remove it.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-25 08:38:56 +01:00
Richard Genoud 77f5492c43 [MTD] [NAND] Hardware ECC controller on at91sam9263 / at91sam9260
This is a patch to use the hardware ECC controller of
the AT91SAM9260 and AT91SAM9263 for the AT91 nand.
On AT91 NAND, there's now a choice between ECC soft,
ECC hard or no ECC (for debug).

It has been tested on AT91SAM9263 with 8 bits large
and small page NAND.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-23 23:34:28 +01:00
Ben Dooks ed8165c75e [MTD] [NAND] Verify probe by retrying to checking the results match
With modern systems using bus-hold instead of bus pull-up, it can
often lead to erroneous reporting of NAND devices where there are
none. Do a double probe to ensure that the result we got the first
time is repeatable, and if it is not then return that there is no
chip there.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 21:43:06 +01:00
Ben Dooks 37e5ffa3f1 [MTD] [NAND] S3C2410 Allow ECC disable to be specified by the board
Add support to disable ECC checking for a given chip
when passed by the board via the platform data.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 21:41:32 +01:00
Ben Dooks 1c21ab67b7 [MTD] [NAND] S3C2410 Allow ECC layout to be passed through platform data
Add support for the ECC layout to be passed via the
platform data specified by the board.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 21:41:19 +01:00
Ben Dooks c45c6c6833 [MTD] [NAND] S3C2410 Allow unset ecc to be ignored for ecc correction
If a block's ecc field is all 0xff, then ignore the ECC
correction. This is for systems where some of the blocks,
such as the initial cramfs are written without ECC and
need to be loaded on start.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 21:41:03 +01:00
Ben Dooks 71d54f3855 [MTD] [NAND] S3C2410 Large page NAND support
This adds support for using large page NAND devices
with the S3C24XX NAND controller. This also adds the
file Documentation/arm/Samsung-S3C24XX/NAND.txt to
describe the differences.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 21:39:16 +01:00
Ben Dooks 0916083210 [MTD] [NAND] S3C2410 Fix previous nFCE suspend save patch
Commit 03680b1e00 incorrectly
was assuming S3C2410_NFCONF was being used to select the
NAND chip. Fix this error by ising the sel_reg.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 21:32:23 +01:00
Anton Vorontsov 0ff6631be1 [MTD] [NAND] fsl_elbc_nand: workaround for hangs during nand write
Using current driver elbc sometimes hangs during nand write. Reading back
last byte helps though (thanks to Scott Wood for the idea).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 21:13:53 +01:00
Hamish Moffatt 93919d384d [MTD] [NAND] plat_nand: set mtd->name
This patch sets mtd->name to the platform bus ID in the plat_nand
driver, so that you can specify partitions readily with mtdparts=.

Currently it relies on nand_base filling in the name from the device,
which results in names like "NAND 256MiB 3,3V 8-bit", that you can't
use with cmdlineparts.

Signed-off-by: Hamish Moffatt <hamish@cloud.net.au>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 21:11:54 +01:00
Mike Hench 1938de46cb [MTD] [NAND] corrected MPC8313 NAND fixes
Fix a race condition in fsl_elbc_run_command
Fix incorrect usage of clearbits32 that bashed option register
Remove work around for bashed register

Signed-off-by: Mike Hench <mhench@elutions.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 20:52:09 +01:00
Anton Vorontsov 9ebed3e60f [MTD] [NAND] fsl_elbc_nand: fix mtd name
Currently fsl_elbc_nand doesn't initialize mtd->name, and this causes
nand_get_flash_type() to assign name that is equal to chip type, like
this:

   root@b1:~# cat /proc/mtd
   dev:    size   erasesize  name
   mtd0: 00800000 00010000 "fe000000.flash"
   mtd1: 02000000 00004000 "NAND 32MiB 3,3V 8-bit"

mtd0 is physmap_of flash (normal name), and mtd1 is fsl_elbc_nand.

Despite inconsistency, with mtd name like this specifying paritions
from the kernel command line becomes a torture (though, I didn't tried
and not sure if mtdparts= can handle spaces at all). Plus, this causes
real bugs when multiple fsl_elbc_nand chips registered.

With this patch applied fsl_elbc_nand chip will have proper name:

   root@b1:~# cat /proc/mtd
   dev:    size   erasesize  name
   mtd0: 00800000 00010000 "fe000000.flash"
   mtd1: 02000000 00004000 "e0600000.flash"

p.s. We can't use priv->dev->bus_id as in physmap_of, because
fsl_elbc_nand pretends to be a localbus controller, so its bus_id is
"address.localbus", which is incorrect and thus will also not work
for multiple chips.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 20:50:31 +01:00
Anton Vorontsov 5c249c5a57 [MTD] [NAND] FSL UPM NAND driver
This is very simple driver, NAND is connected through localbus,
and User-Programmable Machine is doing various adjustments to
speak NAND. No special efforts needed to do read and write cycles,
though to control ALE and CLE phases, we ask UPM to generate exact
pre-programmed signals on the localbus lines.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 20:46:30 +01:00
David Woodhouse a1c06ee11f [MTD] [NAND] Fix checkpatch errors in pxa3xx_nand
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 20:39:43 +01:00
eric miao fe69af002e [MTD] [NAND] support for pxa3xx
This is preliminary since:

1. It supports only _one_ chip select at the moment. As there is no
   existing platforms available using two chip selects of the NAND
   controller, it shall really not include code for supporting the
   2nd chip select for now, as such code cannot be verified.

2. It resorts to the default and simpliest memory based badblock
   table

3. Only limited types of nand flash are currently supported. Most
   PXA3xx processors come with on-chip NAND flash dies, so there
   isn't much flexibility for other types of NAND.

4. The NAND controller should be configured to detect the device's
   ID, thus making it difficult to use nand_scan_ident() to assist
   the detection process (though it's not impossible)

TODO: fix all the above limitations of cuz :-)

Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: Sergey Podstavin <spodstavin@ru.mvista.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 19:27:27 +01:00
Scott Wood 576506645d [MTD] [NAND] fsl_elbc_nand: Fix SEQIN handling for large pages.
Previously, a READ command was erroneously issued rather than SEQIN.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 15:36:24 +01:00
Atsushi Nemoto 52f8301437 [MTD] [NAND] at91_nand: Make part_probes[] static
The part_probes[] should be static.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Jörn Engel <joern@logfs.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 14:50:40 +01:00
Kay Sievers 1ff184225b [MTD] [NAND] fix platform driver hotplug/coldplug
Since 43cc71eed1, the platform modalias is
prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable MTD NAND
platform drivers, to re-enable auto loading.

NOTE: at91_nand for some reason disallows modular builds.  I'm assuming that's
just an oversight that will be fixed.

[dbrownell@users.sourceforge.net: minor fix]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 14:17:47 +01:00
Sebastian Siewior c27e9b80be [MTD] [NAND] fix possible Ooops in rfc_from4
I found this while I was looking how the rs_lib is working.  The rs_decoder is
initialized _after_ the nand core code read the BBT table and _after_ the
partition table has been added.  The driver has a private BBT description
which is in located in flash data so we Ooops if there is a bit flip _or_ if a
bit flips while reading the partition table.

This patch moves the initialization of the rs_lib before the first possible
access by nand core.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jörn Engel <joern@wh.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 14:13:14 +01:00
Adrian Bunk ec12cc74e9 [MTD] [NAND] mtd/nand/cs553x_nand.c:part_probes[] static
Make the needlessly global part_probes[] static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22 12:35:40 +01:00
Linus Torvalds 9a64388d83 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (202 commits)
  [POWERPC] Fix compile breakage for 64-bit UP configs
  [POWERPC] Define copy_siginfo_from_user32
  [POWERPC] Add compat handler for PTRACE_GETSIGINFO
  [POWERPC] i2c: Fix build breakage introduced by OF helpers
  [POWERPC] Optimize fls64() on 64-bit processors
  [POWERPC] irqtrace support for 64-bit powerpc
  [POWERPC] Stacktrace support for lockdep
  [POWERPC] Move stackframe definitions to common header
  [POWERPC] Fix device-tree locking vs. interrupts
  [POWERPC] Make pci_bus_to_host()'s struct pci_bus * argument const
  [POWERPC] Remove unused __max_memory variable
  [POWERPC] Simplify xics direct/lpar irq_host setup
  [POWERPC] Use pseries_setup_i8259_cascade() in pseries_mpic_init_IRQ()
  [POWERPC] Turn xics_setup_8259_cascade() into a generic pseries_setup_i8259_cascade()
  [POWERPC] Move xics_setup_8259_cascade() into platforms/pseries/setup.c
  [POWERPC] Use asm-generic/bitops/find.h in bitops.h
  [POWERPC] 83xx: mpc8315 - fix USB UTMI Host setup
  [POWERPC] 85xx: Fix the size of qe muram for MPC8568E
  [POWERPC] 86xx: mpc86xx_hpcn - Temporarily accept old dts node identifier.
  [POWERPC] 86xx: mark functions static, other minor cleanups
  ...
2008-04-21 15:50:49 -07:00
Russell King adf6d34e46 Merge branch 'omap2-upstream' into devel 2008-04-19 17:17:29 +01:00
Anton Vorontsov d4a32fe40a [POWERPC] fsl_elbc_nand: factor out localbus defines
This is needed to support other localbus peripherals, such as
NAND on FSL UPM.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-17 01:01:38 -05:00
Sebastian Siewior 6f5afaed58 mtd: nand: add out label in rfc_from4
This has been forgotten in commit f5bbdacc41 ("[MTD] NAND Modularize
read function") and nobody compiled the driver.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Joern Engel <joern@wh.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-28 14:45:21 -07:00
Lennert Buytenhek 5d4294c524 plat-orion: make orion_nand available for all Orion families
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-03-27 14:51:40 -04:00
Mart Raudsepp 641f43669f [MTD] [NAND] cs553x_nand: command line partitioning support
Implements kernel command line partitioning support for the CS5535/CS5536 chipsets driver.

For that the following is done:

* cs553x_cleanup(): try the cleanup for all chip selects to not leak memory
* Assign a unique name for each chip select to be separately addressable in the command line mtd-id portion(s)
* Use the already defined PIN_OPT_IDE constant where appropriate for readability
* Include command line partitioning support when CONFIG_MTD_PARTS is set

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-09 08:21:31 +00:00
Linus Torvalds a8e98d6d51 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (120 commits)
  [MTD] Fix mtdoops.c compilation
  [MTD] [NOR] fix startup lock when using multiple nor flash chips
  [MTD] [DOC200x] eccbuf is statically defined and always evaluate to true
  [MTD] Fix maps/physmap.c compilation with CONFIG_PM
  [MTD] onenand: Add panic_write function to the onenand driver
  [MTD] mtdoops: Use the panic_write function when present
  [MTD] Add mtd panic_write function pointer
  [MTD] [NAND] Freescale enhanced Local Bus Controller FCM NAND support.
  [MTD] physmap.c: Add support for multiple resources
  [MTD] [NAND] Fix misparenthesization introduced by commit 78b65179...
  [MTD] [NAND] Fix Blackfin NFC ECC calculating bug with page size 512 bytes
  [MTD] [NAND] Remove wrong operation in PM function of the BF54x NFC driver
  [MTD] [NAND] Remove unused variable in plat_nand_remove
  [MTD] Unlocking all Intel flash that is locked on power up.
  [MTD] [NAND] at91_nand: Make mtdparts option can override board info
  [MTD] mtdoops: Various minor cleanups
  [MTD] mtdoops: Ensure sequential write to the buffer
  [MTD] mtdoops: Perform write operations in a workqueue
  [MTD] mtdoops: Add further error return code checking
  [MTD] [NOR] Test devtype, not definition in flash_probe(), drivers/mtd/devices/lart.c
  ...
2008-02-07 10:20:31 -08:00
Scott Wood 76b1046716 [MTD] [NAND] Freescale enhanced Local Bus Controller FCM NAND support.
Signed-off-by: Nick Spence <nick.spence@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07 10:26:57 +00:00
Joe Perches 8e87d7820a drivers/mtd/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:22:34 +02:00
Scott Wood 1c45f60406 [MTD] [NAND] Fix misparenthesization introduced by commit 78b65179...
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03 22:14:12 +11:00
Bryan Wu 5eb91034f3 [MTD] [NAND] Fix Blackfin NFC ECC calculating bug with page size 512 bytes
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03 18:55:16 +11:00
Bryan Wu f4dda0914e [MTD] [NAND] Remove wrong operation in PM function of the BF54x NFC driver
There is no suspend/resume operation in NFC driver at all, currently.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03 18:54:46 +11:00
Li Zefan a50367784e [MTD] [NAND] Remove unused variable in plat_nand_remove
With CONFIG_MTD_PARTITIONS not set, got this:
drivers/mtd/nand/plat_nand.c:113: warning: unused variable 'pdata'

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03 18:31:52 +11:00
Atsushi Nemoto 842b1a105c [MTD] [NAND] at91_nand: Make mtdparts option can override board info
Call parse_mtd_partitions before checking board's partition_info, so
that "mtdparts=" option can override board's default setting.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03 18:21:01 +11:00
Matt Reimer d0bf37932a [MTD] [NAND] fix s3c2410 error correction
The single-bit error correction was, well, incorrect. For determing which
bit to correct it was using P1' P2' P4' P8' instead of P1 P2 P4 P8, and
it was using P16' P32' P64' P128' P256' P512' P1024' P2048' instead of
P16 P32 P64 P128 P256 P512 P1024 P2048.

Signed-off-by: Matt Reimer <mreimer@vpop.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-01-26 21:11:38 +08:00
Matt Reimer 4fac9f6984 [MTD] [NAND] make s3c2410 indicate an error for multi-bit read errors
If there were multiple bit errors in the data s3c2410_nand_correct_data()
was returning 0 (no error) instead of -1, so the upper layers (like JFFS2)
would not know the data is corrupt.

Signed-off-by: Matt Reimer <mreimer@vpop.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-01-12 14:46:31 +00:00