summaryrefslogtreecommitdiffstats
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-053-60/+59
| | | | | | | | | 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: add new fields to nand_flash_dev{}Huang Shijie2013-04-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | As time goes on, we begin to meet the situation that we can not get enough information from some nand chips's id data. Take some Toshiba's nand chips for example. I have 4 Toshiba's nand chips in my hand: TC58NVG2S0F, TC58NVG3S0F, TC58NVG5D2, TC58NVG6D2 When we read these chips' datasheets, we will get the geometry of these chips: TC58NVG2S0F : 4096 + 224 TC58NVG3S0F : 4096 + 232 TC58NVG5D2 : 8192 + 640 TC58NVG6D2 : 8192 + 640 But we can not parse out the correct oob size for these chips from the id data. This patch adds some new fields to the nand_flash_dev{}: @id_len: the valid length of the id data. See the comments in nand_id_has_period() @oobsize: the oob size. 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>
* arch: cris: amend Kconfig after mtdchar mergeArtem Bityutskiy2013-04-052-2/+0
| | | | | | | | The mtdchar module was merged with the mtdcore module, which means that the MTD_CHAR Kconfig symbol does not exist any more. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* arm: mach-pxa: amend Kconfig after mtdchar mergeArtem Bityutskiy2013-04-051-1/+0
| | | | | | | | The mtdchar module was merged with the mtdcore module, which means that the MTD_CHAR Kconfig symbol does not exist any more. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Documentation: mtd: amend the sysfs docs after mtdchar mergeArtem Bityutskiy2013-04-051-4/+2
| | | | | | | | The mtdchar module was merged with the mtdcore module, which means that the MTD_CHAR Kconfig symbol does not exist any more. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.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: introduce a macro for max NAND ID sequence lengthArtem Bityutskiy2013-04-051-1/+4
| | | | | | | | | Introduce a helpful macro for the maximum NAND ID sequence length instead of using the "8" magic number. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand: use more reasonable integer typesArtem Bityutskiy2013-04-051-5/+5
| | | | | | | | | | | Use 'unsigned int' instead of 'unsigned long' in the NAND chip description data structure, because 32-bits is more than enough for our purposes. We do not need 64-bits, which is what we end up on 64-bit architectures. We declare many instances of this data structure, so this should help saving some amount of memory. 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>
* ssb: driver_mipscore: add a 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> Cc: Michael Buesch <m@bues.ch> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* bcma_mips: add a 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> Cc: "Rafał Miłecki" <zajec5@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: physmap: add const qualifiersArtem Bityutskiy2013-04-052-11/+8
| | | | | | | 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-052-3/+3
| | | | | | | 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-054-7/+8
| | | | | | | | | | | | | | | '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>
OpenPOWER on IntegriCloud