int platform_timer_setup(void (*timer_int)(int, void *, struct pt_regs *)) { outb(H8300_TIMER_COUNT_DATA,TMR8CMA2); outb(0x00,TMR8TCSR2); request_irq_boot(40,timer_int,0,"timer",0); outb(0x40|0x08|0x03,TMR8TCNT2); return 0; }
int platform_timer_setup(void (*timer_int)(int, void *, struct pt_regs *)) { *(unsigned short *)GRA=CONFIG_CLK_FREQ*10/8; *(unsigned short *)TCNT=0; outb(0x23,TCR); outb(0x00,TIOR); request_irq_boot(26,timer_int,0,"timer",0); outb(inb(TIER) | 0x01,TIER); outb(inb(TSNC) & ~0x01,TSNC); outb(inb(TMDR) & ~0x01,TMDR); outb(inb(TSTR) | 0x01,TSTR); return 0; }