* [U-Boot] [PATCH 1/2] mx6slevk: Simplify the return value of setup_fec()
@ 2014-11-17 1:44 Fabio Estevam
2014-11-17 1:44 ` [U-Boot] [PATCH 2/2] mx6sxsabresd: " Fabio Estevam
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2014-11-17 1:44 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
We can simply the return the value from enable_fec_anatop_clock() to make the
code smaller and simpler.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx6slevk/mx6slevk.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index e76c343..8111edf 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -230,16 +230,11 @@ int board_eth_init(bd_t *bis)
static int setup_fec(void)
{
struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
- int ret;
/* clear gpr1[14], gpr1[18:17] to select anatop clock */
clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC_MASK, 0);
- ret = enable_fec_anatop_clock(ENET_50MHz);
- if (ret)
- return ret;
-
- return 0;
+ return enable_fec_anatop_clock(ENET_50MHz);
}
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH 2/2] mx6sxsabresd: Simplify the return value of setup_fec()
2014-11-17 1:44 [U-Boot] [PATCH 1/2] mx6slevk: Simplify the return value of setup_fec() Fabio Estevam
@ 2014-11-17 1:44 ` Fabio Estevam
0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2014-11-17 1:44 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
We can simply the return the value from enable_fec_anatop_clock() to make the
code smaller and simpler.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx6sxsabresd/mx6sxsabresd.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 68d3718..857a196 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -119,7 +119,6 @@ static int setup_fec(void)
{
struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
- int ret;
int reg;
/* Use 125MHz anatop loopback REF_CLK1 for ENET1 */
@@ -140,11 +139,7 @@ static int setup_fec(void)
reg |= BM_ANADIG_PLL_ENET_REF_25M_ENABLE;
writel(reg, &anatop->pll_enet);
- ret = enable_fec_anatop_clock(ENET_125MHz);
- if (ret)
- return ret;
-
- return 0;
+ return enable_fec_anatop_clock(ENET_125MHz);
}
int board_eth_init(bd_t *bis)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-17 1:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 1:44 [U-Boot] [PATCH 1/2] mx6slevk: Simplify the return value of setup_fec() Fabio Estevam
2014-11-17 1:44 ` [U-Boot] [PATCH 2/2] mx6sxsabresd: " Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox