From 1037dc0a2bccfd615be37e52d3322ac622d25b59 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sat, 4 Jan 2014 17:36:30 -0200 Subject: mx6qarm2: Remove unneeded error message when cpu_eth_init() fails There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it. Signed-off-by: Fabio Estevam --- board/freescale/mx6qarm2/mx6qarm2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c index e063407..6c51f3a 100644 --- a/board/freescale/mx6qarm2/mx6qarm2.c +++ b/board/freescale/mx6qarm2/mx6qarm2.c @@ -186,13 +186,10 @@ int fecmxc_mii_postcall(int phy) int board_eth_init(bd_t *bis) { struct eth_device *dev; - int ret; + int ret = cpu_eth_init(bis); - ret = cpu_eth_init(bis); - if (ret) { - printf("FEC MXC: %s:failed\n", __func__); + if (ret) return ret; - } dev = eth_get_dev_by_name("FEC"); if (!dev) { -- cgit v1.1 From 579be2f76033a1202e92d2876aca18dbd1230221 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sat, 4 Jan 2014 17:36:31 -0200 Subject: mx6qsabreauto: Return from cpu_eth_init() directly There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it. In order to simplify the code, just return the value from cpu_eth_init(bis) directly. Signed-off-by: Fabio Estevam --- board/freescale/mx6qsabreauto/mx6qsabreauto.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c index fc75eae..928dadf 100644 --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c @@ -192,15 +192,9 @@ int board_phy_config(struct phy_device *phydev) int board_eth_init(bd_t *bis) { - int ret; - setup_iomux_enet(); - ret = cpu_eth_init(bis); - if (ret) - printf("FEC MXC: %s:failed\n", __func__); - - return ret; + return cpu_eth_init(bis); } #define BOARD_REV_B 0x200 -- cgit v1.1 From 92c707a5809095ddc4cff087b7e499779ece5d6b Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sat, 4 Jan 2014 17:36:32 -0200 Subject: mx6sabresd: Return from cpu_eth_init() directly There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it. In order to simplify the code, just return the value from cpu_eth_init(bis) directly. Signed-off-by: Fabio Estevam --- board/freescale/mx6sabresd/mx6sabresd.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 2ffc3b8..12d8c56 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -453,15 +453,9 @@ int overwrite_console(void) int board_eth_init(bd_t *bis) { - int ret; - setup_iomux_enet(); - ret = cpu_eth_init(bis); - if (ret) - printf("FEC MXC: %s:failed\n", __func__); - - return ret; + return cpu_eth_init(bis); } int board_early_init_f(void) -- cgit v1.1 From 12c20c0c9ba4c52fc512f7192c26c5b7d78f4cbe Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sat, 4 Jan 2014 17:36:33 -0200 Subject: mx6slevk: Return from cpu_eth_init() directly There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it. In order to simplify the code, just return the value from cpu_eth_init(bis) directly. Signed-off-by: Fabio Estevam --- board/freescale/mx6slevk/mx6slevk.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index 643fdac..dfc5746 100644 --- a/board/freescale/mx6slevk/mx6slevk.c +++ b/board/freescale/mx6slevk/mx6slevk.c @@ -106,17 +106,9 @@ int board_mmc_init(bd_t *bis) #ifdef CONFIG_FEC_MXC int board_eth_init(bd_t *bis) { - int ret; - setup_iomux_fec(); - ret = cpu_eth_init(bis); - if (ret) { - printf("FEC MXC: %s:failed\n", __func__); - return ret; - } - - return 0; + return cpu_eth_init(bis); } static int setup_fec(void) -- cgit v1.1