summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLey Foon Tan <[email protected]>2020-07-10 14:58:14 +0800
committerMasahiro Yamada <[email protected]>2020-07-11 21:30:21 +0900
commit3e57f879eee61df88c17ca447f1a9f6d7e598cde (patch)
tree4f10aa07d7373b8cd862ce4fa23022639c9b8fe5
parentb053515e91258ece015a26b06f812ca5dca37e5a (diff)
mtd: nand: raw: denali: Assert reset before deassert
Always put the controller in reset, then take it out of reset. This is to make sure controller always in reset state in both SPL and proper Uboot. This is preparation for the next patch to poll for reset completion (rst_comp) bit after reset. Tested-by: Masahiro Yamada <[email protected]> Signed-off-by: Radu Bacrau <[email protected]> Signed-off-by: Ley Foon Tan <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
-rw-r--r--drivers/mtd/nand/raw/denali_dt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
index 2728e8098fa..75ad15b0758 100644
--- a/drivers/mtd/nand/raw/denali_dt.c
+++ b/drivers/mtd/nand/raw/denali_dt.c
@@ -148,6 +148,8 @@ static int denali_dt_probe(struct udevice *dev)
if (ret) {
dev_warn(dev, "Can't get reset: %d\n", ret);
} else {
+ reset_assert_bulk(&resets);
+ udelay(2);
reset_deassert_bulk(&resets);
/*