[U-Boot] [PATCH] mx51evk: Add CONFIG_REVISION_TAG
Benoît Thébaudeau
benoit.thebaudeau at advansee.com
Tue Sep 18 15:41:24 CEST 2012
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 at 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
More information about the U-Boot
mailing list