Skip to contentSkip to conversation

fdt: fix bcm283x dm-pre-reloc definitions

PATCH New matthias.bgg at kernel.org 1 participant 3 messages Nov 8, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/3 fdt: fix bcm283x dm-pre-reloc definitions

From: Matthias Brugger <[email protected]>

In commmit
143256b353 ("fdt: update bcm283x device tree sources to Linux 5.1-rc6 state") we deleted the label for the node soc from bcm283x.dtsi

As we don't need to add the property dm-pre-reloc to the soc node, we can delete it from bcm283x-uboot.dtsi

---

Changes in v4:
- fix commit message

Changes in v3:
- add tested-by tag

Changes in v2:
- node soc, does not need a label
- dm-pre-reloc not needed for node soc

 arch/arm/dts/bcm283x-uboot.dtsi | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/dts/bcm283x-uboot.dtsi +0 -4
index 6cc1aa3f93..36548dad62 100644
@@ -6,10 +6,6 @@
  * (C) Copyright 2016 Fabian Vogt <[email protected]>
  */
 
-&soc {
-	u-boot,dm-pre-reloc;
-};
-
 &uart0 {
 	skip-init;
 	u-boot,dm-pre-reloc;
Signature · 1 line
2.23.0
#1 lore raw

PATCH v4 2/3 arm: dts: bcm283x: Rename U-Boot file

From: Matthias Brugger <[email protected]>

Rename the file bcm283x-uboot.dtsi so that it get automatically include through the scripts/Makefile.lib using $(CONFIG_SYS_SOC))-u-boot.dtsi

Without this uarts and pincontroller miss the property dm-pre-reloc and the first call to bcm283x_mu_serial_ofdata_to_platdata() fails as the pins are not set correctly.
As a result the U-Boot banner isn't shown on boot.

Before commmit
143256b353 ("fdt: update bcm283x device tree sources to Linux 5.1-rc6 state") we included bcm283x-uboot.dtsi directly in the device-tree file. Which got deleted by the metioned commit.
This is a much robuster solution.

---

Changes in v4: None
Changes in v3:
- add tested-by tag

Changes in v2: None

 arch/arm/dts/{bcm283x-uboot.dtsi => bcm283x-u-boot.dtsi} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename arch/arm/dts/{bcm283x-uboot.dtsi => bcm283x-u-boot.dtsi} (100%)
arch/arm/dts/bcm283x-u-boot.dtsi renamed from arch/arm/dts/bcm283x-uboot.dtsi +0 -0
similarity index 100%
rename from arch/arm/dts/bcm283x-uboot.dtsi
rename to arch/arm/dts/bcm283x-u-boot.dtsi
Signature · 1 line
2.23.0
#2 lore raw

PATCH v4 3/3 drivers: bcm283x: Set pre-location flag for OF_BOARD

In reply to matthias.bgg at kernel.org

From: Matthias Brugger <[email protected]>

U-Boot support on Raspberry Pi 4 relies on the device-tree provided by the firmware. The blob does not contain the U-Boot specific pre-loc-rel properties. The result is, that the U-Boot banner is not printed.

We fix this by setting the DM_FLAG_PRE_RELOC flag in the driver, if we rely on a device-tree provided by the firmware.

---

Changes in v4: None
Changes in v3: None
Changes in v2:
- add DM_FLAG_PRE_RELOC for RPi4 case

 drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 2 +-
 drivers/serial/serial_bcm283x_mu.c         | 2 +-
 drivers/serial/serial_bcm283x_pl011.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/broadcom/pinctrl-bcm283x.c +1 -1
index 3be080d29e..1bb91d6eed 100644
@@ -148,7 +148,7 @@ U_BOOT_DRIVER(pinctrl_bcm283x) = {
 	.priv_auto_alloc_size = sizeof(struct bcm283x_pinctrl_priv),
 	.ops		= &bcm283x_pinctrl_ops,
 	.probe		= bcm283x_pinctl_probe,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD)
 	.flags		= DM_FLAG_PRE_RELOC,
 #endif
 };
drivers/serial/serial_bcm283x_mu.c +1 -1
index bd1d89ec83..a6ffc84b96 100644
@@ -199,7 +199,7 @@ U_BOOT_DRIVER(serial_bcm283x_mu) = {
 	.platdata_auto_alloc_size = sizeof(struct bcm283x_mu_serial_platdata),
 	.probe = bcm283x_mu_serial_probe,
 	.ops = &bcm283x_mu_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD)
 	.flags = DM_FLAG_PRE_RELOC,
 #endif
 	.priv_auto_alloc_size = sizeof(struct bcm283x_mu_priv),
drivers/serial/serial_bcm283x_pl011.c +1 -1
index 2527bb8b1c..7d8ab7b716 100644
@@ -90,7 +90,7 @@ U_BOOT_DRIVER(bcm283x_pl011_uart) = {
 	.platdata_auto_alloc_size = sizeof(struct pl01x_serial_platdata),
 	.probe	= pl01x_serial_probe,
 	.ops	= &bcm283x_pl011_serial_ops,
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
+#if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD)
 	.flags	= DM_FLAG_PRE_RELOC,
 #endif
 	.priv_auto_alloc_size = sizeof(struct pl01x_priv),
Signature · 1 line
2.23.0