[BACK]Return to clock.c CVS log [TXT][DIR] Up to [local] / prex-old / sys / arch / i386 / pc

Diff for /prex-old/sys/arch/i386/pc/clock.c between version 1.1 and 1.1.1.1.2.1

version 1.1, 2008/06/03 10:38:45 version 1.1.1.1.2.1, 2008/08/13 17:12:30
Line 34 
Line 34 
 #include <kernel.h>  #include <kernel.h>
 #include <timer.h>  #include <timer.h>
 #include <irq.h>  #include <irq.h>
 #include <cpu.h>  #include <locore.h>
   
 /* Interrupt vector for clock */  /* Interrupt vector for clock */
 #define CLOCK_IRQ       0  #define CLOCK_IRQ       0
Line 71 
Line 71 
 void  void
 clock_init(void)  clock_init(void)
 {  {
         int clock_irq;          irq_t clock_irq;
   
         outb_p(0x34, PIT_CTRL);         /* Command to set generator mode */          outb_p(0x34, PIT_CTRL);         /* Command to set generator mode */
         outb_p((u_char)(PIT_LATCH & 0xff), PIT_CH0);            /* LSB */          outb_p((u_char)(PIT_LATCH & 0xff), PIT_CH0);            /* LSB */
         outb_p((u_char)((PIT_LATCH >> 8) & 0xff), PIT_CH0);     /* MSB */          outb_p((u_char)((PIT_LATCH >> 8) & 0xff), PIT_CH0);     /* MSB */
   
         clock_irq = irq_attach(CLOCK_IRQ, IPL_CLOCK, 0, clock_isr, NULL);          clock_irq = irq_attach(CLOCK_IRQ, IPL_CLOCK, 0, &clock_isr, NULL);
         ASSERT(clock_irq != -1);          ASSERT(clock_irq != NULL);
   
         printk("Clock rate: %d ticks/sec\n", CONFIG_HZ);          DPRINTF(("Clock rate: %d ticks/sec\n", CONFIG_HZ));
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.1.1.2.1

CVSweb