summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6Linus Torvalds2012-03-318-127/+319
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull MTD changes from David Woodhouse: - Artem's cleanup of the MTD API continues apace. - Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst others. - More work on DiskOnChip G3, new driver for DiskOnChip G4. - Clean up debug/warning printks in JFFS2 to use pr_<level>. Fix up various trivial conflicts, largely due to changes in calling conventions for things like dmaengine_prep_slave_sg() (new inline wrapper to hide new parameter, clashing with rewrite of previously last parameter that used to be an 'append' flag, and is now a bitmap of 'unsigned long flags'). (Also some header file fallout - like so many merges this merge window - and silly conflicts with sparse fixes) * tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits) mtd: docg3 add protection against concurrency mtd: docg3 refactor cascade floors structure mtd: docg3 increase write/erase timeout mtd: docg3 fix inbound calculations mtd: nand: gpmi: fix function annotations mtd: phram: fix section mismatch for phram_setup mtd: unify initialization of erase_info->fail_addr mtd: support ONFI multi lun NAND mtd: sm_ftl: fix typo in major number. mtd: add device-tree support to spear_smi mtd: spear_smi: Remove default partition information from driver mtd: Add device-tree support to fsmc_nand mtd: fix section mismatch for doc_probe_device mtd: nand/fsmc: Remove sparse warnings and errors mtd: nand/fsmc: Add DMA support mtd: nand/fsmc: Access the NAND device word by word whenever possible mtd: nand/fsmc: Use dev_err to report error scenario mtd: nand/fsmc: Use devm routines mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform mtd: fsmc_nand: add pm callbacks to support hibernation ...
| * mtd: chips: cfi_cmdset_0002: Match ENABLE_VPP()/DISABLE_VPP() callsPaul Parsons2012-03-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | This patch is part of a set which fixes unnecessary flash erase and write errors resulting from the MTD CFI driver turning off vpp while an erase is in progress. This patch ensures that only those flash operations which call ENABLE_VPP() can then call DISABLE_VPP(). Other operations should never call DISABLE_VPP(). Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: chips: cfi_cmdset_0001: Match ENABLE_VPP()/DISABLE_VPP() callsPaul Parsons2012-03-271-6/+9
| | | | | | | | | | | | | | | | | | | | | | This patch is part of a set which fixes unnecessary flash erase and write errors resulting from the MTD CFI driver turning off vpp while an erase is in progress. This patch ensures that only those flash operations which call ENABLE_VPP() can then call DISABLE_VPP(). Other operations should never call DISABLE_VPP(). Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: fix 'Flash device refused suspend due to active operation' messageRussell King2012-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | While debugging on SA11x0, the following message was observed: "Flash device refused suspend due to active operation (state 20)" Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: simplify return logic in do_map_probe()Uwe Kleine-König2012-03-271-4/+1Star
| | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: move zero length verification to MTD API functionsArtem Bityutskiy2012-03-273-15/+0Star
| | | | | | | | | | | | | | | | | | | | | | In many places in drivers we verify for the zero length, but this is very inconsistent across drivers. This is obviously the right thing to do, though. This patch moves the check to the MTD API functions instead and removes a lot of duplication. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: remove retlen zeroing duplicationArtem Bityutskiy2012-03-274-22/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MTD API function now zero the 'retlen' parameter before calling the driver's method — do not do this again in drivers. This removes duplicated '*retlen = 0' assignent from the following methods: 'mtd_point()' 'mtd_read()' 'mtd_write()' 'mtd_writev()' 'mtd_panic_write()' Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: remove R/O checking duplicationArtem Bityutskiy2012-03-272-6/+1Star
| | | | | | | | | | | | | | | | | | | | | | Many drivers check whether the partition is R/O and return -EROFS if yes. Let's stop having duplicated checks and move them to the API functions instead. And again a bit of noise - deleted few too sparse newlines, sorry. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: do not duplicate length and offset checks in driversArtem Bityutskiy2012-03-273-16/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already verify that offset and length are within the MTD device size in the MTD API functions. Let's remove the duplicated checks in drivers. This patch only affects the following API's: 'mtd_erase()' 'mtd_point()' 'mtd_unpoint()' 'mtd_get_unmapped_area()' 'mtd_read()' 'mtd_write()' 'mtd_panic_write()' 'mtd_lock()' 'mtd_unlock()' 'mtd_is_locked()' 'mtd_block_isbad()' 'mtd_block_markbad()' This patch adds a bit of noise by removing too sparse empty lines, but this is not too bad. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: return error code from mtd_unpointArtem Bityutskiy2012-03-271-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The 'mtd_unpoint()' API function should be able to return an error code because it may fail if you specify incorrect offset. This patch changes this MTD API function and amends all the drivers correspondingly. Also return '-EOPNOTSUPP' from 'mtd_unpoint()' when the '->unpoint()' method is undefined. We do not really need this currently, but this just makes sense to be consistent with 'mtd_point()'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: add leading underscore to all mtd functionsArtem Bityutskiy2012-03-277-58/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch renames all MTD functions by adding a "_" prefix: mtd->erase -> mtd->_erase mtd->read_oob -> mtd->_read_oob ... The reason is that we are re-working the MTD API and from now on it is an error to use MTD function pointers directly - we have a corresponding API call for every pointer. By adding a leading "_" we achieve the following: 1. Make sure we convert every direct pointer users 2. A leading "_" suggests that this interface is internal and it becomes less likely that people will use them directly 3. Make sure all the out-of-tree modules stop compiling and the owners spot the big API change and amend them. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: cfi: AMD/Fujitsu compatibles: add panic write supportIra W. Snyder2012-03-271-0/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows the mtdoops driver to work on flash chips using the AMD/Fujitsu compatible command set. As the code comments note, the locks used throughout the normal code paths in the driver are ignored, so that the chance of writing out the kernel's last messages are maximized. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: use for_each_clear_bit()Akinobu Mita2012-03-241-4/+2Star
| | | | | | | | | | | | | | | | | | | | Use for_each_clear_bit() to iterate over all the cleared bit in a memory region. Signed-off-by: Akinobu Mita <akinobu.mita@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>
* | mtd: simplify return logic in do_map_probe()Uwe Kleine-König2012-02-281-4/+1Star
|/ | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* mtd: introduce mtd_write interfaceArtem Bityutskiy2012-01-091-3/+5
| | | | | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi: Allow per-mapping CFI device endiannessAaron Sierra2012-01-091-2/+3
| | | | | | | | | | | This patch allows each CFI device map to use its own endianness. The globally defined CFI endianness (CONFIG_MTD_CFI_NOSWAP, CONFIG_MTD_CFI_BE_BYTE_SWAP or CONFIG_MTD_CFI_LE_BYTE_SWAP) becomes the default value which can be overridden by a driver for a particular device. Signed-off-by: Aaron Sierra <asierra@xes-inc.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cleanup style on pr_debug messagesBrian Norris2011-09-111-6/+4Star
| | | | | 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-113-37/+25Star
| | | | | | | | | | | | | | 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: spelling, capitalization, uniformityBrian Norris2011-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | Therefor -> Therefore [Intern], [Internal] -> [INTERN] [REPLACABLE] -> [REPLACEABLE] syndrom, syndom -> syndrome ecc -> ECC buswith -> buswidth endianess -> endianness dont -> don't occures -> occurs independend -> independent wihin -> within erease -> erase blockes -> blocks ... Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* mtd: remove duplicate assignment of chip->stateTadashi Abe2011-05-252-2/+0Star
| | | | | | | | | This is a trivial patch which removes unnecessary assignment of chip->state in put_chip(). It's duplicated. Signed-off-by: Tadashi Abe <tabe@mvista.com> Acked-by: Joakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: fix hang-up in cfi erase and read contentionTadashi Abe2011-05-253-9/+5Star
| | | | | | | | | | | | | | cfi erase command hangs up when erase and read contention occurs. If read runs at the same address as erase operation, read issues Erase-Suspend via get_chip() and the erase goes into sleep in wait queue. But in this case, read operation exits by time-out without waking it up. I think the other variants (0001, 0020 and lpddr) have the same problem too. Tested and verified the patch only on CFI-0002 flash, though. Signed-off-by: Tadashi Abe <tabe@mvista.com> Acked-by: Joakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cmdset_0002: add CFI 1.5 support for S29GL-SGernot Hoyler2011-05-251-2/+3
| | | | | | | | | | | This patch adds CFI 1.5 support for the new Spansion S29GL-S device family. For details, see the data sheet on the Spansion web site: http://www.spansion.com/Support/Datasheets/S29GL_128S_01GS_00_02_e.pdf Signed-off-by: Gernot Hoyler <Gernot.Hoyler@spansion.com> Acked-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Fix common misspellingsLucas De Marchi2011-03-315-10/+10
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* mtd: cfi: add support for AMIC flashes (e.g. A29L160AT)Steffen Sledz2011-03-111-0/+1
| | | | | Signed-off-by: Steffen Sledz <sledz@dresearch.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi: fix writebufsize initializationAnatolij Gustschin2011-03-113-3/+3
| | | | | | | | | | | | When initializing mtd->writebufsize, we must take into account possible flash chip interleaving. Wrong writebufsize initialization caused UBIFS recovery issues resulting in unmountable UBIFS file system on NOR flash partitions. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: fix race in cfi_cmdset_0001 driverJoakim Tjernlund2011-03-111-21/+22
| | | | | | | | | | | | | | As inval_cache_and_wait_for_operation() drop and reclaim the lock to invalidate the cache, some other thread may suspend the operation before reaching the for(;;) loop. Therefore the loop must start with checking the chip->state before reading status from the chip. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Michael Cashwell <mboards@prograde.net> Acked-by: Stefan Bigler <stefan.bigler@keymile.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Cc: stable@kernel.org
* mtd: jedec_probe: initialise make sector erase command variableAntony Pavlov2011-03-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | In the commit 08968041bef437ec363623cd3218c2b083537ada (mtd: cfi_cmdset_0002: make sector erase command variable) introdused a field sector_erase_cmd. In the same commit initialisation of cfi->sector_erase_cmd made in cfi_chip_setup() (file drivers/mtd/chips/cfi_probe.c), so the CFI chip has no problem: ... cfi->cfi_mode = CFI_MODE_CFI; cfi->sector_erase_cmd = CMD(0x30); ... But for the JEDEC chips this initialisation is not carried out, so the JEDEC chips have sector_erase_cmd == 0. This patch adds the missing initialisation. Signed-off-by: Antony Pavlov <antony@niisi.msk.ru> Acked-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> CC: stable@kernel.org
* mtd: jedec_probe: Change variable name from cfi_p to cfiAntony Pavlov2011-03-111-16/+16
| | | | | | | | | | | In the following commit, we'll need to use the CMD() macro in order to fix the initialisation of the sector_erase_cmd field. That requires the local variable to be called 'cfi', so change it first in a simple patch. Signed-off-by: Antony Pavlov <antony@niisi.msk.ru> Acked-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> CC: stable@kernel.org
* mtd: cfi: add writebufsize initializationAnatolij Gustschin2011-01-063-0/+6
| | | | | | | | | Initialize mtd->writebufsize to the value obtained by CFI query command at probe time. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_cmdset_0002: add support for Samsung K8D3x16UxC NOR chipsGuillaume LECERF2011-01-061-1/+3
| | | | | | | | | | | | | These chips report CFI v3.3 [1], so patch them on the fly to the more correct v1.3. Discussed and tested by the OpenWRT people [2]. [1] http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/NORFlash/32Mbit/K8D3216UBC/ds_K8D3x16UxC_rev17.pdf [2] https://dev.openwrt.org/ticket/866 Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_cmdset_0002: add support for Samsung K8D6x16UxM NOR chipsGuillaume LECERF2011-01-061-3/+13
| | | | | | | | | | | | | These chips report CFI v0.0 [1], so extend cfi_fixup_major_minor() to patch all Samsung chips from 0.0 to 1.0. Discussed and tested by the OpenWRT people [2]. [1] http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/NORFlash/64Mbit/K8D6316UTM/ds_K8D6x16UxM_rev16.pdf [2] https://dev.openwrt.org/ticket/7348 Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_fixup: remove unused 'param' parameterGuillaume LECERF2010-12-034-76/+76
| | | | | | | | | The 'param' parameter has never been used since its introduction, so simply remove it. Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge branch 'master' of ↵David Woodhouse2010-10-301-2/+2
|\ | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Conflicts: drivers/mtd/mtd_blkdevs.c Merge Grant's device-tree bits so that we can apply the subsequent fixes. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * Update broken web addresses in the kernel.Justin P. Mattock2010-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch below updates broken web addresses in the kernel Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Finn Thain <fthain@telegraphics.com.au> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Matt Turner <mattst88@gmail.com> Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Acked-by: Ben Pfaff <blp@cs.stanford.edu> Acked-by: Hans J. Koch <hjk@linutronix.de> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Revert "mtd: cleanup Kconfig dependencies"David Woodhouse2010-10-261-22/+24
| | | | | | | | | | | | | | | | | | | | This reverts commit 432dc821c90114f9b0e00f6752a700e937516ade. The individual CFI geometry options were carefully set up to get sane default values if the CFI_ADV_OPTIONS wasn't set, and it wasn't appropriate to move them into an if/endif block. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: cfi_cmdset_0002: make sector erase command variableGuillaume LECERF2010-10-262-4/+8
| | | | | | | | | | | | | | | | | | Some old SST chips use 0x50 as sector erase command, instead of 0x30. Make this value variable to handle such chips. Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: cfi_cmdset_0002: add CFI detection for SST 38VF640x chipsGuillaume LECERF2010-10-261-0/+26
| | | | | | | | | | | | | | | | Add support for SST38VF640x chips in CFI mode. Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: yidong zhang <zhangyd6@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: cfi_util: add support for switching SST 39VF640xB chips into QRY modeGuillaume LECERF2010-10-261-0/+7
| | | | | | | | | | Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: cfi_cmdset_0001: use defined value of P_ID_INTEL_PERFORMANCE instead of ↵Guillaume LECERF2010-10-261-2/+2
| | | | | | | | | | | | | | hardcoded one Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: cfi_cmdset_0002: code cleanupsWolfram Sang2010-10-251-39/+8Star
| | | | | | | | | | | | | | | | | | | | | | - remove disabled code (hasn't been touched since the beginning of git and should be reimplemented if really needed) - convert remaining c++-comments to plain c-style Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | mtd: cleanup Kconfig dependenciesH Hartley Sweeten2010-10-251-24/+22Star
|/ | | | | | | | | | Remove the MTD!=n dependency since that is handled by drivers/mtd/Kconfig. Simplify the dependency checks for mtd/chips by using if/endif blocks. Remove all default n since that is the Kconfig default. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: Remove obsolete <mtd/compatmac.h> includeDavid Woodhouse2010-08-088-8/+0Star
| | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_cmdset_0002: consider version 1.4 as a valid primary extension versionGuillaume LECERF2010-08-061-3/+4
| | | | | | | | | | The Spansion S29WS-P device family uses CFI version 1.4 [1]. Consider it as a valid version. [1] http://www.spansion.com/Support/Datasheets/s29ws-p_00_a12_e.pdf Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: change struct flchip_shared spinlock locking into mutexStefani Seibold2010-08-061-10/+10
| | | | | | | | | | | | This patch prevent to schedule while atomic by changing the flchip_shared spinlock into a mutex. This should be save since no atomic path will use this lock. It was suggested by Arnd Bergmann and Vasiliy Kulikov. Signed-off-by: Stefani Seibold <stefani@seibold.net> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_cmdset_0002: fix the check for valid primary extension versionsGuillaume LECERF2010-08-041-3/+12
| | | | | | | | | | | | Valid primary extension versions are: 1.0, 1.1, 1.2, 1.3 [1][2]. Fix the check in cfi_cmdset_0002 accordingly. [1] http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 [2] http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_probe: print manufacturer and id of probed chipGuillaume LECERF2010-08-021-2/+2
| | | | | | Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: add an ioctl to query the lock status of a flash sectorRichard Cochran2010-08-021-0/+10
| | | | | | | | | | This patchs adds a way for user space programs to find out whether a flash sector is locked. An optional driver method in the mtd_info struct provides the information. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_cmdset_0002: use AMD standard command-set with Winbond flash chipsGuillaume LECERF2010-05-202-0/+4
| | | | | | | | | | | | Tested with W19L320SBT9C [1]. [1] http://www.datasheetarchive.com/pdf-datasheets/Datasheets-40/DSA-795343.pdf [dwmw2: Fix MODULE_ALIAS and linkage] Signed-off-by: Obinou <obconseil@gmail.com> Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_cmdset_0002: Fix MODULE_ALIAS and linkage for new 0701 commandset IDDavid Woodhouse2010-05-201-0/+3
| | | | | Signed-off-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: cfi_cmdset_0002: Fix argument order in bootloc warningDavid Woodhouse2010-05-141-1/+1
| | | | | | | Doh. Pointed out by Guillaume LECERF <glecerf@gmail.com> since I managed to miss it in my test builds. S'what I get for hacking at 2am, I suppose. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>