public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Convert fsmc_nand driver to ->exec_op() to retrieve a unique ID
@ 2017-11-14 15:46 Miquel Raynal
  2017-11-14 15:46 ` [PATCH 1/3] mtd: nand: fsmc: use ->exec_op() Miquel Raynal
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Miquel Raynal @ 2017-11-14 15:46 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Cyrille Pitchen
  Cc: linux-mtd, Quentin Schulz, Thomas Petazzoni, Miquel Raynal

Hi,

A previous work is migrating the NAND framework from ->cmdfunc() and
->cmd_ctrl() to ->exec_op(), a different way to interract between NAND
core and NAND controller drivers.

Retrieving a unique ID from some ONFI NAND chips needs to send a
particular command to the chip. As there is no feedback from
->cmdfunc(), it may or it may not work depending on the controller
driver in use, but the core will not be notified. Using ->exec_op(),
instead, allows the core to know if the command can be handled by the
controller driver. For this reason, only drivers converted to
->exec_op() will benefit from the nand_read_unique_id() function
introduced in this series, as the first patch does it with the
fsmc_nand driver.

About exposing the unique ID in the mtd_info structure, the commit
message will give more details but long story short: it was hard to do
better without doing a deep, time-consuming rework. So I am really open
to suggestions.

Thank you,
Miquèl


Miquel Raynal (3):
  mtd: nand: fsmc: use ->exec_op()
  mtd: nand: add the infrastructure to retrieve the ONFI unique ID
  mtd: nand: add sysfs entry for NAND chip unique ID

 drivers/mtd/mtdcore.c        |  33 +++++-
 drivers/mtd/nand/fsmc_nand.c | 234 ++++++++++++++++++++++++-------------------
 drivers/mtd/nand/nand_base.c | 103 ++++++++++++++++++-
 include/linux/mtd/mtd.h      |   1 +
 include/linux/mtd/rawnand.h  |  19 +++-
 5 files changed, 283 insertions(+), 107 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-16  9:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-14 15:46 [PATCH 0/3] Convert fsmc_nand driver to ->exec_op() to retrieve a unique ID Miquel Raynal
2017-11-14 15:46 ` [PATCH 1/3] mtd: nand: fsmc: use ->exec_op() Miquel Raynal
2017-11-16  9:05   ` Boris Brezillon
2017-11-14 15:46 ` [PATCH 2/3] mtd: nand: add the infrastructure to retrieve the ONFI unique ID Miquel Raynal
2017-11-14 17:07   ` Miquel RAYNAL
2017-11-14 15:46 ` [PATCH 3/3] mtd: nand: add sysfs entry for NAND chip " Miquel Raynal
2017-11-16  9:20   ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox