All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code
@ 2017-09-23  2:45 Fabio Estevam
  2017-09-23  2:45 ` [U-Boot] [PATCH 2/6] cgtqmx6eval: " Fabio Estevam
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Fabio Estevam @ 2017-09-23  2:45 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@nxp.com>

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

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 board/freescale/mx6sabresd/mx6sabresd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 5b50bc8..f14b759 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 2/6] cgtqmx6eval: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code Fabio Estevam
@ 2017-09-23  2:45 ` Fabio Estevam
  2017-09-23  8:07   ` Stefano Babic
  2017-09-23  2:45 ` [U-Boot] [PATCH 3/6] wandboard: " Fabio Estevam
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2017-09-23  2:45 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@nxp.com>

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

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 board/congatec/cgtqmx6eval/cgtqmx6eval.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
index 2ed66d3..d42cc94 100644
--- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c
+++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
@@ -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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 3/6] wandboard: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code Fabio Estevam
  2017-09-23  2:45 ` [U-Boot] [PATCH 2/6] cgtqmx6eval: " Fabio Estevam
@ 2017-09-23  2:45 ` Fabio Estevam
  2017-09-23  8:07   ` Stefano Babic
  2017-09-23  2:45 ` [U-Boot] [PATCH 4/6] mx6cuboxi: " Fabio Estevam
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2017-09-23  2:45 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@nxp.com>

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

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 board/wandboard/wandboard.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index adfcf48..dde4988 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 4/6] mx6cuboxi: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code Fabio Estevam
  2017-09-23  2:45 ` [U-Boot] [PATCH 2/6] cgtqmx6eval: " Fabio Estevam
  2017-09-23  2:45 ` [U-Boot] [PATCH 3/6] wandboard: " Fabio Estevam
@ 2017-09-23  2:45 ` Fabio Estevam
  2017-09-23  8:07   ` Stefano Babic
  2017-09-23  2:45 ` [U-Boot] [PATCH 5/6] apalis_imx6: " Fabio Estevam
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2017-09-23  2:45 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@nxp.com>

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

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 board/solidrun/mx6cuboxi/mx6cuboxi.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 1e4da4a..ee9e4f7 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code Fabio Estevam
                   ` (2 preceding siblings ...)
  2017-09-23  2:45 ` [U-Boot] [PATCH 4/6] mx6cuboxi: " Fabio Estevam
@ 2017-09-23  2:45 ` Fabio Estevam
  2017-09-23  8:43   ` Stefano Babic
  2017-09-23  2:45 ` [U-Boot] [PATCH 6/6] colibri_imx6: " Fabio Estevam
  2017-09-23  8:06 ` [U-Boot] [PATCH 1/6] mx6sabresd: " Stefano Babic
  5 siblings, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2017-09-23  2:45 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@nxp.com>

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

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 board/toradex/apalis_imx6/apalis_imx6.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 628a61d..b86dde8 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 6/6] colibri_imx6: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code Fabio Estevam
                   ` (3 preceding siblings ...)
  2017-09-23  2:45 ` [U-Boot] [PATCH 5/6] apalis_imx6: " Fabio Estevam
@ 2017-09-23  2:45 ` Fabio Estevam
  2017-09-24 11:31   ` Max Krummenacher
  2017-09-23  8:06 ` [U-Boot] [PATCH 1/6] mx6sabresd: " Stefano Babic
  5 siblings, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2017-09-23  2:45 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@nxp.com>

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

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 board/toradex/colibri_imx6/colibri_imx6.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index 756e3f3..a2a4214 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code Fabio Estevam
                   ` (4 preceding siblings ...)
  2017-09-23  2:45 ` [U-Boot] [PATCH 6/6] colibri_imx6: " Fabio Estevam
