summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
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: 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-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: devices: elm: check for device's presence before configurationDaniel Mack2013-04-051-2/+3
| | | | | | | | | | | | | | 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: nand_ids: introduce helper macrosArtem Bityutskiy2013-04-052-111/+109
| | | | | | | | | | Introduce helper macros for defining NAND chips. These macros do not really add much value in the current code-base. However, we are going to add full ID support which adds some more complexity to the table, and helper macros become useful for readability. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand: remove few tiny page NAND bitsArtem Bityutskiy2013-04-053-13/+4
| | | | | | | | | | NAND flashes with 256 bytes NAND pages are so old that probably do not exist any more. Let's remove few related pieces of code and forget about them forever. The assumption will be that 512 bytes NAND page size is the minimum possible. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand: rename the id field of 'struct nand_flash_dev'Artem Bityutskiy2013-04-053-5/+5
| | | | | | | | | | | | The 'id' is a bit confusing name because NAND IDs are multi-byte. Re-name it to 'dev_id' to make it clear that this is the "device ID" part (the second byte). While on it, clean-up the commentary for 'struct nand_flash_dev'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand: use NAND_HAS_CACHEPROGArtem Bityutskiy2013-04-051-1/+1
| | | | | | | | We have this unused macro, let's use it and justify its existence. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand: remove a bunch of unused commandsArtem Bityutskiy2013-04-054-33/+0
| | | | | | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand: remove AG-AND supportArtem Bityutskiy2013-04-053-116/+2
| | | | | | | | | | | | | | | We have only one AG-AND driver and it was not touched since 2005. It looks like AG-AND was not really make it to mass-production and can be considered a dead technology. Along with the AG-AND support, this patch removes the BBT_AUTO_REFRESH feature, because the only user of this feature is AG-AND. And even though it is implemented as a generic feature, I prefer to remove it because NAND flashes do not really need it in this form. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand: remove the rtc_from4 driver supportArtem Bityutskiy2013-04-053-635/+0
| | | | | | | | | | The AG-AND support is about to be removed from MTD, because this technology is dead for long time. Thus, remove this the only AG-AND driver we have in the kernel tree. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: decommission the NAND museumArtem Bityutskiy2013-04-052-25/+5
| | | | | | | | | | | | | | | | | | | | The MTD subsystem has its own small museum of ancient NANDs in a form of the CONFIG_MTD_NAND_MUSEUM_IDS configuration option. The museum contains stone age NANDs with 256 bytes pages, as well as iron age NANDs with 512 bytes per page and up to 8MiB page size. It is with great sorrow that I inform you that the museum is being decommissioned. The MTD subsystem is out of budget for Kconfig options and already has too many of them, and there is a general kernel trend to simplify the configuration menu. We remove the stone age exhibits along with closing the museum, but some of the iron age ones are transferred to the regular NAND depot. Namely, only those which have unique device IDs are transferred, and the ones which have conflicting device IDs are removed. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand_ids: minor clean-upsArtem Bityutskiy2013-04-051-19/+15
| | | | | | | | | | Clean-up the code a little bit: * clean-up commentaries. * move macro definitions to the top of the file. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: nand: reintroduce NAND_NO_READRDY as NAND_NEED_READRDYBrian Norris2013-03-142-39/+57
| | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 1696e6bc2ae83734e64e206ac99766ea19e9a14e ("mtd: nand: kill NAND_NO_READRDY"). In that patch I overlooked a few things. The original documentation for NAND_NO_READRDY included "True for all large page devices, as they do not support autoincrement." I was conflating "not support autoincrement" with the NAND_NO_AUTOINCR option, which was in fact doing nothing. So, when I dropped NAND_NO_AUTOINCR, I concluded that I then could harmlessly drop NAND_NO_READRDY. But of course the fact the NAND_NO_AUTOINCR was doing nothing didn't mean NAND_NO_READRDY was doing nothing... So, NAND_NO_READRDY is re-introduced as NAND_NEED_READRDY and applied only to those few remaining small-page NAND which needed it in the first place. Cc: stable@kernel.org [3.5+] Reported-by: Alexander Shiyan <shc_work@mail.ru> Tested-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge tag 'for-linus-20130301' of git://git.infradead.org/linux-mtdLinus Torvalds2013-03-0215-245/+886
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull MTD update from David Woodhouse: "Fairly unexciting MTD merge for 3.9: - misc clean-ups in the MTD command-line partitioning parser (cmdlinepart) - add flash locking support for STmicro chips serial flash chips, as well as for CFI command set 2 chips. - new driver for the ELM error correction HW module found in various TI chips, enable the OMAP NAND driver to use the ELM HW error correction - added number of new serial flash IDs - various fixes and improvements in the gpmi NAND driver - bcm47xx NAND driver improvements - make the mtdpart module actually removable" * tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd: (45 commits) mtd: map: BUG() in non handled cases mtd: bcm47xxnflash: use pr_fmt for module prefix in messages mtd: davinci_nand: Use managed resources mtd: mtd_torturetest can cause stack overflows mtd: physmap_of: Convert device allocation to managed devm_kzalloc() mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC requirement. mtd: atmel_nand: make pmecc-cap, pmecc-sector-size in dts is optional. mtd: atmel_nand: avoid to report an error when lookup table offset is 0. mtd: bcm47xxsflash: adjust names of bus-specific functions mtd: bcm47xxpart: improve probing of nvram partition mtd: bcm47xxpart: add support for other erase sizes mtd: bcm47xxnflash: register this as normal driver mtd: bcm47xxnflash: fix message mtd: bcm47xxsflash: register this as normal driver mtd: bcm47xxsflash: write number of written bytes mtd: gpmi: add sanity check for the ECC mtd: gpmi: set the Golois Field bit for mx6q's BCH mtd: devices: elm: Removes <xx> literals in elm DT node mtd: gpmi: fix a dereferencing freed memory error mtd: fix the wrong timeo for panic_nand_wait() ...
| * mtd: bcm47xxnflash: use pr_fmt for module prefix in messagesRafał Miłecki2013-02-133-4/+8
| | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: davinci_nand: Use managed resourcesMrugesh Katepallewar2013-02-131-19/+5
| | | | | | | | | | | | | | | | | | davinci_nand driver currently uses normal kzalloc, ioremap and get_clk routines. This patch replaces these routines with devm_kzalloc, devm_request_and_ioremap and devm_clk_get resp. Signed-off-by: Mrugesh Katepallewar <mrugesh.mk@ti.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC ↵Josh Wu2013-02-121-3/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | requirement. This patch will check NAND flash's ecc minimum requirement in ONFI parameter. 1. if pmecc-cap, pmecc-sector-size is set in dts. then use it. Driver will print out a WARNING if the values are different from ONFI parameters. 2. if pmecc-cap, pmecc-sector-size is not set in dts, then use the value from ONFI parameters. * If ONFI ECC parameters are in ONFI extended parameter page, since we are not support it, so assume the minimum ecc requirement is 2 bits in 512 bytes. * For non-ONFI support nand flash, also assume the minimum ecc requirement is 2 bits in 512 bytes. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: atmel_nand: make pmecc-cap, pmecc-sector-size in dts is optional.Josh Wu2013-02-121-21/+31
| | | | | | | | | | | | | | | | | | If those two are not specified in dts file, driver will report an error. TODO: in this case, driver will find ecc requirement in NAND ONFI parameters. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: atmel_nand: avoid to report an error when lookup table offset is 0.Josh Wu2013-02-121-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | Before this patch, we assume the whole ROM code are mapping to memory. So it is wrong if the lookup table offset is 0. After this patch, we can map only the lookup table of ROM code to memory intead of the whole ROM code (about 1M). In this case, one lookup table offset can be 0. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: bcm47xxnflash: register this as normal driverHauke Mehrtens2013-02-041-5/+2
| | | | | | | | | | | | | | | | | | | | When platform_driver_probe() is used and no device is registered for this driver -ENODEV is returned and and error message is shown. Not all BCM47xx SoC have a nand flash chip controller and chip and for them an error message was shown. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: bcm47xxnflash: fix messageHauke Mehrtens2013-02-041-1/+2
| | | | | | | | | | | | | | This is not a serial flash driver, but a nand flash driver Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: gpmi: add sanity check for the ECCHuang Shijie2013-02-042-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | We do the check based on the following two facts: [1] The mx23/mx28 can only support 20-bits ECC, while the mx6 can supports 40-bits ECC. [2] The mx23/mx28 can only support the GF13, while the mx6 can supports GF13 and GF14. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: gpmi: set the Golois Field bit for mx6q's BCHHuang Shijie2013-02-043-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GF13 can be only used in the following case: The ECC data chunk is less then 1K bytes. In mx23/mx28, the ecc data chunk is 512 bytes. So it is okay. But in mx6q, we begin to use some large nand chip whose ecc data chunk maybe 1K bytes long. So when the data chunk is 1K bytes, we have to use the GF14. This patch sets the Golois Field bit when the GF14 is needed. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: gpmi: fix a dereferencing freed memory errorHuang Shijie2013-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | The patch "490e280 mtd: gpmi-nand: Convert to module_platform_driver()" introduced a "dereferencing freed memory" error. This patch fixes it. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: fix the wrong timeo for panic_nand_wait()Huang Shijie2013-02-041-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The panic_nand_wait() expects the timeo in ms and not in jiffies. But in nand_wait(), the timeo for panic_nand_wait() is assigned with wrong value(jiffies + some delay). The timeo should be set like the panic_nand_write() does. This patch passes timeo in ms to panic_nand_wait(). And this patch also passes timeo in jiffies(converted by msecs_to_jiffies) to time_before() which makes the code more readable. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: gpmi: dump the BCH registersHuang Shijie2013-02-042-0/+7
| | | | | | | | | | | | | | Dump the BCH registers in gpmi_dump_info(). Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: nane: print source of error messageTormod Volden2013-02-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the function name to the error message. These messages are not very helpful: [183356.176682] uncorrectable error : [183356.180273] uncorrectable error : [183356.184194] uncorrectable error : [183356.187773] uncorrectable error : [183356.191280] uncorrectable error : Artem: amended the patch a bit Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
| * mtd: fsl_ifc_nand: use more portable i/o accessorsKim Phillips2013-02-041-114/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in/out_be32 accessors are Power arch centric whereas ioread/writebe32 are available in other arches. Since the IFC device registers are annotated big endian in fsl_ifc.h, the accessor annotations now match, resulting in the pleasant side-effect of this patch silencing sparse endian warnings such as the following: drivers/mtd/nand/fsl_ifc_nand.c:179:19: warning: incorrect type in argument 1 (different base types) drivers/mtd/nand/fsl_ifc_nand.c:179:19: expected unsigned int volatile [noderef] [usertype] <asn:2>*addr drivers/mtd/nand/fsl_ifc_nand.c:179:19: got restricted __be32 [noderef] <asn:2>*<noident> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: nand: omap2: Support for hardware BCH error correction.Philip Avinash2013-02-041-39/+534
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELM module can be used for hardware error correction of BCH 4 & 8 bit. ELM module functionality is verified by checking the availability of handle for ELM module in device tree. Hence supporting 1. ELM module available, BCH error correction done by ELM module. Also support read & write page in one shot by adding custom read_page and write_page methods. This helps in optimizing code for NAND flashes with page size less than 4 KB. 2. If ELM module not available fall back to software BCH error correction support. New structure member is added to omap_nand_info 1. "is_elm_used" to know the status of whether the ELM module is used for error correction or not. 2. "elm_dev" device pointer to elm device on detection of ELM module. Also being here update the device tree documentation of gpmc-nand for adding optional property elm_id. Note: ECC layout uses 1 extra bytes for 512 byte of data to handle erased pages. Extra byte programmed to zero for programmed pages. Also BCH8 requires 14 byte ecc to maintain compatibility with RBL ECC layout. This results a common ecc layout across RBL, U-boot & Linux with BCH8. Signed-off-by: Philip Avinash <avinashphilip@ti.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: nand: omap2: Update nerrors using ecc.strengthPhilip Avinash2013-02-041-4/+8
| | | | | | | | | | | | | | | | | | | | Remove check of ecc bytes with 13, number of errors can directly update from nand ecc strength. This will increase re-usability of the code. Also add macro definitions BCH8_ERROR_MAX & BCH4_ERROR_MAX for better readability and cleaner code. Signed-off-by: Philip Avinash <avinashphilip@ti.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: mxc_nand: compress ID info for send_read_id_v3Roman Schneider2013-02-041-0/+11
| | | | | | | | | | | | | | | | Also compress the id in case of a v3 NAND flash controller (i.mx51, i.mx53) and 16Bit buswidth. Signed-off-by: Roman Schneider <schneider@at.festo.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * mtd: rename random32() to prandom_u32()Akinobu Mita2013-02-041-3/+3
| | | | | | | | | | | | | | | | Use more preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
OpenPOWER on IntegriCloud