ipq40xx: nand: Initialize nand flash device before flashing

The DK01 board will be bricked if a nand image is flashed onto it.
Because it supports only nor and nor_plus_nand flash types.
So, this patch detects the nand flash before flashing.

Change-Id: I0e0ce2f4d72bcd6724847729170562068a00394d
Signed-off-by: Balaji Jagadeesan <bjagadee@codeaurora.org>
This commit is contained in:
Balaji Jagadeesan 2018-02-13 14:34:51 +05:30
parent 1fbb054c7e
commit 23dfc73b5b

View file

@ -415,7 +415,8 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
dev = (int)simple_strtoul(argv[2], NULL, 10);
set_dev(dev);
if (set_dev(dev))
return 1;
return 0;
}