summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/patches/barebox-2017.08.0
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2017-08-22 18:35:16 +0200
committerRobert Schwebel <r.schwebel@pengutronix.de>2017-08-22 18:42:43 +0200
commit04410b5fc987d32549e141ecb4d42a0c7eef28f1 (patch)
tree3d2b1b4e7cc3393d6589e1beaf6704062d4d9def /configs/platform-v7a/patches/barebox-2017.08.0
parent838ea9d300c82dda602899bd5c940d80cfe3e725 (diff)
downloadDistroKit-04410b5fc987d32549e141ecb4d42a0c7eef28f1.tar.gz
DistroKit-04410b5fc987d32549e141ecb4d42a0c7eef28f1.tar.xz
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 <r.schwebel@pengutronix.de>
Diffstat (limited to 'configs/platform-v7a/patches/barebox-2017.08.0')
-rw-r--r--configs/platform-v7a/patches/barebox-2017.08.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch43
-rw-r--r--configs/platform-v7a/patches/barebox-2017.08.0/0002-vexpress-device-tree-support.patch78
-rw-r--r--configs/platform-v7a/patches/barebox-2017.08.0/0003-vexpress-add-bootstate-node-to-the-device-tree.patch90
-rw-r--r--configs/platform-v7a/patches/barebox-2017.08.0/0004-of-base-add-funtion-to-copy-a-device-tree-node.patch50
-rw-r--r--configs/platform-v7a/patches/barebox-2017.08.0/0005-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch34
-rw-r--r--configs/platform-v7a/patches/barebox-2017.08.0/0006-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch62
-rw-r--r--configs/platform-v7a/patches/barebox-2017.08.0/0101-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch35
-rw-r--r--configs/platform-v7a/patches/barebox-2017.08.0/series24
8 files changed, 416 insertions, 0 deletions
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 <m.olbrich@pengutronix.de>
+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 <m.olbrich@pengutronix.de>
+---
+ 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 <asm/barebox-arm-head.h>
+ #include <asm/barebox-arm.h>
+ #include <asm/system_info.h>
++#include <asm/unaligned.h>
+ #include <linux/amba/sp804.h>
+
+ 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 <m.olbrich@pengutronix.de>
+Date: Sat, 10 Sep 2016 17:51:36 +0200
+Subject: [PATCH] vexpress: device tree support
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ 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 <arm/vexpress-v2p-ca9.dts>
++
++/ {
++ 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 <m.olbrich@pengutronix.de>
+Date: Sat, 10 Sep 2016 17:54:20 +0200
+Subject: [PATCH] vexpress: add bootstate node to the device tree
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ 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 <m.olbrich@pengutronix.de>
+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 <m.olbrich@pengutronix.de>
+---
+ 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 <m.olbrich@pengutronix.de>
+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 <m.olbrich@pengutronix.de>
+---
+ 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 <m.olbrich@pengutronix.de>
+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 <m.olbrich@pengutronix.de>
+Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
+---
+ 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 <globalvar.h>
+ #include <linux/amba/sp804.h>
+ #include <mci.h>
++#include <of.h>
+
+ 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 <m.grzeschik@pengutronix.de>
+Date: Fri, 10 Jun 2016 14:02:30 +0200
+Subject: [PATCH] beaglebone: add state entry for mmc0 and mmc1
+
+Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
+---
+ 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