rtc qmsi: Enable the driver to work on ARC

Jira: ZEP-1030
Change-Id: Ie57b183c9fdf0e0cb70c7d81b92b221d54a32c0f
Signed-off-by: Iván Briano <ivan.briano@intel.com>
This commit is contained in:
Iván Briano 2016-10-27 11:49:19 -02:00 committed by Anas Nashif
commit b63e635a18
3 changed files with 15 additions and 5 deletions

View file

@ -70,6 +70,16 @@ config QMSI
config QMSI_BUILTIN config QMSI_BUILTIN
def_bool y def_bool y
if RTC
config RTC_QMSI
def_bool y
config RTC_0_IRQ_PRI
default 2
endif # RTC
if GPIO if GPIO
config GPIO_QMSI_SS config GPIO_QMSI_SS

View file

@ -1,2 +1 @@
obj-$(CONFIG_RTC_QMSI) += rtc_qmsi.o obj-$(CONFIG_RTC_QMSI) += rtc_qmsi.o
ccflags-$(CONFIG_RTC_QMSI) += -DENABLE_EXTERNAL_ISR_HANDLING

View file

@ -22,6 +22,7 @@
#include <nanokernel.h> #include <nanokernel.h>
#include <rtc.h> #include <rtc.h>
#include <power.h> #include <power.h>
#include <soc.h>
#include "qm_isr.h" #include "qm_isr.h"
#include "qm_rtc.h" #include "qm_rtc.h"
@ -166,15 +167,15 @@ static int rtc_qmsi_init(struct device *dev)
{ {
rtc_reentrancy_init(dev); rtc_reentrancy_init(dev);
IRQ_CONNECT(QM_IRQ_RTC_0_INT, CONFIG_RTC_0_IRQ_PRI, IRQ_CONNECT(IRQ_GET_NUMBER(QM_IRQ_RTC_0_INT), CONFIG_RTC_0_IRQ_PRI,
qm_rtc_0_isr, NULL, qm_rtc_0_isr, NULL,
IOAPIC_EDGE | IOAPIC_HIGH); IOAPIC_EDGE | IOAPIC_HIGH);
/* Unmask RTC interrupt */ /* Unmask RTC interrupt */
irq_enable(QM_IRQ_RTC_0_INT); irq_enable(IRQ_GET_NUMBER(QM_IRQ_RTC_0_INT));
/* Route RTC interrupt to Lakemont */ /* Route watchdog interrupt to the current core */
QM_INTERRUPT_ROUTER->rtc_0_int_mask &= ~BIT(0); QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->rtc_0_int_mask);
rtc_qmsi_set_power_state(dev, DEVICE_PM_ACTIVE_STATE); rtc_qmsi_set_power_state(dev, DEVICE_PM_ACTIVE_STATE);