From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Behme Date: Wed, 27 Mar 2013 09:02:58 +0100 Subject: [U-Boot] [PATCH] mx6: Fix the reading of CPU revision In-Reply-To: References: <1364302440-18457-1-git-send-email-fabio.estevam@freescale.com> <5151C238.6070603@de.bosch.com> Message-ID: <5152A7B2.5010206@de.bosch.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 26.03.2013 18:04, Fabio Estevam wrote: > Hi Dirk, > > On Tue, Mar 26, 2013 at 12:43 PM, Dirk Behme 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). 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