arm: nxp_kinetis: dts: use label to generate NXP Kinetis uart name

Now that we can utilize label in the device tree we can convert to
getting the device name for the NXP Kinetis UART out of the device tree
instead of from Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-05-16 16:36:51 -05:00 committed by Anas Nashif
parent 29a6053a0d
commit a746bcd56d
12 changed files with 24 additions and 64 deletions

View file

@ -21,82 +21,34 @@ menuconfig UART_MCUX_0
help
Enable UART 0.
if UART_MCUX_0
config UART_MCUX_0_NAME
string "UART 0 driver name"
default "UART_0"
endif # UART_MCUX_0
menuconfig UART_MCUX_1
bool "UART 1"
default n
help
Enable UART 1.
if UART_MCUX_1
config UART_MCUX_1_NAME
string "UART 1 driver name"
default "UART_1"
endif # UART_MCUX_1
menuconfig UART_MCUX_2
bool "UART 2"
default n
help
Enable UART 2.
if UART_MCUX_2
config UART_MCUX_2_NAME
string "UART 2 driver name"
default "UART_2"
endif # UART_MCUX_2
menuconfig UART_MCUX_3
bool "UART 3"
default n
help
Enable UART 3.
if UART_MCUX_3
config UART_MCUX_3_NAME
string "UART 3 driver name"
default "UART_3"
endif # UART_MCUX_3
menuconfig UART_MCUX_4
bool "UART 4"
default n
help
Enable UART 4.
if UART_MCUX_4
config UART_MCUX_4_NAME
string "UART 4 driver name"
default "UART_4"
endif # UART_MCUX_4
menuconfig UART_MCUX_5
bool "UART 5"
default n
help
Enable UART 5.
if UART_MCUX_5
config UART_MCUX_5_NAME
string "UART 5 driver name"
default "UART_5"
endif # UART_MCUX_5
endif # UART_MCUX

View file

@ -21,12 +21,4 @@ menuconfig UART_MCUX_LPSCI_0
help
Enable UART 0.
if UART_MCUX_LPSCI_0
config UART_MCUX_LPSCI_0_NAME
string "UART 0 driver name"
default "UART_0"
endif # UART_MCUX_LPSCI_0
endif # UART_MCUX_LPSCI

View file

@ -21,12 +21,4 @@ menuconfig UART_MCUX_LPUART_0
help
Enable UART 0.
if UART_MCUX_LPUART_0
config UART_MCUX_LPUART_0_NAME
string "UART 0 driver name"
default "UART_0"
endif # UART_MCUX_LPUART_0
endif # UART_MCUX_LPUART

View file

@ -2,18 +2,24 @@
#define CONFIG_UART_MCUX_0_BAUD_RATE NXP_K64F_UART_4006A000_CURRENT_SPEED
#define CONFIG_UART_MCUX_0_IRQ_PRI NXP_K64F_UART_4006A000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_0_NAME NXP_K64F_UART_4006A000_LABEL
#define CONFIG_UART_MCUX_1_BAUD_RATE NXP_K64F_UART_4006B000_CURRENT_SPEED
#define CONFIG_UART_MCUX_1_IRQ_PRI NXP_K64F_UART_4006B000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_1_NAME NXP_K64F_UART_4006B000_LABEL
#define CONFIG_UART_MCUX_2_BAUD_RATE NXP_K64F_UART_4006C000_CURRENT_SPEED
#define CONFIG_UART_MCUX_2_IRQ_PRI NXP_K64F_UART_4006C000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_2_NAME NXP_K64F_UART_4006C000_LABEL
#define CONFIG_UART_MCUX_3_BAUD_RATE NXP_K64F_UART_4006D000_CURRENT_SPEED
#define CONFIG_UART_MCUX_3_IRQ_PRI NXP_K64F_UART_4006D000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_3_NAME NXP_K64F_UART_4006D000_LABEL
#define CONFIG_UART_MCUX_4_BAUD_RATE NXP_K64F_UART_400EA000_CURRENT_SPEED
#define CONFIG_UART_MCUX_4_IRQ_PRI NXP_K64F_UART_400EA000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_4_NAME NXP_K64F_UART_400EA000_LABEL
#define CONFIG_UART_MCUX_5_BAUD_RATE NXP_K64F_UART_400EB000_CURRENT_SPEED
#define CONFIG_UART_MCUX_5_IRQ_PRI NXP_K64F_UART_400EB000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_5_NAME NXP_K64F_UART_400EB000_LABEL

View file

@ -1 +1,2 @@
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
#define CONFIG_UART_MCUX_LPSCI_0_NAME NXP_KINETIS_LPSCI_4006A000_LABEL

View file

