diff options
author | Tom Rini <trini@konsulko.com> | 2019-04-21 18:59:30 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-04-21 18:59:30 -0400 |
commit | b4fde1633e67bb618fd33aad6e6322b7cecf1154 (patch) | |
tree | d427acfe3e80e6614a6b9312cb91892dd3dfd8ac /drivers/mtd/nand/raw/denali_dt.c | |
parent | 1f4ae66eaab29bfb5d1eb44996f7826c9cd01ed1 (diff) | |
parent | e09c1a133155724d3369e150f3ab7b63c875101c (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
- Various stratix10, gen5 updates
Diffstat (limited to 'drivers/mtd/nand/raw/denali_dt.c')
-rw-r--r-- | drivers/mtd/nand/raw/denali_dt.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index d384b974df..0ce81324b9 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -131,15 +131,30 @@ static int denali_dt_probe(struct udevice *dev) denali->clk_x_rate = 200000000; } + ret = reset_get_bulk(dev, &denali->resets); + if (ret) + dev_warn(dev, "Can't get reset: %d\n", ret); + else + reset_deassert_bulk(&denali->resets); + return denali_init(denali); } +static int denali_dt_remove(struct udevice *dev) +{ + struct denali_nand_info *denali = dev_get_priv(dev); + + return reset_release_bulk(&denali->resets); +} + U_BOOT_DRIVER(denali_nand_dt) = { .name = "denali-nand-dt", .id = UCLASS_MISC, .of_match = denali_nand_dt_ids, .probe = denali_dt_probe, .priv_auto_alloc_size = sizeof(struct denali_nand_info), + .remove = denali_dt_remove, + .flags = DM_FLAG_OS_PREPARE, }; void board_nand_init(void) |