linux-sg2042/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 mtd: nand: Get rid of comments giving the file path inside the file itself 2018-02-16 10:08:27 +01:00
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nand-gpio.h This pull request contains the following core changes: 2017-11-22 20:46:06 -10:00
nand.h mtd: nand: Pass mode information to nand_page_io_req 2018-06-01 14:53:50 +02:00
nand_bch.h mtd: nand: simplify nand_bch_init() usage 2016-03-07 16:23:09 -08:00
nand_ecc.h mtd: nand: Get rid of comments giving the file path inside the file itself 2018-02-16 10:08:27 +01:00
ndfc.h mtd: nand: Get rid of comments giving the file path inside the file itself 2018-02-16 10:08:27 +01:00
nftl.h mtd: nftl: kill unused oobinfo field 2016-01-26 10:27:34 -08:00
onenand.h mtd: onenand: switch to mtd_ooblayout_ops 2016-05-05 23:51:49 +02:00
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
physmap.h
pismo.h
plat-ram.h
qinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rawnand.h mtd: rawnand: add hooks that may be called during nand_scan() 2018-07-31 09:45:53 +02:00
sh_flctl.h mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
sharpsl.h Merge branch 'nand/rename-header-file' of git://git.infradead.org/l2-mtd into nand/next 2017-08-23 17:00:12 +02:00
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 mtd: only use __xipram annotation when XIP_KERNEL is set 2017-08-15 14:00:44 +02:00