drivers/uart: Use dts to set uart priorities for QMSI driver
Fix the qmsi uart driver and relevant SoCs accordingly. Also: using config for irq everwhere relevantly and not an hardcoded value in the driver. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
43878fd8b6
commit
17c6456678
12 changed files with 19 additions and 77 deletions
|
@ -194,23 +194,9 @@ endif # BT_H4
|
|||
|
||||
if UART_QMSI
|
||||
|
||||
if UART_QMSI_0
|
||||
|
||||
config UART_QMSI_0_IRQ_PRI
|
||||
default 3
|
||||
|
||||
endif # UART_QMSI_0
|
||||
|
||||
config UART_QMSI_1
|
||||
def_bool y
|
||||
|
||||
if UART_QMSI_1
|
||||
|
||||
config UART_QMSI_1_IRQ_PRI
|
||||
default 3
|
||||
|
||||
endif # UART_QMSI_1
|
||||
|
||||
endif # UART_QMSI
|
||||
|
||||
if SPI
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
#define CONFIG_UART_QMSI_0_BAUDRATE INTEL_QMSI_UART_B0002000_CURRENT_SPEED
|
||||
#define CONFIG_UART_QMSI_0_NAME INTEL_QMSI_UART_B0002000_LABEL
|
||||
#define CONFIG_UART_QMSI_0_IRQ INTEL_QMSI_UART_B0002000_IRQ_0
|
||||
#define CONFIG_UART_QMSI_0_IRQ_PRI INTEL_QMSI_UART_B0002000_IRQ_0_PRIORITY
|
||||
|
||||
#define CONFIG_UART_QMSI_1_BAUDRATE INTEL_QMSI_UART_B0002400_CURRENT_SPEED
|
||||
#define CONFIG_UART_QMSI_1_NAME INTEL_QMSI_UART_B0002400_LABEL
|
||||
#define CONFIG_UART_QMSI_1_IRQ INTEL_QMSI_UART_B0002400_IRQ_0
|
||||
#define CONFIG_UART_QMSI_1_IRQ_PRI INTEL_QMSI_UART_B0002400_IRQ_0_PRIORITY
|
||||
|
||||
#define SRAM_START CONFIG_SRAM_BASE_ADDRESS
|
||||
#define SRAM_SIZE CONFIG_SRAM_SIZE
|
||||
|
|
|
@ -171,6 +171,9 @@
|
|||
#define UART_NS16550_PORT_1_CLK_FREQ SYSCLK_DEFAULT_IOSC_HZ
|
||||
#define UART_NS16550_PORT_1_INT_MASK 0x464
|
||||
|
||||
#define CONFIG_UART_QMSI_0_IRQ_FLAGS 0
|
||||
#define CONFIG_UART_QMSI_1_IRQ_FLAGS 0
|
||||
|
||||
/*
|
||||
* SPI
|
||||
*/
|
||||
|
|
|
@ -46,10 +46,12 @@ if UART_QMSI
|
|||
config UART_QMSI_0
|
||||
def_bool y
|
||||
config UART_QMSI_0_IRQ_PRI
|
||||
int
|
||||
default 0
|
||||
config UART_QMSI_1
|
||||
def_bool y
|
||||
config UART_QMSI_1_IRQ_PRI
|
||||
int
|
||||
default 0
|
||||
endif # UART_QMSI
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#define CONFIG_UART_QMSI_0_BAUDRATE INTEL_QMSI_UART_B0002000_CURRENT_SPEED
|
||||
#define CONFIG_UART_QMSI_0_NAME INTEL_QMSI_UART_B0002000_LABEL
|
||||
#define CONFIG_UART_QMSI_0_IRQ INTEL_QMSI_UART_B0002000_IRQ_0
|
||||
#define CONFIG_UART_QMSI_0_IRQ_FLAGS INTEL_QMSI_UART_B0002000_IRQ_0_SENSE
|
||||
|
||||
#define CONFIG_UART_QMSI_1_BAUDRATE INTEL_QMSI_UART_B0002400_CURRENT_SPEED
|
||||
#define CONFIG_UART_QMSI_1_NAME INTEL_QMSI_UART_B0002400_LABEL
|
||||
#define CONFIG_UART_QMSI_1_IRQ INTEL_QMSI_UART_B0002400_IRQ_0
|
||||
#define CONFIG_UART_QMSI_1_IRQ_FLAGS INTEL_QMSI_UART_B0002400_IRQ_0_SENSE
|
||||
|
||||
#define CONFIG_PHYS_RAM_ADDR CONFIG_SRAM_BASE_ADDRESS
|
||||
|
||||
|
|
|
@ -195,23 +195,9 @@ endif # BT_H4
|
|||
|
||||
if UART_QMSI
|
||||
|
||||
if UART_QMSI_0
|
||||
|
||||
config UART_QMSI_0_IRQ_PRI
|
||||
default 3
|
||||
|
||||
endif # UART_QMSI_0
|
||||
|
||||
config UART_QMSI_1
|
||||
def_bool y
|
||||
|
||||
if UART_QMSI_1
|
||||
|
||||
config UART_QMSI_1_IRQ_PRI
|
||||
default 3
|
||||
|
||||
endif # UART_QMSI_1
|
||||
|
||||
endif # UART_QMSI
|
||||
|
||||
if SOC_FLASH_QMSI
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
#define CONFIG_UART_QMSI_0_BAUDRATE INTEL_QMSI_UART_B0002000_CURRENT_SPEED
|
||||
#define CONFIG_UART_QMSI_0_NAME INTEL_QMSI_UART_B0002000_LABEL
|
||||
#define CONFIG_UART_QMSI_0_IRQ INTEL_QMSI_UART_B0002000_IRQ_0
|
||||
#define CONFIG_UART_QMSI_0_IRQ_PRI INTEL_QMSI_UART_B0002000_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_QMSI_0_IRQ_FLAGS INTEL_QMSI_UART_B0002000_IRQ_0_SENSE
|
||||
|
||||
#define CONFIG_UART_QMSI_1_BAUDRATE INTEL_QMSI_UART_B0002400_CURRENT_SPEED
|
||||
#define CONFIG_UART_QMSI_1_NAME INTEL_QMSI_UART_B0002400_LABEL
|
||||
#define CONFIG_UART_QMSI_1_IRQ INTEL_QMSI_UART_B0002400_IRQ_0
|
||||
#define CONFIG_UART_QMSI_1_IRQ_PRI INTEL_QMSI_UART_B0002400_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_QMSI_1_IRQ_FLAGS INTEL_QMSI_UART_B0002400_IRQ_0_SENSE
|
||||
|
||||
#define CONFIG_PHYS_RAM_ADDR CONFIG_SRAM_BASE_ADDRESS
|
||||
|
||||
|
|
|
@ -15,57 +15,16 @@ config UART_QMSI_0
|
|||
bool "Enable UART 0 controller"
|
||||
default n
|
||||
|
||||
if !HAS_DTS
|
||||
config UART_QMSI_0_NAME
|
||||
depends on UART_QMSI_0
|
||||
string "UART_0 device name"
|
||||
default "UART_0"
|
||||
help
|
||||
This option holds the UART_0 device name. If unsure, use the
|
||||
default name.
|
||||
|
||||
config UART_QMSI_0_BAUDRATE
|
||||
depends on UART_QMSI_0
|
||||
int "UART_0 baud rate"
|
||||
default 115200
|
||||
help
|
||||
This option sets the baud rate from the UART_0 device.
|
||||
endif
|
||||
|
||||
config UART_QMSI_0_HW_FC
|
||||
depends on UART_QMSI_0
|
||||
bool "HW flow control for UART_0 controller"
|
||||
|
||||
config UART_QMSI_0_IRQ_PRI
|
||||
depends on UART_QMSI_0
|
||||
int "IRQ priority from UART_0 controller"
|
||||
|
||||
config UART_QMSI_1
|
||||
depends on UART_QMSI
|
||||
bool "Enable UART 1 controller"
|
||||
default n
|
||||
|
||||
if !HAS_DTS
|
||||
config UART_QMSI_1_NAME
|
||||
depends on UART_QMSI_1
|
||||
string "UART_1 device name"
|
||||
default "UART_1"
|
||||
help
|
||||
This option holds the UART_1 device name. If unsure, use the
|
||||
default name.
|
||||
|
||||
config UART_QMSI_1_BAUDRATE
|
||||
depends on UART_QMSI_1
|
||||
int "UART_1 baud rate"
|
||||
default 115200
|
||||
help
|
||||
This option sets the baud rate from the UART_1 device.
|
||||
endif
|
||||
|
||||
config UART_QMSI_1_HW_FC
|
||||
depends on UART_QMSI_1
|
||||
bool "HW flow control for UART_1 controller"
|
||||
|
||||
config UART_QMSI_1_IRQ_PRI
|
||||
depends on UART_QMSI_1
|
||||
int "IRQ priority from UART_1 controller"
|
||||
|
|
|
@ -373,8 +373,8 @@ static void irq_config_func_0(struct device *dev)
|
|||
|
||||
IRQ_CONNECT(CONFIG_UART_QMSI_0_IRQ,
|
||||
CONFIG_UART_QMSI_0_IRQ_PRI, uart_qmsi_isr,
|
||||
DEVICE_GET(uart_0), UART_IRQ_FLAGS);
|
||||
irq_enable(IRQ_GET_NUMBER(QM_IRQ_UART_0_INT));
|
||||
DEVICE_GET(uart_0), CONFIG_UART_QMSI_0_IRQ_FLAGS);
|
||||
irq_enable(CONFIG_UART_QMSI_0_IRQ);
|
||||
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->uart_0_int_mask);
|
||||
}
|
||||
#endif /* CONFIG_UART_QMSI_0 */
|
||||
|
@ -386,8 +386,8 @@ static void irq_config_func_1(struct device *dev)
|
|||
|
||||
IRQ_CONNECT(CONFIG_UART_QMSI_1_IRQ,
|
||||
CONFIG_UART_QMSI_1_IRQ_PRI, uart_qmsi_isr,
|
||||
DEVICE_GET(uart_1), UART_IRQ_FLAGS);
|
||||
irq_enable(IRQ_GET_NUMBER(QM_IRQ_UART_1_INT));
|
||||
DEVICE_GET(uart_1), CONFIG_UART_QMSI_1_IRQ_FLAGS);
|
||||
irq_enable(CONFIG_UART_QMSI_1_IRQ);
|
||||
QM_IR_UNMASK_INTERRUPTS(QM_INTERRUPT_ROUTER->uart_1_int_mask);
|
||||
}
|
||||
#endif /* CONFIG_UART_QMSI_1 */
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
uart0: uart@b0002000 {
|
||||
compatible = "intel,qmsi-uart";
|
||||
reg = <0xb0002000 0x400>;
|
||||
interrupts = <41 0>;
|
||||
interrupts = <41 3>;
|
||||
interrupt-parent = <&core_intc>;
|
||||
label = "UART_0";
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
|||
uart1: uart@b0002400 {
|
||||
compatible = "intel,qmsi-uart";
|
||||
reg = <0xb0002400 0x400>;
|
||||
interrupts = <42 0>;
|
||||
interrupts = <42 3>;
|
||||
interrupt-parent = <&core_intc>;
|
||||
label = "UART_1";
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@
|
|||
interrupts = <6 IRQ_TYPE_LEVEL_HIGH 3>;
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue