127,6 → 127,21 |
#define apic_read_around(x) |
#define apic_write_around(x,y) apic_write((x),(y)) |
|
static __inline__ void set_APIC_timer(unsigned int clocks) |
{ |
unsigned int tmp_value; |
extern unsigned int apic_set_limit; |
|
if (clocks < apic_set_limit) clocks = apic_set_limit; |
|
tmp_value = apic_read(APIC_TDCR); |
apic_write_around(APIC_TDCR, (tmp_value |
& ~(APIC_TDR_DIV_1 | APIC_TDR_DIV_TMBASE)) |
| APIC_TDR_DIV_1); |
|
apic_write_around(APIC_TMICT, clocks); |
} |
|
static __inline__ void ack_APIC_irq(void) |
{ |
/* |
140,11 → 155,7 |
apic_write_around(APIC_EOI, 0); |
} |
|
extern int get_maxlvt(void); |
extern void clear_local_APIC(void); |
extern void connect_bsp_APIC (void); |
extern void disconnect_bsp_APIC (void); |
extern void disable_local_APIC (void); |
extern void setup_APIC_LVTT(unsigned int clocks); |
extern void enable_APIC_timer(void); |
extern void disable_APIC_timer (void); |
|
#endif |