1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2af930827SMasahiro Yamada /* 3af930827SMasahiro Yamada * Copyright (C) 2010 4af930827SMasahiro Yamada * Reinhard Meyer, reinhard.meyer@emk-elektronik.de 5af930827SMasahiro Yamada * 6af930827SMasahiro Yamada * Real-time Timer 7af930827SMasahiro Yamada * Based on AT91SAM9XE datasheet 8af930827SMasahiro Yamada */ 9af930827SMasahiro Yamada 10af930827SMasahiro Yamada #ifndef AT91_RTT_H 11af930827SMasahiro Yamada #define AT91_RTT_H 12af930827SMasahiro Yamada 13af930827SMasahiro Yamada #ifndef __ASSEMBLY__ 14af930827SMasahiro Yamada 15af930827SMasahiro Yamada typedef struct at91_rtt { 16af930827SMasahiro Yamada u32 mr; /* Mode Register RW 0x00008000 */ 17af930827SMasahiro Yamada u32 ar; /* Alarm Register RW 0xFFFFFFFF */ 18af930827SMasahiro Yamada u32 vr; /* Value Register RO 0x00000000 */ 19af930827SMasahiro Yamada u32 sr; /* Status Register RO 0x00000000 */ 20af930827SMasahiro Yamada } at91_rtt_t; 21af930827SMasahiro Yamada 22af930827SMasahiro Yamada #endif /* __ASSEMBLY__ */ 23af930827SMasahiro Yamada 24af930827SMasahiro Yamada #define AT91_RTT_MR_RTPRES 0x0000ffff 25af930827SMasahiro Yamada #define AT91_RTT_MR_ALMIEN 0x00010000 26af930827SMasahiro Yamada #define AT91_RTT_RTTINCIEN 0x00020000 27af930827SMasahiro Yamada #define AT91_RTT_RTTRST 0x00040000 28af930827SMasahiro Yamada 29af930827SMasahiro Yamada #define AT91_RTT_SR_ALMS 0x00000001 30af930827SMasahiro Yamada #define AT91_RTT_SR_RTTINC 0x00000002 31af930827SMasahiro Yamada 32af930827SMasahiro Yamada #endif 33