From 04410b5fc987d32549e141ecb4d42a0c7eef28f1 Mon Sep 17 00:00:00 2001 From: Robert Schwebel Date: Tue, 22 Aug 2017 18:35:16 +0200 Subject: platform-v7a: barebox: version bump v2017.07.0 -> v2017.08.0 Barebox upstream has version bumped, and so do we. Signed-off-by: Robert Schwebel --- configs/platform-v7a/barebox-am335x-mlo.config | 2 +- configs/platform-v7a/barebox-am335x.config | 2 +- configs/platform-v7a/barebox-mx6.config | 2 +- configs/platform-v7a/barebox-rpi2.config | 2 +- configs/platform-v7a/barebox-vexpress.config | 2 +- ...e-device-tree-provided-by-QEMU-if-availab.patch | 43 --- .../0002-vexpress-device-tree-support.patch | 78 ----- ...ess-add-bootstate-node-to-the-device-tree.patch | 90 ------ ...se-add-funtion-to-copy-a-device-tree-node.patch | 50 ---- ..._dump-don-t-use-flatten-unflatten-to-copy.patch | 34 --- ...ee-add-fixup-handler-for-virtio-mmio-devi.patch | 62 ---- ...glebone-add-state-entry-for-mmc0-and-mmc1.patch | 35 --- .../0201-of_device_is_stdout_path-simplify.patch | 45 --- ...s_stdout_path-split-off-options-and-suppo.patch | 53 ---- ...203-ARM-imx-add-support-for-Udoo-Neo-full.patch | 320 --------------------- ...2017.07.0-pengutronix-multi_v7-20170703-1.patch | 22 -- .../platform-v7a/patches/barebox-2017.07.0/series | 26 -- ...e-device-tree-provided-by-QEMU-if-availab.patch | 43 +++ .../0002-vexpress-device-tree-support.patch | 78 +++++ ...ess-add-bootstate-node-to-the-device-tree.patch | 90 ++++++ ...se-add-funtion-to-copy-a-device-tree-node.patch | 50 ++++ ..._dump-don-t-use-flatten-unflatten-to-copy.patch | 34 +++ ...ee-add-fixup-handler-for-virtio-mmio-devi.patch | 62 ++++ ...glebone-add-state-entry-for-mmc0-and-mmc1.patch | 35 +++ .../platform-v7a/patches/barebox-2017.08.0/series | 24 ++ configs/platform-v7a/rules/barebox-am335x-mlo.make | 4 +- configs/platform-v7a/rules/barebox-am335x.make | 2 +- configs/platform-v7a/rules/barebox-mx6.make | 2 +- configs/platform-v7a/rules/barebox-rpi2.make | 2 +- configs/platform-v7a/rules/barebox-vexpress.make | 2 +- 30 files changed, 427 insertions(+), 869 deletions(-) delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0002-vexpress-device-tree-support.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0201-of_device_is_stdout_path-simplify.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0202-of_device_is_stdout_path-split-off-options-and-suppo.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0203-ARM-imx-add-support-for-Udoo-Neo-full.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/0301-Release-2017.07.0-pengutronix-multi_v7-20170703-1.patch delete mode 100644 configs/platform-v7a/patches/barebox-2017.07.0/series create mode 100644 configs/platform-v7a/patches/barebox-2017.08.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch create mode 100644 configs/platform-v7a/patches/barebox-2017.08.0/0002-vexpress-device-tree-support.patch create mode 100644 configs/platform-v7a/patches/barebox-2017.08.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch create mode 100644 configs/platform-v7a/patches/barebox-2017.08.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch create mode 100644 configs/platform-v7a/patches/barebox-2017.08.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch create mode 100644 configs/platform-v7a/patches/barebox-2017.08.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch create mode 100644 configs/platform-v7a/patches/barebox-2017.08.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch create mode 100644 configs/platform-v7a/patches/barebox-2017.08.0/series diff --git a/configs/platform-v7a/barebox-am335x-mlo.config b/configs/platform-v7a/barebox-am335x-mlo.config index 0bf6513..fdecdd4 100644 --- a/configs/platform-v7a/barebox-am335x-mlo.config +++ b/configs/platform-v7a/barebox-am335x-mlo.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2017.07.0-20170614-1 Configuration +# Barebox/arm 2017.08.0-20170822-1 Configuration # CONFIG_ARM=y CONFIG_ARM_USE_COMPRESSED_DTB=y diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config index b11e6ed..0c2e553 100644 --- a/configs/platform-v7a/barebox-am335x.config +++ b/configs/platform-v7a/barebox-am335x.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2017.07.0-20170614-1 Configuration +# Barebox/arm 2017.08.0-20170822-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config index c02914f..65f14d7 100644 --- a/configs/platform-v7a/barebox-mx6.config +++ b/configs/platform-v7a/barebox-mx6.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2017.07.0-20170614-1 Configuration +# Barebox/arm 2017.08.0-20170822-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config index 6a841a1..f8afba4 100644 --- a/configs/platform-v7a/barebox-rpi2.config +++ b/configs/platform-v7a/barebox-rpi2.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2017.07.0-20170614-1 Configuration +# Barebox/arm 2017.08.0-20170822-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config index 7614fe6..1a2d40a 100644 --- a/configs/platform-v7a/barebox-vexpress.config +++ b/configs/platform-v7a/barebox-vexpress.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2017.07.0-20170614-1 Configuration +# Barebox/arm 2017.08.0-20170822-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch deleted file mode 100644 index a5fdc9c..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Michael Olbrich -Date: Sat, 10 Sep 2016 17:40:56 +0200 -Subject: [PATCH] vexpress: use device tree provided by QEMU if available - -Signed-off-by: Michael Olbrich ---- - arch/arm/boards/vexpress/lowlevel.c | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boards/vexpress/lowlevel.c b/arch/arm/boards/vexpress/lowlevel.c -index 204d29d8f098..7ed07a1e4134 100644 ---- a/arch/arm/boards/vexpress/lowlevel.c -+++ b/arch/arm/boards/vexpress/lowlevel.c -@@ -9,14 +9,27 @@ - #include - #include - #include -+#include - #include - - void __naked barebox_arm_reset_vector(void) - { -+ unsigned long membase; -+ void *boarddata; -+ - arm_cpu_lowlevel_init(); - - if (amba_is_arm_sp804(IOMEM(0x10011000))) -- barebox_arm_entry(0x60000000, SZ_512M, NULL); -+ membase = 0x60000000; -+ else -+ membase = 0x80000000; -+ -+ /* QEMU may put a dtb at the bare address */ -+ if (IS_ENABLED(CONFIG_OFDEVICE) && -+ get_unaligned_be32((void*)membase) == FDT_MAGIC) -+ boarddata = (void*)membase; - else -- barebox_arm_entry(0x80000000, SZ_512M, NULL); -+ boarddata = NULL; -+ -+ barebox_arm_entry(membase, SZ_512M, boarddata); - } diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0002-vexpress-device-tree-support.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0002-vexpress-device-tree-support.patch deleted file mode 100644 index fc7ad48..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0002-vexpress-device-tree-support.patch +++ /dev/null @@ -1,78 +0,0 @@ -From: Michael Olbrich -Date: Sat, 10 Sep 2016 17:51:36 +0200 -Subject: [PATCH] vexpress: device tree support - -Signed-off-by: Michael Olbrich ---- - arch/arm/boards/vexpress/init.c | 16 ++++++++++------ - arch/arm/dts/vexpress-v2p-ca9.dts | 27 +++++++++++++++++++++++++++ - 2 files changed, 37 insertions(+), 6 deletions(-) - create mode 100644 arch/arm/dts/vexpress-v2p-ca9.dts - -diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c -index f89dff939231..68ebbfab2633 100644 ---- a/arch/arm/boards/vexpress/init.c -+++ b/arch/arm/boards/vexpress/init.c -@@ -71,10 +71,12 @@ static void vexpress_a9_legacy_mem_init(void) - - static void vexpress_a9_legacy_devices_init(void) - { -- add_cfi_flash_device(0, 0x40000000, SZ_64M, 0); -- add_cfi_flash_device(1, 0x44000000, SZ_64M, 0); -- add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x4e000000, -- 64 * 1024, IORESOURCE_MEM, NULL); -+ if (!IS_ENABLED(CONFIG_OFDEVICE)) { -+ add_cfi_flash_device(0, 0x40000000, SZ_64M, 0); -+ add_cfi_flash_device(1, 0x44000000, SZ_64M, 0); -+ add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x4e000000, -+ 64 * 1024, IORESOURCE_MEM, NULL); -+ } - vexpress_a9_legacy_register_mmc(&mmci_plat); - armlinux_set_architecture(MACH_TYPE_VEXPRESS); - } -@@ -107,8 +109,10 @@ static int vexpress_devices_init(void) - writel(1, v2m_sysreg_base + V2M_SYS_FLASH); - v2m_init->devices_init(); - -- devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self"); -- devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); -+ if (!IS_ENABLED(CONFIG_OFDEVICE)) { -+ devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self"); -+ devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); -+ } - - if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) - defaultenv_append_directory(defaultenv_vexpress); -diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts -new file mode 100644 -index 000000000000..541840ae22dc ---- /dev/null -+++ b/arch/arm/dts/vexpress-v2p-ca9.dts -@@ -0,0 +1,27 @@ -+#include -+ -+/ { -+ barebox_environment { -+ compatible = "barebox,environment"; -+ device-path = &barebox_env; -+ }; -+ -+ smb@4000000 { -+ motherboard { -+ flash@0,00000000 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ partition@0 { -+ label = "barebox"; -+ reg = <0x0 0x80000>; -+ }; -+ -+ barebox_env: partition@80000 { -+ label = "barebox-environment"; -+ reg = <0x80000 0x80000>; -+ }; -+ }; -+ }; -+ }; -+}; diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch deleted file mode 100644 index 27cfa0b..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch +++ /dev/null @@ -1,90 +0,0 @@ -From: Michael Olbrich -Date: Sat, 10 Sep 2016 17:54:20 +0200 -Subject: [PATCH] vexpress: add bootstate node to the device tree - -Signed-off-by: Michael Olbrich ---- - arch/arm/dts/vexpress-v2p-ca9.dts | 63 +++++++++++++++++++++++++++++++++++++++ - 1 file changed, 63 insertions(+) - -diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts -index 541840ae22dc..d0975330f205 100644 ---- a/arch/arm/dts/vexpress-v2p-ca9.dts -+++ b/arch/arm/dts/vexpress-v2p-ca9.dts -@@ -6,6 +6,10 @@ - device-path = &barebox_env; - }; - -+ aliases { -+ state = &state; -+ }; -+ - smb@4000000 { - motherboard { - flash@0,00000000 { -@@ -21,6 +25,65 @@ - label = "barebox-environment"; - reg = <0x80000 0x80000>; - }; -+ -+ state_storage: partition@100000 { -+ label = "barebox-state"; -+ reg = <0x100000 0x100000>; -+ }; -+ }; -+ }; -+ }; -+ -+ /* State: mutable part */ -+ state: state { -+ magic = <0x4d433230>; -+ compatible = "barebox,state"; -+ backend-type = "raw"; -+ backend = <&state_storage>; -+ backend-stridesize = <0x40>; -+ backend-storage-type = "circular"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ bootstate { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ system0 { /* the node's name here must match the subnode's name in the 'bootstate' node */ -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ remaining_attempts@0 { -+ reg = <0x0 0x4>; -+ type = "uint32"; -+ default = <3>; -+ }; -+ priority@4 { -+ reg = <0x4 0x4>; -+ type = "uint32"; -+ default = <20>; -+ }; -+ }; -+ -+ system1 { /* the node's name here must match the subnode's name in the 'bootstate' node */ -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ remaining_attempts@8 { -+ reg = <0x8 0x4>; -+ type = "uint32"; -+ default = <3>; -+ }; -+ priority@c { -+ reg = <0xC 0x4>; -+ type = "uint32"; -+ default = <20>; -+ }; -+ }; -+ -+ last_chosen@10 { -+ reg = <0x10 0x4>; -+ type = "uint32"; - }; - }; - }; diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch deleted file mode 100644 index ae4b2b2..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Michael Olbrich -Date: Tue, 13 Sep 2016 21:17:12 +0200 -Subject: [PATCH] of: base: add funtion to copy a device tree node - -Signed-off-by: Michael Olbrich ---- - drivers/of/base.c | 16 ++++++++++++++++ - include/of.h | 2 ++ - 2 files changed, 18 insertions(+) - -diff --git a/drivers/of/base.c b/drivers/of/base.c -index 33f61622ae75..9f89c7864475 100644 ---- a/drivers/of/base.c -+++ b/drivers/of/base.c -@@ -1965,6 +1965,22 @@ out: - return dn; - } - -+struct device_node *of_copy_node(struct device_node *parent, const struct device_node *other) -+{ -+ struct device_node *np, *child; -+ struct property *pp; -+ -+ np = of_new_node(parent, other->name); -+ -+ list_for_each_entry(pp, &other->properties, list) -+ of_new_property(np, pp->name, pp->value, pp->length); -+ -+ for_each_child_of_node(other, child) -+ of_copy_node(np, child); -+ -+ return np; -+} -+ - void of_delete_node(struct device_node *node) - { - struct device_node *n, *nt; -diff --git a/include/of.h b/include/of.h -index 0ba73f197f28..c1136708ce6c 100644 ---- a/include/of.h -+++ b/include/of.h -@@ -144,6 +144,8 @@ extern struct device_node *of_new_node(struct device_node *parent, - const char *name); - extern struct device_node *of_create_node(struct device_node *root, - const char *path); -+extern struct device_node *of_copy_node(struct device_node *parent, -+ const struct device_node *other); - extern void of_delete_node(struct device_node *node); - - extern int of_machine_is_compatible(const char *compat); diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch deleted file mode 100644 index 8dc2da3..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Michael Olbrich -Date: Tue, 13 Sep 2016 21:18:15 +0200 -Subject: [PATCH] commands: of_dump: don't use flatten/unflatten to copy the - device tree - -Signed-off-by: Michael Olbrich ---- - commands/of_dump.c | 13 +------------ - 1 file changed, 1 insertion(+), 12 deletions(-) - -diff --git a/commands/of_dump.c b/commands/of_dump.c -index 7bec0b925eee..ac5014e1fff8 100644 ---- a/commands/of_dump.c -+++ b/commands/of_dump.c -@@ -97,18 +97,7 @@ static int do_of_dump(int argc, char *argv[]) - - if (fix) { - /* create a copy of internal devicetree */ -- void *fdt; -- fdt = of_flatten_dtb(root); -- root = of_unflatten_dtb(fdt); -- -- free(fdt); -- -- if (IS_ERR(root)) { -- ret = PTR_ERR(root); -- goto out; -- } -- -- of_free = root; -+ of_free = root = of_copy_node(NULL, root); - } - } - diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch deleted file mode 100644 index 8b64d2f..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Michael Olbrich -Date: Tue, 13 Sep 2016 21:20:10 +0200 -Subject: [PATCH] common: oftree: add fixup handler for 'virtio,mmio' devices - -Qemu adds 'virtio,mmio' nodes to the device tree. Before passing it to the -bootloader or the Linux kernel. This fixup handler copies these nodes to -the new device tree. - -v2: -- move from general to platform specific init - -Signed-off-by: Michael Olbrich -Signed-off-by: Rouven Czerwinski ---- - arch/arm/boards/vexpress/init.c | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - -diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c -index 68ebbfab2633..8655b7e17c97 100644 ---- a/arch/arm/boards/vexpress/init.c -+++ b/arch/arm/boards/vexpress/init.c -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - - struct vexpress_init { - void (*core_init)(void); -@@ -156,3 +157,32 @@ static int vexpress_core_init(void) - return 0; - } - postcore_initcall(vexpress_core_init); -+ -+static int of_fixup_virtio_mmio(struct device_node *root, void *unused) -+{ -+ struct device_node *barebox_root, *np, *parent; -+ -+ barebox_root = of_get_root_node(); -+ if (root == barebox_root) -+ return 0; -+ -+ for_each_compatible_node_from(np, barebox_root, NULL, "virtio,mmio") { -+ if (of_get_parent(np) == barebox_root) -+ parent = root; -+ else -+ parent = of_find_node_by_path_from(root, -+ of_get_parent(np)->full_name); -+ if (!parent) -+ return -EINVAL; -+ -+ of_copy_node(parent, np); -+ } -+ -+ return 0; -+} -+ -+static int of_register_virtio_mmio_fixup(void) -+{ -+ return of_register_fixup(of_fixup_virtio_mmio, NULL); -+} -+late_initcall(of_register_virtio_mmio_fixup); diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch deleted file mode 100644 index 4dfd47c..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Michael Grzeschik -Date: Fri, 10 Jun 2016 14:02:30 +0200 -Subject: [PATCH] beaglebone: add state entry for mmc0 and mmc1 - -Signed-off-by: Michael Grzeschik ---- - arch/arm/dts/am335x-bone-common.dtsi | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi -index ef97d906616c..d14c6ded6a55 100644 ---- a/arch/arm/dts/am335x-bone-common.dtsi -+++ b/arch/arm/dts/am335x-bone-common.dtsi -@@ -11,6 +11,21 @@ - linux,stdout-path = &uart0; - }; - -+ bootstate: bootstate { -+ compatible = "barebox,bootstate"; -+ backend-type = "nv"; -+ -+ system0 { -+ default_attempts = <3>; -+ boot = "mmc0"; -+ }; -+ -+ system1 { -+ default_attempts = <3>; -+ boot = "mmc1"; -+ }; -+ }; -+ - cpus { - cpu@0 { - cpu0-supply = <&dcdc2_reg>; diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0201-of_device_is_stdout_path-simplify.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0201-of_device_is_stdout_path-simplify.patch deleted file mode 100644 index 4d36fca..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0201-of_device_is_stdout_path-simplify.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 14 Jun 2017 13:26:30 +0200 -Subject: [PATCH] of_device_is_stdout_path: simplify -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Test for dev->device_node being NULL earlier which at the end of the -function allows to simplify the calculation of the return value - -Signed-off-by: Uwe Kleine-König -Forwarded: id:20170614113110.21604-1-u.kleine-koenig@pengutronix.de ---- - drivers/of/base.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/drivers/of/base.c b/drivers/of/base.c -index 9f89c7864475..4241ee189cc5 100644 ---- a/drivers/of/base.c -+++ b/drivers/of/base.c -@@ -2018,6 +2018,9 @@ int of_device_is_stdout_path(struct device_d *dev) - struct device_node *dn; - const char *name; - -+ if (!dev->device_node) -+ return 0; -+ - name = of_get_property(of_chosen, "stdout-path", NULL); - if (!name) - name = of_get_property(of_chosen, "linux,stdout-path", NULL); -@@ -2026,13 +2029,8 @@ int of_device_is_stdout_path(struct device_d *dev) - return 0; - - dn = of_find_node_by_path(name); -- if (!dn) -- return 0; - -- if (dn == dev->device_node) -- return 1; -- -- return 0; -+ return dn == dev->device_node; - } - - /** diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0202-of_device_is_stdout_path-split-off-options-and-suppo.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0202-of_device_is_stdout_path-split-off-options-and-suppo.patch deleted file mode 100644 index 12062a5..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0202-of_device_is_stdout_path-split-off-options-and-suppo.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 14 Jun 2017 13:30:54 +0200 -Subject: [PATCH] of_device_is_stdout_path: split off options and support - aliases -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Several device trees use something like: - - stdout-path = "serial0:115200n8"; - -Currently of_device_is_stdout_path fails to do the right thing here -because it expects an absolute node path and no options. So split off -options (everything after the colon) and resolve aliases. - -Signed-off-by: Uwe Kleine-König -Forwarded: id:20170614180249.12644-1-u.kleine-koenig@pengutronix.de (v2) ---- - drivers/of/base.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/drivers/of/base.c b/drivers/of/base.c -index 4241ee189cc5..b6e90f2adb09 100644 ---- a/drivers/of/base.c -+++ b/drivers/of/base.c -@@ -2017,6 +2017,8 @@ int of_device_is_stdout_path(struct device_d *dev) - { - struct device_node *dn; - const char *name; -+ const char *p; -+ char *q; - - if (!dev->device_node) - return 0; -@@ -2028,7 +2030,16 @@ int of_device_is_stdout_path(struct device_d *dev) - if (!name) - return 0; - -- dn = of_find_node_by_path(name); -+ /* This could make use of strchrnul if it were available */ -+ p = strchr(name, ':'); -+ if (!p) -+ p = name + strlen(name); -+ -+ q = xstrndup(name, p - name); -+ -+ dn = of_find_node_by_path_or_alias(NULL, q); -+ -+ free(q); - - return dn == dev->device_node; - } diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0203-ARM-imx-add-support-for-Udoo-Neo-full.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0203-ARM-imx-add-support-for-Udoo-Neo-full.patch deleted file mode 100644 index fc6345f..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0203-ARM-imx-add-support-for-Udoo-Neo-full.patch +++ /dev/null @@ -1,320 +0,0 @@ -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 14 Jun 2017 18:32:15 +0200 -Subject: [PATCH] ARM: imx: add support for Udoo Neo full -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Uwe Kleine-König -Forwarded: id:20170627190317.19253-1-uwe@kleine-koenig.org ---- - arch/arm/boards/Makefile | 1 + - arch/arm/boards/udoo-neo/Makefile | 2 + - arch/arm/boards/udoo-neo/board.c | 27 +++++ - .../flash-header-mx6sx-udoo-neo_full.imxcfg | 124 +++++++++++++++++++++ - arch/arm/boards/udoo-neo/lowlevel.c | 39 +++++++ - arch/arm/dts/Makefile | 1 + - arch/arm/dts/imx6sx-udoo-neo-full.dts | 4 + - arch/arm/mach-imx/Kconfig | 4 + - arch/arm/mach-imx/include/mach/esdctl.h | 1 + - images/Makefile.imx | 5 + - 10 files changed, 208 insertions(+) - create mode 100644 arch/arm/boards/udoo-neo/Makefile - create mode 100644 arch/arm/boards/udoo-neo/board.c - create mode 100644 arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg - create mode 100644 arch/arm/boards/udoo-neo/lowlevel.c - create mode 100644 arch/arm/dts/imx6sx-udoo-neo-full.dts - -diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile -index f2d4d3878524..b0e68db71da7 100644 ---- a/arch/arm/boards/Makefile -+++ b/arch/arm/boards/Makefile -@@ -131,6 +131,7 @@ obj-$(CONFIG_MACH_TX51) += karo-tx51/ - obj-$(CONFIG_MACH_TX53) += karo-tx53/ - obj-$(CONFIG_MACH_TX6X) += karo-tx6x/ - obj-$(CONFIG_MACH_UDOO) += udoo/ -+obj-$(CONFIG_MACH_UDOO_NEO) += udoo-neo/ - obj-$(CONFIG_MACH_USB_A9260) += usb-a926x/ - obj-$(CONFIG_MACH_USB_A9263) += usb-a926x/ - obj-$(CONFIG_MACH_USB_A9G20) += usb-a926x/ -diff --git a/arch/arm/boards/udoo-neo/Makefile b/arch/arm/boards/udoo-neo/Makefile -new file mode 100644 -index 000000000000..01c7a259e9a5 ---- /dev/null -+++ b/arch/arm/boards/udoo-neo/Makefile -@@ -0,0 +1,2 @@ -+obj-y += board.o -+lwl-y += lowlevel.o -diff --git a/arch/arm/boards/udoo-neo/board.c b/arch/arm/boards/udoo-neo/board.c -new file mode 100644 -index 000000000000..9bf480305d70 ---- /dev/null -+++ b/arch/arm/boards/udoo-neo/board.c -@@ -0,0 +1,27 @@ -+/* -+ * Copyright (C) 2014 Pengutronix, Sascha Hauer -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2, as published by the Free Software Foundation. -+ * -+ * 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. -+ */ -+ -+#include -+#include -+#include -+ -+static int imx6sx_udoneo_coredevices_init(void) -+{ -+ if (!of_machine_is_compatible("fsl,imx6sx-udoo-neo")) -+ return 0; -+ -+ barebox_set_hostname("mx6sx-udooneo"); -+ -+ return 0; -+} -+coredevice_initcall(imx6sx_udoneo_coredevices_init); -diff --git a/arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg b/arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg -new file mode 100644 -index 000000000000..176aff49b3ec ---- /dev/null -+++ b/arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg -@@ -0,0 +1,124 @@ -+loadaddr 0x80000000 -+soc imx6 -+dcdofs 0x400 -+ -+/* Enable all clocks */ -+wm 32 0x020c4068 0xffffffff -+wm 32 0x020c406c 0xffffffff -+wm 32 0x020c4070 0xffffffff -+wm 32 0x020c4074 0xffffffff -+wm 32 0x020c4078 0xffffffff -+wm 32 0x020c407c 0xffffffff -+wm 32 0x020c4080 0xffffffff -+wm 32 0x020c4084 0xffffffff -+/********************************************/ -+ -+/* IOMUX */ -+/* DDR IO TYPE */ -+wm 32 0x020e0618 0x000c0000 -+wm 32 0x020e05fc 0x00000000 -+/********************************************/ -+ -+/* CLOCK */ -+wm 32 0x020e032c 0x00000030 -+/********************************************/ -+ -+/* ADDRESS */ -+wm 32 0x020e0300 0x00000020 -+wm 32 0x020e02fc 0x00000020 -+wm 32 0x020e05f4 0x00000020 -+/********************************************/ -+ -+/* CONTROL */ -+wm 32 0x020e0340 0x00000020 -+ -+wm 32 0x020e0320 0x00000000 -+wm 32 0x020e0310 0x00000020 -+wm 32 0x020e0314 0x00000020 -+wm 32 0x020e0614 0x00000020 -+/********************************************/ -+ -+/* DATA STROBE */ -+wm 32 0x020e05f8 0x00020000 -+wm 32 0x020e0330 0x00000028 -+wm 32 0x020e0334 0x00000028 -+wm 32 0x020e0338 0x00000028 -+wm 32 0x020e033c 0x00000028 -+/********************************************/ -+ -+/* DATA */ -+wm 32 0x020e0608 0x00020000 -+wm 32 0x020e060c 0x00000028 -+wm 32 0x020e0610 0x00000028 -+wm 32 0x020e061c 0x00000028 -+wm 32 0x020e0620 0x00000028 -+wm 32 0x020e02ec 0x00000028 -+wm 32 0x020e02f0 0x00000028 -+wm 32 0x020e02f4 0x00000028 -+wm 32 0x020e02f8 0x00000028 -+/********************************************/ -+ -+/* Calibrations */ -+/* ZQ */ -+wm 32 0x021b0800 0xa1390003 -+/********************************************/ -+ -+/* write leveling */ -+wm 32 0x021b080c 0x001E0022 -+wm 32 0x021b0810 0x001C0019 -+/********************************************/ -+ -+/* DQS Read Gate */ -+wm 32 0x021b083c 0x41540150 -+wm 32 0x021b0840 0x01440138 -+/********************************************/ -+ -+/* Read/Write Delay */ -+wm 32 0x021b0848 0x403E4644 -+wm 32 0x021b0850 0x3C3A4038 -+/********************************************/ -+ -+/* read data bit delay */ -+wm 32 0x021b081c 0x33333333 -+wm 32 0x021b0820 0x33333333 -+wm 32 0x021b0824 0x33333333 -+wm 32 0x021b0828 0x33333333 -+/********************************************/ -+ -+/* Complete calibration by forced measurment */ -+wm 32 0x021b08b8 0x00000800 -+/********************************************/ -+ -+/* MMDC init */ -+/* in DDR3, 64-bit mode, only MMDC0 is initiated */ -+wm 32 0x021b0004 0x0002002d -+wm 32 0x021b0008 0x00333030 -+wm 32 0x021b000c 0x676b52f3 -+wm 32 0x021b0010 0xb66d8b63 -+wm 32 0x021b0014 0x01ff00db -+wm 32 0x021b0018 0x00011740 -+wm 32 0x021b001c 0x00008000 -+wm 32 0x021b002c 0x000026d2 -+wm 32 0x021b0030 0x006b1023 -+wm 32 0x021b0040 0x0000005f -+wm 32 0x021b0000 0x83190000 -+/********************************************/ -+ -+/* Initialize MT41K256M16HA-125 */ -+/* MR2 */ -+wm 32 0x021b001c 0x04008032 -+/* MR3 */ -+wm 32 0x021b001c 0x00008033 -+/* MR1 */ -+wm 32 0x021b001c 0x00048031 -+/* MR0 */ -+wm 32 0x021b001c 0x05208030 -+/* DDR device ZQ calibration */ -+wm 32 0x021b001c 0x04008040 -+/********************************************/ -+ -+/* final DDR setup, before operation start */ -+wm 32 0x021b0020 0x00000800 -+wm 32 0x021b0818 0x00011117 -+wm 32 0x021b001c 0x00000000 -+/********************************************/ -diff --git a/arch/arm/boards/udoo-neo/lowlevel.c b/arch/arm/boards/udoo-neo/lowlevel.c -new file mode 100644 -index 000000000000..e78c2685fd78 ---- /dev/null -+++ b/arch/arm/boards/udoo-neo/lowlevel.c -@@ -0,0 +1,39 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static inline void setup_uart(void) -+{ -+ void __iomem *iomuxbase = (void *)MX6_IOMUXC_BASE_ADDR; -+ -+ imx6_ungate_all_peripherals(); -+ -+ writel(0x0, iomuxbase + 0x24); -+ writel(0x1b0b1, iomuxbase + 0x036C); -+ writel(0x0, iomuxbase + 0x28); -+ writel(0x1b0b1, iomuxbase + 0x0370); -+ -+ imx6_uart_setup_ll(); -+ -+ putc_ll('>'); -+} -+ -+extern char __dtb_imx6sx_udoo_neo_full_start[]; -+ -+ENTRY_FUNCTION(start_imx6sx_udoo_neo, r0, r1, r2) -+{ -+ void *fdt; -+ -+ imx6_cpu_lowlevel_init(); -+ -+ if (IS_ENABLED(CONFIG_DEBUG_LL)) -+ setup_uart(); -+ -+ fdt = __dtb_imx6sx_udoo_neo_full_start - get_runtime_offset(); -+ -+ imx6sx_barebox_entry(fdt); -+} -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 806d38600169..ea0fa04bf41c 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -84,6 +84,7 @@ pbl-dtb-$(CONFIG_MACH_TX25) += imx25-karo-tx25.dtb.o - pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o - pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o - pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o -+pbl-dtb-$(CONFIG_MACH_UDOO_NEO) += imx6sx-udoo-neo-full.dtb.o - pbl-dtb-$(CONFIG_MACH_USI_TOPKICK) += kirkwood-topkick-bb.dtb.o - pbl-dtb-$(CONFIG_MACH_VARISCITE_MX6) += imx6q-var-custom.dtb.o - pbl-dtb-$(CONFIG_MACH_VSCOM_BALTOS) += am335x-baltos-minimal.dtb.o -diff --git a/arch/arm/dts/imx6sx-udoo-neo-full.dts b/arch/arm/dts/imx6sx-udoo-neo-full.dts -new file mode 100644 -index 000000000000..9203d40207c5 ---- /dev/null -+++ b/arch/arm/dts/imx6sx-udoo-neo-full.dts -@@ -0,0 +1,4 @@ -+#include -+ -+/{ -+}; -diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig -index 6110924af642..204d0d59994e 100644 ---- a/arch/arm/mach-imx/Kconfig -+++ b/arch/arm/mach-imx/Kconfig -@@ -362,6 +362,10 @@ config MACH_UDOO - bool "Freescale i.MX6 UDOO Board" - select ARCH_IMX6 - -+config MACH_UDOO_NEO -+ bool "i.MX6 UDOO Neo Board (full variant)" -+ select ARCH_IMX6SX -+ - config MACH_VARISCITE_MX6 - bool "Variscite i.MX6 Quad SOM" - select ARCH_IMX6 -diff --git a/arch/arm/mach-imx/include/mach/esdctl.h b/arch/arm/mach-imx/include/mach/esdctl.h -index 66dcc8974cfb..bd6092febca4 100644 ---- a/arch/arm/mach-imx/include/mach/esdctl.h -+++ b/arch/arm/mach-imx/include/mach/esdctl.h -@@ -137,6 +137,7 @@ void __noreturn imx51_barebox_entry(void *boarddata); - void __noreturn imx53_barebox_entry(void *boarddata); - void __noreturn imx6q_barebox_entry(void *boarddata); - void __noreturn imx6ul_barebox_entry(void *boarddata); -+#define imx6sx_barebox_entry(boarddata) imx6ul_barebox_entry(boarddata) - void imx_esdctl_disable(void); - #endif - -diff --git a/images/Makefile.imx b/images/Makefile.imx -index 88d3e5e339ac..b2ebd5c4bfbc 100644 ---- a/images/Makefile.imx -+++ b/images/Makefile.imx -@@ -260,6 +260,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade - FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg - image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img - -+pblx-$(CONFIG_MACH_UDOO_NEO) += start_imx6sx_udoo_neo -+CFG_start_imx6sx_udoo_neo.pblx.imximg = $(board)/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg -+FILE_barebox-udoo-neo.img = start_imx6sx_udoo_neo.pblx.imximg -+image-$(CONFIG_MACH_UDOO_NEO) += barebox-udoo-neo.img -+ - pblx-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += start_imx6sx_sabresdb - CFG_start_imx6sx_sabresdb.pblx.imximg = $(board)/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg - FILE_barebox-freescale-imx6sx-sabresdb.img = start_imx6sx_sabresdb.pblx.imximg diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/0301-Release-2017.07.0-pengutronix-multi_v7-20170703-1.patch b/configs/platform-v7a/patches/barebox-2017.07.0/0301-Release-2017.07.0-pengutronix-multi_v7-20170703-1.patch deleted file mode 100644 index 1fc99c8..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/0301-Release-2017.07.0-pengutronix-multi_v7-20170703-1.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Robert Schwebel -Date: Mon, 3 Jul 2017 12:12:17 +0200 -Subject: [PATCH] Release 2017.07.0/pengutronix/multi_v7/20170703-1 - -Signed-off-by: Robert Schwebel ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 35158319a601..10d2335d4389 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,7 +1,7 @@ - VERSION = 2017 - PATCHLEVEL = 07 - SUBLEVEL = 0 --EXTRAVERSION = -+EXTRAVERSION =-20170703-1 - NAME = None - - # *DOCUMENTATION* diff --git a/configs/platform-v7a/patches/barebox-2017.07.0/series b/configs/platform-v7a/patches/barebox-2017.07.0/series deleted file mode 100644 index 112cb06..0000000 --- a/configs/platform-v7a/patches/barebox-2017.07.0/series +++ /dev/null @@ -1,26 +0,0 @@ -# umpf-base: v2017.07.0 -# umpf-name: 2017.07.0/pengutronix/multi_v7 -# umpf-version: 2017.07.0/pengutronix/multi_v7/20170703-1 -# umpf-topic: v2017.07.0/topic/vexpress -# umpf-hashinfo: 60b579410ca5fd3420018b20d10493a7d447b3ca -# umpf-topic-range: cd7d4469687871e483b9adda3febb11621e23ef5..60b579410ca5fd3420018b20d10493a7d447b3ca -0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch -0002-vexpress-device-tree-support.patch -0003-vexpress-add-bootstate-node-to-the-device-tree.patch -0004-of-base-add-funtion-to-copy-a-device-tree-node.patch -0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch -0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch -# umpf-topic: v2017.07.0/customers/pengutronix/beaglebone -# umpf-hashinfo: b784a2db25aeeb3db4752eb5a72053fa3afbc1cb -# umpf-topic-range: 60b579410ca5fd3420018b20d10493a7d447b3ca..7acfb21ed93e5208d86de6931db8cdce016ac603 -0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch -# umpf-topic: v2017.07.0/customers/pengutronix/udoo-neo -# umpf-hashinfo: c2a0994f2e5e9fd4cd228bfa485b972fe26b9b86 -# umpf-topic-range: 7acfb21ed93e5208d86de6931db8cdce016ac603..8e5aaf8906410287dc5c74c98a70eaaa0ec00d42 -0201-of_device_is_stdout_path-simplify.patch -0202-of_device_is_stdout_path-split-off-options-and-suppo.patch -0203-ARM-imx-add-support-for-Udoo-Neo-full.patch -# umpf-release: 2017.07.0/pengutronix/multi_v7/20170703-1 -# umpf-topic-range: 8e5aaf8906410287dc5c74c98a70eaaa0ec00d42..3b26223d62dd381a6a123f0fb34023e54f7458f9 -0301-Release-2017.07.0-pengutronix-multi_v7-20170703-1.patch -# umpf-end diff --git a/configs/platform-v7a/patches/barebox-2017.08.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch b/configs/platform-v7a/patches/barebox-2017.08.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch new file mode 100644 index 0000000..a5fdc9c --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.08.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch @@ -0,0 +1,43 @@ +From: Michael Olbrich +Date: Sat, 10 Sep 2016 17:40:56 +0200 +Subject: [PATCH] vexpress: use device tree provided by QEMU if available + +Signed-off-by: Michael Olbrich +--- + arch/arm/boards/vexpress/lowlevel.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boards/vexpress/lowlevel.c b/arch/arm/boards/vexpress/lowlevel.c +index 204d29d8f098..7ed07a1e4134 100644 +--- a/arch/arm/boards/vexpress/lowlevel.c ++++ b/arch/arm/boards/vexpress/lowlevel.c +@@ -9,14 +9,27 @@ + #include + #include + #include ++#include + #include + + void __naked barebox_arm_reset_vector(void) + { ++ unsigned long membase; ++ void *boarddata; ++ + arm_cpu_lowlevel_init(); + + if (amba_is_arm_sp804(IOMEM(0x10011000))) +- barebox_arm_entry(0x60000000, SZ_512M, NULL); ++ membase = 0x60000000; ++ else ++ membase = 0x80000000; ++ ++ /* QEMU may put a dtb at the bare address */ ++ if (IS_ENABLED(CONFIG_OFDEVICE) && ++ get_unaligned_be32((void*)membase) == FDT_MAGIC) ++ boarddata = (void*)membase; + else +- barebox_arm_entry(0x80000000, SZ_512M, NULL); ++ boarddata = NULL; ++ ++ barebox_arm_entry(membase, SZ_512M, boarddata); + } diff --git a/configs/platform-v7a/patches/barebox-2017.08.0/0002-vexpress-device-tree-support.patch b/configs/platform-v7a/patches/barebox-2017.08.0/0002-vexpress-device-tree-support.patch new file mode 100644 index 0000000..fc7ad48 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.08.0/0002-vexpress-device-tree-support.patch @@ -0,0 +1,78 @@ +From: Michael Olbrich +Date: Sat, 10 Sep 2016 17:51:36 +0200 +Subject: [PATCH] vexpress: device tree support + +Signed-off-by: Michael Olbrich +--- + arch/arm/boards/vexpress/init.c | 16 ++++++++++------ + arch/arm/dts/vexpress-v2p-ca9.dts | 27 +++++++++++++++++++++++++++ + 2 files changed, 37 insertions(+), 6 deletions(-) + create mode 100644 arch/arm/dts/vexpress-v2p-ca9.dts + +diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c +index f89dff939231..68ebbfab2633 100644 +--- a/arch/arm/boards/vexpress/init.c ++++ b/arch/arm/boards/vexpress/init.c +@@ -71,10 +71,12 @@ static void vexpress_a9_legacy_mem_init(void) + + static void vexpress_a9_legacy_devices_init(void) + { +- add_cfi_flash_device(0, 0x40000000, SZ_64M, 0); +- add_cfi_flash_device(1, 0x44000000, SZ_64M, 0); +- add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x4e000000, +- 64 * 1024, IORESOURCE_MEM, NULL); ++ if (!IS_ENABLED(CONFIG_OFDEVICE)) { ++ add_cfi_flash_device(0, 0x40000000, SZ_64M, 0); ++ add_cfi_flash_device(1, 0x44000000, SZ_64M, 0); ++ add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x4e000000, ++ 64 * 1024, IORESOURCE_MEM, NULL); ++ } + vexpress_a9_legacy_register_mmc(&mmci_plat); + armlinux_set_architecture(MACH_TYPE_VEXPRESS); + } +@@ -107,8 +109,10 @@ static int vexpress_devices_init(void) + writel(1, v2m_sysreg_base + V2M_SYS_FLASH); + v2m_init->devices_init(); + +- devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self"); +- devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); ++ if (!IS_ENABLED(CONFIG_OFDEVICE)) { ++ devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self"); ++ devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); ++ } + + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_vexpress); +diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts +new file mode 100644 +index 000000000000..541840ae22dc +--- /dev/null ++++ b/arch/arm/dts/vexpress-v2p-ca9.dts +@@ -0,0 +1,27 @@ ++#include ++ ++/ { ++ barebox_environment { ++ compatible = "barebox,environment"; ++ device-path = &barebox_env; ++ }; ++ ++ smb@4000000 { ++ motherboard { ++ flash@0,00000000 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "barebox"; ++ reg = <0x0 0x80000>; ++ }; ++ ++ barebox_env: partition@80000 { ++ label = "barebox-environment"; ++ reg = <0x80000 0x80000>; ++ }; ++ }; ++ }; ++ }; ++}; diff --git a/configs/platform-v7a/patches/barebox-2017.08.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch b/configs/platform-v7a/patches/barebox-2017.08.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch new file mode 100644 index 0000000..27cfa0b --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.08.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch @@ -0,0 +1,90 @@ +From: Michael Olbrich +Date: Sat, 10 Sep 2016 17:54:20 +0200 +Subject: [PATCH] vexpress: add bootstate node to the device tree + +Signed-off-by: Michael Olbrich +--- + arch/arm/dts/vexpress-v2p-ca9.dts | 63 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 63 insertions(+) + +diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts +index 541840ae22dc..d0975330f205 100644 +--- a/arch/arm/dts/vexpress-v2p-ca9.dts ++++ b/arch/arm/dts/vexpress-v2p-ca9.dts +@@ -6,6 +6,10 @@ + device-path = &barebox_env; + }; + ++ aliases { ++ state = &state; ++ }; ++ + smb@4000000 { + motherboard { + flash@0,00000000 { +@@ -21,6 +25,65 @@ + label = "barebox-environment"; + reg = <0x80000 0x80000>; + }; ++ ++ state_storage: partition@100000 { ++ label = "barebox-state"; ++ reg = <0x100000 0x100000>; ++ }; ++ }; ++ }; ++ }; ++ ++ /* State: mutable part */ ++ state: state { ++ magic = <0x4d433230>; ++ compatible = "barebox,state"; ++ backend-type = "raw"; ++ backend = <&state_storage>; ++ backend-stridesize = <0x40>; ++ backend-storage-type = "circular"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ bootstate { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ system0 { /* the node's name here must match the subnode's name in the 'bootstate' node */ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ remaining_attempts@0 { ++ reg = <0x0 0x4>; ++ type = "uint32"; ++ default = <3>; ++ }; ++ priority@4 { ++ reg = <0x4 0x4>; ++ type = "uint32"; ++ default = <20>; ++ }; ++ }; ++ ++ system1 { /* the node's name here must match the subnode's name in the 'bootstate' node */ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ remaining_attempts@8 { ++ reg = <0x8 0x4>; ++ type = "uint32"; ++ default = <3>; ++ }; ++ priority@c { ++ reg = <0xC 0x4>; ++ type = "uint32"; ++ default = <20>; ++ }; ++ }; ++ ++ last_chosen@10 { ++ reg = <0x10 0x4>; ++ type = "uint32"; + }; + }; + }; diff --git a/configs/platform-v7a/patches/barebox-2017.08.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch b/configs/platform-v7a/patches/barebox-2017.08.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch new file mode 100644 index 0000000..af6cc6c --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.08.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch @@ -0,0 +1,50 @@ +From: Michael Olbrich +Date: Tue, 13 Sep 2016 21:17:12 +0200 +Subject: [PATCH] of: base: add funtion to copy a device tree node + +Signed-off-by: Michael Olbrich +--- + drivers/of/base.c | 16 ++++++++++++++++ + include/of.h | 2 ++ + 2 files changed, 18 insertions(+) + +diff --git a/drivers/of/base.c b/drivers/of/base.c +index ea330d131012..b6e90f2adb09 100644 +--- a/drivers/of/base.c ++++ b/drivers/of/base.c +@@ -1965,6 +1965,22 @@ out: + return dn; + } + ++struct device_node *of_copy_node(struct device_node *parent, const struct device_node *other) ++{ ++ struct device_node *np, *child; ++ struct property *pp; ++ ++ np = of_new_node(parent, other->name); ++ ++ list_for_each_entry(pp, &other->properties, list) ++ of_new_property(np, pp->name, pp->value, pp->length); ++ ++ for_each_child_of_node(other, child) ++ of_copy_node(np, child); ++ ++ return np; ++} ++ + void of_delete_node(struct device_node *node) + { + struct device_node *n, *nt; +diff --git a/include/of.h b/include/of.h +index 0ba73f197f28..c1136708ce6c 100644 +--- a/include/of.h ++++ b/include/of.h +@@ -144,6 +144,8 @@ extern struct device_node *of_new_node(struct device_node *parent, + const char *name); + extern struct device_node *of_create_node(struct device_node *root, + const char *path); ++extern struct device_node *of_copy_node(struct device_node *parent, ++ const struct device_node *other); + extern void of_delete_node(struct device_node *node); + + extern int of_machine_is_compatible(const char *compat); diff --git a/configs/platform-v7a/patches/barebox-2017.08.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch b/configs/platform-v7a/patches/barebox-2017.08.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch new file mode 100644 index 0000000..8dc2da3 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.08.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch @@ -0,0 +1,34 @@ +From: Michael Olbrich +Date: Tue, 13 Sep 2016 21:18:15 +0200 +Subject: [PATCH] commands: of_dump: don't use flatten/unflatten to copy the + device tree + +Signed-off-by: Michael Olbrich +--- + commands/of_dump.c | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) + +diff --git a/commands/of_dump.c b/commands/of_dump.c +index 7bec0b925eee..ac5014e1fff8 100644 +--- a/commands/of_dump.c ++++ b/commands/of_dump.c +@@ -97,18 +97,7 @@ static int do_of_dump(int argc, char *argv[]) + + if (fix) { + /* create a copy of internal devicetree */ +- void *fdt; +- fdt = of_flatten_dtb(root); +- root = of_unflatten_dtb(fdt); +- +- free(fdt); +- +- if (IS_ERR(root)) { +- ret = PTR_ERR(root); +- goto out; +- } +- +- of_free = root; ++ of_free = root = of_copy_node(NULL, root); + } + } + diff --git a/configs/platform-v7a/patches/barebox-2017.08.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch b/configs/platform-v7a/patches/barebox-2017.08.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch new file mode 100644 index 0000000..8b64d2f --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.08.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch @@ -0,0 +1,62 @@ +From: Michael Olbrich +Date: Tue, 13 Sep 2016 21:20:10 +0200 +Subject: [PATCH] common: oftree: add fixup handler for 'virtio,mmio' devices + +Qemu adds 'virtio,mmio' nodes to the device tree. Before passing it to the +bootloader or the Linux kernel. This fixup handler copies these nodes to +the new device tree. + +v2: +- move from general to platform specific init + +Signed-off-by: Michael Olbrich +Signed-off-by: Rouven Czerwinski +--- + arch/arm/boards/vexpress/init.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c +index 68ebbfab2633..8655b7e17c97 100644 +--- a/arch/arm/boards/vexpress/init.c ++++ b/arch/arm/boards/vexpress/init.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + struct vexpress_init { + void (*core_init)(void); +@@ -156,3 +157,32 @@ static int vexpress_core_init(void) + return 0; + } + postcore_initcall(vexpress_core_init); ++ ++static int of_fixup_virtio_mmio(struct device_node *root, void *unused) ++{ ++ struct device_node *barebox_root, *np, *parent; ++ ++ barebox_root = of_get_root_node(); ++ if (root == barebox_root) ++ return 0; ++ ++ for_each_compatible_node_from(np, barebox_root, NULL, "virtio,mmio") { ++ if (of_get_parent(np) == barebox_root) ++ parent = root; ++ else ++ parent = of_find_node_by_path_from(root, ++ of_get_parent(np)->full_name); ++ if (!parent) ++ return -EINVAL; ++ ++ of_copy_node(parent, np); ++ } ++ ++ return 0; ++} ++ ++static int of_register_virtio_mmio_fixup(void) ++{ ++ return of_register_fixup(of_fixup_virtio_mmio, NULL); ++} ++late_initcall(of_register_virtio_mmio_fixup); diff --git a/configs/platform-v7a/patches/barebox-2017.08.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch b/configs/platform-v7a/patches/barebox-2017.08.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch new file mode 100644 index 0000000..4dfd47c --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.08.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch @@ -0,0 +1,35 @@ +From: Michael Grzeschik +Date: Fri, 10 Jun 2016 14:02:30 +0200 +Subject: [PATCH] beaglebone: add state entry for mmc0 and mmc1 + +Signed-off-by: Michael Grzeschik +--- + arch/arm/dts/am335x-bone-common.dtsi | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi +index ef97d906616c..d14c6ded6a55 100644 +--- a/arch/arm/dts/am335x-bone-common.dtsi ++++ b/arch/arm/dts/am335x-bone-common.dtsi +@@ -11,6 +11,21 @@ + linux,stdout-path = &uart0; + }; + ++ bootstate: bootstate { ++ compatible = "barebox,bootstate"; ++ backend-type = "nv"; ++ ++ system0 { ++ default_attempts = <3>; ++ boot = "mmc0"; ++ }; ++ ++ system1 { ++ default_attempts = <3>; ++ boot = "mmc1"; ++ }; ++ }; ++ + cpus { + cpu@0 { + cpu0-supply = <&dcdc2_reg>; diff --git a/configs/platform-v7a/patches/barebox-2017.08.0/series b/configs/platform-v7a/patches/barebox-2017.08.0/series new file mode 100644 index 0000000..240cc72 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.08.0/series @@ -0,0 +1,24 @@ +# umpf-base: v2017.08.0 +# umpf-name: 2017.08.0/pengutronix/multi_v7 +# umpf-version: 2017.08.0/pengutronix/multi_v7/20170822-1 +# umpf-topic: v2017.08.0/topic/vexpress +# umpf-hashinfo: db4b9b7d1ffde3c6ba557654a09380b54a3fdfe7 +# umpf-topic-range: fbde027fdb1d8725253787dd3416702255e646f7..db4b9b7d1ffde3c6ba557654a09380b54a3fdfe7 +0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch +0002-vexpress-device-tree-support.patch +0003-vexpress-add-bootstate-node-to-the-device-tree.patch +0004-of-base-add-funtion-to-copy-a-device-tree-node.patch +0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch +0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch +# umpf-topic: v2017.08.0/customers/pengutronix/beaglebone +# umpf-hashinfo: a35d1683996a55b567b71078bc47fc0d87b9c55a +# umpf-topic-range: db4b9b7d1ffde3c6ba557654a09380b54a3fdfe7..61098368af6b9a173ce190d89a7bd04bd6880c53 +0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch +# umpf-topic: v2017.08.0/customers/pengutronix/udoo-neo +# umpf-hashinfo: 42d6d5080ecc2082cf4df521679b6463844dcec3 +# umpf-topic-range: 61098368af6b9a173ce190d89a7bd04bd6880c53..1b809bf26f52d8a511bacc3ad59d7ec33f369bb4 +0201-ARM-imx-add-support-for-Udoo-Neo-full.patch +# umpf-release: 2017.08.0/pengutronix/multi_v7/20170822-1 +# umpf-topic-range: 1b809bf26f52d8a511bacc3ad59d7ec33f369bb4..60b688a82177e5819aeaab31769aacd0d5ffd1ea +0301-Release-2017.08.0-pengutronix-multi_v7-20170822-1.patch +# umpf-end diff --git a/configs/platform-v7a/rules/barebox-am335x-mlo.make b/configs/platform-v7a/rules/barebox-am335x-mlo.make index 39aa33c..b8c4caf 100644 --- a/configs/platform-v7a/rules/barebox-am335x-mlo.make +++ b/configs/platform-v7a/rules/barebox-am335x-mlo.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X_MLO) += barebox-am335x-mlo # # Paths and names # -BAREBOX_AM335X_MLO_VERSION := 2017.07.0 -BAREBOX_AM335X_MLO_MD5 := cd14a6b9030e6257bf659106ec221e49 +BAREBOX_AM335X_MLO_VERSION := 2017.08.0 +BAREBOX_AM335X_MLO_MD5 := a755165468163793d260e329ea585fc2 BAREBOX_AM335X_MLO := barebox-$(BAREBOX_AM335X_MLO_VERSION) BAREBOX_AM335X_MLO_SUFFIX := tar.bz2 BAREBOX_AM335X_MLO_DIR := $(BUILDDIR)/barebox-am335x-mlo-$(BAREBOX_AM335X_MLO_VERSION) diff --git a/configs/platform-v7a/rules/barebox-am335x.make b/configs/platform-v7a/rules/barebox-am335x.make index e005f40..2d95ee5 100644 --- a/configs/platform-v7a/rules/barebox-am335x.make +++ b/configs/platform-v7a/rules/barebox-am335x.make @@ -16,7 +16,7 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X) += barebox-am335x # # Paths and names # -BAREBOX_AM335X_VERSION := 2017.07.0 +BAREBOX_AM335X_VERSION := 2017.08.0 BAREBOX_AM335X_MD5 := cd14a6b9030e6257bf659106ec221e49 BAREBOX_AM335X := barebox-$(BAREBOX_AM335X_VERSION) BAREBOX_AM335X_SUFFIX := tar.bz2 diff --git a/configs/platform-v7a/rules/barebox-mx6.make b/configs/platform-v7a/rules/barebox-mx6.make index 3bd47ff..59619fd 100644 --- a/configs/platform-v7a/rules/barebox-mx6.make +++ b/configs/platform-v7a/rules/barebox-mx6.make @@ -16,7 +16,7 @@ PACKAGES-$(PTXCONF_BAREBOX_MX6) += barebox-mx6 # # Paths and names # -BAREBOX_MX6_VERSION := 2017.07.0 +BAREBOX_MX6_VERSION := 2017.08.0 BAREBOX_MX6_MD5 := cd14a6b9030e6257bf659106ec221e49 BAREBOX_MX6 := barebox-$(BAREBOX_MX6_VERSION) BAREBOX_MX6_SUFFIX := tar.bz2 diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make index a79b668..d9471f7 100644 --- a/configs/platform-v7a/rules/barebox-rpi2.make +++ b/configs/platform-v7a/rules/barebox-rpi2.make @@ -16,7 +16,7 @@ PACKAGES-$(PTXCONF_BAREBOX_RPI2) += barebox-rpi2 # # Paths and names # -BAREBOX_RPI2_VERSION := 2017.07.0 +BAREBOX_RPI2_VERSION := 2017.08.0 BAREBOX_RPI2_MD5 := cd14a6b9030e6257bf659106ec221e49 BAREBOX_RPI2 := barebox-$(BAREBOX_RPI2_VERSION) BAREBOX_RPI2_SUFFIX := tar.bz2 diff --git a/configs/platform-v7a/rules/barebox-vexpress.make b/configs/platform-v7a/rules/barebox-vexpress.make index 56e594c..ffd37f8 100644 --- a/configs/platform-v7a/rules/barebox-vexpress.make +++ b/configs/platform-v7a/rules/barebox-vexpress.make @@ -16,7 +16,7 @@ PACKAGES-$(PTXCONF_BAREBOX_VEXPRESS) += barebox-vexpress # # Paths and names # -BAREBOX_VEXPRESS_VERSION := 2017.07.0 +BAREBOX_VEXPRESS_VERSION := 2017.08.0 BAREBOX_VEXPRESS_MD5 := cd14a6b9030e6257bf659106ec221e49 BAREBOX_VEXPRESS := barebox-$(BAREBOX_VEXPRESS_VERSION) BAREBOX_VEXPRESS_SUFFIX := tar.bz2 -- cgit v1.2.3