All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew E. Mileski <andrewm@isoar.ca>
To: u-boot@lists.denx.de
Subject: [U-Boot] Detecting board revision that needs to be done after relocation
Date: Tue, 29 May 2012 15:13:43 -0400	[thread overview]
Message-ID: <4FC51FE7.4040408@isoar.ca> (raw)
In-Reply-To: <CAOMZO5CrgJ2w2RL7teiDadRq8=_3mLkz+hy1_Xg7BAW=d5bURw@mail.gmail.com>

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

  parent reply	other threads:[~2012-05-29 19:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-06-04 14:31 ` Hebbar, Gururaja

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=4FC51FE7.4040408@isoar.ca \
    --to=andrewm@isoar.ca \
    --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.