Changeset 1025d28 in mainline for kernel/arch/ia64/src/drivers/it.c


Ignore:
Timestamp:
2008-11-13T07:54:48Z (16 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
37e518b
Parents:
aa8d0f7
Message:

IA64: Support for real frequency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/drivers/it.c

    raa8d0f7 r1025d28  
    4747#define IT_SERVICE_CLOCKS 64
    4848
     49#define FREQ_NUMERATOR_SHIFT 32
     50#define FREQ_NUMERATOR_MASK 0xffffffff00000000LL
     51
     52#define FREQ_DENOMINATOR_SHIFT 0
     53#define FREQ_DENOMINATOR_MASK 0xffffffffLL
     54
     55
     56uint64_t it_delta;
     57
     58
    4959static irq_t it_irq;
    5060
     
    6575                it_irq.handler = it_interrupt;
    6676                irq_register(&it_irq);
     77               
     78                uint64_t base_freq;
     79                base_freq  = ((bootinfo->freq_scale) & FREQ_NUMERATOR_MASK) >> FREQ_NUMERATOR_SHIFT;
     80                base_freq *= bootinfo->sys_freq;
     81                base_freq /= ((bootinfo->freq_scale) & FREQ_DENOMINATOR_MASK) >> FREQ_DENOMINATOR_SHIFT;
     82               
     83                it_delta = base_freq /HZ;
     84               
    6785        }
    6886       
Note: See TracChangeset for help on using the changeset viewer.