@ 2017-09-23  8:06 ` Stefano Babic
  5 siblings, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2017-09-23  8:06 UTC (permalink / raw)
  To: u-boot



On 23/09/2017 04:45, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> There is no need call setup_display() from SPL code, so move it to
> board_init(), which executes only in U-Boot proper.
> 
> Reported-by: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  board/freescale/mx6sabresd/mx6sabresd.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
> index 5b50bc8..f14b759 100644
> --- a/board/freescale/mx6sabresd/mx6sabresd.c
> +++ b/board/freescale/mx6sabresd/mx6sabresd.c
> @@ -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
> 


Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 2/6] cgtqmx6eval: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 ` [U-Boot] [PATCH 2/6] cgtqmx6eval: " Fabio Estevam
@ 2017-09-23  8:07   ` Stefano Babic
  0 siblings, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2017-09-23  8:07 UTC (permalink / raw)
  To: u-boot



On 23/09/2017 04:45, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> There is no need call setup_display() from SPL code, so move it to
> board_init(), which executes only in U-Boot proper.
> 
> Reported-by: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  board/congatec/cgtqmx6eval/cgtqmx6eval.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
> index 2ed66d3..d42cc94 100644
> --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c
> +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
> @@ -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
> 

Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 3/6] wandboard: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 ` [U-Boot] [PATCH 3/6] wandboard: " Fabio Estevam
@ 2017-09-23  8:07   ` Stefano Babic
  0 siblings, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2017-09-23  8:07 UTC (permalink / raw)
  To: u-boot



On 23/09/2017 04:45, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> There is no need call setup_display() from SPL code, so move it to
> board_init(), which executes only in U-Boot proper.
> 
> Reported-by: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  board/wandboard/wandboard.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
> index adfcf48..dde4988 100644
> --- a/board/wandboard/wandboard.c
> +++ b/board/wandboard/wandboard.c
> @@ -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;
> 

Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 4/6] mx6cuboxi: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 ` [U-Boot] [PATCH 4/6] mx6cuboxi: " Fabio Estevam
@ 2017-09-23  8:07   ` Stefano Babic
  0 siblings, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2017-09-23  8:07 UTC (permalink / raw)
  To: u-boot



On 23/09/2017 04:45, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> There is no need call setup_display() from SPL code, so move it to
> board_init(), which executes only in U-Boot proper.
> 
> Reported-by: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  board/solidrun/mx6cuboxi/mx6cuboxi.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
> index 1e4da4a..ee9e4f7 100644
> --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
> +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
> @@ -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)
> 

Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 ` [U-Boot] [PATCH 5/6] apalis_imx6: " Fabio Estevam
@ 2017-09-23  8:43   ` Stefano Babic
  2017-09-23 13:01     ` Fabio Estevam
  2017-09-23 19:06     ` Anatolij Gustschin
  0 siblings, 2 replies; 18+ messages in thread
From: Stefano Babic @ 2017-09-23  8:43 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

On 23/09/2017 04:45, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> There is no need call setup_display() from SPL code, so move it to
> board_init(), which executes only in U-Boot proper.
> 
> Reported-by: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  board/toradex/apalis_imx6/apalis_imx6.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
> index 628a61d..b86dde8 100644
> --- a/board/toradex/apalis_imx6/apalis_imx6.c
> +++ b/board/toradex/apalis_imx6/apalis_imx6.c
> @@ -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
> 

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

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
  2017-09-23  8:43   ` Stefano Babic
@ 2017-09-23 13:01     ` Fabio Estevam
  2017-09-23 15:11       ` Fabio Estevam
  2017-09-23 19:06     ` Anatolij Gustschin
  1 sibling, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2017-09-23 13:01 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On Sat, Sep 23, 2017 at 5:43 AM, Stefano Babic <sbabic@denx.de> wrote:

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
  2017-09-23 13:01     ` Fabio Estevam
@ 2017-09-23 15:11       ` Fabio Estevam
  2017-09-25 13:46         ` Stefano Babic
  0 siblings, 1 reply; 18+ messages in thread
From: Fabio Estevam @ 2017-09-23 15:11 UTC (permalink / raw)
  To: u-boot

On Sat, Sep 23, 2017 at 10:01 AM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Stefano,
>
> On Sat, Sep 23, 2017 at 5:43 AM, Stefano Babic <sbabic@denx.de> wrote:
>
>> 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.

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
  2017-09-23  8:43   ` Stefano Babic
  2017-09-23 13:01     ` Fabio Estevam
@ 2017-09-23 19:06     ` Anatolij Gustschin
  2017-09-24 11:27       ` Max Krummenacher
  1 sibling, 1 reply; 18+ messages in thread
