OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-ppc64/] [timex.h] - Blame information for rev 1275

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * linux/include/asm-ppc/timex.h
3
 *
4
 * PPC64 architecture timex specifications
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version
9
 * 2 of the License, or (at your option) any later version.
10
 */
11
#ifndef _ASMPPC64_TIMEX_H
12
#define _ASMPPC64_TIMEX_H
13
 
14
#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
15
#define CLOCK_TICK_FACTOR       20      /* Factor of both 1000000 and CLOCK_TICK_RATE */
16
#define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
17
        (1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \
18
                << (SHIFT_SCALE-SHIFT_HZ)) / HZ)
19
 
20
typedef unsigned long cycles_t;
21
extern cycles_t cacheflush_time;
22
 
23
static inline cycles_t get_cycles(void)
24
{
25
        cycles_t ret;
26
 
27
        __asm__ __volatile__("mftb %0" : "=r" (ret) : );
28
        return ret;
29
}
30
 
31
#define vxtime_lock()           do {} while (0)
32
#define vxtime_unlock()         do {} while (0)
33
 
34
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.