linux/include/linux/mtd
Miquel Raynal 05b54c7bac mtd: rawnand: add hooks that may be called during nand_scan()
In order to remove the limitation that forbids dynamic allocation in
nand_scan_ident(), we must create a path that will be the same for all
controller drivers. The idea is to use nand_scan() instead of the widely
used nand_scan_ident()/nand_scan_tail() couple. In order to achieve
this, controller drivers will need to adjust some parameters between
these two functions depending on the NAND chip wired on them.

This takes the form of two new hooks (->{attach,detach}_chip()) that are
placed in a new nand_controller_ops structure, which is then attached
to the nand_controller object at driver initialization time.
->attach_chip() is called between nand_scan_ident() and
nand_scan_tail(), and ->detach_chip() is called in the error path of
nand_scan() and in nand_cleanup().

Note that some NAND controller drivers don't have a dedicated
nand_controller object and instead rely on the default/dummy one
embedded in nand_chip. If you're in this case and still want to
initialize the controller ops, you'll have to manipulate
chip->dummy_controller directly.

Last but not least, it's worth mentioning that we plan to move some of
the controller related hooks placed in nand_chip into
nand_controller_ops to make the separation between NAND chip and NAND
controller methods clearer.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-07-31 09:45:53 +02:00
..
bbm.h
blktrans.h
cfi.h
cfi_endian.h
concat.h
doc2000.h
flashchip.h mtd: cfi: cmdset_0001: Do not allow read/write to suspend erase block. 2018-04-24 17:41:18 +02:00
ftl.h
gen_probe.h
inftl.h
latch-addr-flash.h
lpc32xx_mlc.h
lpc32xx_slc.h
map.h mtd: Fix comparison in map_word_andequal() 2018-05-14 14:46:20 +02:00
mtd.h mtd: Stop updating erase_info->state and calling mtd_erase_callback() 2018-03-21 09:50:56 +01:00
mtdram.h
nand-gpio.h
nand.h mtd: nand: Pass mode information to nand_page_io_req 2018-06-01 14:53:50 +02:00
nand_bch.h
nand_ecc.h
ndfc.h
nftl.h
onenand.h
onenand_regs.h
partitions.h mtd: partitions: add of_match_table parser matching for the "ofpart" type 2018-03-27 09:10:48 +02:00
pfow.h
physmap.h
pismo.h
plat-ram.h
qinfo.h
rawnand.h mtd: rawnand: add hooks that may be called during nand_scan() 2018-07-31 09:45:53 +02:00
sh_flctl.h
sharpsl.h
spear_smi.h
spi-nor.h mtd: spi-nor: clear Winbond Extended Address Reg on switch to 3-byte addressing. 2018-04-21 10:05:23 +02:00
spinand.h mtd: spinand: Add initial support for the MX35LF1GE4AB chip 2018-07-18 09:24:12 +02:00
super.h
ubi.h
xip.h