Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * goldfish-timer clocksource
0004  * Registers definition for the goldfish-timer device
0005  */
0006 
0007 #ifndef _CLOCKSOURCE_TIMER_GOLDFISH_H
0008 #define _CLOCKSOURCE_TIMER_GOLDFISH_H
0009 
0010 /*
0011  * TIMER_TIME_LOW    get low bits of current time and update TIMER_TIME_HIGH
0012  * TIMER_TIME_HIGH   get high bits of time at last TIMER_TIME_LOW read
0013  * TIMER_ALARM_LOW   set low bits of alarm and activate it
0014  * TIMER_ALARM_HIGH  set high bits of next alarm
0015  * TIMER_IRQ_ENABLED     enable alarm interrupt
0016  * TIMER_CLEAR_ALARM     disarm an existing alarm
0017  * TIMER_ALARM_STATUS    alarm status (running or not)
0018  * TIMER_CLEAR_INTERRUPT clear interrupt
0019  */
0020 #define TIMER_TIME_LOW      0x00
0021 #define TIMER_TIME_HIGH     0x04
0022 #define TIMER_ALARM_LOW     0x08
0023 #define TIMER_ALARM_HIGH    0x0c
0024 #define TIMER_IRQ_ENABLED   0x10
0025 #define TIMER_CLEAR_ALARM   0x14
0026 #define TIMER_ALARM_STATUS  0x18
0027 #define TIMER_CLEAR_INTERRUPT   0x1c
0028 
0029 extern int goldfish_timer_init(int irq, void __iomem *base);
0030 
0031 #endif /* _CLOCKSOURCE_TIMER_GOLDFISH_H */