public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails
@ 2013-09-20 19:30 Fabio Estevam
  2013-09-20 19:30 ` [U-Boot] [PATCH 2/3] " Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Fabio Estevam @ 2013-09-20 19:30 UTC (permalink / raw)
  To: u-boot

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

If cpu_eth_init() fails we should return the error immediately.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx28evk/mx28evk.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index 3abf1fd..5005fe2 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -103,6 +103,8 @@ int board_eth_init(bd_t *bis)
 	int ret;
 
 	ret = cpu_eth_init(bis);
+	if (ret)
+		return ret;
 
 	/* MX28EVK uses ENET_CLK PAD to drive FEC clock */
 	writel(CLKCTRL_ENET_TIME_SEL_RMII_CLK | CLKCTRL_ENET_CLK_OUT_EN,
-- 
1.8.1.2

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

* [U-Boot] [PATCH 2/3] mx28evk: Propagate the error if cpu_eth_init() fails
  2013-09-20 19:30 [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails Fabio Estevam
@ 2013-09-20 19:30 ` Fabio Estevam
  2013-09-22 23:59   ` Marek Vasut
  2013-09-27 12:04   ` Stefano Babic
  2013-09-20 19:30 ` [U-Boot] [PATCH 3/3] mx35pdk: Fix error handling in board_late_init() Fabio Estevam
  2013-09-27 12:04 ` [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails Stefano Babic
  2 siblings, 2 replies; 8+ messages in thread
From: Fabio Estevam @ 2013-09-20 19:30 UTC (permalink / raw)
  To: u-boot

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

If cpu_eth_init() fails we should return the error immediately.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/denx/m28evk/m28evk.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c
index f4453d6..33d38cf 100644
--- a/board/denx/m28evk/m28evk.c
+++ b/board/denx/m28evk/m28evk.c
@@ -116,6 +116,8 @@ int board_eth_init(bd_t *bis)
 	int ret;
 
 	ret = cpu_eth_init(bis);
+	if (ret)
+		return ret;
 
 	clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet,
 		CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN,
-- 
1.8.1.2

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

* [U-Boot] [PATCH 3/3] mx35pdk: Fix error handling in board_late_init()
  2013-09-20 19:30 [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails Fabio Estevam
  2013-09-20 19:30 ` [U-Boot] [PATCH 2/3] " Fabio Estevam
@ 2013-09-20 19:30 ` Fabio Estevam
  2013-09-23  8:35   ` Stefano Babic
  2013-09-27 12:04   ` Stefano Babic
  2013-09-27 12:04 ` [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails Stefano Babic
  2 siblings, 2 replies; 8+ messages in thread
From: Fabio Estevam @ 2013-09-20 19:30 UTC (permalink / raw)
  To: u-boot

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

If smc911x_initialize() fails we should return the error immediately.

While at it, also check the error from cpu_eth_init().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx35pdk/mx35pdk.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index 427c83a..9fabef5 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -251,14 +251,12 @@ int board_late_init(void)
 
 int board_eth_init(bd_t *bis)
 {
-	int rc = -ENODEV;
 #if defined(CONFIG_SMC911X)
-	rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+	int rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+	if (rc)
+		return rc;
 #endif
-
-	cpu_eth_init(bis);
-
-	return rc;
+	return cpu_eth_init(bis);
 }
 
 #if defined(CONFIG_FSL_ESDHC)
-- 
1.8.1.2

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

* [U-Boot] [PATCH 2/3] mx28evk: Propagate the error if cpu_eth_init() fails
  2013-09-20 19:30 ` [U-Boot] [PATCH 2/3] " Fabio Estevam
@ 2013-09-22 23:59   ` Marek Vasut
  2013-09-27 12:04   ` Stefano Babic
  1 sibling, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2013-09-22 23:59 UTC (permalink / raw)
  To: u-boot

Dear Fabio Estevam,

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> If cpu_eth_init() fails we should return the error immediately.
> 
> Cc: Marek Vasut <marex@denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Marek Vasut <marex@denx.de>

> ---
>  board/denx/m28evk/m28evk.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c
> index f4453d6..33d38cf 100644
> --- a/board/denx/m28evk/m28evk.c
> +++ b/board/denx/m28evk/m28evk.c
> @@ -116,6 +116,8 @@ int board_eth_init(bd_t *bis)
>  	int ret;
> 
>  	ret = cpu_eth_init(bis);
> +	if (ret)
> +		return ret;
> 
>  	clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet,
>  		CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN,

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 3/3] mx35pdk: Fix error handling in board_late_init()
  2013-09-20 19:30 ` [U-Boot] [PATCH 3/3] mx35pdk: Fix error handling in board_late_init() Fabio Estevam
@ 2013-09-23  8:35   ` Stefano Babic
  2013-09-27 12:04   ` Stefano Babic
  1 sibling, 0 replies; 8+ messages in thread
From: Stefano Babic @ 2013-09-23  8:35 UTC (permalink / raw)
  To: u-boot

On 20/09/2013 21:30, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> If smc911x_initialize() fails we should return the error immediately.
> 
> While at it, also check the error from cpu_eth_init().
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  board/freescale/mx35pdk/mx35pdk.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
> index 427c83a..9fabef5 100644
> --- a/board/freescale/mx35pdk/mx35pdk.c
> +++ b/board/freescale/mx35pdk/mx35pdk.c
> @@ -251,14 +251,12 @@ int board_late_init(void)
>  
>  int board_eth_init(bd_t *bis)
>  {
> -	int rc = -ENODEV;
>  #if defined(CONFIG_SMC911X)
> -	rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
> +	int rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
> +	if (rc)
> +		return rc;
>  #endif
> -
> -	cpu_eth_init(bis);
> -
> -	return rc;
> +	return cpu_eth_init(bis);
>  }
>  
>  #if defined(CONFIG_FSL_ESDHC)
> 

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

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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] 8+ messages in thread

* [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails
  2013-09-20 19:30 [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails Fabio Estevam
  2013-09-20 19:30 ` [U-Boot] [PATCH 2/3] " Fabio Estevam
  2013-09-20 19:30 ` [U-Boot] [PATCH 3/3] mx35pdk: Fix error handling in board_late_init() Fabio Estevam
@ 2013-09-27 12:04 ` Stefano Babic
  2 siblings, 0 replies; 8+ messages in thread
From: Stefano Babic @ 2013-09-27 12:04 UTC (permalink / raw)
  To: u-boot

On 20/09/2013 21:30, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> If cpu_eth_init() fails we should return the error immediately.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx (fix), thanks!

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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] 8+ messages in thread

