summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/mxc_nand.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * mxc_nand: remove unused definesSascha Hauer2009-11-121-7/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc nand: modify send_page to send all pages, not only oneSascha Hauer2009-11-121-25/+20
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc nand: simplify command processingSascha Hauer2009-11-121-46/+35
| | | | | | | | | | | | | | Instead of having two switch/case with other operations in between, use only one switch/case Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc nand: use buffersSascha Hauer2009-11-121-233/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | The NAND controller has some limitations how to access the internal buffers. It only allows 32 bit accesses. The driver used to work around this by having special alignment aware copy routines. We now copy the whole page to a buffer in memory and let the access functions use this buffer. This simplifies the driver. A bonnie++ test showed that this has no negative performance impact on the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc nand: use resource_size()Sascha Hauer2009-11-121-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc nand: remove dead codeSascha Hauer2009-11-121-17/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc nand: remove debug paramSascha Hauer2009-11-121-8/+8
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: introduce mxc_do_addr_cycleSascha Hauer2009-11-121-40/+47
| | | | | | | | | | | | | | | | This factors the address cycle to a seperate function. This becomes useful in a later patch where we can simplify the command processing by making use of this function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: merge send_read_page and send_prog_pageSascha Hauer2009-11-121-41/+13
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: cleanup initializationSascha Hauer2009-11-121-50/+22
| | | | | | | | | | | | | | | | The oob layout was initialized several times. Instead, use a smallpage layout by default and switch to a largepage afterwards if necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mxc_nand: cleanup eccoob descriptionsSascha Hauer2009-11-121-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original Freescale driver used to have eccoob descriptions like this: static struct nand_ecclayout nand_hw_eccoob_8 = { .eccbytes = 5, .eccpos = {6, 7, 8, 9, 10}, .oobfree = {{0, 5}, {11, 5}} }; static struct nand_ecclayout nand_hw_eccoob_16 = { .eccbytes = 5, .eccpos = {6, 7, 8, 9, 10}, .oobfree = {{0, 6}, {12, 4}} }; The former was used for 8bit flashes and the latter for 16bit flashes. They honored the fact that the bad block marker on 8bit flashes is on byte 5 while on 16bit flashes it is on byte 11. In the Kernel driver this was copied wrong and we ended up with two identical descriptions. Change it so that we have only one description which leaves byte 5 and byte 11 unspecified so that it won't be used by others. Also, rename the descriptions to nand_hw_eccoob_smallpage and nand_hw_eccoob_largepage so that it can't be confused with Nand chip bus widths (what actually happened in this driver) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: don't use __exit_p to wrap mxcnd_removeUwe Kleine-König2009-11-301-1/+1
|/ | | | | | | | | The function mxcnd_remove is defined using __devexit, so don't use __exit_p but __devexit_p to wrap it. 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>
* Revert "mtd: mxc_nand: fix 2KiB pagesize NAND on i.MX27"David Woodhouse2009-10-201-15/+1
| | | | | | | | | | | | This reverts commit 71b7d0d90d536ae4e70929cc59a1a9f6ba457c6c. The problem which that commit attempted to fix was a bootloader issue, which had been misunderstood. The 'fix' causes lots of false bad blocks for existing users with sane firmware. Thanks to Mathieu Berland for diagnosing the problem coherently. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: move mxcnd_remove to .exit.textUwe Kleine-König2009-10-171-1/+1
| | | | | | | | | | | | | The function mxcnd_remove is used only wrapped by __exit_p so define it using __exit. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Vladimir Barinov <vova.barinov@gmail.com> Cc: Vladimir Barinov <vbarinov@embeddedalley.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mxc_nand: fix 2KiB pagesize NAND on i.MX27Eric Benard2009-09-191-1/+15
| | | | | | | | | | | | This patch allows i.MX27 to support 2KiB pagesize NAND flash. We are using a 1.8V NAND flash which datasheet (unfortunately only available under NDA) says : Page size: x8: 2,112 bytes (2,048 + 64 bytes). Without this patch, all sectors are marked as bad eraseblock. Signed-off-by: Eric Benard <ebenard@eukrea.com> Acked-by : Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge branch 'next-mtd' of git://aeryn.fluff.org.uk/bjdooks/linuxDavid Woodhouse2009-06-081-16/+24
|\
| * mtd: MXC NAND driver fixes (v5)Vladimir Barinov2009-05-291-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch fixes: - re-initialization of host->col_addr which is used as byte index between the successive READID flash commands. - compile error when CONFIG_PM is enabled - pass on the error code from clk_get() - return -ENOMEM in case of failed ioremap() - pass on the return value of platform_driver_probe() directly - remove excessive printk - let command line partition table parsing with mxc_nand name. The cmd_line parsing is done via <mtd-id> name that differs from mxc_nand by default and looks like "NAND 256MiB 1,8V 8-bit" Signed-off-by: Vladimir Barinov <vbarinov@embeddedalley.com> Signed-off-by: Lothar Wassmann <LW@KARO-electronics.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: nand: max_retries off by one in mxc_nandRoel Kluin2009-06-051-1/+1
| | | | | | | | | | | | | | with `while (max_retries-- > 0)' max_retries reaches -1 after the loop. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: MXC NAND support for 2KiB page size flashesVladimir Barinov2009-06-051-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | - Add support for 2KiB page size flashes - Fix page address access for large pages - Detect oob layout at runtime - handle pagesize_2k variable - Fix oob16 layout: reserve location 5 of oob area since it's used for bbt Signed-off-by: Vladimir Barinov <vova.barinov@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: mxc_nand: add correct dev_id parameter to free_irq() callsMagnus Lilja2009-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | Make sure to pass the same dev_id data to free_irq() that was used when calling request_irq(), otherwise we get a warning about freeing an already free IRQ. Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | [MTD] Remove mtd->{suspend,resume} calls from board driversDavid Woodhouse2009-05-261-5/+0
|/ | | | | | | | | Now the MTD core will do this for us, we don't need to hook it up from the board drivers. Shame we can't do shutdown from the class too... Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge git://git.infradead.org/mtd-2.6Linus Torvalds2009-04-061-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: (53 commits) [MTD] struct device - replace bus_id with dev_name(), dev_set_name() [MTD] [NOR] Fixup for Numonyx M29W128 chips [MTD] mtdpart: Make ecc_stats more realistic. powerpc/85xx: TQM8548: Update DTS file for multi-chip support powerpc: NAND: FSL UPM: document new bindings [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delays [MTD] [NAND] FSL-UPM: add multi chip support [MTD] [NOR] Add device parent info to physmap_of [MTD] [NAND] Add support for NAND on the Socrates board [MTD] [NAND] Add support for 4KiB pages. [MTD] sysfs support should not depend on CONFIG_PROC_FS [MTD] [NAND] Add parent info for CAFÉ controller [MTD] support driver model updates [MTD] driver model updates (part 2) [MTD] driver model updates [MTD] [NAND] move gen_nand's probe function to .devinit.text [MTD] [MAPS] move sa1100 flash's probe function to .devinit.text [MTD] fix use after free in register_mtd_blktrans [MTD] [MAPS] Drop now unused sharpsl-flash map [MTD] ofpart: Check name property to determine partition nodes. ... Manually fix trivial conflict in drivers/mtd/maps/Makefile
| * [MTD] support driver model updatesDavid Brownell2009-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Follow-on patch to the previous driver model patch for the MTD framework. This one makes various MTD drivers connect to the driver model tree, so /sys/devices/virtual/mtd/* nodes are no longer present ... mostly drivers used on boards I have handy. Based on a patch from Kay Sievers. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | [ARM] MXC: remove _clk suffix from clock namesSascha Hauer2009-03-131-1/+1
|/ | | | | | | | | The context makes it clear already that these are clocks, so there's no need for such a suffix. This patch only changes the clocks actually used in the tree. The remaining clocks are renamed in the subsequent architecture specific patches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* [MTD] [NAND] Freescale i.MX2 NAND driverSascha Hauer2008-09-021-0/+1077
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>
OpenPOWER on IntegriCloud