summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/plat_nand.c
Commit message (Collapse)AuthorAgeFilesLines
* gen_nand: Test if nr_chips field is validMarek Vasut2010-08-121-0/+5
| | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: gen_nand: fix support for multiple chipsMarek Vasut2010-08-061-1/+1
| | | | | | | | | This patch corrects a problem where gen_nand driver assumed there can be only one chip and ignored the pdata->chip.nr_chips value. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: plat_nand: request memory resource before doing ioremapH Hartley Sweeten2009-10-201-16/+34
| | | | | | | | Add a request_mem_region() before doing the ioremap(). Also, use the resource_size macro instead of doing the end - start + 1 calc by hand. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: plat_nand: allow platform to set partitionsH Hartley Sweeten2009-06-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Add optional callback to allow platform to initialize partitions. Static partitions on a nand device could vary depending on the size of the device. This patch allows an optional platform callback to be used to setup this partition information at runtime. Scan order is: 1) chip.part_probe_types 2) chip.set_parts 3) chip.partitions 4) full mtd device (fallback for no partitions) Some of the existing nand drivers could possibly be replaced by the plat_nand driver by using this patch. These include autcpu12.c and ts7250.c drivers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: plat_nand: add platform probe/remove callbacksH Hartley Sweeten2009-06-051-2/+11
| | | | | | | | | | | | | | | Add optional probe and remove callbacks to the plat_nand driver. Some platforms may require additional setup, such as configuring the memory controller, before the nand device can be accessed. This patch provides an optional callback to handle this setup as well as a callback to teardown the setup. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Tested-by: Alexander Clouter <alex@digriz.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: extend plat_nand for (read|write)_bufAlexander Clouter2009-06-051-0/+2
| | | | | | | | | | | | | This patch adds (write|read)_buf callbacks to plat_nand. The NAND on the TS-7800 provisioned by the FPGA allows readw() and readl() to be used which gives a 2.5x speed up. To be able to use this from the plat_nand driver a hook for read_buf (and also write_buf whilst we are in there) need to be made available. This patch adds the hook. Signed-off-by: Alexander Clouter <alex@digriz.org.uk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: plat_nand: fix section errorThomas Chou2009-06-051-1/+1
| | | | | | | | | | | | | With CONFIG_HOTPLUG=n, the following eror occurred during link: local symbol 0: discarded in section `.devexit.text' from drivers/built-in.o It was caused by improper section reference. The __devexit_p() should be added to the .remove function. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [NAND] move gen_nand's probe function to .devinit.textUwe Kleine-König2009-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | A pointer to plat_nand_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Hamish Moffatt <hamish@cloud.net.au> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Vitaly Wool <vitalywool@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2009-01-061-1/+1
| | | | | | CC: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [MTD] [NAND] plat_nand: set mtd->nameHamish Moffatt2008-04-221-0/+1
| | | | | | | | | | | | 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>
* [MTD] [NAND] fix platform driver hotplug/coldplugKay Sievers2008-04-221-0/+1
| | | | | | | | | | | | | | | Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, 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>
* [MTD] [NAND] Remove unused variable in plat_nand_removeLi Zefan2008-02-031-0/+2
| | | | | | | | 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>
* [MTD] [NAND] platform NAND driver: add driverVitaly Wool2007-05-081-0/+150
This patch adds support for generic platform NAND driver. Updated after tglx's review/discussion in IRC #mtd channel. Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
OpenPOWER on IntegriCloud