aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-29mtd: m25p80: add support for Micron N25Q128Jan Luebbe1-0/+1
Signed-off-by: Jan Luebbe <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: lpc32xx_mlc: Cleanup after DT-only conversionRoland Stigge1-28/+18
The LPC32xx's DT-only conversion of the MLC NAND driver makes NAND config via platform_data obsolete. Dropped by this patch. Further, the driver really needs CONFIG_OF, which is already reflected by the dependency on ARCH_LPC32XX which depends on CONFIG_OF. So also dropping CONFIG_OF ifdefs. There is still platform_data necessary to supply the dma_filter callback for the dma engine. This is a completely different data structure than the old platform_data for NAND config, so renaming some old "pdata" variable to "ncfg" to prevent confusion with the new platform data. Signed-off-by: Roland Stigge <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: lpc32xx_slc: Cleanup after DT-only conversionRoland Stigge1-31/+21
The LPC32xx's DT-only conversion of the SLC NAND driver makes NAND config via platform_data obsolete. Dropped by this patch. Further, the driver really needs CONFIG_OF, which is already reflected by the dependency on ARCH_LPC32XX which depends on CONFIG_OF. So also dropping CONFIG_OF ifdefs. There is still platform_data necessary to supply the dma_filter callback for the dma engine. This is a completely different data structure than the old platform_data for NAND config, so renaming some old "pdata" variable to "ncfg" to prevent confusion with the new platform data. Signed-off-by: Roland Stigge <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: allow MTD_NAND_GPMI_NAND to be built as moduleFabio Estevam1-1/+1
Allow MTD_NAND_GPMI_NAND to be built as module. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand: nand_bbt: export nand_update_bbtFabio Estevam1-1/+2
When building MTD_NAND_GPMI_NAND as module, the following error shows up: ERROR: "nand_update_bbt" [drivers/mtd/nand/gpmi-nand/gpmi_nand.ko] undefined! Export nand_update_bbt to fix it. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand: rename create_bbt()'s 'len' variable to 'numpages'Shmulik Ladkani1-12/+12
Rename 'len' variable of create_bbt/scan_block_fast/scan_block_full to 'numpages', since it really means number of pages to scan when searching for the BBM (and not the byte length of the scan). Signed-off-by: Shmulik Ladkani <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: s3c2410: Fix compiler warningsSachin Kamat1-0/+2
Fixes the following warnings: ‘s3c2410_nand_correct_data’ defined but not used [-Wunused-function] ‘s3c2410_nand_enable_hwecc’ defined but not used [-Wunused-function] ‘s3c2412_nand_enable_hwecc’ defined but not used [-Wunused-function] ‘s3c2440_nand_enable_hwecc’ defined but not used [-Wunused-function] ‘s3c2410_nand_calculate_ecc’ defined but not used [-Wunused-function] ‘s3c2412_nand_calculate_ecc’ defined but not used [-Wunused-function] ‘s3c2440_nand_calculate_ecc’ defined but not used [-Wunused-function] The above functions are called only when CONFIG_MTD_NAND_S3C2410_HWECC is defined. Thus making them conditional. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: s3c2410: Use devm_* functionsSachin Kamat1-37/+10
devm_* functions are device managed functions and make cleanup code simpler and smaller. devm_kzalloc, devm_clk_get and devm_request_and_ioremap functions are used. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: maps: rbtx4939-flash: delete unneeded testJulia Lawall1-2/+0
Err has only been initialized to 0 at this, so it is not possible that this test can be true. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: fix kernel-doc warning in include/linux/mtd/nand.hRandy Dunlap1-0/+1
Fix kernel-doc warning in <linux/mtd/nand.h>: Warning(include/linux/mtd/nand.h:659): No description found for parameter 'read_byte' Signed-off-by: Randy Dunlap <[email protected]> Acked-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: mtdpart: break it as soon as we parse out the partitionsHuang Shijie1-1/+4
We may cause a memory leak when the @types has more then one parser. Take the `default_mtd_part_types` for example. The default_mtd_part_types has two parsers now: `cmdlinepart` and `ofpart`. Assume the following case: The kernel command line sets the partitions like: #gpmi-nand:20m(boot),20m(kernel),1g(rootfs),-(user) But the devicetree file(such as arch/arm/boot/dts/imx28-evk.dts) also sets the same partitions as the kernel command line does. In the current code, the partitions parsed out by the `ofpart` will overwrite the @pparts which has already set by the `cmdlinepart` parser, and the the partitions parsed out by the `cmdlinepart` is missed. A memory leak occurs. So we should break the code as soon as we parse out the partitions, In actually, this patch makes a priority order between the parsers. If one parser has already parsed out the partitions successfully, it's no need to use another parser anymore. Signed-off-by: Huang Shijie <[email protected]> Cc: [email protected] Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: physmap_of: Add "no-unaligned-direct-access" DT propertyStefan Roese2-0/+21
On some platforms (e.g. MPC5200) a direct 1:1 mapping may cause problems with JFFS2 usage, as the local bus (LPB) doesn't support unaligned accesses as implemented in the JFFS2 code via memcpy(). By defining "no-unaligned-direct-access", the flash will not be exposed directly to the MTD users (e.g. JFFS2) any more. Signed-off-by: Stefan Roese <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: spear_smi: use devm_ functions consistentlyJulia Lawall1-65/+18
Use devm_kzalloc for all calls to kzalloc and not just the first. Use devm functions for other allocations as well. Move the call to platform_get_resource(pdev, IORESOURCE_MEM, 0) closer to where its result is passed to devm_request_and_ioremap to make the lack of need for a NULL test more evident. The semantic match that finds the inconsistency is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ @@ *devm_kzalloc(...) ... *kzalloc(...) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: lantiq: Add NAND support on Lantiq XWAY SoC.John Crispin3-0/+210
The driver uses plat_nand. As the platform_device is loaded from DT, we need to lookup the node and attach our xway specific "struct platform_nand_data" to it. Signed-off-by: John Crispin <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: check for valid pdata inside plat_nandJohn Crispin1-0/+5
If plat_nand loads and the platform_data is not properly set it will segfault. Signed-off-by: John Crispin <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29defconfigs: remove CONFIG_MTD_NAND_VERIFY_WRITEHuang Shijie15-15/+0
CONFIG_MTD_NAND_VERIFY_WRITE was killed recently, so remove it from defconfigs as well. Signed-off-by: Huang Shijie <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: kill MTD_NAND_VERIFY_WRITEHuang Shijie26-550/+0
Just as Artem suggested: "Both UBI and JFFS2 are able to read verify what they wrote already. There are also MTD tests which do this verification. So I think there is no reason to keep this in the NAND layer, let alone wasting RAM in the driver to support this feature. Besides, it does not work for sub-pages and many drivers have it broken. It hurts more than it provides benefits." So kill MTD_NAND_VERIFY_WRITE entirely. Signed-off-by: Huang Shijie <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: m25p80: add support for Micron N25Q256AVivien Didelot1-0/+3
The manufacturer datasheet can be found on the Micron website, under the name n25q_256mb_3v_65nm.pdf: http://www.micron.com/search?source=ps&q=n25q_256mb_3v_65nm Signed-off-by: Vivien Didelot <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: maps: pci: remove dead codeWolfram Sang1-23/+0
Removes disabled printk (which should be dev_dbg these days) as well as #if 0 blocks (which are trivial to reimplement if ever needed) to meet basic CodingStyle guidelines. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: use %*ph[CN] to dump small buffersAndy Shevchenko4-41/+14
There is new format specified that helps to dump small buffers. It makes the code simpler and nicer. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Jiandong Zheng <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: gpmi: fix the compiler warningsHuang Shijie3-16/+12
Signed-off-by: Huang Shijie <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand: davinci: add OF support for davinci nand controllerHeiko Schocher2-1/+122
add OF support for the davinci nand controller. Signed-off-by: Heiko Schocher <[email protected]> Acked-by: Sekhar Nori <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29JFFS2: fix unmount regressionArtem Bityutskiy1-0/+4
This patch fixes regression introduced by "8bdc81c jffs2: get rid of jffs2_sync_super". We submit a delayed work in order to make sure the write-buffer is synchronized at some point. But we do not flush it when we unmount, which causes an oops when we unmount the file-system and then the delayed work is executed. This patch fixes the issue by adding a "cancel_delayed_work_sync()" infocation in the '->sync_fs()' handler. This will make sure the delayed work is canceled on sync, unmount and re-mount. And because VFS always callse 'sync_fs()' before unmounting or remounting, this fixes the issue. Reported-by: Ludovic Desroches <[email protected]> Cc: [email protected] [3.5+] Signed-off-by: Artem Bityutskiy <[email protected]> Tested-by: Ludovic Desroches <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: allow uclinux map driver to be used on any ColdFire CPU platformGreg Ungerer1-1/+1
The uclinux.c map driver has traditionally been used only on non-MMU based systems. But there is no fundamental reason it can't be used on systems running with virtual memory. Some ColdFire CPU based systems now have full paged MMU hardware and can use the uclinux.c mapping driver, so making the uclinux.c driver configuration depend on !CONFIG_MMU doesn't make sense now. Allow the CONFIG_MTD_UCLINUX option to be enabled if CONFIG_COLDFIRE is enabled. (I have chosen not to just more generally allow uclinux.c for any MMU type to keep this option hidden for most systems that are not interested in setting it). Signed-off-by: Greg Ungerer <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: fix wrong usage of ioremap_nocache() in uclinux.c map driverGreg Ungerer1-6/+9
The uclinux.c mapping driver uses ioremap_nocache() to map its physical mapping address to a system virtual address. Problem is that the region it is mapping is not device memory. It is ordinary system RAM. On most non-MMU systems this doesn't matter, and the mapping is always a 1:1 translation of the address. On paged memory systems on some architectures the page table mappings are not compatible between normal RAM and device memory. If we want to use the uclinux.c mapping driver on real MMU enabled systems we should be using the kernel virtual address that the mapping is at. For architectures that support the traditional initrd they use phys_to_virt or __va to convert the physical start initrd address to a kernel usable virtual address. The uclinux filesystem mapping is even more restrictive than the typical initrd, it always follows the kernels own bss section (so always in directly mapped memory). Therefore we can use the usual phys_to_virt to translate the physical start address to a virtual address. Signed-off-by: Greg Ungerer <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: s3c2410: Fix line over 80 characters warningSachin Kamat1-10/+20
Fixes the following checkpatch warnings: WARNING: line over 80 characters Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: s3c2410: Fix checkpatch warnings and errors related to whitespacesSachin Kamat1-8/+9
Fixes checkpatch warnings and errors related to whitespaces. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: s3c2410: Do not initialise statics to 0 or NULLSachin Kamat1-37/+27
Fixes the following checkpatch errors: ERROR: do not initialise statics to 0 or NULL +static int hardware_ecc = 0; ERROR: do not initialise statics to 0 or NULL +static const int clock_stop = 0; Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: s3c2410: Use <linux/io.h> instead of <asm/io.h>Sachin Kamat1-2/+1
Fixes the following checkpatch warning: WARNING: Use #include <linux/io.h> instead of <asm/io.h> Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: s3c2410: Use pr_* instead of printkSachin Kamat1-1/+4
Use pr_* instead of printk. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: s3c2410: Use module_platform_driver()Sachin Kamat1-14/+1
This makes the code simpler by eliminating module_init() and module_exit(). Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand: Include IMX6 in the list of supported SoCsFabio Estevam1-1/+1
Include IMX6 in the list of supported SoCs. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: autcpu12-nvram: Convert driver to platform_deviceAlexander Shiyan3-70/+101
Because we can have a single kernel to support multiple machines, we need to make loading specific drivers for the target platform only. For this, driver is converted to the platform driver. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: autcpu12-nvram: Fix compile breakageAlexander Shiyan1-8/+11
Update driver autcpu12-nvram.c so it compiles; map_read32/map_write32 no longer exist in the kernel so the driver is totally broken. Additionally, map_info name passed to simple_map_init is incorrect. Signed-off-by: Alexander Shiyan <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Cc: [email protected] Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: omap2: fix some typos in commentsPeter Meerwald1-5/+5
Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driverBrian Norris2-8/+2
The NAND_CHIPOPTIONS_MSK has limited utility and is causing real bugs. It silently masks off at least one flag that might be set by the driver (NAND_NO_SUBPAGE_WRITE). This breaks the GPMI NAND driver and possibly others. Really, as long as driver writers exercise a small amount of care with NAND_* options, this mask is not necessary at all; it was only here to prevent certain options from accidentally being set by the driver. But the original thought turns out to be a bad idea occasionally. Thus, kill it. Note, this patch fixes some major gpmi-nand breakage. Signed-off-by: Brian Norris <[email protected]> Tested-by: Huang Shijie <[email protected]> Cc: [email protected] Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: atmel nand: fix gpio missing requestJean-Christophe PLAGNIOL-VILLARD1-2/+63
without this the gpio will not be muxed as a gpio by the current custom pinmux or later by the pinctrl Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: docg4: fix oob readsMike Dunn1-27/+6
This patch does two closely related things: (1) Currently the ecc.read_page() method does not fill the nand->oob_poi buffer with the oob data, but instead reads oob into a local buffer. Fix this by filling the oob_poi buffer instead of a local buffer. The 'oob_required' argument is quietly ignored; the device must always read oob after the page data, and it is presumed that there's no harm in filling oob_poi, even when not explicitly requested. (2) Always read oob from the device in ecc.read_oob(), instead of copying it from a local buffer under some circumstances. Signed-off-by: Mike Dunn <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: spear_smi: fix compilation warningArtem Bityutskiy1-1/+1
drivers/mtd/devices/spear_smi.c: In function 'spear_smi_probe': drivers/mtd/devices/spear_smi.c:984:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: spear_smi: failure test for null rather than negative integerJulia Lawall1-1/+1
dev_get_platdata returns a pointer, so the failure value would be NULL rather than a negative integer. The semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,e; statement S1,S2; @@ *x = dev_get_platdata(...) ... when != x = e *if (x < 0) S1 else S2 // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Stefan Roese <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: lpc32xx_mlc: Make driver independent of AMBA DMA engine driverRoland Stigge2-2/+31
This patch makes the MLC NAND driver independent of the single AMBA DMA engine driver by using the platform data provided dma_filter callback. Signed-off-by: Roland Stigge <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: lpc32xx_slc: Make driver independent of AMBA DMA engine driverRoland Stigge2-2/+31
This patch makes the SLC NAND driver independent of the single AMBA DMA engine driver by using the platform data provided dma_filter callback. Signed-off-by: Roland Stigge <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand: rename '_raw' BBT scan functionsBrian Norris1-10/+10
None of these scanning functions use MTD_OPS_RAW mode any more, so there's really nothing 'raw' about them. Rename them to (hopefully) make the code a little clearer. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand: use ECC, if present, when scanning OOBBrian Norris1-7/+20
scan_read_raw_oob() is used in only in places where the MTD_OPS_PLACE_OOB mode is preferable to MTD_OPS_RAW mode, so use MTD_OPS_PLACE_OOB instead. MTD_OPS_PLACE_OOB provides the same functionality with the potential[1] added bonus of error correction. This brings scan_block_full() in line with scan_block_fast() so that they both read bad block markers with MTD_OPS_PLACE_OOB. This can help in preventing 0xff markers (in good blocks) from being interpreted as bad block indicators in the presence of a single bitflip. Note that ECC error codes (EUCLEAN or EBADMSG) are already silently ignored in all users of scan_read_raw_oob(). [1] Few drivers perform proper error correction on OOB data. In those cases, the use of MTD_OPS_RAW vs. MTD_OPS_PLACE_OOB is not significant. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand_bbt: use string libraryBrian Norris1-18/+9
Some nand_bbt code can be shortened by using memcmp() and memchr_inv(). As an added bonus, there is a possible performance benefit. Borrowed some code from Akinobu Mita. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: nand: remove unused 'int' return codesBrian Norris1-11/+8
The return codes for read_abs_bbts() and search_read_bbts() are always non-zero, and so don't have much meaning. Just remove them. Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Shmulik Ladkani <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: check for max_bitflips in mtd_read_oob()Brian Norris1-1/+13
mtd_read_oob() has some unexpected similarities to mtd_read(). For instance, when ops->datbuf != NULL, nand_base.c might return max_bitflips; however, when ops->datbuf == NULL, nand_base's code potentially could return -EUCLEAN (no in-tree drivers do this yet). In any case where the driver might return max_bitflips, we should translate this into an appropriate return code using the bitflip_threshold. Essentially, mtd_read_oob() duplicates the logic from mtd_read(). This prevents users of mtd_read_oob() from receiving a positive return value (i.e., from max_bitflips) and interpreting it as an unknown error. Artem: amend comments. Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Reviewed-by: Shmulik Ladkani <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: m25p80: Fix the Spansion chip detectionMarek Vasut1-5/+5
Due to the implementation of the following loop at the end of jedec_probe(): 776 for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) { 777 info = (void *)m25p_ids[tmp].driver_data; 778 if (info->jedec_id == jedec) { 779 if (info->ext_id != 0 && info->ext_id != ext_jedec) 780 continue; 781 return &m25p_ids[tmp]; 782 } 783 } In particular line 779 in the above numbering, the chips with ext_id != 0 must be ordered first in the list of chips (m25p_ids[]). Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: m25p80: add support for Spansion s25sl064p chipMarek Vasut1-0/+1
Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-09-29mtd: gpmi: change the code for clocksHuang Shijie3-18/+112
The gpmi nand driver may needs several clocks(MX6Q needs five clocks). In the old clock framework, all these clocks are chained together, all you need is to manipulate the first clock. But the kernel uses the common clk framework now, which forces us to get the clocks one by one. When we use them, we have to enable them one by one too. Signed-off-by: Huang Shijie <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>