From: Alexander Kurz <akurz@blala.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/4] ARM i.MX: add SoC type detection for i.MX6SL
Date: Wed, 7 Dec 2016 22:40:06 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.00.1612072151470.30368@blala.de> (raw)
In-Reply-To: <20161207205323.ymjfjjmsevdjuawg@pengutronix.de>
On Wed, 7 Dec 2016, Sascha Hauer wrote:
> Hi Alexander,
>
> On Mon, Nov 28, 2016 at 10:27:33AM +0100, Alexander Kurz wrote:
> > The i.MX6 series SoC type is determined by barebox by examining the
> > USB_ANALOG_DIGPROG aka IMX6_ANATOP_SI_REV register. This register is located
> > at a common offset for all mx6 SoC - except for i.MX6SL where a different
> > offset is used. This creates a dilemma while distinguishing the mx6sl from
> > non-mx6sl SOC since the SoC type identification register location is type
> > specific itself.
> >
> > Access to undocumented and probably invalid or unpredictable registers should
> > be avoided as possible. For the mx6sl detection an access to the general
> > USB_ANALOG_DIGPROG @0x260 cannot be avoided when running on mx6sl. This
> > register contained the value 0x00014009 for different mx6sl Rev. 1.2 based
> > e-book readers using MCIMX6L7DVN10AB and MCIMX6L8DVN10AB SoC. This
> > implementation assumes the value of MAJOR_UPPER (here 0x01) to be smaller
> > than the smallest non-6sl MAJOR_UPPER (0x61 for mx6s).
>
> The i.MX6SL code would be quite straight forward and easy to merge
> without this handicap. I'll probably need a few more days to swallow
> this pill. I assume you already searched for better ways to detect a
> i.MX6SL, right?
>
The uboot-implementation (get_cpu_rev() in arch/arm/cpu/armv7/mx6/soc.c)
first checks the 6SL-digprog register and then proceeds with the non-6SL
detection. This results in access to non-documented registers for all
non-6SL SoC. My implementation limits potential trouble to 6SL and any
SoC not detected yet.
I did not find any good hint in the reference manuals, but anyway, if
it would exist, I would assume it to be used in the freescale u-boot
branch (which is similar to mainline u-boot).
Regards, Alexander
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-12-07 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 9:27 [PATCH 1/4] ARM i.MX: move cpu_type macros in front of cpu_revision code Alexander Kurz
2016-11-28 9:27 ` [PATCH 2/4] ARM i.MX: add SoC type detection for i.MX6SL Alexander Kurz
2016-12-07 20:53 ` Sascha Hauer
2016-12-07 21:40 ` Alexander Kurz [this message]
2016-11-28 9:27 ` [PATCH 3/4] ARM: i.MX6SL: import clock infrastructure from linux Alexander Kurz
2016-11-28 9:27 ` [PATCH 4/4] ARM i.MX: Add i.MX6SL support Alexander Kurz
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=alpine.DEB.2.00.1612072151470.30368@blala.de \
--to=akurz@blala.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox