drivers: spi: spi_dw: determine num IRQs from devicetree
Replace Kconfig symbols SPI_DW_PORT_n_INTERRUPT_SINGLE_LINE with just seeing how many IRQs are defined in the devicetree to determine single or multiline interrupt support. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
b08c5d2bb8
commit
1957fe2417
2 changed files with 4 additions and 45 deletions
|
@ -39,45 +39,4 @@ config SPI_DW_ACCESS_WORD_ONLY
|
|||
DesignWare SPI only allows word access, byte access will raise
|
||||
exception.
|
||||
|
||||
if SPI_0
|
||||
|
||||
config SPI_DW_PORT_0_INTERRUPT_SINGLE_LINE
|
||||
bool "Single interrupt line for all interrupts"
|
||||
default y
|
||||
help
|
||||
Only one line is used to trigger interrupts: RX, TX and ERROR
|
||||
interrupt go all through that line, undifferentiated.
|
||||
|
||||
endif # SPI_0
|
||||
|
||||
if SPI_1
|
||||
|
||||
config SPI_DW_PORT_1_INTERRUPT_SINGLE_LINE
|
||||
bool "Single interrupt line for all interrupts"
|
||||
default y
|
||||
|
||||
endif # SPI_1
|
||||
|
||||
if SPI_2
|
||||
|
||||
config SPI_DW_PORT_2_INTERRUPT_SINGLE_LINE
|
||||
bool "Single interrupt line for all interrupts"
|
||||
default y
|
||||
help
|
||||
Only one line is used to trigger interrupts: RX, TX and ERROR
|
||||
interrupt go all through that line, undifferentiated.
|
||||
|
||||
endif # SPI_2
|
||||
|
||||
if SPI_3
|
||||
|
||||
config SPI_DW_PORT_3_INTERRUPT_SINGLE_LINE
|
||||
bool "Single interrupt line for all interrupts"
|
||||
default y
|
||||
help
|
||||
Only one line is used to trigger interrupts: RX, TX and ERROR
|
||||
interrupt go all through that line, undifferentiated.
|
||||
|
||||
endif # SPI_3
|
||||
|
||||
endif # SPI_DW
|
||||
|
|
|
@ -564,7 +564,7 @@ DEVICE_DT_INST_DEFINE(0, spi_dw_init, device_pm_control_nop,
|
|||
|
||||
void spi_config_0_irq(void)
|
||||
{
|
||||
#ifdef CONFIG_SPI_DW_PORT_0_INTERRUPT_SINGLE_LINE
|
||||
#if DT_NUM_IRQS(DT_DRV_INST(0)) == 1
|
||||
#if DT_INST_IRQ_HAS_NAME(0, flags)
|
||||
#define INST_0_IRQ_FLAGS DT_INST_IRQ_BY_NAME(0, flags, irq)
|
||||
#else
|
||||
|
@ -626,7 +626,7 @@ DEVICE_DT_INST_DEFINE(1, spi_dw_init, device_pm_control_nop,
|
|||
|
||||
void spi_config_1_irq(void)
|
||||
{
|
||||
#ifdef CONFIG_SPI_DW_PORT_1_INTERRUPT_SINGLE_LINE
|
||||
#if DT_NUM_IRQS(DT_DRV_INST(1)) == 1
|
||||
#if DT_INST_IRQ_HAS_NAME(1, flags)
|
||||
#define INST_1_IRQ_FLAGS DT_INST_IRQ_BY_NAME(1, flags, irq)
|
||||
#else
|
||||
|
@ -688,7 +688,7 @@ DEVICE_DT_INST_DEFINE(2, spi_dw_init, device_pm_control_nop,
|
|||
|
||||
void spi_config_2_irq(void)
|
||||
{
|
||||
#ifdef CONFIG_SPI_DW_PORT_2_INTERRUPT_SINGLE_LINE
|
||||
#if DT_NUM_IRQS(DT_DRV_INST(2)) == 1
|
||||
#if DT_INST_IRQ_HAS_NAME(2, flags)
|
||||
#define INST_2_IRQ_FLAGS DT_INST_IRQ_BY_NAME(2, flags, irq)
|
||||
#else
|
||||
|
@ -750,7 +750,7 @@ DEVICE_DT_INST_DEFINE(3, spi_dw_init, device_pm_control_nop,
|
|||
|
||||
void spi_config_3_irq(void)
|
||||
{
|
||||
#ifdef CONFIG_SPI_DW_PORT_3_INTERRUPT_SINGLE_LINE
|
||||
#if DT_NUM_IRQS(DT_DRV_INST(3)) == 1
|
||||
#if DT_INST_IRQ_HAS_NAME(3, flags)
|
||||
#define INST_3_IRQ_FLAGS DT_INST_IRQ_BY_NAME(3, flags, irq)
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue