public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
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 14:51:55 +0100	[thread overview]
Message-ID: <5152F97B.6000600@de.bosch.com> (raw)
In-Reply-To: <CAOMZO5DHKhiVJH_xXi_03dvMJYTG4q+oV0CEZ2+Q=gQH=Ctn4w@mail.gmail.com>

On 27.03.2013 14:37, Fabio Estevam wrote:
> On Wed, Mar 27, 2013 at 5:57 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> 
>> 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.
> 
> Unfortunately VPU library relies on the bootloader to pass the correct
> silicon revision.

I don't think so, at least this depends on the kernel. To my 
understanding the VPU library relies on the kernel to pass the correct 
silicon revision. And where the kernel gets this information from seems 
to depend on the kernel version:

a) get it from U-Boot via ATAGs

b) calculate the value in the kernel independent of U-Boot

About which kernel are you talking? To my understanding, using a recent 
kernel with device tree there is no revision information passed from the 
boot loader to the kernel?

Instead of hacking U-Boot for these (old) kernels, I'd propose to fix 
the kernel to pass the 0x61/0x63 correctly to the VPU library. Or as 
Wolfgang mentioned, even better, fix the VPU library.

I really like Troys existing code and see no reason to change it just 
due to the VPU library. Do the change in the kernel or the VPU library.

Best regards

Dirk

> Eric's tested passing 0 as get_cpu_rev and showed that VPU simply
> cannot work on this case.
> 
>> In this case I'd propose to just keep Troy's version of get_cpu_rev() as it
>> is [1].
> 
> This is proven to not to work with mx6solo and VPU, so we need the fix
> I proposed.
> 
> Here is what I am planning to do:
> 
> 1. Send a v2 of this patch with the small correction pointed out by Eric
> 2. Include a weak function to pass get_cpu_rev in common mx6 code
> 
> Then on top of that, one can send a patch that prints the mx6 silicon
> strings by differentiating between a mx6dual-lite and mx6solo, if it
> is worth.
> 
> Regards,
> 
> Fabio Estevam


-- 
======================================================================
Dirk Behme                      Robert Bosch Car Multimedia GmbH
                                 CM-AI/PJ-CF32
Phone: +49 5121 49-3274         Dirk Behme
Fax:   +49 711 811 5053274      PO Box 77 77 77
mailto:dirk.behme at de.bosch.com  D-31132 Hildesheim - Germany

Bosch Group, Car Multimedia (CM)
              Automotive Navigation and Infotainment Systems (AI)
              ProJect - CoreFunctions (PJ-CF)

Robert Bosch Car Multimedia GmbH - Ein Unternehmen der Bosch Gruppe
Sitz: Hildesheim
Registergericht: Amtsgericht Hildesheim HRB 201334
Aufsichtsratsvorsitzender: Volkmar Denner
Gesch?ftsf?hrung: Uwe Thomas, Michael Bolle, Robby Drave, Egbert Hellwig
======================================================================

  reply	other threads:[~2013-03-27 13:51 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
2013-03-27 13:37         ` Fabio Estevam
2013-03-27 13:51           ` Dirk Behme [this message]
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=5152F97B.6000600@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