From: Dirk Behme <dirk.behme@de.bosch.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx6: Fix the reading of CPU revision
Date: Wed, 27 Mar 2013 09:57:26 +0100 [thread overview]
Message-ID: <5152B476.4080006@de.bosch.com> (raw)
In-Reply-To: <5152A7B2.5010206@de.bosch.com>
On 27.03.2013 09:02, Dirk Behme wrote:
> On 26.03.2013 18:04, Fabio Estevam wrote:
>> Hi Dirk,
>>
>> On Tue, Mar 26, 2013 at 12:43 PM, Dirk Behme <dirk.behme@de.bosch.com>
>> wrote:
>>> Hi Fabio,
>>>
>>>
>>> On 26.03.2013 13:54, Fabio Estevam wrote:
>>>> Currently when booting a mx6 solo processor get_cpu_rev() returns
>>>> 0x62xxx,
>>>> which
>>>> is an invalid mx6 CPU revision.
>>>
>>> Do you have somewhere a list of valid CPU revisions? From two points of
>>> view:
>>>
>>> a) the i.MX6 hardware spec
>>>
>>> b) the VPU library
>>
>> Sorry, I don't. I am basing the CPU revision numbers from FSL U-boot:
>> http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/board/freescale/common/fsl_sys_rev.c?h=imx_v2009.08_3.0.0
>>
>>
>> Adding Jason, in case he could clarify it.
>>
>>> You remove Troy's code here introduced with
>>>
>>> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=20332a066aff98f39419495821e14edd10b2a3f8
>>>
>>>
>>> Troy's detection you remove here intentionally distinguishes between
>>> DualLite and Solo. You now re-introduce a common DL_S, again.
>>>
>>> Additionally, you completely seem to drop checking for scu->config. I've
>>> already seen some (broken?) i.MX6Solo where this check was essential.
>>>
>>> I can't talk about the "problems when trying to use VPU library in the
>>> kernel" (btw, which problems?) and the invalid 0x62xxx, but we used
>>> Troy's
>>> version of the detection successfully.
>>
>> Passing 0x62xxx as cpu_rev on a mx6solo caused the VPU issues
>> described here:
>> https://community.freescale.com/thread/305396
>>
>> Which cpu_rev value is returned with your mx6solo? Are you able to use
>> VPU lib?
>
> I'll check this.
>
> Rethinking about the issue here, my recent understanding is:
>
> a) We have a VPU library which only understands 0x63 (Quad) and 0x61
> (DualLite/Solo)
>
> b) We have Troy's existing get_cpu_rev() [1] which seems to correctly
> decode the CPU revision (at least this is my impression from testing ;)
> ). But reports 0x62 for the Solo which then isn't understood by the VPU
> library (to be checked).
Some additional rethinking: I missed that we have a Linux kernel, too ;)
c) It's the job of the Linux kernel to export the CPU revision to the
VPU library. In case the Linux kernel completely ignores what we are
doing in U-Boot and calculates the CPU revision itself (*), e.g. by
something like
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/mach-mx6/mm.c?h=imx_3.0.35_1.1.0&id=207f80453c77bc32e04b5fef863f6fe50a7fd1a8#n60
we can do anything in U-Boot. Independent of the VPU library.
In this case I'd propose to just keep Troy's version of get_cpu_rev() as
it is [1].
Sorry for the confusion, hopefully this is correct now ;)
Best regards
Dirk
(*) There might be U-Boot/Kernel combinations out there, where U-Boot
exports the CPU revision via ATAGs to the kernel. But hopefully this
doesn't affect us here (?)
> I wonder if we could find a way to combine both parts without breaking
> the other? I.e. using Troy's get_cpu_rev() to correctly report the CPU
> revision (in U-Boot), but let the VPU library get the revision it
> understands?
>
> Best regards
>
> Dirk
>
> [1]
> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=20332a066aff98f39419495821e14edd10b2a3f8
next prev parent reply other threads:[~2013-03-27 8:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 12:54 [U-Boot] [PATCH] mx6: Fix the reading of CPU revision Fabio Estevam
2013-03-26 15:19 ` Eric Nelson
2013-03-26 15:43 ` Dirk Behme
2013-03-26 17:04 ` Fabio Estevam
2013-03-27 8:02 ` Dirk Behme
2013-03-27 8:57 ` Dirk Behme [this message]
2013-03-27 13:37 ` Fabio Estevam
2013-03-27 13:51 ` Dirk Behme
2013-03-27 14:00 ` Eric Nelson
2013-03-27 15:06 ` Dirk Behme
2013-03-27 15:30 ` Eric Nelson
2013-03-27 13:25 ` Fabio Estevam
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=5152B476.4080006@de.bosch.com \
--to=dirk.behme@de.bosch.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox