X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cpu%2Fblackfin%2Finterrupts.c;h=bf6fb4b4cf38cd19af4f0ee4852fa8f98b12fe01;hb=f15f14e52879711be1d1bba2634dec684eda722e;hp=d4dd63610106012bf5a6b307f200a9b98dd2af5d;hpb=cb5473205206c7f14cbb1e747f28ec75b48826e2;p=oweals%2Fu-boot.git diff --git a/cpu/blackfin/interrupts.c b/cpu/blackfin/interrupts.c index d4dd636101..bf6fb4b4cf 100644 --- a/cpu/blackfin/interrupts.c +++ b/cpu/blackfin/interrupts.c @@ -95,11 +95,12 @@ void udelay(unsigned long usec) int timer_init(void) { *pTCNTL = 0x1; + CSYNC(); *pTSCALE = 0x0; *pTCOUNT = MAX_TIM_LOAD; *pTPERIOD = MAX_TIM_LOAD; *pTCNTL = 0x7; - asm("CSYNC;"); + CSYNC(); timestamp = 0; last_time = 0; @@ -151,5 +152,5 @@ ulong get_timer(ulong base) void reset_timer(void) { - timestamp = 0; + timer_init(); }