* [U-Boot] [PATCH 2/3] mx28evk: Propagate the error if cpu_eth_init() fails
  2013-09-20 19:30 ` [U-Boot] [PATCH 2/3] " Fabio Estevam
  2013-09-22 23:59   ` Marek Vasut
@ 2013-09-27 12:04   ` Stefano Babic
  1 sibling, 0 replies; 8+ messages in thread
From: Stefano Babic @ 2013-09-27 12:04 UTC (permalink / raw)
  To: u-boot

On 20/09/2013 21:30, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> If cpu_eth_init() fails we should return the error immediately.
> 
> Cc: Marek Vasut <marex@denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx (fix), thanks!

Best regards,
Stefano Babic



-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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] 8+ messages in thread

* [U-Boot] [PATCH 3/3] mx35pdk: Fix error handling in board_late_init()
  2013-09-20 19:30 ` [U-Boot] [PATCH 3/3] mx35pdk: Fix error handling in board_late_init() Fabio Estevam
  2013-09-23  8:35   ` Stefano Babic
@ 2013-09-27 12:04   ` Stefano Babic
  1 sibling, 0 replies; 8+ messages in thread
From: Stefano Babic @ 2013-09-27 12:04 UTC (permalink / raw)
  To: u-boot

On 20/09/2013 21:30, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> If smc911x_initialize() fails we should return the error immediately.
> 
> While at it, also check the error from cpu_eth_init().
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx (fix), thanks!

Best regards,
Stefano Babic



-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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] 8+ messages in thread

end of thread, other threads:[~2013-09-27 12:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-20 19:30 [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails Fabio Estevam
2013-09-20 19:30 ` [U-Boot] [PATCH 2/3] " Fabio Estevam
2013-09-22 23:59   ` Marek Vasut
2013-09-27 12:04   ` Stefano Babic
2013-09-20 19:30 ` [U-Boot] [PATCH 3/3] mx35pdk: Fix error handling in board_late_init() Fabio Estevam
2013-09-23  8:35   ` Stefano Babic
2013-09-27 12:04   ` Stefano Babic
2013-09-27 12:04 ` [U-Boot] [PATCH 1/3] mx28evk: Propagate the error if cpu_eth_init() fails Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox