Skip to contentSkip to conversation

ARM: imx: m53menlo: Do not fail boot on invalid splash screen

PATCH New Marek Vasut 2 participants 4 messages May 30, 2020 – Jun 8, 2020

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

PATCH 1/2 ARM: imx: m53menlo: Do not fail boot on invalid splash screen

None of these splash screen loading errors are so critical as to justify complete failure to boot, so just print error message as needed and return 0, the boot can very likely continue without the splash.

Fix a couple of missing free(dst) instances as well.

Cc Fabio Estevam <[email protected]>
Cc NXP i.MX U-Boot Team <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/menlo/m53menlo/m53menlo.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
board/menlo/m53menlo/m53menlo.c +9 -5
index 58a564ac31..d4288a2c57 100644
@@ -353,24 +353,28 @@ int board_late_init(void)
 
 	ret = splash_screen_prepare();
 	if (ret < 0)
-		return ret;
+		goto splasherr;
 
 	len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE;
 	ret = gunzip(dst + 2, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE - 2,
 		     (uchar *)addr, &len);
 	if (ret) {
 		printf("Error: no valid bmp or bmp.gz image@%lx\n", addr);
-		free(dst);
-		return ret;
+		goto splasherr;
 	}
 
 	ret = uclass_get_device(UCLASS_VIDEO, 0, &dev);
 	if (ret)
-		return ret;
+		goto splasherr;
 
 	ret = video_bmp_display(dev, (ulong)dst + 2, xpos, ypos, true);
 	if (ret)
-		return ret;
+		goto splasherr;
+
+	return 0;
+
+splasherr:
+	free(dst);
 #endif
 	return 0;
 }
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 ARM: dts: imx: m53menlo: Convert to DM_ETH

Convert the board to DM_ETH instead of legacy networking. This requires a minor addition to the DT to satisfy the requirement for specifying a PHY node. No functional change from board user perspective.

Cc Fabio Estevam <[email protected]>
Cc NXP i.MX U-Boot Team <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 arch/arm/dts/imx53-m53menlo.dts | 11 +++++++++++
 configs/m53menlo_defconfig      |  3 +++
 2 files changed, 14 insertions(+)
arch/arm/dts/imx53-m53menlo.dts +11 -0
index a6805eca9d..3767dcaef4 100644
@@ -86,8 +86,19 @@
 &fec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_fec>;
+	phy-handle = <&ethphy0>;
 	phy-mode = "rmii";
 	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethphy0: ethernet-phy at 0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <0>;
+		};
+	};
 };
 
 &i2c1 {
configs/m53menlo_defconfig +3 -0
index a65c21a139..5289899601 100644
@@ -75,6 +75,9 @@ CONFIG_NAND_MXC=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ8XXX=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX5=y
 CONFIG_DM_REGULATOR=y
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 ARM: dts: imx: m53menlo: Convert to DM_ETH

Quoted 8 lines

Convert the board to DM_ETH instead of legacy networking. This requires a minor addition to the DT to satisfy the requirement for specifying a PHY node. No functional change from board user perspective.

Cc Fabio Estevam <[email protected]>
Cc NXP i.MX U-Boot Team <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/2 ARM: imx: m53menlo: Do not fail boot on invalid splash screen

In reply to Marek Vasut
Quoted 10 lines

None of these splash screen loading errors are so critical as to justify complete failure to boot, so just print error message as needed and return 0, the boot can very likely continue without the splash.
Fix a couple of missing free(dst) instances as well.

Cc Fabio Estevam <[email protected]>
Cc NXP i.MX U-Boot Team <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================