From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pali =?ISO-8859-1?Q?Roh=E1r?= Date: Tue, 16 Oct 2012 18:15:44 +0200 Subject: [U-Boot] [PATCH v3 5/5] New board support: Nokia RX-51 aka N900 In-Reply-To: <201210161757.09401.marex@denx.de> References: <1327415291-13260-1-git-send-email-pali.rohar@gmail.com> <10005742.dfAzi2Zbs1@pali> <201210161757.09401.marex@denx.de> Message-ID: <2584796.CG4l6bWD1K@pali> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: