Skip to contentSkip to conversation

mx6sabresd: Avoid calling setup_display() from SPL code

PATCH New Fabio Estevam 4 participants 18 messages Sep 23, 2017 – Sep 25, 2017 Arm i.MX and Layerscape

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/6 mx6sabresd: Avoid calling setup_display() from SPL code

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/freescale/mx6sabresd/mx6sabresd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
board/freescale/mx6sabresd/mx6sabresd.c +3 -3
index 5b50bc8..f14b759 100644
@@ -620,9 +620,6 @@ int board_ehci_power(int port, int on)
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
-#if defined(CONFIG_VIDEO_IPUV3)
-	setup_display();
-#endif
 
 	return 0;
 }
@@ -639,6 +636,9 @@ int board_init(void)
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1);
 	else
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
+#if defined(CONFIG_VIDEO_IPUV3)
+	setup_display();
+#endif
 #ifdef CONFIG_USB_EHCI_MX6
 	setup_usb();
 #endif
Signature · 1 line
2.7.4
author reviewer
#1 lore raw

PATCH 2/6 cgtqmx6eval: Avoid calling setup_display() from SPL code

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/congatec/cgtqmx6eval/cgtqmx6eval.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/congatec/cgtqmx6eval/cgtqmx6eval.c +2 -2
index 2ed66d3..d42cc94 100644
@@ -683,8 +683,6 @@ int overwrite_console(void)
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
-	setup_display();
-
 #ifdef CONFIG_MXC_SPI
 	setup_spi();
 #endif
@@ -702,6 +700,8 @@ int board_init(void)
 	else
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
 
+	setup_display();
+
 #ifdef CONFIG_SATA
 	setup_sata();
 #endif
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/6 cgtqmx6eval: Avoid calling setup_display() from SPL code

Quoted 26 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/congatec/cgtqmx6eval/cgtqmx6eval.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/congatec/cgtqmx6eval/cgtqmx6eval.c +0 -2
index 2ed66d3..d42cc94 100644
@@ -683,8 +683,6 @@ int overwrite_console(void)
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
-	setup_display();
-
 #ifdef CONFIG_MXC_SPI
 	setup_spi();
 #endif

board/congatec/cgtqmx6eval/cgtqmx6eval.c int board_init(void) · line 707

Quoted 8 lines
board/congatec/cgtqmx6eval/cgtqmx6eval.c +2 -0
@@ -702,6 +700,8 @@ int board_init(void)
 	else
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
 
+	setup_display();
+
 #ifdef CONFIG_SATA
 	setup_sata();
 #endif

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
=====================================================================
author reviewer
#3 lore raw

PATCH 3/6 wandboard: Avoid calling setup_display() from SPL code

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/wandboard/wandboard.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
board/wandboard/wandboard.c +2 -3
index adfcf48..dde4988 100644
@@ -376,9 +376,6 @@ int board_eth_init(bd_t *bis)
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
-#if defined(CONFIG_VIDEO_IPUV3)
-	setup_display();
-#endif
 #ifdef CONFIG_SATA
 	/* Only mx6q wandboard has SATA */
 	if (is_cpu_type(MXC_CPU_MX6Q))
@@ -448,6 +445,8 @@ int board_init(void)
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c2_pad_info);
 	else
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info);
+
+	setup_display();
 #endif
 
 	return 0;
Signature · 1 line
2.7.4
#4 lore raw

PATCH 3/6 wandboard: Avoid calling setup_display() from SPL code

Quoted 27 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/wandboard/wandboard.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
board/wandboard/wandboard.c +0 -3
index adfcf48..dde4988 100644
@@ -376,9 +376,6 @@ int board_eth_init(bd_t *bis)
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
-#if defined(CONFIG_VIDEO_IPUV3)
-	setup_display();
-#endif
 #ifdef CONFIG_SATA
 	/* Only mx6q wandboard has SATA */
 	if (is_cpu_type(MXC_CPU_MX6Q))

board/wandboard/wandboard.c int board_init(void) · line 452

