mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops
->setup_data_interface() is a controller specific method and should thus be placed in nand_controller_ops. In order to make that work with controllers that support keeping pre-configured timings we need to add a new NAND_KEEP_TIMINGS flag to inform the core it should skip the timings selection step. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:

committed by
Miquel Raynal

parent
f2abfeb207
commit
7a08dbaedd
@@ -996,6 +996,7 @@ static int fsmc_nand_attach_chip(struct nand_chip *nand)
|
||||
static const struct nand_controller_ops fsmc_nand_controller_ops = {
|
||||
.attach_chip = fsmc_nand_attach_chip,
|
||||
.exec_op = fsmc_exec_op,
|
||||
.setup_data_interface = fsmc_setup_data_interface,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1108,10 +1109,10 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
if (host->dev_timings)
|
||||
if (host->dev_timings) {
|
||||
fsmc_nand_setup(host, host->dev_timings);
|
||||
else
|
||||
nand->setup_data_interface = fsmc_setup_data_interface;
|
||||
nand->options |= NAND_KEEP_TIMINGS;
|
||||
}
|
||||
|
||||
if (AMBA_REV_BITS(host->pid) >= 8) {
|
||||
nand->ecc.read_page = fsmc_read_page_hwecc;
|
||||
|
Reference in New Issue
Block a user