All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH 3/3] mtd: rawnand: denali: Do not reset the block on SoCFPGA
Date: Thu, 9 Jan 2020 20:04:30 +0900	[thread overview]
Message-ID: <CAK7LNASniAhB5u7upaff8uCwvoj986zy2FuQ+R_AdzUcQwbABw@mail.gmail.com> (raw)
In-Reply-To: <20200109100754.1007705-3-marex@denx.de>

On Thu, Jan 9, 2020 at 7:08 PM Marek Vasut <marex@denx.de> wrote:
>
> Legacy kernel versions for SoCFPGA may not implement proper reset
> handling. Apply the same approach as SoCFPGA reset driver, check
> environment variable "socfpga_legacy_reset_compat", and if it is
> set, do not reset the IP before booting Linux. This way, even the
> older kernel versions can be booted by up to date U-Boot.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>  drivers/mtd/nand/raw/denali_dt.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
> index 2c9e249ab6..d35f2a3543 100644
> --- a/drivers/mtd/nand/raw/denali_dt.c
> +++ b/drivers/mtd/nand/raw/denali_dt.c
> @@ -148,6 +148,18 @@ static int denali_dt_remove(struct udevice *dev)
>  {
>         struct denali_nand_info *denali = dev_get_priv(dev);
>
> +#if CONFIG_IS_ENABLED(ARCH_SOCFPGA)
> +       /*
> +        * Legacy kernel versions do not implement proper reset handling on
> +        * SoCFPGA. To let those older kernel versions work, reuse the same
> +        * approach as the SoCFPGA reset driver does -- check environment
> +        * variable socfpga_legacy_reset_compat and avoid resetting the IP
> +        * before booting the kernel if it is set to 1.
> +        */
> +       if (env_get_ulong("socfpga_legacy_reset_compat", 10, 0))
> +               return 0;
> +#endif
> +
>         return reset_release_bulk(&denali->resets);
>  }


Why don't you simply remove reset_release_bulk() ?

>
> --
> 2.24.1
>


-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2020-01-09 11:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 10:07 [PATCH 1/3] mtd: rawnand: denali-spl: Add missing hardware init Marek Vasut
2020-01-09 10:07 ` [PATCH 2/3] mtd: rawnand: denali: Allow operation without clock driver Marek Vasut
2020-01-09 11:02   ` Masahiro Yamada
2020-01-09 11:14     ` Marek Vasut
2020-01-09 12:04       ` Masahiro Yamada
2020-01-09 13:21         ` Marek Vasut
2020-01-09 10:07 ` [PATCH 3/3] mtd: rawnand: denali: Do not reset the block on SoCFPGA Marek Vasut
2020-01-09 11:04   ` Masahiro Yamada [this message]
2020-01-09 11:15     ` Marek Vasut
2020-01-09 12:11       ` Masahiro Yamada
2020-01-09 14:25         ` Marek Vasut
2020-01-09 15:01           ` Masahiro Yamada
2020-01-10  0:10             ` Marek Vasut
2020-01-09 11:29 ` [PATCH 1/3] mtd: rawnand: denali-spl: Add missing hardware init Masahiro Yamada
2020-01-09 13:18   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNASniAhB5u7upaff8uCwvoj986zy2FuQ+R_AdzUcQwbABw@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.