2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 22:53:55 +08:00
linux-next/arch/unicore32/include/mach/regs-rtc.h
GuanXuetao 1cf46c42d7 unicore32: modify io_p2v and io_v2p macros, and adjust PKUNITY_mmio_BASEs
1. remove __REG macro
2. add (void __iomem *) to io_p2v macro
3. add (phys_addr_t) to io_v2p macro
4. add PKUNITY_AHB_BASE and PKUNITY_APB_BASE definitions
5. modify all PKUNITY_mmio_BASEs from physical addr to virtual addr
6. adjust prefix macro for all usage of PKUNITY_mmio_BASEs
  -- by advice with Arnd Bergmann

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2011-03-17 09:19:21 +08:00

38 lines
694 B
C

/*
* PKUnity Real-Time Clock (RTC) control registers
*/
/*
* RTC Alarm Reg RTC_RTAR
*/
#define RTC_RTAR (PKUNITY_RTC_BASE + 0x0000)
/*
* RTC Count Reg RTC_RCNR
*/
#define RTC_RCNR (PKUNITY_RTC_BASE + 0x0004)
/*
* RTC Trim Reg RTC_RTTR
*/
#define RTC_RTTR (PKUNITY_RTC_BASE + 0x0008)
/*
* RTC Status Reg RTC_RTSR
*/
#define RTC_RTSR (PKUNITY_RTC_BASE + 0x0010)
/*
* ALarm detected RTC_RTSR_AL
*/
#define RTC_RTSR_AL FIELD(1, 1, 0)
/*
* 1 Hz clock detected RTC_RTSR_HZ
*/
#define RTC_RTSR_HZ FIELD(1, 1, 1)
/*
* ALarm interrupt Enable RTC_RTSR_ALE
*/
#define RTC_RTSR_ALE FIELD(1, 1, 2)
/*
* 1 Hz clock interrupt Enable RTC_RTSR_HZE
*/
#define RTC_RTSR_HZE FIELD(1, 1, 3)