18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2016 Yang Ling <gnaygnil@gmail.com>
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Loongson 1 RTC timer Register Definitions.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef __ASM_MACH_LOONGSON32_REGS_RTC_H
98c2ecf20Sopenharmony_ci#define __ASM_MACH_LOONGSON32_REGS_RTC_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#define LS1X_RTC_REG(x) \
128c2ecf20Sopenharmony_ci		((void __iomem *)KSEG1ADDR(LS1X_RTC_BASE + (x)))
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#define LS1X_RTC_CTRL	LS1X_RTC_REG(0x40)
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define RTC_EXTCLK_OK	(BIT(5) | BIT(8))
178c2ecf20Sopenharmony_ci#define RTC_EXTCLK_EN	BIT(8)
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#endif /* __ASM_MACH_LOONGSON32_REGS_RTC_H */
20