summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2016-01-13 19:38:59 -0800
committerSimon Glass <sjg@chromium.org>2016-01-20 19:10:14 -0700
commitf833cd6279666e1c2de6fc271bfd5d451003ed3b (patch)
tree588c093f50633f1ecc3fe8894c1f618838b17e4b
parent9f29aeb89de8199ebaea9995dbb30ea5fa2f1085 (diff)
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 <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/arm/dts/ls1021a-twr.dts4
-rw-r--r--arch/arm/dts/ls1021a.dtsi4
-rw-r--r--configs/ls1021atwr_nor_defconfig4
-rw-r--r--include/configs/ls1021atwr.h2
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 = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
- clock-frequency = <0>;
fifo-size = <15>;
status = "disabled";
};
@@ -227,7 +226,6 @@
compatible = "fsl,16550-FIFO64", "ns16550a";
reg = <0x21c0600 0x100>;
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
- clock-frequency = <0>;
fifo-size = <15>;
status = "disabled";
};
@@ -236,7 +234,6 @@
compatible = "fsl,16550-FIFO64", "ns16550a";
reg = <0x21d0500 0x100>;
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
- clock-frequency = <0>;
fifo-size = <15>;
status = "disabled";
};
@@ -245,7 +242,6 @@
compatible = "fsl,16550-FIFO64", "ns16550a";
reg = <0x21d0600 0x100>;
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
- 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