All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Wildt <patrick@blueri.se>
To: u-boot@lists.denx.de
Subject: [U-Boot] imx8m: fix rom version check to unbreak some B0 chips
Date: Sat, 7 Dec 2019 16:29:19 +0100	[thread overview]
Message-ID: <20191207152919.GA54977@nox.fritz.box> (raw)
In-Reply-To: <20191119084206.GA17502@nox.fritz.box>

Ping?

On Tue, Nov 19, 2019 at 09:42:06AM +0100, Patrick Wildt wrote:
> Recently the version check was improved to be able to determine that
> we're running on SoC revision 2.1.  A check for B0 was tightened so
> that it now must equal 0x20 instead of being bigger than 0x20.  On
> some B0 chips the value returned is 0x1020 instead of 0x20.  This
> means even though it's B0, the check will fail and code relying on
> the correct chip revision will make wrong decisions.  There is no
> documentation of those bits, but it seems that NXP always uses a
> byte to encode the revision.  Thus remove the upper bits to fix the
> regression.
> 
> Signed-off-by: Patrick Wildt <patrick@blueri.se>
> 
> diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
> index 9a203e4736..4d42368057 100644
> --- a/arch/arm/mach-imx/imx8m/soc.c
> +++ b/arch/arm/mach-imx/imx8m/soc.c
> @@ -216,6 +216,7 @@ u32 get_cpu_rev(void)
>  					readl((void __iomem *)ROM_VERSION_A0);
>  				if (rom_version != CHIP_REV_1_0) {
>  					rom_version = readl((void __iomem *)ROM_VERSION_B0);
> +					rom_version &= 0xff;
>  					if (rom_version == CHIP_REV_2_0)
>  						reg = CHIP_REV_2_0;
>  				}
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

  reply	other threads:[~2019-12-07 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19  8:42 [U-Boot] imx8m: fix rom version check to unbreak some B0 chips Patrick Wildt
2019-12-07 15:29 ` Patrick Wildt [this message]
2019-12-09 10:52   ` Stefano Babic

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=20191207152919.GA54977@nox.fritz.box \
    --to=patrick@blueri.se \
    --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.