Revision 66321a11 hw/slavio_timer.c

b/hw/slavio_timer.c
1 1
/*
2 2
 * QEMU Sparc SLAVIO timer controller emulation
3 3
 *
4
 * Copyright (c) 2003-2004 Fabrice Bellard
4
 * Copyright (c) 2003-2005 Fabrice Bellard
5 5
 * 
6 6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 7
 * of this software and associated documentation files (the "Software"), to deal
......
25 25

  
26 26
//#define DEBUG_TIMER
27 27

  
28
#ifdef DEBUG_TIMER
29
#define DPRINTF(fmt, args...) \
30
do { printf("TIMER: " fmt , ##args); } while (0)
31
#else
32
#define DPRINTF(fmt, args...)
33
#endif
34

  
28 35
/*
29 36
 * Registers of hardware timer in sun4m.
30 37
 *
......
90 97
    // Convert remaining counter ticks to CPU ticks
91 98
    s->expire_time = ticks + muldiv64(limit - count, ticks_per_sec, CNT_FREQ);
92 99

  
93
#ifdef DEBUG_TIMER
94
    term_printf("timer: irq %d limit %d reached %d d %lld count %d s->c %x diff %lld stopped %d mode %d\n", s->irq, limit, s->reached?1:0, (ticks-s->count_load_time), count, s->count, s->expire_time - ticks, s->stopped, s->mode);
95
#endif
100
    DPRINTF("irq %d limit %d reached %d d %lld count %d s->c %x diff %lld stopped %d mode %d\n", s->irq, limit, s->reached?1:0, (ticks-s->count_load_time), count, s->count, s->expire_time - ticks, s->stopped, s->mode);
101

  
96 102
    if (s->mode != 1)
97 103
	pic_set_irq(s->irq, out);
98 104
}

Also available in: Unified diff