Quoted 8 lines
board/wandboard/wandboard.c +2 -0
@@ -448,6 +445,8 @@ int board_init(void)
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c2_pad_info);
 	else
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info);
+
+	setup_display();
 #endif
 
 	return 0;

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
=====================================================================
author reviewer
#5 lore raw

PATCH 4/6 mx6cuboxi: Avoid calling setup_display() from SPL code

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/solidrun/mx6cuboxi/mx6cuboxi.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
board/solidrun/mx6cuboxi/mx6cuboxi.c +8 -7
index 1e4da4a..ee9e4f7 100644
@@ -308,13 +308,8 @@ int board_ehci_hcd_init(int port)
 
 int board_early_init_f(void)
 {
-	int ret = 0;
 	setup_iomux_uart();
 
-#ifdef CONFIG_VIDEO_IPUV3
-	ret = setup_display();
-#endif
-
 #ifdef CONFIG_CMD_SATA
 	setup_sata();
 #endif
@@ -322,15 +317,21 @@ int board_early_init_f(void)
 #ifdef CONFIG_USB_EHCI_MX6
 	setup_usb();
 #endif
-	return ret;
+	return 0;
 }
 
 int board_init(void)
 {
+	int ret = 0;
+
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-	return 0;
+#ifdef CONFIG_VIDEO_IPUV3
+	ret = setup_display();
+#endif
+
+	return ret;
 }
 
 static bool is_hummingboard(void)
Signature · 1 line
2.7.4
#6 lore raw

PATCH 4/6 mx6cuboxi: Avoid calling setup_display() from SPL code

Quoted 44 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/solidrun/mx6cuboxi/mx6cuboxi.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
board/solidrun/mx6cuboxi/mx6cuboxi.c +3 -6
index 1e4da4a..ee9e4f7 100644
@@ -308,13 +308,8 @@ int board_ehci_hcd_init(int port)
 
 int board_early_init_f(void)
 {
-	int ret = 0;
 	setup_iomux_uart();
 
-#ifdef CONFIG_VIDEO_IPUV3
-	ret = setup_display();
-#endif
-
 #ifdef CONFIG_CMD_SATA
 	setup_sata();
 #endif
@@ -322,15 +317,21 @@ int board_early_init_f(void)
 #ifdef CONFIG_USB_EHCI_MX6
 	setup_usb();
 #endif
-	return ret;
+	return 0;
 }
 
 int board_init(void)
 {
+	int ret = 0;
+
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;

board/solidrun/mx6cuboxi/mx6cuboxi.c int board_early_init_f(void) · line 337

Quoted 10 lines
board/solidrun/mx6cuboxi/mx6cuboxi.c +5 -1
 
-	return 0;
+#ifdef CONFIG_VIDEO_IPUV3
+	ret = setup_display();
+#endif
+
+	return ret;
 }
 
 static bool is_hummingboard(void)

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
=====================================================================
author reviewer
#7 lore raw

PATCH 5/6 apalis_imx6: Avoid calling setup_display() from SPL code

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/toradex/apalis_imx6/apalis_imx6.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
board/toradex/apalis_imx6/apalis_imx6.c +4 -4
index 628a61d..b86dde8 100644
@@ -756,10 +756,6 @@ int board_early_init_f(void)
 #else
 	setup_iomux_dce_uart();
 #endif
-
-#if defined(CONFIG_VIDEO_IPUV3)
-	setup_display();
-#endif
 	return 0;
 }
 
@@ -781,6 +777,10 @@ int board_init(void)
 	setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc);
 	setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3);
 
+#if defined(CONFIG_VIDEO_IPUV3)
+	setup_display();
+#endif
+
 #ifdef CONFIG_TDX_CMD_IMX_MFGR
 	(void) pmic_init();
 #endif
Signature · 1 line
2.7.4
#8 lore raw

PATCH 5/6 apalis_imx6: Avoid calling setup_display() from SPL code

Hi Fabio,

