From f833cd6279666e1c2de6fc271bfd5d451003ed3b Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 13 Jan 2016 19:38:59 -0800 Subject: [PATCH] arm: ls1021atwr: Convert to driver model and enable serial support Convert ls1021atwr_nor to driver model support. As a start, enable ns16550 serial port driver. Signed-off-by: Bin Meng Acked-by: Simon Glass --- arch/arm/dts/ls1021a-twr.dts | 4 ++++ arch/arm/dts/ls1021a.dtsi | 4 ---- configs/ls1021atwr_nor_defconfig | 4 ++++ include/configs/ls1021atwr.h | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/arm/dts/ls1021a-twr.dts b/arch/arm/dts/ls1021a-twr.dts index 6ccd33279b..aead13fc8b 100644 --- a/arch/arm/dts/ls1021a-twr.dts +++ b/arch/arm/dts/ls1021a-twr.dts @@ -19,6 +19,10 @@ spi0 = &qspi; spi1 = &dspi1; }; + + chosen { + stdout-path = &uart0; + }; }; &qspi { diff --git a/arch/arm/dts/ls1021a.dtsi b/arch/arm/dts/ls1021a.dtsi index 7fadd7ca57..ee0e55461d 100644 --- a/arch/arm/dts/ls1021a.dtsi +++ b/arch/arm/dts/ls1021a.dtsi @@ -218,7 +218,6 @@ compatible = "fsl,16550-FIFO64", "ns16550a"; reg = <0x21c0500 0x100>; interrupts = ; - clock-frequency = <0>; fifo-size = <15>; status = "disabled"; }; @@ -227,7 +226,6 @@ compatible = "fsl,16550-FIFO64", "ns16550a"; reg = <0x21c0600 0x100>; interrupts = ; - clock-frequency = <0>; fifo-size = <15>; status = "disabled"; }; @@ -236,7 +234,6 @@ compatible = "fsl,16550-FIFO64", "ns16550a"; reg = <0x21d0500 0x100>; interrupts = ; - clock-frequency = <0>; fifo-size = <15>; status = "disabled"; }; @@ -245,7 +242,6 @@ compatible = "fsl,16550-FIFO64", "ns16550a"; reg = <0x21d0600 0x100>; interrupts = ; - clock-frequency = <0>; fifo-size = <15>; status = "disabled"; }; diff --git a/configs/ls1021atwr_nor_defconfig b/configs/ls1021atwr_nor_defconfig index aa874fdcfd..2b794439a9 100644 --- a/configs/ls1021atwr_nor_defconfig +++ b/configs/ls1021atwr_nor_defconfig @@ -1,6 +1,10 @@ CONFIG_ARM=y CONFIG_TARGET_LS1021ATWR=y +CONFIG_DM_SERIAL=y +CONFIG_DEFAULT_DEVICE_TREE="ls1021a-twr" # CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y +CONFIG_DM=y CONFIG_NETDEVICES=y CONFIG_E1000=y CONFIG_SYS_NS16550=y diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index c12ba3ac91..bbef2a7eef 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -271,7 +271,9 @@ #else #define CONFIG_CONS_INDEX 1 #define CONFIG_SYS_NS16550_SERIAL +#ifndef CONFIG_DM_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE 1 +#endif #define CONFIG_SYS_NS16550_CLK get_serial_clock() #endif -- 2.25.1