- 20 Mar, 2018 2 commits
-
-
Miquel Raynal authored
SET/GET FEATURES are flagged ONFI-compliant because of their name. This is not accurate as non-ONFI NAND chips support it and use it. Rename the hooks and helpers to remove the "onfi" prefix. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Miquel Raynal authored
Prepare future work on the ->onfi_get/set_features() hooks by renaming the core's implementation as 'default' ones. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 19 Mar, 2018 1 commit
-
-
Miquel Raynal authored
Files have been moved in the NAND subsystem to reflect the different flavors of NAND devices. Raw/Parallel NAND devices have been moved to a "raw" subdirectory to make the difference with OneNAND and SPI NAND for instance. So adjust the Kconfig entry to clarify things. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 17 Mar, 2018 4 commits
-
-
Arnd Bergmann authored
The blackfin architecture is getting removed, so this driver has become obsolete. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Stefan Agner authored
With the move to ->exec_op() the driver should now support ONFI SET/GET_FEATURES commands. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Stefan Agner authored
Now that the driver is using ->exec_op(), remove the old hooks. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Stefan Agner authored
This reworks the driver to make use of ->exec_op() callback. The command sequencer of the VF610 NFC aligns well with the new ops interface. The operations are translated to a NFC command code while filling the necessary registers. Instead of using the special status and read ID command codes (which require to read status/ID from special registers instead of the regular data area) the driver now now uses the main data buffer for all commands. This simplifies the driver as no special casing is needed. For control data (status byte, id bytes and parameter page) the driver needs to reverse byte order for little endian CPUs since the controller seems to store the bytes in big endian order in the data buffer. The current state seems to pass MTD tests on a Colibri VF61. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 15 Mar, 2018 4 commits
-
-
Masahiro Yamada authored
This file can not be built independently any more. We would have to bring in more to resolve mtd_to_nand(mtd)->ecc.size, for example. It is difficult to notice a breakage since nobody compiles this mode. It is not worth fixing or maintaining in my opinion. Remove. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Shreeya Patel authored
Using pr_<loglevel>() is more concise than printk(KERN_<LOGLEVEL>). Replace printks having a log level with the appropriate pr_*() macros. Define pr_fmt() and remove other additional macros from the replaced printks. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Boris Brezillon authored
Move onenand code base to the drivers/mtd/nand directory in the hope that someday someone will patch it to use the generic NAND helpers. If it never happens, at least we'll have all NAND related support in a single directory and not spread over the drivers/mtd/ directory. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Boris Brezillon authored
Some files add a comment giving the path of the file inside the Linux tree, which is pretty useless since the reader had to find the file to open it. Getting rid of these comments will also allow us to easily move these files around when needed. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 02 Mar, 2018 5 commits
-
-
git://git.infradead.org/linux-mtdBoris Brezillon authored
Remove the pxa3xx_nand driver (replaced by marvell_nand).
-
Miquel Raynal authored
The driver pxa3xx_nand.c has been replaced everywhere by its rework called marvell_nand.c so this entry can now be removed. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Miquel Raynal authored
Use the new bindings of the reworked Marvell NAND controller driver. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Miquel Raynal authored
The deprecated pxa3xx_nand.c driver does not exist anymore, it has been replaced by marvell_nand.c which has its own up-to-date documentation. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Rob Herring <robh@kernel.org> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Miquel Raynal authored
The "enable arbiter" bit is available only for pxa3xx based platforms but it was experimentally shown that even if this bit is reserved, some Marvell platforms (64-bit) actually need it to be set. The driver always set this bit regardless of this property, which is harmless. Then this property is not needed. The "num_cs" field is always 1 and for a good reason, the old driver (pxa3xx_nand.c) could only handle one. The new driver that replaces it (marvell_nand.c) can handle more, but better use device tree for such description. As there is only one available chip select, there is no need for an array of partitions neither an array of partition numbers. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 23 Feb, 2018 2 commits
-
-
Miquel Raynal authored
All board files and defconfig files have been moved to use the new marvell_nand driver instead of pxa3xx_nand, so we can safely remove this file now. People should use the new driver which is supposed to behave exactly like the old one. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Miquel Raynal authored
Compile marvell_nand.c instead of pxa3xx_nand.c with all PXA based SoCs. Convert all board files and defconfigs so that the new driver is used everywhere instead of the old one. Board files using CONFIG_MTD_NAND_PXA3xx now use CONFIG_MTD_NAND_MARVELL instead. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 22 Feb, 2018 2 commits
-
-
Boris Brezillon authored
Free Electrons is now Bootlin. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Miquel Raynal authored
Free Electrons is now Bootlin. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 17 Feb, 2018 2 commits
-
-
Miquel Raynal authored
Remove the deprecated ->cmd_ctrl() implementation to use ->exec_op() in the fsmc_nand driver. Implement the ->select_chip() hook to avoid having to support the hack from the core that send a NAND_CMD_NONE with NAND_NCE to signal a deassertion of nCE. Also get rid of the last references to ->IO_ADDR_[R|W] that are not used anymore. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Miquel Raynal authored
Remove the use of IO_ADDR_[R|W] in the fsmc_nand driver. Instead, use a pointer to the control registers to avoid doing several arithmetic operations (including a multiplication) each time a control register is read or written. All references to IO_ADDR_[R|W] are not entirely removed from the driver as, at this time, these values are needed by the NAND core in the default ->read/write_byte/word() hooks. These references will be entirely removed when switching to ->exec_op(), that does not make use of these hooks anymore. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 16 Feb, 2018 7 commits
-
-
Boris Brezillon authored
Add an intermediate layer to abstract NAND device interface so that some logic can be shared between SPI NANDs, parallel/raw NANDs, OneNANDs, ... Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Boris Brezillon authored
As part of the process of sharing more code between different NAND based devices, we need to move all raw NAND related code to the raw/ subdirectory. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Boris Brezillon authored
Some drivers have been derived from others which have then been removed from the source tree. When this is the case, add mention the copyright of the source file(s) they've been derived from. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Boris Brezillon authored
A lot of NAND drivers have been derived from other old NAND drivers which have since then been removed from the Linux tree. When this is the case, specify when the file the header is referring to has been removed so that people can find the original implementation more easily. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Boris Brezillon authored
Last known location of toto.c was drivers/mtd/nand/toto.c. Fix the path so that one can use git log to find when the driver was deleted and possibly checkout the source code. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Boris Brezillon authored
Some NAND drivers are derived from other NAND drivers and state it in their license header. Using full path to point to other driver files sitting in the same directory is not such a good idea, since the NAND drivers might be moved to a different directory at some point, and we don't to patch all license/copyright headers everytime this happen. The only exception where we keep full path is when the referred source files no longer exist in the tree. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Boris Brezillon authored
Some files add a comment giving the path of the file inside the Linux tree, which is pretty useless since the reader had to find the file to open it. Getting rid of these comments will also allow us to easily move these files around when needed. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 14 Feb, 2018 1 commit
-
-
KOBAYASHI Yoshitake authored
This patch enables support to read the ECC strength and size from the NAND flash using Toshiba Memory SLC NAND extended-ID. This patch is based on the information of the 6th ID byte of the Toshiba Memory SLC NAND. Signed-off-by: KOBAYASHI Yoshitake <yoshitake.kobayashi@toshiba.co.jp> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
- 12 Feb, 2018 10 commits
-
-
Alexey Khoroshilov authored
vf610_nfc_probe() misses error handling of mtd_device_register(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Reviewed-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Alexey Khoroshilov authored
Use clearer error labels as Boris Brezillon suggested. Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Reviewed-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Alexey Khoroshilov authored
Calling of_node_put() in vf610_nfc_probe() is wrong because nothing in this code retains a reference to the DT node. Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Reviewed-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Stefan Agner authored
The function count_written_bits has been replaced by the generic nand_check_erased_ecc_chunk() function with commit 48c25cf4 ("mtd: nand: vf610_nfc: use nand_check_erased_ecc_chunk() helper"). Remove the unused function. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Miquel Raynal authored
First generation of Marvell NAND flash controllers (eg. embedded in PXA boards) did not make use of the NAND core hook ->setup_data_interface() to setup controller timings. Add support for it. Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Sascha Hauer authored
Since we now have our own read_page/write_page functions mxc_nand_command() will no longer be called with NAND_CMD_READ0, NAND_CMD_READOOB, NAND_CMD_SEQIN and NAND_CMD_PAGEPROG. Remove the code handling these commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Sascha Hauer authored
Since we have our own read_page/write_page functions correct_data and calculate are no longer needed. Remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Sascha Hauer authored
Now that we have our own read_page function add a write_page function for consistency aswell. This can be a lot easier than the generic function since we do not have to iterate over subpages but can write the whole page at once. Also add write_page_raw and write_oob for proper raw and oob write support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Sascha Hauer authored
The v1 controller code has several flaws: - We do not forward the number of corrected bitflips to the upper layers - For 2k page NAND chips only the status results from the fourth subpage read are evaluated, so ECC failures in the other subpages remain uncovered - When there are uncorrectable errors we have to increase the statistics counter, but still have to return successfully. Currently we return an error This patch fixes this by introducing a v1 specific read_page function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-
Sascha Hauer authored
Currently nand_read_page_hwecc() from nand_base calls mxc_nand_correct_data_v2_v3() for each subpage, but in this function we return the corrected/failed results for the whole page instead of a single subpage. On a 2k page size Nand this leads to results which are 4 times too high. The whole ecc.calculate/ecc.correct mechanism used by nand_read_page_hwecc() is not suitable for devices which correct the data in hardware, so fix this by using a driver specific read_page function which does the right thing. Also add read_page_raw and read_oob For proper raw and oob read support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-