Quoted 28 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/toradex/apalis_imx6/apalis_imx6.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
board/toradex/apalis_imx6/apalis_imx6.c +0 -4
index 628a61d..b86dde8 100644
@@ -756,10 +756,6 @@ int board_early_init_f(void)
 #else
 	setup_iomux_dce_uart();
 #endif
-
-#if defined(CONFIG_VIDEO_IPUV3)
-	setup_display();
-#endif
 	return 0;
 }
 

board/toradex/apalis_imx6/apalis_imx6.c int board_init(void) · line 786

Quoted 10 lines
board/toradex/apalis_imx6/apalis_imx6.c +4 -0
@@ -781,6 +777,10 @@ int board_init(void)
 	setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc);
 	setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3);
 
+#if defined(CONFIG_VIDEO_IPUV3)
+	setup_display();
+#endif
+
 #ifdef CONFIG_TDX_CMD_IMX_MFGR
 	(void) pmic_init();
 #endif

Max has already fixed apalis / colibri, see for example
http://patchwork.ozlabs.org/patch/817053/. I will apply Max's patches and drop 5/6 from your series. Anyway, thanks for having thought to these two boards, too.

Regards,
Stefano

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
=====================================================================
author reviewer
#9 lore raw

PATCH 5/6 apalis_imx6: Avoid calling setup_display() from SPL code

Hi Stefano,

Quoted 4 lines · Stefano Babic

Max has already fixed apalis / colibri, see for example
http://patchwork.ozlabs.org/patch/817053/. I will apply Max's patches and drop 5/6 from your series. Anyway, thanks for having thought to these two boards, too.

Yes, I saw Max's patches too. When I tried the same approach on cgtqmx6eval I got build failures:

board/congatec/cgtqmx6eval/built-in.o: In function `setup_display':
/home/fabio/u-boot-imx/board/congatec/cgtqmx6eval/cgtqmx6eval.c:632:
undefined reference to `enable_ipu_clock' /home/fabio/u-boot-imx/board/congatec/cgtqmx6eval/cgtqmx6eval.c:633:
undefined reference to `imx_setup_hdmi'

It is true that Max's patches fix the warnings for Toradex boards, but if in future someone rework the IPU code like it is done in cgtqmx6eval, then failure would happen.

So I thought that a more robust solution was to simply prevent making explicit calls to setup_display() from SPL like I did here.

This also has the benefit to have the same solution across several mx6 boards.

I am OK with Max's patches, but just wanted to provide a rationale for my proposal.

Thanks,

Fabio Estevam

author reviewer
#10 lore raw

PATCH 5/6 apalis_imx6: Avoid calling setup_display() from SPL code

Quoted 18 lines · Fabio Estevam

Hi Stefano,

Quoted 4 lines · Stefano Babic

Max has already fixed apalis / colibri, see for example
http://patchwork.ozlabs.org/patch/817053/. I will apply Max's patches and drop 5/6 from your series. Anyway, thanks for having thought to these two boards, too.

Yes, I saw Max's patches too. When I tried the same approach on cgtqmx6eval I got build failures:

board/congatec/cgtqmx6eval/built-in.o: In function `setup_display':
/home/fabio/u-boot-imx/board/congatec/cgtqmx6eval/cgtqmx6eval.c:632:
undefined reference to `enable_ipu_clock' /home/fabio/u-boot-imx/board/congatec/cgtqmx6eval/cgtqmx6eval.c:633:
undefined reference to `imx_setup_hdmi'

Quoted 8 lines

It is true that Max's patches fix the warnings for Toradex boards, but if in future someone rework the IPU code like it is done in cgtqmx6eval, then failure would happen.

So I thought that a more robust solution was to simply prevent making explicit calls to setup_display() from SPL like I did here.

This also has the benefit to have the same solution across several mx6 boards.

One more advantage of my proposal is that it does not rely on adding logic to include/configs/.

This is particularly important when someone moves the IPU related config symbols into Kconfig.

Regards,

Fabio Estevam

#11 lore raw

PATCH 5/6 apalis_imx6: Avoid calling setup_display() from SPL code

