From: Zhi-zhou Zhang Date: Sat, 24 Nov 2012 05:07:13 +0000 (+0000) Subject: MIPS: do not initialize timestamp variable before relocate_code X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=8ab36d2e5490ea7bd5a39fd65210533a6c478e28;p=u-boot.git MIPS: do not initialize timestamp variable before relocate_code 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 Signed-off-by: Daniel Schwierzeck --- diff --git a/arch/mips/cpu/mips32/time.c b/arch/mips/cpu/mips32/time.c index 350896a2a5..09fc842b50 100644 --- a/arch/mips/cpu/mips32/time.c +++ b/arch/mips/cpu/mips32/time.c @@ -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; diff --git a/arch/mips/cpu/mips64/time.c b/arch/mips/cpu/mips64/time.c index 51542808dd..720f7b7f8c 100644 --- a/arch/mips/cpu/mips64/time.c +++ b/arch/mips/cpu/mips64/time.c @@ -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;