162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * goldfish-timer clocksource 462306a36Sopenharmony_ci * Registers definition for the goldfish-timer device 562306a36Sopenharmony_ci */ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#ifndef _CLOCKSOURCE_TIMER_GOLDFISH_H 862306a36Sopenharmony_ci#define _CLOCKSOURCE_TIMER_GOLDFISH_H 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci/* 1162306a36Sopenharmony_ci * TIMER_TIME_LOW get low bits of current time and update TIMER_TIME_HIGH 1262306a36Sopenharmony_ci * TIMER_TIME_HIGH get high bits of time at last TIMER_TIME_LOW read 1362306a36Sopenharmony_ci * TIMER_ALARM_LOW set low bits of alarm and activate it 1462306a36Sopenharmony_ci * TIMER_ALARM_HIGH set high bits of next alarm 1562306a36Sopenharmony_ci * TIMER_IRQ_ENABLED enable alarm interrupt 1662306a36Sopenharmony_ci * TIMER_CLEAR_ALARM disarm an existing alarm 1762306a36Sopenharmony_ci * TIMER_ALARM_STATUS alarm status (running or not) 1862306a36Sopenharmony_ci * TIMER_CLEAR_INTERRUPT clear interrupt 1962306a36Sopenharmony_ci */ 2062306a36Sopenharmony_ci#define TIMER_TIME_LOW 0x00 2162306a36Sopenharmony_ci#define TIMER_TIME_HIGH 0x04 2262306a36Sopenharmony_ci#define TIMER_ALARM_LOW 0x08 2362306a36Sopenharmony_ci#define TIMER_ALARM_HIGH 0x0c 2462306a36Sopenharmony_ci#define TIMER_IRQ_ENABLED 0x10 2562306a36Sopenharmony_ci#define TIMER_CLEAR_ALARM 0x14 2662306a36Sopenharmony_ci#define TIMER_ALARM_STATUS 0x18 2762306a36Sopenharmony_ci#define TIMER_CLEAR_INTERRUPT 0x1c 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciextern int goldfish_timer_init(int irq, void __iomem *base); 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#endif /* _CLOCKSOURCE_TIMER_GOLDFISH_H */ 32