mx28evk: Propagate the error if cpu_eth_init() fails
PATCH 1/3 mx28evk: Propagate the error if cpu_eth_init() fails
From: Fabio Estevam <[email protected]>
If cpu_eth_init() fails we should return the error immediately.
--- board/freescale/mx28evk/mx28evk.c | 2 ++ 1 file changed, 2 insertions(+)
board/freescale/mx28evk/mx28evk.c +2 -0
@@ -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,
Signature · 1 line
1.8.1.2
PATCH 2/3 mx28evk: Propagate the error if cpu_eth_init() fails
From: Fabio Estevam <[email protected]>
If cpu_eth_init() fails we should return the error immediately.
--- board/denx/m28evk/m28evk.c | 2 ++ 1 file changed, 2 insertions(+)
board/denx/m28evk/m28evk.c +2 -0
@@ -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,
Signature · 1 line
1.8.1.2
PATCH 2/3 mx28evk: Propagate the error if cpu_eth_init() fails
Dear Fabio Estevam,
Quoted 6 lines
From: Fabio Estevam <[email protected]>
If
cpu_eth_init()fails we should return the error immediately.Cc Marek Vasut <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Quoted 9 lines
--- board/denx/m28evk/m28evk.c | 2 ++ 1 file changed, 2 insertions(+)board/denx/m28evk/m28evk.c +0
-0
board/denx/m28evk/m28evk.c int board_eth_init(bd_t *bis) · line 123
Quoted 8 lines
board/denx/m28evk/m28evk.c +2
-0@@ -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
PATCH 2/3 mx28evk: Propagate the error if cpu_eth_init() fails
In reply to Fabio EstevamQuoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
If
cpu_eth_init()fails we should return the error immediately.Cc Marek Vasut <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx (fix), thanks!
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 3/3 mx35pdk: Fix error handling in board_late_init()
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
If smc911x_initialize() fails we should return the error immediately.
While at it, also check the error from cpu_eth_init().
--- board/freescale/mx35pdk/mx35pdk.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
board/freescale/mx35pdk/mx35pdk.c +4 -6
@@ -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 )
Signature · 1 line
1.8.1.2
PATCH 3/3 mx35pdk: Fix error handling in board_late_init()
Quoted 25 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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 <[email protected]>--- board/freescale/mx35pdk/mx35pdk.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)board/freescale/mx35pdk/mx35pdk.c +2
-2@@ -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)
board/freescale/mx35pdk/mx35pdk.c int board_late_init(void) · line 262
Quoted 10 lines
board/freescale/mx35pdk/mx35pdk.c +2
-4+return rc;#endif - -cpu_eth_init (bis); - -return rc; +return cpu_eth_init (bis); }#if defined(CONFIG_FSL_ESDHC )
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 3/3 mx35pdk: Fix error handling in board_late_init()
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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 <[email protected]>---
Applied to u-boot-imx (fix), thanks!
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/3 mx28evk: Propagate the error if cpu_eth_init() fails
In reply to Fabio EstevamQuoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
If
cpu_eth_init()fails we should return the error immediately.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx (fix), thanks!
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================