[PATCH 1/2] mtd: nand: raw: denali: Assert reset before deassert

Masahiro Yamada masahiroy at kernel.org
Thu Jul 9 18:27:23 CEST 2020


On Mon, Jun 29, 2020 at 7:11 PM Ley Foon Tan <ley.foon.tan at intel.com> wrote:
>
> 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.
>
> Signed-off-by: Radu Bacrau <radu.bacrau at intel.com>
> Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com>
> ---
>  drivers/mtd/nand/raw/denali_dt.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
> index 2728e8098faa..75ad15b0758c 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);
>
>                 /*


Tested-by: Masahiro Yamada <yamada.masahiro at socionext.com>


-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list