From: Anatolij Gustschin @ 2017-09-23 19:06 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On Sat, 23 Sep 2017 10:43:55 +0200
Stefano Babic sbabic at denx.de wrote:
... 
> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
  2017-09-23 19:06     ` Anatolij Gustschin
@ 2017-09-24 11:27       ` Max Krummenacher
  2017-09-25 13:47         ` Stefano Babic
  0 siblings, 1 reply; 18+ messages in thread
From: Max Krummenacher @ 2017-09-24 11:27 UTC (permalink / raw)
  To: u-boot

Hi


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


Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>


Max

________________________________
Von: Anatolij Gustschin <agust@denx.de>
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:
...
> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 6/6] colibri_imx6: Avoid calling setup_display() from SPL code
  2017-09-23  2:45 ` [U-Boot] [PATCH 6/6] colibri_imx6: " Fabio Estevam
@ 2017-09-24 11:31   ` Max Krummenacher
  0 siblings, 0 replies; 18+ messages in thread
From: Max Krummenacher @ 2017-09-24 11:31 UTC (permalink / raw)
  To: u-boot


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.


Tested-by: Max Krummenacher <max.krummenacher@toradex.com>


Thanks Fabio.


Max


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

________________________________
Von: Fabio Estevam <festevam@gmail.com>
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 <fabio.estevam@nxp.com>

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

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 board/toradex/colibri_imx6/colibri_imx6.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index 756e3f3..a2a4214 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
  2017-09-23 15:11       ` Fabio Estevam
@ 2017-09-25 13:46         ` Stefano Babic
  0 siblings, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2017-09-25 13:46 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

On 23/09/2017 17:11, Fabio Estevam wrote:
> On Sat, Sep 23, 2017 at 10:01 AM, Fabio Estevam <festevam@gmail.com> wrote:
>> Hi Stefano,
>>
>> On Sat, Sep 23, 2017 at 5:43 AM, Stefano Babic <sbabic@denx.de> wrote:
>>
>>> 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.
> 
> One more advantage of my proposal is that it does not rely on adding
> logic to include/configs/.

You're right, I agree.

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

+1

Best regards,
Stefano



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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
  2017-09-24 11:27       ` Max Krummenacher
@ 2017-09-25 13:47         ` Stefano Babic
  0 siblings, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2017-09-25 13:47 UTC (permalink / raw)
  To: u-boot

On 24/09/2017 13:27, Max Krummenacher wrote:
> Hi
> 
> 
> I propose to drop my patches in favor of  Fabio's solution.
> 
> 

Agree, I will merge them.

Regards,
Stefano

> Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
> 
> 
> Max
> 
> ------------------------------------------------------------------------
> *Von:* Anatolij Gustschin <agust@denx.de>
> *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:
> ...
>> 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


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-09-25 13:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-23  2:45 [U-Boot] [PATCH 1/6] mx6sabresd: Avoid calling setup_display() from SPL code Fabio Estevam
2017-09-23  2:45 ` [U-Boot] [PATCH 2/6] cgtqmx6eval: " Fabio Estevam
2017-09-23  8:07   ` Stefano Babic
2017-09-23  2:45 ` [U-Boot] [PATCH 3/6] wandboard: " Fabio Estevam
2017-09-23  8:07   ` Stefano Babic
2017-09-23  2:45 ` [U-Boot] [PATCH 4/6] mx6cuboxi: " Fabio Estevam
2017-09-23  8:07   ` Stefano Babic
2017-09-23  2:45 ` [U-Boot] [PATCH 5/6] apalis_imx6: " Fabio Estevam
2017-09-23  8:43   ` Stefano Babic
2017-09-23 13:01     ` Fabio Estevam
2017-09-23 15:11       ` Fabio Estevam
2017-09-25 13:46         ` Stefano Babic
2017-09-23 19:06     ` Anatolij Gustschin
2017-09-24 11:27       ` Max Krummenacher
2017-09-25 13:47         ` Stefano Babic
2017-09-23  2:45 ` [U-Boot] [PATCH 6/6] colibri_imx6: " Fabio Estevam
2017-09-24 11:31   ` Max Krummenacher
2017-09-23  8:06 ` [U-Boot] [PATCH 1/6] mx6sabresd: " Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.