mtd: rawnand: atmel: Check the proposed data interface is supported
Check the data interface is supported in ->setup_interface() before acknowledging the timings. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-4-miquel.raynal@bootlin.com
This commit is contained in:
parent
4dd7ef970b
commit
ed2a491037
@ -1524,8 +1524,13 @@ static int atmel_nand_setup_interface(struct nand_chip *chip, int csline,
|
||||
const struct nand_interface_config *conf)
|
||||
{
|
||||
struct atmel_nand *nand = to_atmel_nand(chip);
|
||||
const struct nand_sdr_timings *sdr;
|
||||
struct atmel_nand_controller *nc;
|
||||
|
||||
sdr = nand_get_sdr_timings(conf);
|
||||
if (IS_ERR(sdr))
|
||||
return PTR_ERR(sdr);
|
||||
|
||||
nc = to_nand_controller(nand->base.controller);
|
||||
|
||||
if (csline >= nand->numcs ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user