qmsi: gpio: use built-in qmsi driver
Change-Id: I11444bcc146dbc477bb605f6b405bee559716f2a Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
324a83bed7
commit
85b3c2c62a
8 changed files with 14 additions and 109 deletions
|
@ -153,23 +153,12 @@ endif # RTC
|
||||||
|
|
||||||
if GPIO
|
if GPIO
|
||||||
|
|
||||||
config GPIO_DW
|
config GPIO_QMSI
|
||||||
def_bool y
|
def_bool y
|
||||||
|
config GPIO_QMSI_0
|
||||||
if GPIO_DW
|
|
||||||
|
|
||||||
config GPIO_DW_0
|
|
||||||
def_bool y
|
def_bool y
|
||||||
|
config GPIO_QMSI_0_PRI
|
||||||
if GPIO_DW_0
|
default 0
|
||||||
|
|
||||||
config GPIO_DW_0_PRI
|
|
||||||
default 2
|
|
||||||
|
|
||||||
endif # GPIO_DW_0
|
|
||||||
|
|
||||||
endif # GPIO_DW
|
|
||||||
|
|
||||||
endif # GPIO
|
endif # GPIO
|
||||||
|
|
||||||
if PWM
|
if PWM
|
||||||
|
@ -206,14 +195,6 @@ config AON_TIMER_IRQ_PRI
|
||||||
default 0
|
default 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if GPIO_QMSI
|
|
||||||
config GPIO_QMSI_0
|
|
||||||
def_bool y
|
|
||||||
config GPIO_QMSI_0_IRQ
|
|
||||||
default 15
|
|
||||||
config GPIO_QMSI_0_PRI
|
|
||||||
default 0
|
|
||||||
endif # GPIO_QMSI
|
|
||||||
|
|
||||||
if SPI_QMSI
|
if SPI_QMSI
|
||||||
config SPI_QMSI_PORT_0
|
config SPI_QMSI_PORT_0
|
||||||
|
@ -224,7 +205,6 @@ config SPI_QMSI_PORT_0_PRI
|
||||||
default 0
|
default 0
|
||||||
endif # SPI_QMSI
|
endif # SPI_QMSI
|
||||||
|
|
||||||
|
|
||||||
if SOC_FLASH_QMSI
|
if SOC_FLASH_QMSI
|
||||||
config SOC_FLASH_QMSI_SYS_SIZE
|
config SOC_FLASH_QMSI_SYS_SIZE
|
||||||
default 0x8000
|
default 0x8000
|
||||||
|
|
|
@ -57,82 +57,21 @@ config PWM_QMSI
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if GPIO
|
if GPIO
|
||||||
|
|
||||||
config GPIO_DW
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
if GPIO_DW
|
|
||||||
|
|
||||||
config GPIO_DW_BOTHEDGES_SUPPORT
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
config GPIO_DW_CLOCK_GATE
|
|
||||||
def_bool n
|
|
||||||
|
|
||||||
if GPIO_DW_CLOCK_GATE
|
|
||||||
|
|
||||||
config GPIO_DW_CLOCK_GATE_DRV_NAME
|
|
||||||
default CLOCK_CONTROL_QUARK_SE_PERIPHERAL_DRV_NAME
|
|
||||||
|
|
||||||
endif # GPIO_DW_CLOCK_GATE
|
|
||||||
|
|
||||||
config GPIO_DW_0
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
if GPIO_DW_0
|
|
||||||
|
|
||||||
config GPIO_DW_0_PRI
|
|
||||||
default 2
|
|
||||||
config GPIO_DW_0_CLOCK_GATE_SUBSYS
|
|
||||||
default 13
|
|
||||||
depends on GPIO_DW_CLOCK_GATE
|
|
||||||
|
|
||||||
endif # GPIO_DW_0
|
|
||||||
|
|
||||||
config GPIO_DW_1
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
if GPIO_DW_1
|
|
||||||
|
|
||||||
config GPIO_DW_1_PRI
|
|
||||||
default 2
|
|
||||||
|
|
||||||
endif # GPIO_DW_1
|
|
||||||
|
|
||||||
endif # GPIO_DW
|
|
||||||
|
|
||||||
if QMSI_DRIVERS
|
|
||||||
|
|
||||||
config GPIO_QMSI
|
config GPIO_QMSI
|
||||||
def_bool n
|
def_bool y
|
||||||
|
|
||||||
if GPIO_QMSI
|
|
||||||
|
|
||||||
config GPIO_QMSI_0
|
config GPIO_QMSI_0
|
||||||
def_bool n
|
def_bool y
|
||||||
|
|
||||||
if GPIO_QMSI_0
|
|
||||||
|
|
||||||
config GPIO_QMSI_0_IRQ
|
|
||||||
default 8
|
|
||||||
config GPIO_QMSI_0_PRI
|
config GPIO_QMSI_0_PRI
|
||||||
default 2
|
default 2
|
||||||
|
|
||||||
endif # GPIO_QMSI_0
|
|
||||||
|
|
||||||
config GPIO_QMSI_AON
|
config GPIO_QMSI_AON
|
||||||
def_bool n
|
def_bool n
|
||||||
config GPIO_QMSI_AON_NAME
|
config GPIO_QMSI_AON_NAME
|
||||||
default "gpio_aon"
|
default "gpio_aon"
|
||||||
config GPIO_QMSI_AON_IRQ
|
|
||||||
default 31
|
|
||||||
config GPIO_QMSI_AON_PRI
|
config GPIO_QMSI_AON_PRI
|
||||||
default 2
|
default 2
|
||||||
|
|
||||||
endif # GPIO_QMSI
|
|
||||||
|
|
||||||
endif # QMSI_DRIVERS
|
|
||||||
|
|
||||||
endif # GPIO
|
endif # GPIO
|
||||||
|
|
||||||
if I2C
|
if I2C
|
||||||
|
@ -382,7 +321,6 @@ config UART_CONSOLE_ON_DEV_NAME
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
if SOC_FLASH_QMSI
|
if SOC_FLASH_QMSI
|
||||||
config SOC_FLASH_QMSI_SYS_SIZE
|
config SOC_FLASH_QMSI_SYS_SIZE
|
||||||
default 0x60000
|
default 0x60000
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
menuconfig GPIO_QMSI
|
menuconfig GPIO_QMSI
|
||||||
bool "QMSI GPIO driver"
|
bool "QMSI GPIO driver"
|
||||||
depends on GPIO && QMSI_DRIVERS
|
depends on GPIO && QMSI
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable the GPIO driver found on Intel Microcontroller
|
Enable the GPIO driver found on Intel Microcontroller
|
||||||
|
@ -38,12 +38,6 @@ config GPIO_QMSI_0_NAME
|
||||||
depends on GPIO_QMSI_0
|
depends on GPIO_QMSI_0
|
||||||
default "GPIO_0"
|
default "GPIO_0"
|
||||||
|
|
||||||
config GPIO_QMSI_0_IRQ
|
|
||||||
int "Controller interrupt number"
|
|
||||||
depends on GPIO_QMSI_0
|
|
||||||
help
|
|
||||||
IRQ number for the controller
|
|
||||||
|
|
||||||
config GPIO_QMSI_0_PRI
|
config GPIO_QMSI_0_PRI
|
||||||
int "Controller interrupt priority"
|
int "Controller interrupt priority"
|
||||||
depends on GPIO_QMSI_0
|
depends on GPIO_QMSI_0
|
||||||
|
@ -62,12 +56,6 @@ config GPIO_QMSI_AON_NAME
|
||||||
depends on GPIO_QMSI_AON
|
depends on GPIO_QMSI_AON
|
||||||
default "gpio_aon"
|
default "gpio_aon"
|
||||||
|
|
||||||
config GPIO_QMSI_AON_IRQ
|
|
||||||
int "Controller interrupt number"
|
|
||||||
depends on GPIO_QMSI_AON
|
|
||||||
help
|
|
||||||
IRQ number for the controller
|
|
||||||
|
|
||||||
config GPIO_QMSI_AON_PRI
|
config GPIO_QMSI_AON_PRI
|
||||||
int "Controller interrupt priority"
|
int "Controller interrupt priority"
|
||||||
depends on GPIO_QMSI_AON
|
depends on GPIO_QMSI_AON
|
||||||
|
|
|
@ -290,18 +290,18 @@ int gpio_qmsi_init(struct device *port)
|
||||||
CLK_PERIPH_GPIO_INTERRUPT |
|
CLK_PERIPH_GPIO_INTERRUPT |
|
||||||
CLK_PERIPH_GPIO_DB |
|
CLK_PERIPH_GPIO_DB |
|
||||||
CLK_PERIPH_CLK);
|
CLK_PERIPH_CLK);
|
||||||
IRQ_CONNECT(CONFIG_GPIO_QMSI_0_IRQ,
|
IRQ_CONNECT(QM_IRQ_GPIO_0,
|
||||||
CONFIG_GPIO_QMSI_0_PRI, qm_gpio_isr_0,
|
CONFIG_GPIO_QMSI_0_PRI, qm_gpio_isr_0,
|
||||||
0, IOAPIC_LEVEL | IOAPIC_HIGH);
|
0, IOAPIC_LEVEL | IOAPIC_HIGH);
|
||||||
irq_enable(CONFIG_GPIO_QMSI_0_IRQ);
|
irq_enable(QM_IRQ_GPIO_0);
|
||||||
QM_SCSS_INT->int_gpio_mask &= ~BIT(0);
|
QM_SCSS_INT->int_gpio_mask &= ~BIT(0);
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_GPIO_QMSI_AON
|
#ifdef CONFIG_GPIO_QMSI_AON
|
||||||
case QM_AON_GPIO_0:
|
case QM_AON_GPIO_0:
|
||||||
IRQ_CONNECT(CONFIG_GPIO_QMSI_AON_IRQ,
|
IRQ_CONNECT(QM_IRQ_AONGPIO_0,
|
||||||
CONFIG_GPIO_QMSI_AON_PRI, qm_aon_gpio_isr_0,
|
CONFIG_GPIO_QMSI_AON_PRI, qm_aon_gpio_isr_0,
|
||||||
0, IOAPIC_LEVEL | IOAPIC_HIGH);
|
0, IOAPIC_LEVEL | IOAPIC_HIGH);
|
||||||
irq_enable(CONFIG_GPIO_QMSI_AON_IRQ);
|
irq_enable(QM_IRQ_AONGPIO_0);
|
||||||
QM_SCSS_INT->int_aon_gpio_mask &= ~BIT(0);
|
QM_SCSS_INT->int_aon_gpio_mask &= ~BIT(0);
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_GPIO_QMSI_AON */
|
#endif /* CONFIG_GPIO_QMSI_AON */
|
||||||
|
|
|
@ -5,3 +5,4 @@ obj-$(CONFIG_I2C_QMSI) += drivers/qm_i2c.o
|
||||||
obj-$(CONFIG_PWM_QMSI) += drivers/qm_pwm.o
|
obj-$(CONFIG_PWM_QMSI) += drivers/qm_pwm.o
|
||||||
obj-$(CONFIG_AIO_QMSI_COMPARATOR) += drivers/qm_comparator.o
|
obj-$(CONFIG_AIO_QMSI_COMPARATOR) += drivers/qm_comparator.o
|
||||||
obj-$(CONFIG_AON_COUNTER_QMSI) += drivers/qm_aon_counters.o
|
obj-$(CONFIG_AON_COUNTER_QMSI) += drivers/qm_aon_counters.o
|
||||||
|
obj-$(CONFIG_GPIO_QMSI) += drivers/qm_gpio.o
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
CONFIG_STDOUT_CONSOLE=y
|
CONFIG_STDOUT_CONSOLE=y
|
||||||
CONFIG_PRINTK=y
|
CONFIG_PRINTK=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
CONFIG_GPIO_DW=y
|
|
||||||
CONFIG_GPIO_DW_0=y
|
|
||||||
CONFIG_NANO_TIMERS=y
|
CONFIG_NANO_TIMERS=y
|
||||||
CONFIG_NANO_TIMEOUTS=y
|
CONFIG_NANO_TIMEOUTS=y
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
#define GPIO_CLK_PIN 19
|
#define GPIO_CLK_PIN 19
|
||||||
#define GPIO_NAME "GPIO_"
|
#define GPIO_NAME "GPIO_"
|
||||||
|
|
||||||
#define GPIO_DRV_NAME CONFIG_GPIO_DW_0_NAME
|
#define GPIO_DRV_NAME "GPIO_0"
|
||||||
|
|
||||||
#define APA102C_START_FRAME 0x00000000
|
#define APA102C_START_FRAME 0x00000000
|
||||||
#define APA102C_END_FRAME 0xFFFFFFFF
|
#define APA102C_END_FRAME 0xFFFFFFFF
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
#define GPIO_CLK_PIN 3
|
#define GPIO_CLK_PIN 3
|
||||||
#define GPIO_NAME "GPIO_SS_"
|
#define GPIO_NAME "GPIO_SS_"
|
||||||
|
|
||||||
#define GPIO_DRV_NAME CONFIG_GPIO_DW_0_NAME
|
#define GPIO_DRV_NAME "GPIO_0"
|
||||||
|
|
||||||
#define APA102C_START_FRAME 0x00000000
|
#define APA102C_START_FRAME 0x00000000
|
||||||
#define APA102C_END_FRAME 0xFFFFFFFF
|
#define APA102C_END_FRAME 0xFFFFFFFF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue