
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/ma...
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:
- Send a v2 of this patch with the small correction pointed out by Eric
- 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