summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeFilesLines
* mtd: omap2: use msecs_to_jiffies()Toan Pham2013-04-051-2/+2
| | | | | | | | | | Fix mtd-utils from returning -EIO. Formatting jffs2 filesystem was impossible when CONFIG_HZ was set to a low value. Signed-off-by: Toan Pham <tpham3783@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand_ids: use size macrosArtem Bityutskiy2013-04-052-55/+56
| | | | | | | | Use the convenient 'SZ_8K' and 'SZ_16K' macros for the eraseblock size in the NAND IDs table. This is a little more readable. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand_ids: improve LEGACY_ID_NAND macro a bitArtem Bityutskiy2013-04-052-55/+55
| | | | | | | | | Notice that all the flashes belonging to the "legacy ID" class have 512 bytes NAND page. This means we may simplify the 'LEGACY_ID_NAND()' macro as well as the NAND ID table a little. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: add 4 Toshiba nand chips for the full-id caseHuang Shijie2013-04-051-0/+19
| | | | | | | | | | | | | I have 4 Toshiba nand chips which can not be parsed out by the id data. We can not get the oob size from the id data. So add them as the full-id nand chips in the first of nand_flash_ids. The comment for the full-id items is from Brian. Signed-off-by: Huang Shijie <b32955@freescale.com> Reviewed-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: add the support to parse out the full-id nand typeHuang Shijie2013-04-051-3/+32
| | | | | | | | | | | | | When we meet a full-id nand type whose @id_len is not zero, we can use the find_full_id_nand() to parse out the necessary information for a nand chip. If we meet a non full-id nand type, we can handle it in the legacy way. Signed-off-by: Huang Shijie <b32955@freescale.com> Reviewed-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: sh_flctl: Use of_match_ptr() macroSachin Kamat2013-04-051-2/+1
| | | | | | | | | This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: gpio: Use of_match_ptr() macroSachin Kamat2013-04-051-2/+1
| | | | | | | | | This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: gpio: Use devm_kzalloc()Sachin Kamat2013-04-051-4/+1
| | | | | | | | devm_kzalloc() is device managed and makes cleanup simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: davinci_nand: Use of_match_ptr()Sachin Kamat2013-04-051-2/+2
| | | | | | | | | This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: dataflash: Use of_match_ptr() macroSachin Kamat2013-04-051-3/+1
| | | | | | | | | This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove h720x flash supportArnd Bergmann2013-04-053-128/+0
| | | | | | | | | The h720x platform support is going away in linux-3.10, so the MTD driver will also not be needed any more. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: onenand: remove OneNAND simulatorArtem Bityutskiy2013-04-053-573/+0
| | | | | | | | This commit remove OneNAND simulator on the basis that it is useless. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: merge mtdchar module with mtdcoreArtem Bityutskiy2013-04-058-40/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MTD subsystem has historically tried to be as configurable as possible. The side-effect of this is that its configuration menu is rather large, and we are gradually shrinking it. For example, we recently merged partitions support with the mtdcore. This patch does the next step - it merges the mtdchar module to mtdcore. And in this case this is not only about eliminating too fine-grained separation and simplifying the configuration menu. This is also about eliminating seemingly useless kernel module. Indeed, mtdchar is a module that allows user-space making use of MTD devices via /dev/mtd* character devices. If users do not enable it, they simply cannot use MTD devices at all. They cannot read or write the flash contents. Is it a sane and useful setup? I believe not. And everyone just enables mtdchar. Having mtdchar separate is also a little bit harmful. People sometimes miss the fact that they need to enable an additional configuration option to have user-space MTD interfaces, and then they wonder why on earth the kernel does not allow using the flash? They spend time asking around. Thus, let's just get rid of this module and make it part of mtd core. Note, mtdchar had additional configuration option to enable OTP interfaces, which are present on some flashes. I removed that option as well - it saves a really tiny amount space. [dwmw2: Strictly speaking, you can mount file systems on MTD devices just fine without the mtdchar (or mtdblock) devices; you just can't do other manipulations directly on the underlying device. But still I agree that it makes sense to make this unconditional. And Yay! we get to kill off an instance of checking CONFIG_foo_MODULE, which is an abomination that should never happen.] Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mtdcore: cleanup mtdcore.h a littleArtem Bityutskiy2013-04-051-17/+11
| | | | | | | | | | | Remove useless extern qualifiers. Not that this is a problem, but we more often declare function prototypes without 'extern', so this is just about being more consistent. And I am going to add a couple more prototypes here. Additionally, remove a useless comment. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mtdchar: use proper kernel print levelArtem Bityutskiy2013-04-051-3/+5
| | | | | | | We normally use 'pr_err()' for error messages, not 'pr_notice()'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mtdcore: remove few useless #ifdef'sArtem Bityutskiy2013-04-051-7/+4
| | | | | | | | | Remove a couple of useles '#ifdef CONFIG_PROC_FS's around procfs functions which anyway turn into empty function in 'proc_fs.h' file when CONFIG_PROC_FS is not defined. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove the h1910 NAND driverArtem Bityutskiy2013-04-053-174/+0
| | | | | | | | This driver is marked as broken for 2 years, and no one cares to make it compile and work. Now it is time to zap it. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove the ppchameleonevb NAND driverArtem Bityutskiy2013-04-053-410/+0
| | | | | | | | This driver has been marked as broken for long time and it depends on a non-existing PPCHAMELEONEVB Kconfig symbol. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: davinci_nand: use module_platform_driver_probe()Jingoo Han2013-04-051-11/+1
| | | | | | | | | This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: txx9ndfmc: use module_platform_driver_probe()Jingoo Han2013-04-051-12/+1
| | | | | | | | | This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: sh_flctl: use module_platform_driver_probe()Jingoo Han2013-04-051-12/+1
| | | | | | | | | This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: fsmc_nand: use module_platform_driver_probe()Jingoo Han2013-04-051-12/+1
| | | | | | | | | This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: atmel_nand: use module_platform_driver_probe()Jingoo Han2013-04-051-14/+1
| | | | | | | | | This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: orion_nand: use module_platform_driver_probe()Jingoo Han2013-04-051-12/+1
| | | | | | | | | This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: doc: use module_platform_driver_probe()Jingoo Han2013-04-052-24/+2
| | | | | | | | | This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: bcm47xxsflash: define opcodesRafał Miłecki2013-04-051-0/+48
| | | | | | | | | | | We need them to add erase/write support. This may duplicate some defines with bcma and/or ssb code, but it makes more sense to keep that in bcm47xxsflash which is supposed to work with both buses. Duplicated defines will be removed from ssb/bcma. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: bcm47xxsflash: store info about flash typeRafał Miłecki2013-04-052-0/+16
| | | | | | | | | It's going to be needed for erase and write operations, they differ between Atmel and ST flashes. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: bcm47xxsflash: keep a reference to the BCMARafał Miłecki2013-04-052-0/+6
| | | | | | | | | To implement erase and write support we need to "talk" with ChipCommon BCMA core which serial flash it attached to. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: mtdcore: use const qualifierArtem Bityutskiy2013-04-051-1/+1
| | | | | | | Be a bit stricter and add few more 'const' qualifiers. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: devices: add const qualifiersArtem Bityutskiy2013-04-052-2/+2
| | | | | | | Be a bit stricter and add few more 'const' qualifiers. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: maps: add const qualifiersArtem Bityutskiy2013-04-0513-25/+21
| | | | | | | Be a bit stricter and add few more 'const' qualifiers. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: physmap_of: add const qualifiersArtem Bityutskiy2013-04-051-7/+9
| | | | | | | Be a bit stricter and add few more 'const' qualifiers. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: physmap: add const qualifiersArtem Bityutskiy2013-04-051-10/+7
| | | | | | | Be a bit stricter and add few more 'const' qualifiers. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: plat-ram: add const quilifiersArtem Bityutskiy2013-04-051-1/+1
| | | | | | | Be a bit stricter and add few more 'const' qualifiers. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: add 'const' qualifier to a couple of register functionsArtem Bityutskiy2013-04-053-3/+4
| | | | | | | | | | | | | | | 'mtd_device_parse_register()' and 'parse_mtd_partitions()' functions accept a an array of character pointers. These functions modify neither the pointers nor the characters they point to. The characters are actually names of the MTD parsers. At the moment, the argument type is 'const char **', which means that only the names of the parsers are constant. Let's turn the argument type into 'const char * const *', which means that both names and the pointers which point to them are constant. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove the ixp2000 map driverArtem Bityutskiy2013-04-053-263/+0
| | | | | | | | This driver depends on CONFIG_IXP2000 which is not defined anywhere, which means this driver is dead. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove the dilnetpc map driver supportArtem Bityutskiy2013-04-053-513/+0
| | | | | | | | This driver is marked as broken for very long time. Most probably this board is just something ancient no one cares about anyway. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove the tqm8xxl map driverArtem Bityutskiy2013-04-053-260/+0
| | | | | | | | This driver depends on the CONFIG_TQM8xxL symbol, which is not defined anywhere, which means that this driver is dead. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: maps: kill the rpxlite map driverArtem Bityutskiy2013-04-053-75/+0
| | | | | | | | | | | This driver depends on the CONFIG_RPXCLASSIC and CONFIG_RPXLITE symbols, which are not defined anywhere, and this means that this driver is dead. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Cc: linux-pcmcia@lists.infradead.org Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove the mbx860 map driverArtem Bityutskiy2013-04-053-107/+0
| | | | | | | | | | | This driver depends on CONFIG_MBX which is not defined anywhere, which means this driver is dead. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Cc: linux-pcmcia@lists.infradead.org Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove the dmv182 map driverArtem Bityutskiy2013-04-053-156/+0
| | | | | | | | This driver depends on the CONFIG_DMV182 symbol which is not defined anywhere, and this means that this driver is dead. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: remove the dbox2-flash map driverArtem Bityutskiy2013-04-053-132/+0
| | | | | | | | This driver depends on the CONFIG_DBOX2 symbol which does not exist in the kernel, which means the driver is dead. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: devices: elm: check for device's presence before configurationDaniel Mack2013-04-052-3/+11
| | | | | | | | | | | | | | In case the driver is not probed - due to config mismatches or errors in the DTS files - dev_get_drvdata() returns NULL, leading to an Ooops during boot. Make elm_config() return an error in such cases to propagate the error up to the user, so it can fall back to software mode. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand_base: Removed unnecessary cleaning "onfi_version" variableAlexander Shiyan2013-04-051-2/+0
| | | | | | | | | | Variable "onfi_version" is already set to zero before nand_flash_detect_onfi() call, so additional cleaning is not necessary. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand_base: Removed unnecessary command maskingAlexander Shiyan2013-04-051-2/+1
| | | | | | | | | | NAND command, passed to cmd_ctrl(), is masked with 0xff. This patch removes this since masking is not necessary and masking is not performed in other places for same call. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: m25p80: add entry for w25q128Rafał Miłecki2013-04-051-0/+1
| | | | | | | | | | | | This device was reported over a year ago on OpenWrt mailing list in the thread [OpenWrt-Devel] RedBoot partition table with winbond m25q128vb (unfortunately, I can't find message id). Macpaul seemed to have problems with partition driver, but it seems the device was working OK. Reported-by: Macpaul Lin <macpaul@gmail.com> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: maps: Remove redundant NULL check before kfreeSyam Sidhardhan2013-04-051-2/+1
| | | | | | | | kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: m25p80: add support for SST25VF064CKrzysztof Mazur2013-04-051-0/+1
| | | | | | Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: m25p80: introduce SST_WRITE flag for SST byte programmingKrzysztof Mazur2013-04-051-9/+10
| | | | | | | | | | | | | | Not all SST devices implement the SST byte programming command. Some devices (like SST25VF064C) implement only standard m25p80 page write command. Now SPI flash devices that need sst_write() are explicitly marked with new SST_WRITE flag and the decision to use sst_write() is based on this flag instead of manufacturer id. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: ofpart: support partitions of 4 GiB and largerJoe Schaack2013-04-051-2/+5
| | | | | | | | | | | | Previously, partitions were limited to less than 4 GiB in size because the address and size were read as 32-bit values. Add support for 64-bit values to support devices of 4 GiB and larger. Signed-off-by: Joe Schaack <jschaack@xes-inc.com> Signed-off-by: Nate Case <ncase@xes-inc.com> 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>
OpenPOWER on IntegriCloud