summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/mxc_nand.c
Commit message (Collapse)AuthorAgeFilesLines
* mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocksWolfram Stering2011-09-231-1/+1
| | | | | | | | | For NFC v1, the unlock end block address was 0x4000, which would only unlock the first 32 blocks of the NAND flash. Change that value to 0xffff to unlock all available blocks, as is done for NFC v21 as well. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
* mtd: mxc_nand: add mx53 NFC driver supportJason Liu2011-09-111-1/+1
| | | | | | | | This has already been tested with Samsung NAND: K9LAG08U0M on MX53EVK board, ubi/ubifs has already been tested OK too. Signed-off-by: Jason Liu <jason.hui@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
* mtd: cleanup style on pr_debug messagesBrian Norris2011-09-111-4/+2
| | | | | Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
* mtd: replace DEBUG() with pr_debug()Brian Norris2011-09-111-8/+6
| | | | | | | | | | | | | | Start moving away from the MTD_DEBUG_LEVEL messages. The dynamic debugging feature is a generic kernel feature that provides more flexibility. (See Documentation/dynamic-debug-howto.txt) Also fix some punctuation, indentation, and capitalization that went along with the affected lines. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
* mtd: mxc_nand.c: use mtd_device_parse_registerDmitry Eremin-Solenikov2011-09-111-12/+3
| | | | | | | | | Replace custom invocations of parse_mtd_partitions and mtd_device_register with common mtd_device_parse_register call. This would bring: standard handling of all errors, fallback to default partitions, etc. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* mtd: nand: rename NAND_USE_FLASH_BBTBrian Norris2011-09-111-1/+1
| | | | | | | | | | | | | | | Recall the recently added prefix requirements: * "NAND_" for flags in nand.h, used in nand_chip.options * "NAND_BBT_" for flags in bbm.h, used in nand_chip.bbt_options or in nand_bbt_descr.options Thus, I am changing NAND_USE_FLASH_BBT to NAND_BBT_USE_FLASH. Again, this flag is found in bbm.h and so should NOT be used in the "nand_chip.options" field. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* mtd: nand: consolidate redundant flash-based BBT flagsBrian Norris2011-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch works with the following three flags from two headers (nand.h and bbm.h): (1) NAND_USE_FLASH_BBT (nand.h) (2) NAND_USE_FLASH_BBT_NO_OOB (nand.h) (3) NAND_BBT_NO_OOB (bbm.h) These flags are all related and interdependent, yet they were in different headers. Flag (2) is simply the combination of (1) and (3) and can be eliminated. This patch accomplishes the following: * eliminate NAND_USE_FLASH_BBT_NO_OOB (i.e., flag (2)) * move NAND_USE_FLASH_BBT (i.e., flag (1)) to bbm.h It's important to note that because (1) and (3) are now both found in bbm.h, they should NOT be used in the "nand_chip.options" field. I removed a small section from the mtdnand DocBook because it referes to NAND_USE_FLASH_BBT in nand.h, which has been moved to bbm.h. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* mtd: mxc_nand: convert to mtd_device_register()Jamie Iles2011-05-251-9/+4
| | | | | | | | | Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS preprocessor conditionals as partitioning is always available. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mxc_nand: add support for multiple chips on V21 devicesBaruch Siach2011-05-251-19/+32
| | | | | | | | | | | | | | | | Do the following to add support for up to 4 chips on V21 devices (i.MX25 and i.MX35): * implement .select_chip for V21 * adjust existing NFC_V1_V2_BUF_ADDR writes to take chip select into account * unlock all chip selects at preset_v1_v2() * scan up to 4 devices at .probe This has been tested on i.MX25 with two attached NAND chip (on one die). Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge branch 'master' of ↵Artem Bityutskiy2011-03-251-3/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus-1 * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (9356 commits) [media] rc: update for bitop name changes fs: simplify iget & friends fs: pull inode->i_lock up out of writeback_single_inode fs: rename inode_lock to inode_hash_lock fs: move i_wb_list out from under inode_lock fs: move i_sb_list out from under inode_lock fs: remove inode_lock from iput_final and prune_icache fs: Lock the inode LRU list separately fs: factor inode disposal fs: protect inode->i_state with inode->i_lock lib, arch: add filter argument to show_mem and fix private implementations SLUB: Write to per cpu data when allocating it slub: Fix debugobjects with lockless fastpath autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd() autofs4 - remove autofs4_lock autofs4 - fix d_manage() return on rcu-walk autofs4 - fix autofs4_expire_indirect() traversal autofs4 - fix dentry leak in autofs4_expire_direct() autofs4 - reinstate last used update on access vfs - check non-mountpoint dentry might block in __follow_mount_rcu() ... NOTE! This merge commit was created to fix compilation error. The block tree was merged upstream and removed the 'elv_queue_empty()' function which the new 'mtdswap' driver is using. So a simple merge of the mtd tree with upstream does not compile. And the mtd tree has already be published, so re-basing it is not an option. To fix this unfortunate situation, I had to merge upstream into the mtd-2.6.git tree without committing, put the fixup patch on top of this, and then commit this. The result is that we do not have commits which do not compile. In other words, this merge commit "merges" 3 things: the MTD tree, the upstream tree, and the fixup patch.
| * kbuild, mtd, net: a few comment typo fixes and rewordingGilles Espinasse2011-02-171-3/+2
| | | | | | | | | | Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | mtd: mxc_nand: fix OOB corruption when page size > 2KiBBaruch Siach2011-03-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | When page size is 4KiB, ecc.total is set to 8*9, and this causes nand_write_page_hwecc() to read past the initialized part of the eccpos array, which corrupts chip->oob_poi with bogus values from ecc_calc. Fix this by creating a proper nand_ecclayout for 4KiB flashes. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: mxc_nand: fix read past buffer endBaruch Siach2011-03-111-2/+2
|/ | | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Sascha hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mxc_nand: Fix warning on nr_parts unused variableFabio Estevam2010-12-031-1/+1
| | | | | | | | | | | | | | If CONFIG_MTD_PARTITIONS is not selected, then the following warning is generated: CC drivers/mtd/nand/mxc_nand.o drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_probe': drivers/mtd/nand/mxc_nand.c:1014: warning: unused variable 'nr_parts' Fix it by marking nr_parts as __maybe_unused. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mxc_nand: do not depend on disabling the irq in the interrupt handlerSascha Hauer2010-10-181-9/+83
| | | | | | | | | | | | | | | | | This patch reverts the driver to enabling/disabling the NFC interrupt mask rather than enabling/disabling the system interrupt. This cleans up the driver so that it doesn't rely on interrupts being disabled within the interrupt handler. For i.MX21 we keep the current behaviour, that is calling enable_irq/disable_irq_nosync to enable/disable interrupts. This patch is based on earlier work by John Ogness. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: John Ogness <john.ogness@linutronix.de> Tested-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mtd: mxc_nand: configure pages per block for v2 controllerSascha Hauer2010-09-131-14/+19
| | | | | | | | | | | | | This patch initializes the pages per block field in CONFIG1 for v2 controllers. It also sets the FP_INT field. This is the last field not correctly initialized, so we can switch from read/modify/write the CONFIG1 reg to just write the correct value. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: John Ogness <john.ogness@linutronix.de> Tested-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mxc_nand: Do not do byte accesses to the NFC buffer.John Ogness2010-08-271-7/+7
| | | | | | | | | | | | This patch avoids byte access to the NFC buffer. Byte access to the NFC is not allowed. The patch is against linux-next 20100618. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge git://git.infradead.org/mtd-2.6Linus Torvalds2010-08-101-175/+425
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: (79 commits) mtd: Remove obsolete <mtd/compatmac.h> include mtd: Update copyright notices jffs2: Update copyright notices mtd-physmap: add support users can assign the probe type in board files mtd: remove redwood map driver mxc_nand: Add v3 (i.MX51) Support mxc_nand: support 8bit ecc mxc_nand: fix correct_data function mxc_nand: add V1_V2 namespace to registers mxc_nand: factor out a check_int function mxc_nand: make some internally used functions overwriteable mxc_nand: rework get_dev_status mxc_nand: remove 0xe00 offset from registers mtd: denali: Add multi connected NAND support mtd: denali: Remove set_ecc_config function mtd: denali: Remove unuseful code in get_xx_nand_para functions mtd: denali: Remove device_info_tag structure mtd: m25p80: add support for the Winbond W25Q32 SPI flash chip mtd: m25p80: add support for the Intel/Numonyx {16,32,64}0S33B SPI flash chips mtd: m25p80: add support for the EON EN25P{32, 64} SPI flash chips ... Fix up trivial conflicts in drivers/mtd/maps/{Kconfig,redwood.c} due to redwood driver removal.
| * mxc_nand: Add v3 (i.MX51) SupportSascha Hauer2010-08-061-1/+221
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mxc_nand: support 8bit eccSascha Hauer2010-08-061-0/+30
| | | | | | | | | | | | | | | | | | Nand devices with at least 26 bytes of oob data per 512 byte block can have 8bit ecc on v2 type controllers. This is currently not tested, but at least this patch puts the ECC_MODE bit into a well defined state. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mxc_nand: fix correct_data functionSascha Hauer2010-08-061-2/+40
| | | | | | | | | | | | | | | | | | | | The v2 controller has a totally different mechanism to check whether the data we read had ecc errors or not. Implement this. The mechanism in the v2 controller happens to be identical to the v3 controller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mxc_nand: add V1_V2 namespace to registersSascha Hauer2010-08-061-78/+63
| | | | | | | | | | | | | | | | | | | | This prepares the driver for v3 support. The v3 controller has a completely different register layout, so add a V1_V2_ namespace to the register defines to avoid confusion with the v3 regs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mxc_nand: factor out a check_int functionSascha Hauer2010-08-061-13/+19
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mxc_nand: make some internally used functions overwriteableSascha Hauer2010-08-061-28/+44
| | | | | | | | | | | | | | | | | | This patch prepares the driver to add v3 controller support later. The v3 controller is basically the same controller as v1 and v2, but with a completely different register layout. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mxc_nand: rework get_dev_statusSascha Hauer2010-08-061-12/+9
| | | | | | | | | | | | | | | | | | | | | | We save/restore the value in the buffer anyway, so it makes no difference whether we use main_area0 or main_area1. So, we can use main_area0 and remove main_area1 from the driver which is otherwise unused. Also, clean up the comments in get_dev_status. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mxc_nand: remove 0xe00 offset from registersSascha Hauer2010-08-061-18/+18
| | | | | | | | | | | | | | | | Add the offset to the register base instead. This is done in preparation for v3 controller support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: dont call suspend and resume explicitlyEric Bénard2010-08-041-42/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The mtd layer is responsible to call mtd->{suspend,resume}. Doing it again in the driver is wrong and results in a warning: nand_resume called for a chip which is not in suspended state at resume time. Removing the calls from the resume and suspend functions makes them empty allowing them to be deleted completely. Signed-off-by: Eric Bénard <eric@eukrea.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: fix unbalanced enable for IRQEric Bénard2010-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * preset should be done before sending the reset command * without this, I get the following error on an i.MX35 : [ 0.900000] ------------[ cut here ]------------ [ 0.900000] WARNING: at kernel/irq/manage.c:290 __enable_irq+0x4c/0x88() [ 0.900000] Unbalanced enable for IRQ 33 [ 0.900000] Modules linked in: [ 0.900000] [<c002ffb8>] (unwind_backtrace+0x0/0xf0) from [<c02f7d0c>] (dump_stack+0x18/0x1c) [ 0.900000] [<c02f7d0c>] (dump_stack+0x18/0x1c) from [<c0049a44>] (warn_slowpath_common+0x54/0x6c) [ 0.900000] [<c0049a44>] (warn_slowpath_common+0x54/0x6c) from [<c0049b00>] (warn_slowpath_fmt+0x38/0x40) [ 0.900000] [<c0049b00>] (warn_slowpath_fmt+0x38/0x40) from [<c008f65c>] (__enable_irq+0x4c/0x88) [ 0.900000] [<c008f65c>] (__enable_irq+0x4c/0x88) from [<c008fca0>] (enable_irq+0x54/0x98) [ 0.900000] [<c008fca0>] (enable_irq+0x54/0x98) from [<c021e618>] (wait_op_done+0x40/0x134) [ 0.900000] [<c021e618>] (wait_op_done+0x40/0x134) from [<c021e808>] (send_cmd+0x30/0x38) [ 0.900000] [<c021e808>] (send_cmd+0x30/0x38) from [<c021eb8c>] (mxc_nand_command+0x26c/0x328) [ 0.900000] [<c021eb8c>] (mxc_nand_command+0x26c/0x328) from [<c021aa60>] (nand_scan_ident+0x188/0x6c0) [ 0.900000] [<c021aa60>] (nand_scan_ident+0x188/0x6c0) from [<c001a9cc>] (mxcnd_probe+0x2b8/0x3d0) [ 0.900000] [<c001a9cc>] (mxcnd_probe+0x2b8/0x3d0) from [<c01f9e88>] (platform_drv_probe+0x20/0x24) [ 0.900000] [<c01f9e88>] (platform_drv_probe+0x20/0x24) from [<c01f8c38>] (driver_probe_device+0xb0/0x164) [ 0.900000] [<c01f8c38>] (driver_probe_device+0xb0/0x164) from [<c01f8d54>] (__driver_attach+0x68/0x8c) [ 0.900000] [<c01f8d54>] (__driver_attach+0x68/0x8c) from [<c01f8348>] (bus_for_each_dev+0x50/0x84) [ 0.900000] [<c01f8348>] (bus_for_each_dev+0x50/0x84) from [<c01f8a9c>] (driver_attach+0x20/0x28) [ 0.900000] [<c01f8a9c>] (driver_attach+0x20/0x28) from [<c01f7c00>] (bus_add_driver+0x144/0x2dc) [ 0.900000] [<c01f7c00>] (bus_add_driver+0x144/0x2dc) from [<c01f906c>] (driver_register+0xb0/0x13c) [ 0.900000] [<c01f906c>] (driver_register+0xb0/0x13c) from [<c01fa13c>] (platform_driver_register+0x4c/0x60) [ 0.900000] [<c01fa13c>] (platform_driver_register+0x4c/0x60) from [<c01fa170>] (platform_driver_probe+0x20/0xa0) [ 0.900000] [<c01fa170>] (platform_driver_probe+0x20/0xa0) from [<c001a708>] (mxc_nd_init+0x18/0x24) [ 0.900000] [<c001a708>] (mxc_nd_init+0x18/0x24) from [<c002938c>] (do_one_initcall+0x64/0x1bc) [ 0.900000] [<c002938c>] (do_one_initcall+0x64/0x1bc) from [<c00084c4>] (kernel_init+0xe8/0x1ac) [ 0.900000] [<c00084c4>] (kernel_init+0xe8/0x1ac) from [<c002aee8>] (kernel_thread_exit+0x0/0x8) [ 0.900000] ---[ end trace 8bf72ac6ba089a19 ]--- [ 1.140000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit) Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: remove unused variableUwe Kleine-König2010-08-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes: drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_resume': drivers/mtd/nand/mxc_nand.c:901: warning: unused variable 'host' Removing this variable was missed in 9c14b153e6af. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: fix OOB accesses on i.MX27Sascha Hauer2010-08-021-26/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The OOB handling in the mxc_nand driver is broken for v1 type controllers (i.MX27/31) with 512 byte page size. This perhaps did not show up because ubi does not use OOB. Update the driver to always read/write a whole page even if only OOB is requested. With this patch the driver passes the mtd_oobtest on i.MX27 with 512 byte page size. Also tested with 2048 byte page size and on i.MX35 (v2 type controller) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mxc_nand: add support for platform defined partitionsBaruch Siach2010-07-261-0/+2
| | | | | | | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mxc_nand: Fix OOB handlingSascha Hauer2010-07-261-26/+5
|/ | | | | | | | | | | | | | The OOB handling in the mxc_nand driver is broken for v1 type controllers (i.MX27/31) with 512 byte page size. This perhaps did not show up because ubi does not use OOB. Update the driver to always read/write a whole page even if only OOB is requested. With this patch the driver passes the mtd_oobtest on i.MX27 with 512 byte page size. Also tested with 2048 byte page size and on i.MX35 (v2 type controller) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Baruch Siach <baruch@tkos.co.il>
* mtd: mxc_nand: Remove duplicate NAND_CMD_RESET case valueDavid Woodhouse2010-05-201-1/+0
| | | | | | | | | | | | This reverts commit 66803762 ("mtd: mxc_nand: add RESET command support"). Support for NAND_CMD_RESET was added separately in commit d4840180 ("mtd: mxc_nand: set NFC registers after reset"), causing a build error: drivers/mtd/nand/mxc_nand.c: In function 'mxc_nand_command': drivers/mtd/nand/mxc_nand.c:689: error: duplicate case value drivers/mtd/nand/mxc_nand.c:606: error: previously used here Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mxc_nand: support i.MX21Ivo Clarysse2010-05-141-16/+25
| | | | | | | | | | | | | | | | | On i.MX21 SoCs, if the NFC_CONFIG1:NFC_INT_MASK bit is set, NFC_CONFIG2:NFC_INT always reads out zero, even if an operation is completed. This patch uses enable_irq and disable_irq_nosync instead of NFC_CONFIG1:NFC_INT_MASK to mask NFC interrupts. This allows NFC_CONFIG2:NFC_INT to also be used to detect operation completion on i.MX21. The i.MX21 NFC does not signal reset completion using NFC_CONFIG1:NFC_INT_MASK, so instead reset completion is tested by checking if NFC_CONFIG2 becomes 0. Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mxc_nand: set NFC registers after resetIvo Clarysse2010-05-141-42/+48
| | | | | | | | | | | This patch allows the mxc_nand driver to reset the NAND flash controller. NFC registers are (re-)set after completion of the reset, as a reset will have reverted the NFC registers to their default values. Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge branch 'master' of ↵David Woodhouse2010-03-261-1/+1
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/mtd/nand/sh_flctl.c Maxim's patch to initialise sysfs attributes depends on the patch which actually adds sysfs_attr_init().
| * tree-wide: Assorted spelling fixesDaniel Mack2010-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | In particular, several occurances of funny versions of 'success', 'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address', 'beginning', 'desirable', 'separate' and 'necessary' are fixed. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Joe Perches <joe@perches.com> Cc: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident()David Woodhouse2010-02-261-1/+1
| | | | | | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: mxc_nand: add RESET command supportEric Benard2010-02-261-0/+1
| | | | | | | | | | | | | | | | | | mxc_nand driver must support the RESET Command in order to support Micron NAND which need a reset before any other command. Signed-off-by: Eric Benard <eric@eukrea.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: mxc-nand: don't disable clock in mxcnd-suspendUwe Kleine-König2010-02-251-4/+6
| | | | | | | | | | | | | | | | | | | | | | The clock must already be off after mtd->suspend. Disabling it again results in an negative overflow of the clock usage count. This didn't hurt as mxcnd_resume undid it after wake up. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: mxc-nand: no need to check for validity of platform driver dataUwe Kleine-König2010-02-251-10/+7
|/ | | | | | | | | | | | | | | The probe function calls platform_set_drvdata with a valid pointer when the probe is successful. As mxcnd_suspend and mxcnd_resume are only called on bound devices, platform_get_drvdata always returns non-NULL. This fix isn't critical as the pointer is always valid so it doesn't matter if the compiler generated code for it or not. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Revert "mtd: move mxcnd_remove to .exit.text"Uwe Kleine-König2009-12-071-1/+1
| | | | | | | | | This reverts commit 82613b0da622efbd24cb7b23eb349966802310f1, because commit daa0f15 (mtd: don't use __exit_p to wrap mxcnd_remove) is a better solution. Not having a remove callback breaks rebinding because resources are not freed on remove. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge branch 'mxc-nand' of git://git.pengutronix.de/git/imx/linux-2.6David Woodhouse2009-11-301-475/+298
|\
| * mxc_nand: use DRIVER_NAME where appropriateSascha Hauer2009-11-121-2/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: remove TROP_US_DELAYSascha Hauer2009-11-121-10/+7
| | | | | | | | | | | | | | wait_op_done is only called with the same timeout, so code the timeout into the function itself. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: Allow flash based bbtSascha Hauer2009-11-121-0/+34
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: disable sp_en bit only onceSascha Hauer2009-11-121-12/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: Add NFC V2 supportSascha Hauer2009-11-121-13/+68
| | | | | | | | | | | | The v2 version of this controller is used on i.MX35/25 SoCs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: Get rid of pagesize_2k flagSascha Hauer2009-11-121-15/+14
| | | | | | | | | | | | | | Later versions of this controller also allow 4k pagesize, so use mtd->writesize instead of a flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: Make main/spare areas runtime configurableSascha Hauer2009-11-121-22/+20
| | | | | | | | | | | | | | The main/spare areas are on different addresses on later versions of the controller, so make them configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
OpenPOWER on IntegriCloud