All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] using static variables
@ 2006-03-24 16:33 David Ho
  2006-03-24 17:16 ` Wolfgang Denk
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Ho @ 2006-03-24 16:33 UTC (permalink / raw)
  To: u-boot

Hi,

I would appreciate if an u-boot expert can explain the use of static
variables in u-boot.

My understanding is that when u-boot is still running in flash static
variables are not modifiable.    Once u-boot moves to RAM, what will
happen to static variables?  I don't quite understand how the
mechanism work before and after relocation.

I asked this question because I need a saved copy of a write only
latch/register, which I have to initialize early.

I have added a field in the global_data struct previously for this. 
Seeing that introduced changes in the common code I would like to
choose a method I can use to localize it in my board specific code.

Will I be able to use static variables in board_early_init_r?

Are there some other mehods I have not noticed?

Regards,
David

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-27 20:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-24 16:33 [U-Boot-Users] using static variables David Ho
2006-03-24 17:16 ` Wolfgang Denk
2006-03-27 20:11   ` David Ho
2006-03-27  6:30 ` Tore Martin Hagen
2006-03-27  7:30   ` Wolfgang Denk
2006-03-27  8:42 ` Sam Song

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.