rtc: dw: Unmasking interrupt is not generic among platforms
Let's apply the interruption unmasking if only the mask is defined. Which definition should be done in board.h thus applying the change to quark_se and quark_d2000 platforms Change-Id: I9c273e2e7e33dd077a54e8f9205fa949a5e3707a Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
49a6e0ae37
commit
d1d66a6200
3 changed files with 14 additions and 3 deletions
|
@ -134,8 +134,8 @@ struct scss_interrupt {
|
|||
|
||||
|
||||
/* RTC */
|
||||
#define RTC_DW_INT_MASK (SCSS_INT_BASE + 0x78)
|
||||
#define CCU_RTC_CLK_DIV_OFFSET 0x3
|
||||
#define INT_RTC_MASK 0x478
|
||||
#define CCU_RTC_PCLK_EN_SW (1 << 11)
|
||||
|
||||
|
||||
|
|
|
@ -225,8 +225,8 @@ struct scss_interrupt {
|
|||
#define CCU_WDT_PCLK_EN_SW (1 << 10)
|
||||
|
||||
/* RTC */
|
||||
#define RTC_DW_INT_MASK (SCSS_INT_BASE + 0x78)
|
||||
#define CCU_RTC_CLK_DIV_OFFSET (3)
|
||||
#define SCSS_INT_RTC_MASK 0x478
|
||||
#define CCU_RTC_PCLK_EN_SW (1 << 11)
|
||||
|
||||
/* Clock */
|
||||
|
|
|
@ -26,6 +26,16 @@
|
|||
#define CLK_RTC_DIV_DEF_MASK (0xFFFFFF83)
|
||||
#define CCU_RTC_CLK_DIV_EN (2)
|
||||
|
||||
#ifdef RTC_DW_INT_MASK
|
||||
static inline void _rtc_dw_int_unmask(void)
|
||||
{
|
||||
sys_write32(sys_read32(RTC_DW_INT_MASK) & INT_UNMASK_IA,
|
||||
RTC_DW_INT_MASK);
|
||||
}
|
||||
#else
|
||||
#define _rtc_dw_int_unmask()
|
||||
#endif
|
||||
|
||||
static void rtc_dw_set_div(const enum clk_rtc_div div)
|
||||
{
|
||||
/* set default division mask */
|
||||
|
@ -157,7 +167,8 @@ int rtc_dw_init(struct device *dev)
|
|||
IRQ_CONFIG(rtc, CONFIG_RTC_DW_IRQ);
|
||||
irq_enable(CONFIG_RTC_DW_IRQ);
|
||||
|
||||
SCSS_INTERRUPT->int_rtc_mask = INT_UNMASK_IA;
|
||||
_rtc_dw_int_unmask();
|
||||
|
||||
dev->driver_api = &funcs;
|
||||
|
||||
return DEV_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue