void rtl8139_dumpregs(struct rtl8139 *rtl) { for(int i = 0; i < 0x80/4; i++) { printf("%.8X:",rtl_inl(rtl, i*4)); if(i %8 == 7) printf("\n"); } }
void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { //unsigned int i,j; unsigned char status; static int light=0; // prom_printf("in timer interrupt\n"); prom_printf("IRQ=%x\n",irq); if (irq != 8) { prom_printf("in timer irq, irq!=0\n"); for(;;); } status = rtl_inl(TCIR); if (status & 0x40000000) { ((volatile timer_t *)(dev_id))->timer0tick= ((volatile timer_t *)(dev_id))->timer0tick + 1; #if (WATCHDOG_TEST == 1) /*Cyrus Tsai*/ /*this should be longer */ if (Jiffies <=0x19) { rtl_outl(WDTCNR,0x100); } #endif } if (status & 0x20) { ((volatile timer_t *)(dev_id))->timer1tick= ((volatile timer_t *)(dev_id))->timer1tick + 1; //serial_outc('T'); //wlan_tx_list_generate(0xFF); flush_cache(); //twiddle(); Jiffies++; if(Jiffies>1000) { prom_printf("----\n"); Jiffies=0; } } if (status & 0x40) ((volatile timer_t *)(dev_id))->timer2tick= ((volatile timer_t *)(dev_id))->timer2tick + 1; }