]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
MIPS: do not initialize timestamp variable before relocate_code
authorZhi-zhou Zhang <zhizhou.zh@gmail.com>
Sat, 24 Nov 2012 05:07:13 +0000 (05:07 +0000)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sun, 25 Nov 2012 20:50:43 +0000 (21:50 +0100)
Because timestamp is declared as `static', we needn't initialize
it by writing it a zero. If we do it before relocate_code, we
will write into a flash address(0xffffffffbfc0xxxx).

Signed-off-by: Zhi-zhou Zhang <zhizhou.zh@gmail.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
arch/mips/cpu/mips32/time.c
arch/mips/cpu/mips64/time.c

index 350896a2a5657e4cd08b2ab428fd6b1ce1e1ef1e..09fc842b502cd6dc18647ffb646aafbcd5874a95 100644 (file)
@@ -36,7 +36,6 @@ static unsigned long timestamp;
 int timer_init(void)
 {
        /* Set up the timer for the first expiration. */
-       timestamp = 0;
        write_c0_compare(read_c0_count() + CYCLES_PER_JIFFY);
 
        return 0;
index 51542808dd6a48c604dc0eaf3c33826e5b253b65..720f7b7f8cbada89007fbea88a93283b4e4a2d1e 100644 (file)
@@ -37,7 +37,6 @@ static unsigned long timestamp;
 int timer_init(void)
 {
        /* Set up the timer for the first expiration. */
-       timestamp = 0;
        write_c0_compare(read_c0_count() + CYCLES_PER_JIFFY);
 
        return 0;