From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] environmental "baudrate" not used at boot up
Date: Wed, 19 Jan 2011 07:59:10 +0100 [thread overview]
Message-ID: <20110119065910.397AF2FC@gemini.denx.de> (raw)
In-Reply-To: <20110119053445.GA9776@cslinux-build01.cyberswitching.local>
Dear chrisv at cyberswitching.com,
In message <20110119053445.GA9776@cslinux-build01.cyberswitching.local> you wrote:
>
> I investigated this a little further, and I'm wondering if the problem
> is related to the initialization ordering in lib_arm/board.c.
>
> Here's the sequence:
>
> start_armboot():
> 1. init_baudrate() -> getenv_r() -> serial_setbrg()
> 2. env_relocate()
>
> Note that init_baudrate() calls getenv_r("baudrate") and passes either
> the result (on success) or CONFIG_BAUDRATE (on error) to
> serial_setbrg(). Only after this does the environment get relocated
> using env_relocate().
Right. This is the intended sequence.
> Based on empirical testing, I've discovered that re-running
> init_baudrate() after env_relocate() fixes everything. The serial
> console uses the baud rate stored in the "baudrate" variable now, and
> some ordering of display outputs needs to be tweaked so that gibberish
> isn't output in the interim.
You have diagnosed where the problem is, but you come to the wrong
conclusions and instead of fixing the problem you paint over it.
Obviously getenv_r("baudrate") is not returning the right value for
you.
You should first check, what exactly it returns.
Then you should check why it is not reading the correct data, as it is
supposed to do.
Then you should fix _that_ problem.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Is there a way to determine Yesterday's date using Unix utilities?
echo "what is yesterday's date?" | /bin/mail root
-- Randal L. Schwartz in <ukbuh2y982.fsf@julie.teleport.com>
next prev parent reply other threads:[~2011-01-19 6:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 14:01 [U-Boot] environmental "baudrate" not used at boot up chrisv at cyberswitching.com
2011-01-16 14:42 ` Albert ARIBAUD
2011-01-16 14:50 ` chrisv at cyberswitching.com
2011-01-19 5:34 ` chrisv at cyberswitching.com
2011-01-19 6:59 ` Wolfgang Denk [this message]
2011-01-19 14:46 ` chrisv at cyberswitching.com
2011-01-19 15:36 ` Wolfgang Denk
2011-01-19 19:49 ` Reinhard Meyer
2011-01-19 19:50 ` chrisv at cyberswitching.com
2011-01-19 19:58 ` Scott Wood
2011-01-21 4:45 ` Aggrwal Poonam-B10812
2011-01-21 18:58 ` Scott Wood
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=20110119065910.397AF2FC@gemini.denx.de \
--to=wd@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox