mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-17 23:37:01 +00:00
mtd: rawnand: denali_dt: insert udelay() after reset deassert
When the reset signal is de-asserted, the HW-controlled bootstrap starts running unless it is disabled in the SoC integration. It issues some commands to detect a NAND chip, and sets up registers automatically. Until this process finishes, software should avoid any register access. Without this delay function, some of UniPhier boards hangs up while executing nand_scan_ident(). (denali_read_byte() is blocked) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
9925df051a
commit
21d4a3ca54
1 changed files with 10 additions and 2 deletions
|
@ -136,11 +136,19 @@ static int denali_dt_probe(struct udevice *dev)
|
|||
}
|
||||
|
||||
ret = reset_get_bulk(dev, &resets);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dev_warn(dev, "Can't get reset: %d\n", ret);
|
||||
else
|
||||
} else {
|
||||
reset_deassert_bulk(&resets);
|
||||
|
||||
/*
|
||||
* When the reset is deasserted, the initialization sequence is
|
||||
* kicked (bootstrap process). The driver must wait until it is
|
||||
* finished. Otherwise, it will result in unpredictable behavior.
|
||||
*/
|
||||
udelay(200);
|
||||
}
|
||||
|
||||
return denali_init(denali);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue