From 2bf10f8a5cfdd71fc11cda97d0296fb34310c915 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 Jun 2018 12:06:20 +0000 Subject: [PATCH] Use new patch for overlay Signed-off-by: Pascal Vizeli --- ...tc-Update-to-upstream-version-1.4.6.patch} | 6 ++-- ...rivers-of-implement-overlay-support.patch} | 33 ++++++++++--------- 2 files changed, 20 insertions(+), 19 deletions(-) rename buildroot-external/patches/barebox/{0002-scripts-dtc-Update-to-upstream-version-1.4.6.patch => 0001-scripts-dtc-Update-to-upstream-version-1.4.6.patch} (99%) rename buildroot-external/patches/barebox/{0001-drivers-of-implement-overlay-support.patch => 0002-drivers-of-implement-overlay-support.patch} (97%) diff --git a/buildroot-external/patches/barebox/0002-scripts-dtc-Update-to-upstream-version-1.4.6.patch b/buildroot-external/patches/barebox/0001-scripts-dtc-Update-to-upstream-version-1.4.6.patch similarity index 99% rename from buildroot-external/patches/barebox/0002-scripts-dtc-Update-to-upstream-version-1.4.6.patch rename to buildroot-external/patches/barebox/0001-scripts-dtc-Update-to-upstream-version-1.4.6.patch index 16805e1f3..28371f14a 100644 --- a/buildroot-external/patches/barebox/0002-scripts-dtc-Update-to-upstream-version-1.4.6.patch +++ b/buildroot-external/patches/barebox/0001-scripts-dtc-Update-to-upstream-version-1.4.6.patch @@ -1,7 +1,7 @@ -From ec731512831fba48b9cc5f07cd47be6426821733 Mon Sep 17 00:00:00 2001 +From 33d62d2531ec28a54acd9392c38e621d2a72472b Mon Sep 17 00:00:00 2001 From: Pascal Vizeli -Date: Tue, 5 Jun 2018 17:34:46 +0000 -Subject: [PATCH 2/2] scripts/dtc: Update to upstream version 1.4.6 +Date: Tue, 5 Jun 2018 22:35:03 +0000 +Subject: [PATCH 1/2] scripts/dtc: Update to upstream version 1.4.6 Signed-off-by: Pascal Vizeli --- diff --git a/buildroot-external/patches/barebox/0001-drivers-of-implement-overlay-support.patch b/buildroot-external/patches/barebox/0002-drivers-of-implement-overlay-support.patch similarity index 97% rename from buildroot-external/patches/barebox/0001-drivers-of-implement-overlay-support.patch rename to buildroot-external/patches/barebox/0002-drivers-of-implement-overlay-support.patch index f286e8ec7..1db8b1f3d 100644 --- a/buildroot-external/patches/barebox/0001-drivers-of-implement-overlay-support.patch +++ b/buildroot-external/patches/barebox/0002-drivers-of-implement-overlay-support.patch @@ -1,17 +1,18 @@ -From 679ad93a2297a953cdbd9d04b216a33d24b87385 Mon Sep 17 00:00:00 2001 +From c02be471430936674acba23ad18e3a4178c2c45a Mon Sep 17 00:00:00 2001 From: Pascal Vizeli -Date: Sat, 2 Jun 2018 20:52:06 +0000 -Subject: [PATCH 1/2] drivers: of: implement overlay support +Date: Tue, 5 Jun 2018 22:43:53 +0000 +Subject: [PATCH 2/2] drivers: of: implement overlay support -Origin by Jan Luebbe: -http://lists.infradead.org/pipermail/barebox/2015-March/022674.html +Origin patches are from Jan Luebbe. -I rebase the patches and fix the resolve for __local_fixups__, they -was wrong copy/ported from linux kernel. +This is based on Pantelis Antoniou's overlay support for the kernel. It +has been simplified by leaving out transaction support, locking and +other details required by the Linux DT support. -I merge the overlay code from oftree into own command: of_overlay +Pascal Vizeli fix some parts of resolver they was wrong ported from +linux source. -Signed-off-by: Pascal Vizeli +Signed-off-by: Jan Luebbe --- Documentation/user/devicetree.rst | 101 ++++++++- arch/sandbox/dts/Makefile | 5 +- @@ -250,14 +251,14 @@ index eb4796389..f404338fa 100644 obj-$(CONFIG_CMD_OF_DISPLAY_TIMINGS) += of_display_timings.o diff --git a/commands/of_overlay.c b/commands/of_overlay.c new file mode 100644 -index 000000000..6c74c72bc +index 000000000..1b3e857bb --- /dev/null +++ b/commands/of_overlay.c @@ -0,0 +1,106 @@ +/* + * of_overlay.c - device tree overlay command support + * -+ * Copyright (c) 2018 Pascal Vizeli , Hass.io ++ * Copyright (C) 2015 Pengutronix, Jan Luebbe + * + * See file CREDITS for list of people who contributed to this + * project. @@ -299,7 +300,7 @@ index 000000000..6c74c72bc + struct device_node *overlay = NULL, *root; + struct of_overlay_info *ovinfo; + -+ if (argc != 2 || !IS_ENABLED(CONFIG_OFTREE_OVERLAY)) ++ if (argc != 2) + return COMMAND_ERROR_USAGE; + + filename = argv[1]; @@ -307,7 +308,7 @@ index 000000000..6c74c72bc + root = of_get_root_node(); + if (!root) { + printf("no oftree loaded\n"); -+ goto out; ++ return 1; + } + + fdt = read_file(filename, &size); @@ -325,19 +326,19 @@ index 000000000..6c74c72bc + } + + ret = of_resolve(overlay); -+ if (ret) { ++ if (ret != 0) { + printf("resolve oftree overlay: %s\n", strerror(-ret)); + goto out; + } + + ret = of_build_overlay_info(overlay, &ovinfo_cnt, &ovinfo); -+ if (ret) { ++ if (ret != 0) { + printf("prepare oftree overlay: %s\n", strerror(-ret)); + goto out; + } + + ret = of_overlay(ovinfo_cnt, ovinfo); -+ if (ret) { ++ if (ret != 0) { + printf("apply oftree overlay: %s\n", strerror(-ret)); + goto out; + }