Hi Fabio,

Quoted 23 lines · Fabio Estevam
Quoted 22 lines · Fabio Estevam

Hi Stefano,

Quoted 4 lines · Stefano Babic

Max has already fixed apalis / colibri, see for example
http://patchwork.ozlabs.org/patch/817053/. I will apply Max's patches and drop 5/6 from your series. Anyway, thanks for having thought to these two boards, too.

Yes, I saw Max's patches too. When I tried the same approach on cgtqmx6eval I got build failures:

board/congatec/cgtqmx6eval/built-in.o: In function `setup_display':
/home/fabio/u-boot-imx/board/congatec/cgtqmx6eval/cgtqmx6eval.c:632:
undefined reference to `enable_ipu_clock' /home/fabio/u-boot-imx/board/congatec/cgtqmx6eval/cgtqmx6eval.c:633:
undefined reference to `imx_setup_hdmi'

It is true that Max's patches fix the warnings for Toradex boards, but if in future someone rework the IPU code like it is done in cgtqmx6eval, then failure would happen.

Quoted 7 lines
Quoted 4 lines

So I thought that a more robust solution was to simply prevent making explicit calls to setup_display() from SPL like I did here.

This also has the benefit to have the same solution across several mx6 boards.

One more advantage of my proposal is that it does not rely on adding logic to include/configs/.

You're right, I agree.

Quoted 4 lines

This is particularly important when someone moves the IPU related config symbols into Kconfig.

+1

Best regards,
Stefano

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
=====================================================================
#12 lore raw

PATCH 5/6 apalis_imx6: Avoid calling setup_display() from SPL code

In reply to Stefano Babic

Hi Stefano,

On Sat, 23 Sep 2017 10:43:55 +0200
Stefano Babic sbabic at denx.de wrote:
...

Quoted 4 lines

Max has already fixed apalis / colibri, see for example
http://patchwork.ozlabs.org/patch/817053/. I will apply Max's patches and drop 5/6 from your series. Anyway, thanks for having thought to these two boards, too.

I would prefer patch from Fabio, so I applied all them to a build test branch and building with [1] passed now. There is a pull request for them.

Thanks,
Anatolij

[1] http://patchwork.ozlabs.org/patch/806755

#13 lore raw

PATCH 5/6 apalis_imx6: Avoid calling setup_display() from SPL code

Hi

I propose to drop my patches in favor of Fabio's solution.

Max

________________________________
Von: Anatolij Gustschin <[email protected]>
Gesendet: Samstag, 23. September 2017 21:06:57
An: Stefano Babic
Cc: Fabio Estevam; u-boot at lists.denx.de; Max Krummenacher; Fabio Estevam
Betreff: Re: [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code

Hi Stefano,

On Sat, 23 Sep 2017 10:43:55 +0200
Stefano Babic sbabic at denx.de wrote:
...

Quoted 4 lines

Max has already fixed apalis / colibri, see for example
http://patchwork.ozlabs.org/patch/817053/. I will apply Max's patches and drop 5/6 from your series. Anyway, thanks for having thought to these two boards, too.

I would prefer patch from Fabio, so I applied all them to a build test branch and building with [1] passed now. There is a pull request for them.

Thanks,
Anatolij

[1] http://patchwork.ozlabs.org/patch/806755

#14 lore raw

PATCH 5/6 apalis_imx6: Avoid calling setup_display() from SPL code

Quoted 6 lines · Max Krummenacher

Hi

I propose to drop my patches in favor of  Fabio's solution.

Agree, I will merge them.

Regards,
Stefano

Quoted 30 lines

Max

------------------------------------------------------------------------
*Von:* Anatolij Gustschin <[email protected]>
*Gesendet:* Samstag, 23. September 2017 21:06:57
*An:* Stefano Babic
*Cc:* Fabio Estevam; u-boot at lists.denx.de; Max Krummenacher; Fabio Estevam *Betreff:* Re: [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code

Hi Stefano,

On Sat, 23 Sep 2017 10:43:55 +0200
Stefano Babic sbabic at denx.de wrote:
...

Quoted 4 lines

Max has already fixed apalis / colibri, see for example
http://patchwork.ozlabs.org/patch/817053/. I will apply Max's patches and drop 5/6 from your series. Anyway, thanks for having thought to these two boards, too.

I would prefer patch from Fabio, so I applied all them to a build test branch and building with [1] passed now. There is a pull request for them.

Thanks,
Anatolij

[1] http://patchwork.ozlabs.org/patch/806755

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
=====================================================================
author reviewer
#15 lore raw

PATCH 6/6 colibri_imx6: Avoid calling setup_display() from SPL code

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/toradex/colibri_imx6/colibri_imx6.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
board/toradex/colibri_imx6/colibri_imx6.c +4 -3
index 756e3f3..a2a4214 100644
@@ -630,9 +630,6 @@ int board_early_init_f(void)
 					 ARRAY_SIZE(pwr_intb_pads));
 	setup_iomux_uart();
 
-#if defined(CONFIG_VIDEO_IPUV3)
-	setup_display();
-#endif
 	return 0;
 }
 
@@ -653,6 +650,10 @@ int board_init(void)
 	setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
 	setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc);
 
+#if defined(CONFIG_VIDEO_IPUV3)
+	setup_display();
+#endif
+
 #ifdef CONFIG_TDX_CMD_IMX_MFGR
 	(void) pmic_init();
 #endif
Signature · 1 line
2.7.4
#16 lore raw

PATCH 6/6 colibri_imx6: Avoid calling setup_display() from SPL code

Hi

I tested this together with Anatolij's patch [1] on a Colibri iMX6. Both with the SPL and non SPL config the behaviour of the graphical output is as expected.

Thanks Fabio.

Max

[1] http://patchwork.ozlabs.org/patch/806755

________________________________
Von: Fabio Estevam <[email protected]>
Gesendet: Samstag, 23. September 2017 04:45:33
An: sbabic at denx.de
Cc: u-boot at lists.denx.de; agust at denx.de; Max Krummenacher; Fabio Estevam
Betreff: [PATCH 6/6] colibri_imx6: Avoid calling setup_display() from SPL code

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/toradex/colibri_imx6/colibri_imx6.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
board/toradex/colibri_imx6/colibri_imx6.c +4 -3
index 756e3f3..a2a4214 100644
@@ -630,9 +630,6 @@ int board_early_init_f(void)
                                          ARRAY_SIZE(pwr_intb_pads));
         setup_iomux_uart();
 
-#if defined(CONFIG_VIDEO_IPUV3)
-       setup_display();
-#endif
         return 0;
 }
 
@@ -653,6 +650,10 @@ int board_init(void)
         setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
         setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc);
 
+#if defined(CONFIG_VIDEO_IPUV3)
+       setup_display();
+#endif
+
 #ifdef CONFIG_TDX_CMD_IMX_MFGR
         (void) pmic_init();
 #endif

--
2.7.4

#17 lore raw

PATCH 1/6 mx6sabresd: Avoid calling setup_display() from SPL code

In reply to Fabio Estevam
Quoted 27 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper.

---
 board/freescale/mx6sabresd/mx6sabresd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
board/freescale/mx6sabresd/mx6sabresd.c +0 -3
index 5b50bc8..f14b759 100644
@@ -620,9 +620,6 @@ int board_ehci_power(int port, int on)
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
-#if defined(CONFIG_VIDEO_IPUV3)
-	setup_display();
-#endif
 
 	return 0;
 }

board/freescale/mx6sabresd/mx6sabresd.c int board_init(void) · line 644

Quoted 9 lines
board/freescale/mx6sabresd/mx6sabresd.c +3 -0
@@ -639,6 +636,9 @@ int board_init(void)
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1);
 	else
 		setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
+#if defined(CONFIG_VIDEO_IPUV3)
+	setup_display();
+#endif
 #ifdef CONFIG_USB_EHCI_MX6
 	setup_usb();
 #endif

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
=====================================================================