Skip to content

Implement exec_op for GPMI nand driver

Sascha Hauer linux-mtd 4 versions – Applied

Status from this message: Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest14 patches 17 repliesApplied
  2. v314 patches 4 repliesApplied
  3. v214 patches 18 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v110 patches2 repliesSuperseded

Changes in v4 from the cover letter

- Rebase on v5.2-rc1

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/14mtd: rawnand: export NAND operation tracerdrivers/mtd/nand/raw/nand_base.c include/linux/mtd/rawnand.h+37 -291 reply
2/14mtd: rawnand: fsmc: Use nand_op_trace for operation tracingdrivers/mtd/nand/raw/fsmc_nand.c+2 -171 reply
3/14mtd: rawnand: gpmi: move all driver code into single filedrivers/mtd/nand/raw/gpmi-nand/Makefile drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +1 more+1095 -11323 replies
4/14mtd: rawnand: gpmi: remove unused variabledrivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h+0 -31 reply
5/14mtd: rawnand: gpmi: Remove unnecessary variablesdrivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h+6 -111 reply
6/14mtd: rawnand: gpmi: read buf in nand_read_page_opdrivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c+4 -80 replies
7/14mtd: rawnand: gpmi: remove unused parametersdrivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c+19 -151 reply
8/14mtd: rawnand: gpmi: Drop unnecessary restoring of previous chipselectiondrivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c+2 -141 reply
9/14mtd: rawnand: gpmi: use runtime PM to manage clocksdrivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c+44 -251 reply
10/14dmaengine: mxs: Drop unnecessary flagdrivers/dma/mxs-dma.c+8 -91 reply
11/14mtd: rawnand: gpmi: drop unnecessary flagdrivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c+5 -91 reply
12/14dmaengine: mxs: Add header file to be shared with gpmi nand driverdrivers/dma/mxs-dma.c drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c include/linux/dma/mxs-dma.h+36 -221 reply
13/14dmaengine: mxs: rename custom flagdrivers/dma/mxs-dma.c drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c include/linux/dma/mxs-dma.h+15 -81 reply
14/14mtd: rawnand: gpmi: Implement exec_opdrivers/dma/mxs-dma.c drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h +1 more+436 -6921 reply

Reviews trailers per patch

13 of 14 patches have a Reviewed-by or Acked-by.

PatchVinod KoulMiquel Raynal
1/14R-b
2/14R-b
3/14R-b R-b
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14A-b
11/14R-b
12/14A-b
13/14A-b
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/14] Implement exec_op for GPMI nand driver

When rebasing on v5.2-rc1 I observe this backtrace:

[   10.789761] WARNING: CPU: 0 PID: 1 at /ptx/work/WORK_OOGHO/sha/backup/linux/linux/drivers/mtd/nand/raw/internals.h:
114 nand_reset_op+0x194/0x1c4
[   10.803137] Modules linked in:
[   10.806441] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc1-00014-g793f23e5adb0-dirty #676
[   10.815297] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[   10.822054] [<c0112928>] (unwind_backtrace) from [<c010d140>] (show_stack+0x10/0x14)
[   10.830054] [<c010d140>] (show_stack) from [<c0bd65cc>] (dump_stack+0xd8/0x110)
[   10.837609] [<c0bd65cc>] (dump_stack) from [<c0127148>] (__warn+0xe0/0x10c)
[   10.844791] [<c0127148>] (__warn) from [<c0127288>] (warn_slowpath_null+0x3c/0x48)
[   10.852604] [<c0127288>] (warn_slowpath_null) from [<c070be50>] (nand_reset_op+0x194/0x1c4)
[   10.861207] [<c070be50>] (nand_reset_op) from [<c070db44>] (nand_reset+0x58/0xb4)
[   10.868924] [<c070db44>] (nand_reset) from [<c070f454>] (nand_scan_with_ids+0x152c/0x1624)
[   10.877444] [<c070f454>] (nand_scan_with_ids) from [<c071a8a8>] (gpmi_nand_probe+0x2f8/0x6ac)
[   10.886235] [<c071a8a8>] (gpmi_nand_probe) from [<c067c2cc>] (platform_drv_probe+0x48/0x98)
[   10.894844] [<c067c2cc>] (platform_drv_probe) from [<c067a15c>] (really_probe+0xec/0x2c8)
[   10.903272] [<c067a15c>] (really_probe) from [<c067a494>] (driver_probe_device+0x5c/0x168)
[   10.911781] [<c067a494>] (driver_probe_device) from [<c067a748>] (device_driver_attach+0x58/0x60)
[   10.920909] [<c067a748>] (device_driver_attach) from [<c067a7d4>] (__driver_attach+0x84/0xc0)
[   10.929684] [<c067a7d4>] (__driver_attach) from [<c06785dc>] (bus_for_each_dev+0x70/0xb4)
[   10.938107] [<c06785dc>] (bus_for_each_dev) from [<c06795fc>] (bus_add_driver+0x154/0x1e0)
[   10.946615] [<c06795fc>] (bus_add_driver) from [<c067b430>] (driver_register+0x74/0x108)
[   10.954952] [<c067b430>] (driver_register) from [<c010317c>] (do_one_initcall+0x80/0x330)
[   10.963385] [<c010317c>] (do_one_initcall) from [<c11011a0>] (kernel_init_freeable+0x2e8/0x3cc)
[   10.972346] [<c11011a0>] (kernel_init_freeable) from [<c0bf0c60>] (kernel_init+0x8/0x114)
[   10.980768] [<c0bf0c60>] (kernel_init) from [<c01010b4>] (ret_from_fork+0x14/0x20)

