From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] overo: add SPL support
Date: Tue, 20 Dec 2011 06:43:28 +0100 [thread overview]
Message-ID: <20111220054329.327111EDB42@gemini.denx.de> (raw)
In-Reply-To: <CA+M6bX=bBFBaVm4aD2hVJfLXovtGjmKO9V40E+NyWtMtoaOV6A@mail.gmail.com>
Dear Tom Rini,
In message <CA+M6bX=bBFBaVm4aD2hVJfLXovtGjmKO9V40E+NyWtMtoaOV6A@mail.gmail.com> you wrote:
>
> > 'i2c_base' is correctly located in SRAM but 'current_bus' and 'bus_initialized'
> > are located in CS0 SDRAM which is at the time of call not yet initalized. This
> > fits to the crash behaviour: Accessing 'i2c_base' does not cause trouble.
> > How can I move 'current_bus' and 'bus_initialized' to SRAM?
I guess you really, really must use i2c before relocation? If
possible, this should be avoided in the first place.
> Ah-ha! Good work. If you initialize them to a non-zero value,
> statically (and make sure the code doesn't assume they're 0 by
> default), this will change.
No, this is justy hiding the problem, and the next one who believes
the value doesn't fit and changes it back to 0 runs into the issue
again. Rather use an explicit
int foo __attribute__ ((section(".data"))) = 0;
so everybody sees the real intention.
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
Ein weiser Herrscher kann in einem gro?en Land mehr Gutes bewirken
als in einem kleinen - ein dummer Herrscher aber auch viel mehr Un-
fug. Da weise Herrscher seltener sind als dumme, war ich schon immer
gegen gro?e Reiche skeptisch. - Herbert Rosendorfer
next prev parent reply other threads:[~2011-12-20 5:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 14:34 [U-Boot] [PATCH] overo: add SPL support Andreas Müller
2011-12-15 18:32 ` Tom Rini
2011-12-15 21:12 ` Andreas Müller
2011-12-20 1:03 ` Andreas Müller
2011-12-20 1:08 ` Tom Rini
2011-12-20 1:15 ` Andreas Müller
2011-12-20 5:43 ` Wolfgang Denk [this message]
2011-12-20 5:45 ` Tom Rini
2011-12-20 11:41 ` Wolfgang Denk
2011-12-20 11:53 ` Andreas Müller
2011-12-20 12:06 ` Wolfgang Denk
2011-12-20 12:39 ` Andreas Müller
2011-12-20 16:36 ` Aneesh V
2011-12-20 21:17 ` Wolfgang Denk
2011-12-20 12:20 ` Igor Grinberg
2011-12-20 13:55 ` Steve Sakoman
2011-12-21 1:00 ` Andreas Müller
-- strict thread matches above, loose matches on Subject: below --
2011-12-14 16:27 Andreas Müller
2011-12-14 17:24 ` Steve Sakoman
2011-12-14 23:00 ` Andreas Müller
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=20111220054329.327111EDB42@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