#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#define SUNXI_LOSC_CTRL 0x0000
#define SUNXI_LOSC_CTRL_RTC_HMS_ACC BIT(8)
#define SUNXI_LOSC_CTRL_RTC_YMD_ACC BIT(7)
#define SUNXI_RTC_YMD 0x0004
#define SUNXI_RTC_HMS 0x0008
#define SUNXI_ALRM_DHMS 0x000c
#define SUNXI_ALRM_EN 0x0014
#define SUNXI_ALRM_EN_CNT_EN BIT(8)
#define SUNXI_ALRM_IRQ_EN 0x0018
#define SUNXI_ALRM_IRQ_EN_CNT_IRQ_EN BIT(0)
#define SUNXI_ALRM_IRQ_STA 0x001c
#define SUNXI_ALRM_IRQ_STA_CNT_IRQ_PEND BIT(0)
#define SUNXI_MASK_DH 0x0000001f
#define SUNXI_MASK_SM 0x0000003f
#define SUNXI_MASK_M 0x0000000f
#define SUNXI_MASK_LY 0x00000001
#define SUNXI_MASK_D 0x00000ffe
#define SUNXI_MASK_M 0x0000000f
#define SUNXI_GET(x, mask, shift) (((x) & ((mask) << (shift))) \