- 19 1月, 2018 2 次提交
-
-
由 Colin Ian King 提交于
Trivial fix to spelling mistakes in dev_err error message text. Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Wei Yongjun 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 16 1月, 2018 1 次提交
-
-
由 Arnd Bergmann 提交于
The omap2 onenand driver is now available for compile-testing, which uncovers a warning in configurations that have a 64-bit resource_size_t: drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_probe': drivers/mtd/onenand/omap2.c:536:54: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] dev_err(dev, "Cannot reserve memory region at 0x%08x, size: 0x%x\n", drivers/mtd/onenand/omap2.c:536:66: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] Changing the format string to the special %pR simplifies the code and lets it do the right thing in that configuration, while avoiding the warning. Fixes: a758f50f ("mtd: onenand: omap2: Configure driver from DT") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 14 1月, 2018 2 次提交
-
-
由 Christophe JAILLET 提交于
'page_buf' and 'oob_buf' are allocated with 'devm_kzalloc()' and should not have __iomem decoration. Remove these decorations and some useless casting. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Miquel Raynal 提交于
Add entry for Marvell NAND controller driver and its bindings which will soon replace the old driver pxa3xx_nand.c. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 12 1月, 2018 22 次提交
-
-
由 Ladislav Michl 提交于
As OneNAND driver is now using devicetree gpmc-onenand and its platform data is unused and can be removed. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: NRoger Quadros <rogerq@ti.com> Acked-by: NTony Lindgren <tony@atomide.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
Move away from platform data configuration and use pure DT approach. Use generic probe function to deal with OneNAND node and remove now useless gpmc_probe_onenand_child function. Import sync mode timing calculation function from mach-omap2/gpmc-onenand.c Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Acked-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
INT pin (gpio_irq) is not really needed for DMA but only for notification when a command that needs wait has completed. DMA memcpy can be still used even without gpio_irq available, so enable it unconditionally. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Acked-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
Second commit in driver history (782b7a36: "[MTD] [OneNAND] OMAP3: add delay for GPIO") added quirk for waiting until GPIO line settle. As DMA was disabled for OMAP2 boards, chances are this problem was not OMAP3 specific and as it is just one register read, previous test for SoC type is approximately as expensive as read itself. Make delay unconditional, which allows removing SoC specific code alltogether. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NRoger Quadros <rogerq@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Peter Ujfalusi 提交于
Do not use the legacy and deprecated omap-dma interface for setting up the memcpy. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NRoger Quadros <rogerq@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
Since the very first commit (36cd4fb5: "[MTD] [OneNAND] Add OMAP2 / OMAP3 OneNAND driver") DMA is disabled for OMAP2. Later fixes thus went only into OMAP3 specific DMA functions which turned out not to be so OMAP3 specific, so merge those two implementations. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NRoger Quadros <rogerq@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Peter Ujfalusi 提交于
We have 4 functions containing almost identical DMA setup code. Create one function which can set up the DMA for both read and write and use this in place for the setup code in the driver. The new function will use wait_for_completion_io_timeout() and it will figure out the best data_type to be used for the transfer instead of hardwiring 32 or 16 bit data. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NRoger Quadros <rogerq@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
Use wait_for_completion_io_timeout, which has an impact on how the task is accounted in scheduling stats. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NRoger Quadros <rogerq@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
No platform data user setups partitioning information, so remove. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NRoger Quadros <rogerq@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
No platform data user sets skip_initial_unlocking, so remove test for this field. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NRoger Quadros <rogerq@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
As no platform data user sets regulator_can_sleep, regulator code is no-op and can be deleted. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NRoger Quadros <rogerq@ti.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
Update node timings to be compatible with actual chip used - gpmc_cs_show_timings utilized to dump values. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: NRoger Quadros <rogerq@ti.com> Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
OMAP onenand nodes are missing compatible property, add it. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: NRoger Quadros <rogerq@ti.com> Acked-by: NTony Lindgren <tony@atomide.com> Tested-by: NTony Lindgren <tony@atomide.com> Tested-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Ladislav Michl 提交于
Compatible property is required for OMAP2+ mtd driver. Also add INT pin gpio description and delete unused dma-channel property. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
https://github.com/rogerq/linux由 Boris Brezillon 提交于
Pull changes needed for omap OneNAND changes from Roger Quadros: OMAP-GPMC: driver updates for v4.16 * Error out only if both 'bank-width' and 'gpmc,device-width' DT properties are missing.
-
由 Miquel Raynal 提交于
Choose to compile and embed marvell_nand.c as NAND controller driver instead of the legacy pxa3xx_nand.c for platforms with Marvell EBU SoCs. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Acked-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Miquel Raynal 提交于
Add marvell_nand driver which aims at replacing the existing pxa3xx_nand driver. The new driver intends to be easier to understand and follows the brand new NAND framework rules by implementing hooks for every pattern the controller might support and referencing them inside a parser object that will be given to the core at each ->exec_op() call. Raw accessors are implemented, useful to test/debug memory/filesystem corruptions. Userspace binaries contained in the mtd-utils package may now be used and their output trusted. Most of the DT nodes using the old driver kept non-optimal timings from the bootloader (even if there was some mechanisms to derive them if the chip was ONFI compliant). The new default is to implement ->setup_data_interface() and follow the core's decision regarding the chip. Thanks to the improved timings, implementation of ONFI mode 5 support (with EDO managed by adding a delay on data sampling), merging the commands together and optimizing writes in the command registers, the new driver may achieve faster throughputs in both directions. Measurements show an improvement of about +23% read throughput and +24% write throughput. These measurements have been done with an Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH ECC correction) using the userspace tool 'flash_speed' from the MTD test suite. Besides these important topics, the new driver addresses several unsolved known issues in the old driver which: - did not work with ECC soft neither with ECC none ; - relied on naked read/write (which is unchanged) while the NFCv1 embedded in the pxa3xx platforms do not implement it, so several NAND commands did not actually ever work without any notice (like reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ; - wrote the OOB data correctly, but was not able to read it correctly past the first OOB data chunk ; - did not retrieve ECC bytes ; - used device tree bindings that did not allow more than one NAND chip, and did not allow to choose the correct chip select if not incrementing from 0. Plus, the Ready/Busy line used had to be 0. Old device tree bindings are still supported but deprecated. A more hierarchical view has to be used to keep the controller and the NAND chip structures clearly separated both inside the device tree and also in the driver code. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Tested-by: NSean Nyekjaer <sean.nyekjaer@prevas.dk> Tested-by: NWilly Tarreau <w@1wt.eu> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Miquel Raynal 提交于
Document the legacy and the new bindings for Marvell NAND controller. The pxa3xx_nand.c driver does only support legacy bindings, which are incomplete and inaccurate. A rework of this controller (called marvell_nand.c) does support both. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Miquel Raynal 提交于
There are already an atmel,rb and an allwinner,rb properties, let's not make other ones and instead use a generic term: nand-rb to define NAND chips Ready/Busy lines. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Miquel Raynal 提交于
Starting from commit 041e4575 ("mtd: nand: handle ECC errors in OOB"), nand_do_read_oob() (from the NAND core) did return 0 or a negative error, and the MTD layer expected it. However, the trend for the NAND layer is now to return an error or a positive number of bitflips. Deciding which status to return to the user belongs to the MTD layer. Commit e47f6858 ("mtd: check for max_bitflips in mtd_read_oob()") brought this logic to the mtd_read_oob() function while the return value coming from nand_do_read_oob() (called by the ->_read_oob() hook) was left unchanged. Fixes: e47f6858 ("mtd: check for max_bitflips in mtd_read_oob()") Cc: stable@vger.kernel.org Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Miquel Raynal 提交于
Reads from NAND devices usually trigger bitflips, this is an expected behavior. While bitflips are under a given threshold, the MTD core returns 0. However, when the number of corrected bitflips is above this same threshold, -EUCLEAN is returned to inform the upper layer that this block is slightly dying and soon the ECC engine will be overtaken so actions should be taken to move the data out of it. This particular condition should not be treated like an error and the test should continue. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Nicolas Ferre 提交于
Update Wenyou Yang email address. Take advantage of this update to move this entry to the MICROCHIP / ATMEL location and add the DT binding documentation link. Signed-off-by: NNicolas Ferre <nicolas.ferre@microchip.com> Acked-by: NWenyou Yang <wenyou.yang@microchip.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 10 1月, 2018 1 次提交
-
-
由 Ladislav Michl 提交于
Samsung E-die SLC NAND manufactured using 21nm process (K9F1G08U0E) does not support partial page programming, so disable subpage writes for it. Manufacturing process is stored in lowest two bits of 5th ID byte. Signed-off-by: NLadislav Michl <ladis@linux-mips.org> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 09 1月, 2018 2 次提交
-
-
由 Sascha Hauer 提交于
The number of corrected bitflips is not correctly reported by the test until the bitflip threshold is reached. read_page() shall return the number of corrected bitflips, but mtd_read() returns 0 or a negative error, so we can't forward its return value. In the absence of an error we always have calculate the number of bitflips ourselves. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Kamal Dasu 提交于
Brcm nand controller prefetch feature needs to be disabled by default. Enabling affects performance on random reads as well as dma reads. Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com> Fixes: 27c5b17c ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Cc: <stable@vger.kernel.org> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 07 1月, 2018 1 次提交
-
-
由 Fabio Estevam 提交于
devm_kasprintf() may fail, so we should better add a NULL check and propagate an error on failure. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 06 1月, 2018 2 次提交
-
-
由 Fabio Estevam 提交于
devm_kasprintf() may fail, so we should better add a NULL check and propagate an error on failure. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Miquel Raynal 提交于
Give an unfinished comment a meaning. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 19 12月, 2017 4 次提交
-
-
由 Christophe JAILLET 提交于
This include is not needed, so remove it. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Christophe JAILLET 提交于
Propagate the error code returned by 'onenand_scan()' instead of a hard-coded -EFAULT. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Christophe JAILLET 提交于
If 'mtd_device_parse_register()' fails, we still return 0 which mean success. Return the error code instead, as done in all the other error handling paths. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Christophe JAILLET 提交于
Convert all error handling code in 's3c_onenand_probe()' to resource-managed alternatives in order to simplify code. This fixes a resource leak if 'platform_get_resource()' fails at line 872. The 'request_irq()' at line 971 was also un-balanced. It is now resource-managed. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 16 12月, 2017 1 次提交
-
-
由 Miquel Raynal 提交于
Introduce a new interface to instruct NAND controllers to send specific NAND operations. The new interface takes the form of a single method called ->exec_op(). This method is designed to replace ->cmd_ctrl(), ->cmdfunc() and ->read/write_byte/word/buf() hooks. ->exec_op() is passed a set of instructions describing the operation to execute. Each instruction has a type (ADDR, CMD, DATA, WAITRDY) and delay. The delay is here to help simple controllers wait enough time between each instruction, advanced controllers with integrated timings control can ignore these delays. Controllers that natively support complex operations (operations formed of several instructions) can use the NAND op parser infrastructure. This infrastructure allows controller drivers to describe the sequence of instructions they support (called nand_op_pattern) and a hook for each of these supported sequences. The core then tries to find the best match for a given NAND operation, and calls the associated hook. Various other helpers are also added to ease NAND controller drivers writing. This new interface should ease support of vendor specific operations in that NAND manufacturer drivers now have a way to check if the controller they are connected to supports a specific operation, and complain or refuse to probe the NAND chip when that's not the case. Suggested-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 14 12月, 2017 2 次提交
-
-
由 Miquel Raynal 提交于
Samsung NAND chip K9F4G08U0D minimum ECC strength requirement is 1 bit per 512 bytes. As the chip is not ONFI nor JEDEC and because of the lack of these values, boards using it fail to probe the NAND controller driver. Fix this by setting up the default values. Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Boris Brezillon 提交于
The only users of the ecc->{calc,code}_buf buffers are NAND controller drivers implementing ecc->calculate() and/or ecc->correct(). Since the ->oobsize can be non-negligle, especially on modern NAND devices, we'd better allocate it only when it is actually required. Make ecc->{calc,code}_buf allocation dependent on the presence of ecc->calculate() or ecc->correct(). Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-