summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Belisko <marek.belisko@open-nandra.com>2020-10-15 13:39:24 +0200
committerAndrei Gherzan <andrei@gherzan.ro>2020-11-03 17:25:58 +0000
commit4dc106ae585d23cf59740565f8857d897f0ce6f5 (patch)
treeb39e639bc75ba27f3f9c8d87bb6dbd2a4a7dc29f
parenta47b0b1fd9a85b12c26a08570ca69424a7e10892 (diff)
downloadmeta-raspberrypi-4dc106ae585d23cf59740565f8857d897f0ce6f5.tar.gz
u-boot: Fix booting raspberrypi CM3 moduledunfell-next
With stock u-boot v2020.01 which we use from poky CM3 module won't boot. We need to apply this patch in order to have platform again working. Add it only for cm3 to not break anything else. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
-rw-r--r--recipes-bsp/u-boot/files/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch51
-rw-r--r--recipes-bsp/u-boot/u-boot_%.bbappend3
2 files changed, 54 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/files/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch b/recipes-bsp/u-boot/files/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch
new file mode 100644
index 0000000..996ad10
--- /dev/null
+++ b/recipes-bsp/u-boot/files/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch
@@ -0,0 +1,51 @@
1From 336d86ebd146905cf4384912f4f27699b6e37c72 Mon Sep 17 00:00:00 2001
2From: Simon Glass <sjg@chromium.org>
3Date: Sun, 29 Dec 2019 21:19:17 -0700
4Subject: [PATCH] dm: core: Move ofdata_to_platdata() call earlier
5
6This method is supposed to extract platform data from the device tree. It
7should be done before the device itself is probed. Move it earlier in the
8device_probe() function.
9
10Upstream-Status: Backport
11
12Signed-off-by: Simon Glass <sjg@chromium.org>
13---
14 drivers/core/device.c | 14 +++++++-------
15 1 file changed, 7 insertions(+), 7 deletions(-)
16
17diff --git a/drivers/core/device.c b/drivers/core/device.c
18index 4e03708..291ff4c 100644
19--- a/drivers/core/device.c
20+++ b/drivers/core/device.c
21@@ -375,6 +375,13 @@ int device_probe(struct udevice *dev)
22 return 0;
23 }
24
25+ if (drv->ofdata_to_platdata &&
26+ (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) {
27+ ret = drv->ofdata_to_platdata(dev);
28+ if (ret)
29+ goto fail;
30+ }
31+
32 seq = uclass_resolve_seq(dev);
33 if (seq < 0) {
34 ret = seq;
35@@ -411,13 +418,6 @@ int device_probe(struct udevice *dev)
36 goto fail;
37 }
38
39- if (drv->ofdata_to_platdata &&
40- (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) {
41- ret = drv->ofdata_to_platdata(dev);
42- if (ret)
43- goto fail;
44- }
45-
46 /* Only handle devices that have a valid ofnode */
47 if (dev_of_valid(dev)) {
48 /*
49--
502.7.4
51
diff --git a/recipes-bsp/u-boot/u-boot_%.bbappend b/recipes-bsp/u-boot/u-boot_%.bbappend
index 7f38adb..cdfe5bb 100644
--- a/recipes-bsp/u-boot/u-boot_%.bbappend
+++ b/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -4,6 +4,9 @@ SRC_URI_append_rpi = " \
4 file://fw_env.config \ 4 file://fw_env.config \
5" 5"
6 6
7# special fix for raspberrypi-cm3
8SRC_URI_append_raspberrypi-cm3 = " file://0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch"
9
7DEPENDS_append_rpi = " u-boot-default-script" 10DEPENDS_append_rpi = " u-boot-default-script"
8 11
9do_install_append_rpi () { 12do_install_append_rpi () {