blob: cbc53293af5aec441c6fdc5a135550a9e75863be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/*
* linux/include/asm-arm/arch-ebsa285/time.h
*
* Copyright (c) 1998 Russell King.
*
* No real time clock on the evalulation board!
*
* Changelog:
* 21-Mar-1998 RMK Created
*/
#include <asm/leds.h>
extern __inline__ unsigned long gettimeoffset (void)
{
return 0;
}
extern __inline__ int reset_timer (void)
{
static unsigned int count = 50;
static int last_pid;
*CSR_TIMER1_CLR = 0;
if (current->pid != last_pid) {
last_pid = current->pid;
if (last_pid)
leds_event(led_idle_end);
else
leds_event(led_idle_start);
}
if (--count == 0) {
count = 50;
leds_event(led_timer);
}
return 1;
}
/*
* We don't have a RTC to update!
*/
#define update_rtc()
/*
* Set up timer interrupt, and return the current time in seconds.
*/
extern __inline__ unsigned long setup_timer (void)
{
*CSR_TIMER1_CLR = 0;
*CSR_TIMER1_LOAD = LATCH;
*CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_AUTORELOAD | TIMER_CNTL_DIV16;
return mktime(1970, 1, 1, 0, 0, 0);
}
|