From: Hong Xu <hong.xu@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] AT91: Defer Dataflash access to env_relocate_spec
Date: Wed, 03 Aug 2011 15:36:45 +0800 [thread overview]
Message-ID: <4E38FA8D.9080203@atmel.com> (raw)
In-Reply-To: <4E38F6D0.4080807@emk-elektronik.de>
Hi Reinhard,
On 08/03/2011 03:20 PM, Reinhard Meyer wrote:
> Dear Hong Xu,
> > When env_init is called, the SPI is not actually initialized in U-Boot.
> > So that we can not read Dataflash for its content.
> > We simply mark it OK for now, and defer the real work to
> > `env_relocate_spec'. (Idealy from env_nand.c)
> >
> > Signed-off-by: Hong Xu<hong.xu@atmel.com>
> > ---
> > common/env_dataflash.c | 83
> ++++++++++++++++++++++++++----------------------
> > 1 files changed, 45 insertions(+), 38 deletions(-)
>
> I cannot really decide if that is a good approach. Where would be
> the issue if SPI/dataflash were initialized at this point (before
> relocation)?
Currently the SPI is initialized in board_init which is called in
board_init_r, but env_init is called in board_init_f. So actually the
original code needs the SPI to be initialized before env_init, not
before relocation.
An alternative way is to put SPI initialization code in
board_early_init_f. But I'm not sure if it's the correct way.
BR,
Eric
> Same works well for example for I2C.
>
> If Wolfgang is OK with it, I can pick up this patch (once
> it is agreed on the way to solve the issue).
>
> Best Regards,
> Reinhard
>
next prev parent reply other threads:[~2011-08-03 7:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 7:01 [U-Boot] [PATCH] AT91: Defer Dataflash access to env_relocate_spec Hong Xu
2011-08-03 7:20 ` Reinhard Meyer
2011-08-03 7:36 ` Hong Xu [this message]
2011-08-12 9:38 ` Albert ARIBAUD
2011-08-24 21:55 ` Wolfgang Denk
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=4E38FA8D.9080203@atmel.com \
--to=hong.xu@atmel.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.