
Hi Thomas,
On 3 September 2015 at 21:15, Thomas Chou thomas@wytron.com.tw wrote:
This patch adds device tree control of U-Boot to nios2 boards. The example dts is taken from Linux kernel.
Signed-off-by: Thomas Chou thomas@wytron.com.tw
arch/nios2/dts/.gitignore | 1 + arch/nios2/dts/3c120_devboard.dts | 164 +++++++++++++++++++++++++++++++++++++ arch/nios2/dts/Makefile | 11 +++ arch/nios2/dts/include/dt-bindings | 1 + configs/nios2-generic_defconfig | 2 + 5 files changed, 179 insertions(+) create mode 100644 arch/nios2/dts/.gitignore create mode 100644 arch/nios2/dts/3c120_devboard.dts create mode 100644 arch/nios2/dts/Makefile create mode 120000 arch/nios2/dts/include/dt-bindings
Reviewed-by: Simon Glass sjg@chromium.org
But I think the license header should use SPDX.
diff --git a/arch/nios2/dts/.gitignore b/arch/nios2/dts/.gitignore new file mode 100644 index 0000000..b60ed20 --- /dev/null +++ b/arch/nios2/dts/.gitignore @@ -0,0 +1 @@ +*.dtb diff --git a/arch/nios2/dts/3c120_devboard.dts b/arch/nios2/dts/3c120_devboard.dts new file mode 100644 index 0000000..31c51f9 --- /dev/null +++ b/arch/nios2/dts/3c120_devboard.dts @@ -0,0 +1,164 @@ +/*
- Copyright (C) 2013 Altera Corporation
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see http://www.gnu.org/licenses/.
- This file is generated by sopc2dts.
- */
+/dts-v1/;
+/ {
model = "altr,qsys_ghrd_3c120";
compatible = "altr,qsys_ghrd_3c120";
#address-cells = <1>;
#size-cells = <1>;
[snip]
diff --git a/arch/nios2/dts/Makefile b/arch/nios2/dts/Makefile new file mode 100644 index 0000000..b2175a1 --- /dev/null +++ b/arch/nios2/dts/Makefile @@ -0,0 +1,11 @@ +dtb-y += 3c120_devboard.dtb
+targets += $(dtb-y)
+DTC_FLAGS += -R 4 -p 0x1000
You can drop the -p 0x1000 part. It isn't needed.
+PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y))
@:
+clean-files := *.dtb diff --git a/arch/nios2/dts/include/dt-bindings b/arch/nios2/dts/include/dt-bindings new file mode 120000 index 0000000..0cecb3d --- /dev/null +++ b/arch/nios2/dts/include/dt-bindings @@ -0,0 +1 @@ +../../../../include/dt-bindings \ No newline at end of file diff --git a/configs/nios2-generic_defconfig b/configs/nios2-generic_defconfig index f8d2821..09cc51e 100644 --- a/configs/nios2-generic_defconfig +++ b/configs/nios2-generic_defconfig @@ -1,5 +1,6 @@ CONFIG_NIOS2=y CONFIG_TARGET_NIOS2_GENERIC=y +CONFIG_DEFAULT_DEVICE_TREE="3c120_devboard" CONFIG_HUSH_PARSER=y # CONFIG_CMD_BOOTD is not set # CONFIG_CMD_IMLS is not set @@ -10,4 +11,5 @@ CONFIG_HUSH_PARSER=y CONFIG_CMD_DHCP=y # CONFIG_CMD_NFS is not set CONFIG_CMD_PING=y +CONFIG_OF_CONTROL=y CONFIG_NET_RANDOM_ETHADDR=y -- 2.1.4
Regards, Simon