drivers: serial: Use generated dts macros in mcux flexcomm driver
Uses the generated device tree macros, DT_NXP_LPC_USART_USART_*, in the mcux flexcomm driver and removes the now unused dts fixups from the lpc54xxx and lpc55xxx socs. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
72e0080e56
commit
95743561a6
3 changed files with 6 additions and 18 deletions
|
@ -290,9 +290,9 @@ static void mcux_flexcomm_config_func_0(struct device *dev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct mcux_flexcomm_config mcux_flexcomm_0_config = {
|
static const struct mcux_flexcomm_config mcux_flexcomm_0_config = {
|
||||||
.base = (USART_Type *)DT_USART_MCUX_LPC_0_BASE_ADDRESS,
|
.base = (USART_Type *)DT_NXP_LPC_USART_USART_0_BASE_ADDRESS,
|
||||||
.clock_source = 0,
|
.clock_source = 0,
|
||||||
.baud_rate = DT_USART_MCUX_LPC_0_BAUD_RATE,
|
.baud_rate = DT_NXP_LPC_USART_USART_0_CURRENT_SPEED,
|
||||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||||
.irq_config_func = mcux_flexcomm_config_func_0,
|
.irq_config_func = mcux_flexcomm_config_func_0,
|
||||||
#endif
|
#endif
|
||||||
|
@ -300,7 +300,7 @@ static const struct mcux_flexcomm_config mcux_flexcomm_0_config = {
|
||||||
|
|
||||||
static struct mcux_flexcomm_data mcux_flexcomm_0_data;
|
static struct mcux_flexcomm_data mcux_flexcomm_0_data;
|
||||||
|
|
||||||
DEVICE_AND_API_INIT(usart_0, DT_USART_MCUX_LPC_0_NAME,
|
DEVICE_AND_API_INIT(usart_0, DT_NXP_LPC_USART_USART_0_LABEL,
|
||||||
&mcux_flexcomm_init,
|
&mcux_flexcomm_init,
|
||||||
&mcux_flexcomm_0_data, &mcux_flexcomm_0_config,
|
&mcux_flexcomm_0_data, &mcux_flexcomm_0_config,
|
||||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||||
|
@ -309,11 +309,11 @@ DEVICE_AND_API_INIT(usart_0, DT_USART_MCUX_LPC_0_NAME,
|
||||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||||
static void mcux_flexcomm_config_func_0(struct device *dev)
|
static void mcux_flexcomm_config_func_0(struct device *dev)
|
||||||
{
|
{
|
||||||
IRQ_CONNECT(DT_USART_MCUX_LPC_0_IRQ,
|
IRQ_CONNECT(DT_NXP_LPC_USART_USART_0_IRQ_0,
|
||||||
DT_USART_MCUX_LPC_0_IRQ_PRI,
|
DT_NXP_LPC_USART_USART_0_IRQ_0_PRIORITY,
|
||||||
mcux_flexcomm_isr, DEVICE_GET(usart_0), 0);
|
mcux_flexcomm_isr, DEVICE_GET(usart_0), 0);
|
||||||
|
|
||||||
irq_enable(DT_USART_MCUX_LPC_0_IRQ);
|
irq_enable(DT_NXP_LPC_USART_USART_0_IRQ_0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,6 @@
|
||||||
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DT_USART_MCUX_LPC_0_BASE_ADDRESS DT_NXP_LPC_USART_40086000_BASE_ADDRESS
|
|
||||||
#define DT_USART_MCUX_LPC_0_BAUD_RATE DT_NXP_LPC_USART_40086000_CURRENT_SPEED
|
|
||||||
#define DT_USART_MCUX_LPC_0_IRQ DT_NXP_LPC_USART_40086000_IRQ_0
|
|
||||||
#define DT_USART_MCUX_LPC_0_IRQ_PRI DT_NXP_LPC_USART_40086000_IRQ_0_PRIORITY
|
|
||||||
#define DT_USART_MCUX_LPC_0_NAME DT_NXP_LPC_USART_40086000_LABEL
|
|
||||||
|
|
||||||
#define DT_MAILBOX_MCUX_MAILBOX_0_IRQ DT_NXP_LPC_MAILBOX_4008B000_IRQ_0
|
#define DT_MAILBOX_MCUX_MAILBOX_0_IRQ DT_NXP_LPC_MAILBOX_4008B000_IRQ_0
|
||||||
#define DT_MAILBOX_MCUX_MAILBOX_0_IRQ_PRI DT_NXP_LPC_MAILBOX_4008B000_IRQ_0_PRIORITY
|
#define DT_MAILBOX_MCUX_MAILBOX_0_IRQ_PRI DT_NXP_LPC_MAILBOX_4008B000_IRQ_0_PRIORITY
|
||||||
#define DT_MAILBOX_MCUX_MAILBOX_0_NAME DT_NXP_LPC_MAILBOX_4008B000_LABEL
|
#define DT_MAILBOX_MCUX_MAILBOX_0_NAME DT_NXP_LPC_MAILBOX_4008B000_LABEL
|
||||||
|
|
|
@ -8,10 +8,4 @@
|
||||||
|
|
||||||
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V8M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V8M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
||||||
|
|
||||||
#define DT_USART_MCUX_LPC_0_BASE_ADDRESS DT_NXP_LPC_USART_50086000_BASE_ADDRESS
|
|
||||||
#define DT_USART_MCUX_LPC_0_BAUD_RATE DT_NXP_LPC_USART_50086000_CURRENT_SPEED
|
|
||||||
#define DT_USART_MCUX_LPC_0_IRQ DT_NXP_LPC_USART_50086000_IRQ_0
|
|
||||||
#define DT_USART_MCUX_LPC_0_IRQ_PRI DT_NXP_LPC_USART_50086000_IRQ_0_PRIORITY
|
|
||||||
#define DT_USART_MCUX_LPC_0_NAME DT_NXP_LPC_USART_50086000_LABEL
|
|
||||||
|
|
||||||
/* End of SoC Level DTS fixup file */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue