diff --git a/arch/x86/soc/quark_d2000/Kconfig.defconfig b/arch/x86/soc/quark_d2000/Kconfig.defconfig index f5fc0381126..004a1699531 100644 --- a/arch/x86/soc/quark_d2000/Kconfig.defconfig +++ b/arch/x86/soc/quark_d2000/Kconfig.defconfig @@ -197,6 +197,15 @@ config AIO_QMSI_COMPARATOR def_bool y endif +if COUNTER +config AON_COUNTER_QMSI + def_bool y +config AON_TIMER_QMSI + def_bool y +config AON_TIMER_IRQ_PRI + default 0 +endif + if GPIO_QMSI config GPIO_QMSI_0 def_bool y @@ -215,12 +224,6 @@ config SPI_QMSI_PORT_0_PRI default 0 endif # SPI_QMSI -if AON_TIMER_QMSI -config AON_TIMER_IRQ - default 3 -config AON_TIMER_IRQ_PRI - default 0 -endif # AON_TIMER_QMSI if SOC_FLASH_QMSI config SOC_FLASH_QMSI_SYS_SIZE diff --git a/arch/x86/soc/quark_se/Kconfig.defconfig b/arch/x86/soc/quark_se/Kconfig.defconfig index e89693dd410..5c9e20c069f 100644 --- a/arch/x86/soc/quark_se/Kconfig.defconfig +++ b/arch/x86/soc/quark_se/Kconfig.defconfig @@ -191,6 +191,18 @@ endif # CLOCK_CONTROL_QUARK_SE endif # CLOCK_CONTROL + +if COUNTER +config AON_COUNTER_QMSI + def_bool y +config AON_TIMER_QMSI + def_bool y +config AON_TIMER_IRQ_PRI + default 2 + +endif + + if SPI config SPI_DW @@ -370,14 +382,6 @@ config UART_CONSOLE_ON_DEV_NAME endif -if AON_TIMER_QMSI - -config AON_TIMER_IRQ - default 28 -config AON_TIMER_IRQ_PRI - default 2 - -endif # AON_TIMER_QMSI if SOC_FLASH_QMSI config SOC_FLASH_QMSI_SYS_SIZE diff --git a/drivers/counter/Kconfig b/drivers/counter/Kconfig index 04350786df8..57349047a3d 100644 --- a/drivers/counter/Kconfig +++ b/drivers/counter/Kconfig @@ -25,7 +25,7 @@ menuconfig COUNTER config AON_COUNTER_QMSI bool prompt "AON counter driver" - depends on COUNTER && QMSI_DRIVERS + depends on COUNTER && QMSI default n help Enable support for AON counter. @@ -40,7 +40,7 @@ config AON_COUNTER_QMSI_DEV_NAME config AON_TIMER_QMSI bool prompt "AON periodic timer driver" - depends on COUNTER && QMSI_DRIVERS + depends on COUNTER && QMSI default n help Enable support for AON periodic timer. @@ -52,12 +52,6 @@ config AON_TIMER_QMSI_DEV_NAME help Specify the device name for AON timer driver. -config AON_TIMER_IRQ - int "Interrupt number" - depends on AON_TIMER_QMSI - help - aon timer interrupt number - config AON_TIMER_IRQ_PRI int "Interrupt priority" depends on AON_TIMER_QMSI diff --git a/drivers/counter/Makefile b/drivers/counter/Makefile index 211601eaedb..97be1aaf9dd 100644 --- a/drivers/counter/Makefile +++ b/drivers/counter/Makefile @@ -1,4 +1,2 @@ -ccflags-$(CONFIG_QMSI_DRIVERS) +=-I$(CONFIG_QMSI_INSTALL_PATH)/include - obj-$(CONFIG_AON_COUNTER_QMSI) += counter_qmsi_aon.o obj-$(CONFIG_AON_TIMER_QMSI) += counter_qmsi_aonpt.o diff --git a/drivers/counter/counter_qmsi_aonpt.c b/drivers/counter/counter_qmsi_aonpt.c index fa6460c47ed..322fcf3ff1e 100644 --- a/drivers/counter/counter_qmsi_aonpt.c +++ b/drivers/counter/counter_qmsi_aonpt.c @@ -119,11 +119,11 @@ static int aon_timer_init(struct device *dev) driver_data->callback_user_data = NULL; driver_data->timer_callback = NULL; - IRQ_CONNECT(CONFIG_AON_TIMER_IRQ, + IRQ_CONNECT(QM_IRQ_AONPT_0, CONFIG_AON_TIMER_IRQ_PRI, qm_aonpt_isr_0, NULL, IOAPIC_EDGE | IOAPIC_HIGH); - irq_enable(CONFIG_AON_TIMER_IRQ); + irq_enable(QM_IRQ_AONPT_0); QM_SCSS_INT->int_aon_timer_mask &= ~BIT(0); diff --git a/drivers/qmsi/Makefile b/drivers/qmsi/Makefile index b7d0ef2591e..e7a7c640113 100644 --- a/drivers/qmsi/Makefile +++ b/drivers/qmsi/Makefile @@ -4,3 +4,4 @@ obj-$(CONFIG_WDT_QMSI) += drivers/qm_wdt.o obj-$(CONFIG_I2C_QMSI) += drivers/qm_i2c.o obj-$(CONFIG_PWM_QMSI) += drivers/qm_pwm.o obj-$(CONFIG_AIO_QMSI_COMPARATOR) += drivers/qm_comparator.o +obj-$(CONFIG_AON_COUNTER_QMSI) += drivers/qm_aon_counters.o diff --git a/samples/drivers/aon_counter/prj.conf b/samples/drivers/aon_counter/prj.conf index 284f0ab6d17..9d51e5fcdb3 100644 --- a/samples/drivers/aon_counter/prj.conf +++ b/samples/drivers/aon_counter/prj.conf @@ -1,6 +1,2 @@ CONFIG_PRINTK=y CONFIG_COUNTER=y -CONFIG_QMSI_DRIVERS=y -CONFIG_AON_COUNTER_QMSI=y -CONFIG_AON_TIMER_QMSI=y -CONFIG_QMSI_INSTALL_PATH="${ZEPHYR_BASE}/libqmsi/" diff --git a/samples/drivers/aon_counter/testcase.ini b/samples/drivers/aon_counter/testcase.ini index 815384e98fe..b9611864012 100644 --- a/samples/drivers/aon_counter/testcase.ini +++ b/samples/drivers/aon_counter/testcase.ini @@ -1,5 +1,4 @@ [test] -skip = true tags = apps build_only = true platform_whitelist = quark_d2000_crb