- 06 2月, 2015 8 次提交
-
-
由 Masahiro Yamada 提交于
This driver uses NAND_ECC_HW_SYNDROME mode. The nand_scan_tail() function would not complain about missing ecc->calculate, ecc->correct, ecc->hwctl handlers. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Baruch Siach 提交于
Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Han Xu 提交于
Add a maintainer entry for FREESCALE QUAD SPI driver and add myself as a maintainer. Signed-off-by: NHan Xu <han.xu@freescale.com> Acked-by: NHuang Shijie <shijie.huang@intel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Allen Xu 提交于
Set AHB transfer size to 1K which improved the read performance. Add ahb_buf_size field in fsl_qspi_devtype_data to denote the size for different SoC. Before: root@imx6qdlsolo:~# dd if=/dev/mtd1 of=/dev/null bs=1M count=16 16+0 records in 16+0 records out 16777216 bytes (17 MB) copied, 0.472183 s, 25.1 MB/s After: root@imx6qdlsolo:~# dd if=/dev/mtd1 of=/dev/null bs=1M count=16 16+0 records in 16+0 records out 16777216 bytes (17 MB) copied, 0.369439 s, 29.5 MB/s Signed-off-by: NAllen Xu <b45815@freescale.com> Signed-off-by: NHuang Shijie <shijie8@gmail.com> Signed-off-by: NFrank Li <Frank.Li@freescale.com> Acked-by: NHuang Shijie <shijie.huang@intel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabio Estevam 提交于
There is no need to keep the 'map_failed' label. We can simply return the error code directly and let the code shorter and cleaner. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NHan Xu <han.xu@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabio Estevam 提交于
When the driver successfully probe we already have messages like: [ 1.140989] fsl-quadspi 21e4000.qspi: s25fl128s (16384 Kbytes) [ 1.150902] fsl-quadspi 21e4000.qspi: s25fl128s (16384 Kbytes) Or in case of error: [ 1.175920] fsl-quadspi: probe of 21e4000.qspi failed with error -12 , so remove the unneeded success/error messages. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NHan Xu <han.xu@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabio Estevam 提交于
Jumping to 'map_failed' label is not correct at these points, as it misses to disable the clocks that were previously enabled. Jump to 'irq_failed' label instead that will correctly disable the clocks. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NHan Xu <han.xu@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Nicholas Mc Guire 提交于
The if and the else branch code are identical - so the condition has no effect on the effective code. This patch removes the condition and the duplicated code and updates the documentation as suggested by Roger Quadros <rogerq@ti.com>. Acked-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org> Reviewed-by: NPekon Gupta <pekon@pek-sem.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 02 2月, 2015 2 次提交
-
-
由 Lars-Peter Clausen 提交于
Use the GPIO descriptor API instead of the deprecated legacy GPIO API to manage the busy GPIO. The patch updates both the jz4740 nand driver and the only user of the driver the qi-lb60 board driver. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NRalf Baechle <ralf@linux-mips.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Aaron Sierra 提交于
Previously, we requested that drivers pass ecc.size and ecc.bytes when using NAND_ECC_SOFT_BCH. However, a driver is likely to only know the ECC strength required for its NAND, so each driver would need to perform a strength-to-bytes calculation. Avoid duplicating this calculation in each driver by asking drivers to pass ecc.size and ecc.strength so that the strength-to-bytes calculation need only be implemented once. This reverts/generalizes this commit: mtd: nand: Base BCH ECC bytes on required strength Signed-off-by: NAaron Sierra <asierra@xes-inc.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 21 1月, 2015 5 次提交
-
-
由 Brian Norris 提交于
The MTD API reports -EUCLEAN only if the maximum number of bitflips found in any ECC block exceeds a certain threshold. This is done to avoid excessive -EUCLEAN reports to MTD users, which may induce additional scrubbing of data, even when the ECC algorithm in use is perfectly capable of handling the bitflips. This threshold can be controlled by user-space (via sysfs), to allow users to determine what they are willing to tolerate in their application. But it still helps to have sane defaults. In recent discussion [1], it was pointed out that our default threshold is equal to the correction strength. That means that we won't actually report any -EUCLEAN (i.e., "bitflips were corrected") errors until there are almost too many to handle. It was determined that 3/4 of the correction strength is probably a better default. [1] http://lists.infradead.org/pipermail/linux-mtd/2015-January/057259.htmlSigned-off-by: NBrian Norris <computersforpeace@gmail.com> Acked-by: NHuang Shijie <shijie.huang@intel.com>
-
由 Wu, Josh 提交于
Since in SAMA5D4 chip, the PMECC can correct bit flips in erased page. So we add a DT property to indicate this hardware character. If the PMECC support correct bitflip erased page (all data are 0xff). Then we can use the PMECC correct the page and skip the erased page check. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Wu, Josh 提交于
atmel_nand_pmecc_read_page() will return the total bitflips in this page. This is incorrect. As one nand page includes multiple ecc sectors, that will cause the returned total bitflips exceed ecc capablity. So this patch will make pmecc_correct() return the max bitflips of all sectors in the page. That also makes atmel_nand_pmecc_read_page() return the max bitflips. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabio Estevam 提交于
When removing the fsl-quadspi module and running 'cat /proc/mtd' afterwards, we see garbage data like: $ rmmod fsl-quadspi $ cat /proc/mtd dev: size erasesize name mtd0: 00000000 00000000 "(null)" mtd0: 00000000 00000000 "(null)" mtd0: 00000000 00000000 "(null)" ... mtd0: a22296c6c756e28 00000000 "(null)" mtd0: a22296c6c756e28 3064746d "(null)" If we continue doing multiple module load/unload operations, then it will also lead to a kernel crash. The reason for this is due to the wrong mtd index used in mtd_device_unregister() in the remove function. We need to keep the mtd unregister index aligned with the one used in the probe function, which means we need to take into account the 'has_second_chip' property. By doing so we can guarantee that the mtd index is the same in the registration and unregistration functions. With this patch applied we can load/unload the fsl-quadspi driver several times and it will result in no crash. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NHuang Shijie <shijie.huang@intel.com> Tested-by: NFrank Li <Frank.Li@freescale.com> Acked-by: NAllen Xu <han.xu@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rafał Miłecki 提交于
Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 16 1月, 2015 3 次提交
-
-
由 Akinobu Mita 提交于
There is no path to switch to STATE_DATAOUT_STATUS_M state, and OPT_SMARTMEDIA is unused. This is leftover from commit 0be718e5 ("mtd: nand: remove a bunch of unused commands"). Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Brian Norris <computersforpeace@gmail.com> Cc: linux-mtd@lists.infradead.org Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Akinobu Mita 提交于
In initialization routine, mtd_info->owner is overwritten by memset() just after being initialized. This can be fixed by moving memset() calls to just before setting mtd_info->owner. But the memory region is allocated by kmalloc, so we can fix it by using kzalloc instead of kmalloc. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: Jonathan McDowell <noodles@earth.li> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Allen Xu 提交于
i.mx6 sx support turn off fastmix and megamix power. qpsi controller can be turned off and all status lost when suspend/resume. add suspend/resume functions and reset qspi controller when resume. Signed-off-by: NAllen Xu <b45815@freescale.com> Signed-off-by: NFrank Li <Frank.Li@freescale.com> Acked-by: NHuang Shijie <shijie.huang@intel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 13 1月, 2015 5 次提交
-
-
由 Graham Moore 提交于
commit 3157d1ed ("mtd: denali: remove unnecessary casts") introduced an error by using a wrong bitmask. A uint16_t cast was replaced with & 0xff, should be & 0xffff. Signed-off-by: NGraham Moore <grmoore@opensource.altera.com> Signed-off-by: NDinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Lee Jones 提交于
drivers/mtd/devices/st_spi_fsm.c:1647:17: warning: comparison between signed and unsigned integer expressions Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Lee Jones 提交于
ST's Common Clk Framework is now available. This patch ensures the FSM makes use of it by obtaining and enabling the EMI clock. If system fails to provide the EMI clock, we bomb out. Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Lee Jones 提交于
Under certain conditions, the SPI-FSM Controller can be left in a state where the data FIFO is not entirely empty. This can lead to problems where subsequent data transfers appear to have been shifted by a number of unidentified bytes. One simple example would be an errant FSM sequence which loaded more data to the FIFO than was read by the host. Another more interesting case results from an obscure artefact in the FSM Controller. When switching from data transfers in x4 or x2 mode to data transfers in x1 mode, extraneous bytes will appear in the FIFO, unless the previous data transfer was a multiple of 32 cycles (i.e. 8 bytes for x2, and 16 bytes for x4). This applies equally whether FSM is being operated directly by a S/W driver, or by the SPI boot-controller in FSM-Boot mode. Furthermore, data in the FIFO not only survive a transition between FSM-Boot and FSM, but also a S/W reset of IP block [1]. By taking certain precautions, it is possible to prevent the driver from causing this type of problem (e.g. ensuring that the host and programmed sequence agree on the transfer size, and restricting transfer sizes to multiples of 32-cycles [2]). However, at the point the driver is loaded, no assumptions can be made regarding the state of the FIFO. Even if previous S/W drivers have behaved correctly, it is impossible to control the number of transactions serviced by the controller operating in FSM-Boot. To address this problem, we ensure the FIFO is cleared during initialisation, before performing any FSM operations. Previously, the fsm_clear_fifo() code was capable of detecting and clearing any unwanted 32-bit words from the FIFO. This patch extends the capability to handle an arbitrary number of bytes present in the FIFO [3]. Now that the issue is better understood, we also remove the calls to fsm_clear_fifo() following the fsm_read() and fsm_write() operations. The process of actually clearing the FIFO deserves a mention. While the FIFO may contain any number of bytes, the SPI_FAST_SEQ_STA register only reports the number of complete 32-bit words present. Furthermore, data can only be drained from the FIFO by reading complete 32-bit words. With this in mind, a two stage process is used to the clear the FIFO: 1. Read any complete 32-bit words from the FIFO, as reported by the SPI_FAST_SEQ_STA register. 2. Mop up any remaining bytes. At this point, it is not known if there are 0, 1, 2, or 3 bytes in the FIFO. To handle all cases, a dummy FSM sequence is used to load one byte at a time, until a complete 32-bit word is formed; at most, 4 bytes will need to be loaded. [1] Although this issue has existed since early versions of the SPI-FSM controller, its full extent only emerged recently as a consequence of the targetpacks starting to use FSM-Boot(x4) as the default configuration. [2] The requirement to restrict transfers to multiples of 32 cycles was found empirically back when DUAL and QUAD mode support was added. The current analysis now gives a satisfactory explanation for this requirement. [3] Theoretically, it is possible for the FIFO to contain an arbitrary number of bits. However, since there are no known use-cases that leave incomplete bytes in the FIFO, only words and bytes are considered here. Signed-off-by: NAngus Clark <angus.clark@st.com> Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rickard Strandqvist 提交于
Remove the function pulledbits() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 10 1月, 2015 6 次提交
-
-
由 Aaron Sierra 提交于
UBI needs to know the physical erase block size, even on read-only devices, since it defines the on-device layout. Use a device-tree provided value to support previously written UBI on read-only NOR. UBI also needs a non-zero writebufsize, so we set it to one. Note: This was implemented because hardware write-protected CFI NOR cannot be probed for the physical erase block size. Signed-off-by: NJoe Schultz <jschultz@xes-inc.ccom> Signed-off-by: NAaron Sierra <asierra@xes-inc.ccom> [Brian: removed unneeded #ifdef, note 'optional' erase-size property] Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Joe Schultz 提交于
Previously, when probing a CFI chip which was write-protected at the hardware level, the probe would fail due to the fact it could not put the chip into QUERY mode. This would result in no MTD devices being created. Add a fallback to probe using the map_rom driver if the user-selected probe fails. Signed-off-by: NJoe Schultz <jschultz@xes-inc.com> Signed-off-by: NAaron Sierra <asierra@xes-inc.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Alessio Igor Bogani 提交于
Signed-off-by: NAlessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabio Estevam 提交于
"fsl,imx6sx-qspi" is also a valid compatible string, so add an entry for it. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Andy Shevchenko 提交于
We need to compare ret variable for negative value. The current code assigns the boolean to the ret and prints it wrongly in the warning message. Reported-by: NAndrey Karpov <karpov@viva64.com> Cc: Giel van Schijndel <me@mortis.eu> Cc: Dimitri Gorokhovik <dimitri.gorokhovik@free.fr> Signed-off-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Baruch Siach 提交于
Commit 7854d3f7 ("mtd: spelling, capitalization, uniformity") added a correctly spelled line, but failed to remove the wrongly spelled one. Commit 064a7694 ("mtd: Fix typo mtd/tests") then fixed the spelling again, but left the duplication. Fixes: 7854d3f7 ("mtd: spelling, capitalization, uniformity") Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 08 1月, 2015 7 次提交
-
-
由 Scott Branden 提交于
Add nand_shutdown to wait for current nand operations to finish and prevent further operations by changing the nand flash state to FL_SHUTDOWN. This is addressing a problem observed during reboot tests using UBIFS root file system: NAND erase operations that are in progress during system reboot/shutdown are causing partial erased blocks. Although UBI should be able to detect and recover from this error, this change will avoid the creation of partial erased blocks on reboot in the middle of a NAND erase operation. Signed-off-by: NScott Branden <sbranden@broadcom.com> Tested-by: NScott Branden <sbranden@broadcom.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
cfi_cmdset_000{1,2}.c already implement their own reboot notifiers, and we're going to add one for NAND. Let's put the boilerplate in one place. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by: NScott Branden <sbranden@broadcom.com>
-
由 Gu Zheng 提交于
The global lock mtdblks_lock was used to protect the original mtdblks array to avoid race conditions. As the mtdblks array was already gone, but the mtdblks_lock is left, and it causes latency when open/release dev. So we need to remove it here. Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rafał Miłecki 提交于
SquashFS is supposed to use magic defined as SQUASHFS_MAGIC. What we were supporting so far (SQSH_MAGIC) is something ZTE specific. This patch adds support for Xiaomi R1D. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rafał Miłecki 提交于
Some devices like Netgear WNR1000v3 or WGR614v10 have partitions aligned to 0x1000. Using bigger blocksize stopped us from detecting some parts. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rafał Miłecki 提交于
Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Bean Huo 霍斌斌 (beanhuo) 提交于
This patch adds code which enables Quad I/O mode on Micron SPI NOR flashes. For Micron SPI NOR flash, enabling or disabling quad I/O protocol can be done By two methods, which are to use EVCR (Enhanced Volatile Configuration Register) and the ENTER QUAD I/O MODE command. There is no difference between these two methods. Unfortunately, for some Micron SPI NOR flashes, there no ENTER Quad I/O command (35h), such as n25q064. But for all current Micron SPI NOR, if it support quad I/O mode, using EVCR definitely be supported. It is a recommended method to enable Quad I/O mode by EVCR, Quad I/O protocol bit 7. When EVCR bit 7 is reset to 0, the SPI NOR flash will operate in quad I/O mode. This patch has been tested on N25Q512A and MT25TL256BAA1ESF. Micron SPI NOR of spi_nor_ids[] table all support this method. Signed-off-by: NBean Huo <beanhuo@micron.com> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 23 12月, 2014 3 次提交
-
-
由 Stefan Roese 提交于
This sentence "We support only one NAND chip now" is not true any more. Multiple chips are supported. So lets remove this sentence to not confuse anyone. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Huang Shijie <b32955@freescale.com> Cc: Brian Norris <computersforpeace@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
Now that we have raw functions properly implemented we can remove this FIXME. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NHuang Shijie <shijie.huang@intel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabio Estevam 提交于
mx28evk board has a socket for NAND flash that comes with no NAND flash populated, and then we get this message on every boot: [ 1.657603] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19 which is not very helpful, so get rid of this error message. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 21 12月, 2014 1 次提交
-
-
由 Linus Torvalds 提交于
-