
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.