@ -2,3 +2,4 @@
#define CONFIG_UART_MCUX_LPUART_0_BAUD_RATE NXP_KW41Z_LPUART_40054000_CURRENT_SPEED
#define CONFIG_UART_MCUX_LPUART_0_IRQ_PRI NXP_KW41Z_LPUART_40054000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_LPUART_0_NAME NXP_KW41Z_LPUART_40054000_LABEL

View file

@ -2,18 +2,24 @@
#define CONFIG_UART_MCUX_0_BAUD_RATE NXP_K64F_UART_4006A000_CURRENT_SPEED
#define CONFIG_UART_MCUX_0_IRQ_PRI NXP_K64F_UART_4006A000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_0_NAME NXP_K64F_UART_4006A000_LABEL
#define CONFIG_UART_MCUX_1_BAUD_RATE NXP_K64F_UART_4006B000_CURRENT_SPEED
#define CONFIG_UART_MCUX_1_IRQ_PRI NXP_K64F_UART_4006B000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_1_NAME NXP_K64F_UART_4006B000_LABEL
#define CONFIG_UART_MCUX_2_BAUD_RATE NXP_K64F_UART_4006C000_CURRENT_SPEED
#define CONFIG_UART_MCUX_2_IRQ_PRI NXP_K64F_UART_4006C000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_2_NAME NXP_K64F_UART_4006C000_LABEL
#define CONFIG_UART_MCUX_3_BAUD_RATE NXP_K64F_UART_4006D000_CURRENT_SPEED
#define CONFIG_UART_MCUX_3_IRQ_PRI NXP_K64F_UART_4006D000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_3_NAME NXP_K64F_UART_4006D000_LABEL
#define CONFIG_UART_MCUX_4_BAUD_RATE NXP_K64F_UART_400EA000_CURRENT_SPEED
#define CONFIG_UART_MCUX_4_IRQ_PRI NXP_K64F_UART_400EA000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_4_NAME NXP_K64F_UART_400EA000_LABEL
#define CONFIG_UART_MCUX_5_BAUD_RATE NXP_K64F_UART_400EB000_CURRENT_SPEED
#define CONFIG_UART_MCUX_5_IRQ_PRI NXP_K64F_UART_400EB000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_5_NAME NXP_K64F_UART_400EB000_LABEL

View file

@ -2,3 +2,4 @@
#define CONFIG_UART_MCUX_LPUART_0_BAUD_RATE NXP_KW41Z_LPUART_40054000_CURRENT_SPEED
#define CONFIG_UART_MCUX_LPUART_0_IRQ_PRI NXP_KW41Z_LPUART_40054000_IRQ_0_PRIORITY
#define CONFIG_UART_MCUX_LPUART_0_NAME NXP_KW41Z_LPUART_40054000_LABEL

View file

@ -73,6 +73,7 @@
reg = <0x4006a000 0x1000>;
interrupts = <31 0>, <32 0>;
interrupt-names = "status", "error";
label = "UART_0";
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
@ -85,6 +86,7 @@
reg = <0x4006b000 0x1000>;
interrupts = <33 0>, <34 0>;
interrupt-names = "status", "error";
label = "UART_1";
status = "disabled";
};
@ -94,6 +96,7 @@
reg = <0x4006c000 0x1000>;
interrupts = <35 0>, <36 0>;
interrupt-names = "status", "error";
label = "UART_2";
status = "disabled";
};
@ -103,6 +106,7 @@
reg = <0x4006d000 0x1000>;
interrupts = <37 0>, <38 0>;
interrupt-names = "status", "error";
label = "UART_3";
status = "disabled";
};
@ -112,6 +116,7 @@
reg = <0x400ea000 0x1000>;
interrupts = <66 0>, <67 0>;
interrupt-names = "status", "error";
label = "UART_4";
status = "disabled";
};
@ -121,6 +126,7 @@
reg = <0x400eb000 0x1000>;
interrupts = <68 0>, <69 0>;
interrupt-names = "status", "error";
label = "UART_5";
status = "disabled";
};

View file

@ -21,6 +21,7 @@
compatible = "nxp,kinetis-lpsci";
reg = <0x4006A000 0xc>;
interrupts = <12 0>;
label = "UART_0";
status = "disabled";
};

View file

@ -48,6 +48,7 @@
compatible = "nxp,kw41z-lpuart";
reg = <0x40054000 0x18>;
interrupts = <12 0>;
label = "UART_0";
pinctrl-0 = <&lpuart0_default>;
pinctrl-names = "default";

View file

@ -48,6 +48,7 @@
compatible = "nxp,kw41z-lpuart";
reg = <0x40054000 0x18>;
interrupts = <12 0>;
label = "UART_0";
pinctrl-0 = <&lpuart0_default>;
pinctrl-names = "default";