[U-Boot] [PATCH v3 5/5] New board support: Nokia RX-51 aka N900

Pali Rohár pali.rohar at gmail.com
Tue Oct 16 18:15:44 CEST 2012


On Tuesday 16 October 2012 17:57:09 Marek Vasut wrote:
> 
> > > > > > +
> > > > > > +static unsigned long int twl_wd_time; /* last time
> > > > > > of
> > > > > > watchdog reset */ +static unsigned long int
> > > > > > twl_i2c_lock;
> > > > > 
> > > > > Are you sure you want to use global vars for these?
> > > > > These
> > > > > won't work before reloc!
> > > > 
> > > > Why it does not work before reloc? U-Boot is on n900
> > > > always
> > > > started from RAM.
> > > 
> > > The BSS isn't cleared though.
> > 
> > So how to fix it? I need to share these vars in more
> > functions.
> Make a struct and pass it around? Or if it's used only _after_
> relocation, these will work.
> 

It is used for keyboard input (tstc, getc) and watchdog reset. 
All functions are global for uboot, so parameters are fixed. 
Keyboard input is initialized in console_init_r.

I tested U-Boot on real N900 and in qemu N900 and both watchdog 
kicking & keyboard input worked without problem.

-- 
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121016/c19d863d/attachment.pgp>


More information about the U-Boot mailing list