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
@@ -116,6 +116,18 @@ static inline int nand_exec_op(struct nand_chip *chip,
|
||||
return chip->controller->ops->exec_op(chip, op, false);
|
||||
}
|
||||
|
||||
static inline bool nand_has_setup_data_iface(struct nand_chip *chip)
|
||||
{
|
||||
if (!chip->controller || !chip->controller->ops ||
|
||||
!chip->controller->ops->setup_data_interface)
|
||||
return false;
|
||||
|
||||
if (chip->options & NAND_KEEP_TIMINGS)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* BBT functions */
|
||||
int nand_markbad_bbt(struct nand_chip *chip, loff_t offs);
|
||||
int nand_isreserved_bbt(struct nand_chip *chip, loff_t offs);
|
||||
|
Reference in New Issue
Block a user