* [U-Boot] Detecting board revision that needs to be done after relocation
@ 2012-05-29 3:25 Fabio Estevam
2012-05-29 14:45 ` Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Fabio Estevam @ 2012-05-29 3:25 UTC (permalink / raw)
To: u-boot
Hi,
I need to provide a get_board_rev() function that depends on I2C probe
of a PMIC to decide between the board revision.
I2C is only available after relocation, so what is the correct way to
"delay" get_board_rev, so that it gets called only at a time when I2C
is ready?
Thanks,
Fabio Estevam
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Detecting board revision that needs to be done after relocation
2012-05-29 3:25 [U-Boot] Detecting board revision that needs to be done after relocation Fabio Estevam
@ 2012-05-29 14:45 ` Marek Vasut
2012-05-29 15:55 ` Fabio Estevam
2012-05-29 19:13 ` Andrew E. Mileski
2012-06-04 14:31 ` Hebbar, Gururaja
2 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2012-05-29 14:45 UTC (permalink / raw)
To: u-boot
Dear Fabio Estevam,
> Hi,
>
> I need to provide a get_board_rev() function that depends on I2C probe
> of a PMIC to decide between the board revision.
>
> I2C is only available after relocation,
On arm? Not at all ;-) check arch/arm/lib/board.c
> so what is the correct way to
> "delay" get_board_rev, so that it gets called only at a time when I2C
> is ready?
Well ... implement board-specific hack in your boardfile that detects the PMIC
early?
> Thanks,
>
> Fabio Estevam
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Detecting board revision that needs to be done after relocation
2012-05-29 14:45 ` Marek Vasut
@ 2012-05-29 15:55 ` Fabio Estevam
0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2012-05-29 15:55 UTC (permalink / raw)
To: u-boot
On Tue, May 29, 2012 at 11:45 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Well ... implement board-specific hack in your boardfile that detects the PMIC
> early?
Yes, you are right. This works ;-)
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Detecting board revision that needs to be done after relocation
2012-05-29 3:25 [U-Boot] Detecting board revision that needs to be done after relocation Fabio Estevam
2012-05-29 14:45 ` Marek Vasut
@ 2012-05-29 19:13 ` Andrew E. Mileski
2012-06-04 14:31 ` Hebbar, Gururaja
2 siblings, 0 replies; 5+ messages in thread
From: Andrew E. Mileski @ 2012-05-29 19:13 UTC (permalink / raw)
To: u-boot
On 05/28/2012 11:25 PM, Fabio Estevam wrote:
>
> I need to provide a get_board_rev() function that depends on I2C probe
> of a PMIC to decide between the board revision.
>
> I2C is only available after relocation, so what is the correct way to
> "delay" get_board_rev, so that it gets called only at a time when I2C
> is ready?
I2C is usually available earlier, as it is used to read the SPD on
memory modules.
When I last did it, I had to change U-Boot slightly to support a second
I2C bus, as the bus selection variable was located in flash before
relocation (very old version of U-Boot, so may not apply still).
I've only had a problem using I2C very early in the boot sequence, like
before the system clocks have been setup, then the solution to that was
to just use a GPIO strapping instead for clock selection.
--
Andrew E. Mileski
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Detecting board revision that needs to be done after relocation
2012-05-29 3:25 [U-Boot] Detecting board revision that needs to be done after relocation Fabio Estevam
2012-05-29 14:45 ` Marek Vasut
2012-05-29 19:13 ` Andrew E. Mileski
@ 2012-06-04 14:31 ` Hebbar, Gururaja
2 siblings, 0 replies; 5+ messages in thread
From: Hebbar, Gururaja @ 2012-06-04 14:31 UTC (permalink / raw)
To: u-boot
On Tue, May 29, 2012 at 08:55:34, Fabio Estevam wrote:
> Hi,
>
> I need to provide a get_board_rev() function that depends on I2C probe
> of a PMIC to decide between the board revision.
>
> I2C is only available after relocation,
Not necessarily. You can use i2c probe & read even before relocation provided
they are no data from bss section being used.
Look at below commits for details
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=0b620ec97e05ddb09714d127a7880333fc4008fb
http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=commitdiff;h=4825603ea6b2f70df2986bb489c4179383c76b5a
http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=commitdiff;h=0ffb997b4d2fa3fd6e99310d7eb4d034cc78d63e
>so what is the correct way to
> "delay" get_board_rev, so that it gets called only at a time when I2C
> is ready?
>
> Thanks,
>
> Fabio Estevam
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Regards,
Gururaja
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-04 14:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-29 3:25 [U-Boot] Detecting board revision that needs to be done after relocation Fabio Estevam
2012-05-29 14:45 ` Marek Vasut
2012-05-29 15:55 ` Fabio Estevam
2012-05-29 19:13 ` Andrew E. Mileski
2012-06-04 14:31 ` Hebbar, Gururaja
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox