26#ifndef _ULTIBO_PL031_H
27#define _ULTIBO_PL031_H
36#define PL031_RTC_DESCRIPTION "ARM PrimeCell PL031 Real Time Clock"
38#define PL031_MIN_TIME TIME_TICKS_TO_1970
39#define PL031_MAX_TIME 137919572470000000
42#define PL031_RTC_CR_EN (1 << 0)
45#define PL031_RTC_IMSC_INTR_SET (1 << 0)
46#define PL031_RTC_IMSC_INTR_CLEAR (0 << 0)
49#define PL031_RTC_RIS_INTR (1 << 0)
52#define PL031_RTC_MIS_INTR (1 << 0)
55#define PL031_RTC_ICR_INTR (1 << 0)
#define STDCALL
Definition globaltypes.h:45
uint32_t STDCALL pl031_rtc_destroy(RTC_DEVICE *rtc)
Stop, deregister and destroy a PL031 RTC device created by this driver.
struct _PL031_RTC PL031_RTC
Definition pl031.h:73
RTC_DEVICE *STDCALL pl031_rtc_create(size_t address, char *name, uint32_t irq)
Create, register and start a new PL031 RTC device which can be accessed using the RTC API.
struct _PL031_RTC_REGISTERS PL031_RTC_REGISTERS
Definition pl031.h:59
struct _RTC_DEVICE RTC_DEVICE
Definition rtc.h:70
uint32_t mr
Match register.
Definition pl031.h:63
uint32_t ris
Raw interrupt status register.
Definition pl031.h:67
uint32_t imsc
Interrupt mask set and clear register.
Definition pl031.h:66
uint32_t lr
Load register.
Definition pl031.h:64
uint32_t cr
Control register.
Definition pl031.h:65
uint32_t icr
Interrupt clear register.
Definition pl031.h:69
uint32_t dr
Data register.
Definition pl031.h:62
uint32_t mis
Masked interrupt status register.
Definition pl031.h:68
uint32_t irq
Definition pl031.h:79
uint32_t interruptcount
Number of interrupt requests received by the device.
Definition pl031.h:82
PL031_RTC_REGISTERS * registers
Device registers.
Definition pl031.h:80
RTC_DEVICE rtc
Definition pl031.h:77