All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx51evk: Add CONFIG_REVISION_TAG
Date: Tue, 18 Sep 2012 15:41:24 +0200 (CEST)	[thread overview]
Message-ID: <2023277454.4655204.1347975684715.JavaMail.root@advansee.com> (raw)
In-Reply-To: <CEF1C43EC1BF464090308EB428E1360001BA57@AMEXMB02.ds.jdsu.net>

Hi Greg, Fabio,

On Tuesday, September 18, 2012 3:00:58 PM, Greg Topmiller wrote:
> Fabio/Benoit,
> 
> I tried the get_board_rev alone and it worked on my mx51evk.
> 
> In the FSL u-boot version I am using the set_board_rev is:
> static inline void set_board_rev(int rev)
> {
> 	system_rev |= (rev & 0xF) << 8;
> }
> 
> It is not called for the mx51evk but is used for mx35_3stack.
> 
> The set_board_rev code below doesn't make sense when looking at the
> FSL u-boot code or the main line and comparing to the mx51evk
> schematic.  I don't see where either the FSL u-boot or the main line
> u-boot set up iomux for GPIO0_22.  There are four pin possibilities,
> EIM_EB2, NANDF_CS6, CSPI1_MOSI, and UART3_RXD.  On the schematic the
> UART3_RXD is tied low so that would be the only pin to make sense in
> this case.  To make the "set_board_rev" code below work the mx51evk
> board specific code would have to set up the UART3_RXD to be
> GPIO0_22 by making its function ALT3.  That being said the code
> below would not be a problem since the if logic would most likely be
> positive in any case and the system_rev would be or'd with board rev
> 2.
> 
> Let me know if you want the schematic I'm looking at.  It's a PDF.
> 
> Best Regards,
> 
> Greg
> 
> 
> 
> -----Original Message-----
> From: Fabio Estevam [mailto:festevam at gmail.com]
> Sent: Monday, September 17, 2012 11:25 PM
> To: Beno?t Th?baudeau
> Cc: U-Boot-Users ML; Greg Topmiller; Stefano Babic
> Subject: Re: [PATCH] mx51evk: Add CONFIG_REVISION_TAG
> 
> Hi Beno?t ,
> 
> On Mon, Sep 17, 2012 at 4:04 PM, Beno?t Th?baudeau
> <benoit.thebaudeau@advansee.com> wrote:
> 
> > +u32 get_board_rev(void)
> > +{
> > +       return get_cpu_rev();
> > +}
> 
> Is this enough?  Looking at FSL U-boot there is also a:
> 
> static inline void set_board_rev(void)
> {
> 	if ((__REG(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0)
> 		system_rev |= BOARD_REV_2_0 << BOARD_VER_OFFSET;
> 
> }
> 
> On mx53loco I had very weird problems when kernel was running and it
> took me sometime to find out that it was due to wrong detection of
> the board revision, so I suggest to double check this to avoid this
> kind of problem on mx51evk too.
> 
> Regards,
> 
> Fabio Estevam

It looks like there is confusion between the 3stack and Babbage boards here:
Fabio, the code you refer to in FSL U-Boot comes from the Babbage board, while
AFAIK, the mx51evk mainline U-Boot board corresponds to the 3stack board (this
is also FSL's naming for this board on their website).

Best regards,
Beno?t

  parent reply	other threads:[~2012-09-18 13:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CEF1C43EC1BF464090308EB428E1360001B95B@AMEXMB02.ds.jdsu.net>
2012-09-17 19:04 ` [U-Boot] [PATCH] mx51evk: Add CONFIG_REVISION_TAG Benoît Thébaudeau
2012-09-18  3:24   ` Fabio Estevam
     [not found]     ` <CEF1C43EC1BF464090308EB428E1360001BA57@AMEXMB02.ds.jdsu.net>
2012-09-18 13:36       ` Fabio Estevam
2012-09-18 13:41       ` Benoît Thébaudeau [this message]
2012-09-18 13:38         ` Fabio Estevam
2012-09-18 13:54           ` Benoît Thébaudeau
2012-09-18 14:02             ` Fabio Estevam
2012-09-18 14:11               ` Fabio Estevam
     [not found]                 ` <CEF1C43EC1BF464090308EB428E1360001BAA1@AMEXMB02.ds.jdsu.net>
2012-09-18 14:19                   ` Fabio Estevam
2012-09-18 14:36               ` Stefano Babic
2012-09-18 14:32         ` Stefano Babic
2012-09-18 16:01     ` Benoît Thébaudeau
2012-09-18 16:12       ` Fabio Estevam
2012-09-18 14:48   ` [U-Boot] [PATCH v2] " Benoît Thébaudeau
2012-09-18 15:11     ` Fabio Estevam
2012-09-23 17:55     ` Stefano Babic

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=2023277454.4655204.1347975684715.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.