I also reported this as an answer to the original patch introducing this backtrace here:

http://lists.infradead.org/pipermail/linux-mtd/2019-May/089600.html

No idea what goes wrong here, but in the hope that it's not the fault of this series I'm resending this rebased version anyway.

The GPMI nand driver suffers from very poor performance. The read performance can be roughly doubled with two steps: First is to use runtime PM for controlling the clocks which prevents the driver from spending a good amount of time en/disabling the clocks. The second step is to implement exec_op which allows us to combine the steps necessary to do a page read into a single DMA transaction.

changes since v3:

- Rebase on v5.2-rc1

changes since v2:

- s/dma/dmaengine in dmaengine specific patches
- s/nand/NAND/
- Add reviewed-by Miquel
- Add Acked-by Vinod

changes since v1:

- tested and fixed on i.MX28
- remove debugging leftover
- Add mxs dma specific header files to put the oddities of the mxs dma driver in
- Turn off BCH engine interrupts when not needed as they result in calling complete() on an uninitialized completion. This crashes on i.MX28

Sascha Hauer (14):
mtd: rawnand: export NAND operation tracer
mtd: rawnand: fsmc: Use nand_op_trace for operation tracing
mtd: rawnand: gpmi: move all driver code into single file
mtd: rawnand: gpmi: remove unused variable
mtd: rawnand: gpmi: Remove unnecessary variables
mtd: rawnand: gpmi: read buf in nand_read_page_op
mtd: rawnand: gpmi: remove unused parameters
mtd: rawnand: gpmi: Drop unnecessary restoring of previous
chipselection
mtd: rawnand: gpmi: use runtime PM to manage clocks
dmaengine: mxs: Drop unnecessary flag
mtd: rawnand: gpmi: drop unnecessary flag
dmaengine: mxs: Add header file to be shared with gpmi nand driver
dmaengine: mxs: rename custom flag
mtd: rawnand: gpmi: Implement exec_op

 drivers/dma/mxs-dma.c                      |   25 +-
 drivers/mtd/nand/raw/fsmc_nand.c           |   19 +-
 drivers/mtd/nand/raw/gpmi-nand/Makefile    |    1 -
 drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c  |  923 -----------
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 1685 ++++++++++++++------
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h |   64 +-
 drivers/mtd/nand/raw/nand_base.c           |   30 +-
 include/linux/dma/mxs-dma.h                |   24 +
 include/linux/mtd/rawnand.h                |   36 +
 9 files changed, 1261 insertions(+), 1546 deletions(-)
 create mode 100644 include/linux/dma/mxs-dma.h
Signature · 6 lines
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/