Re: [U-Boot] [PATCH v2 05/11] imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
Hi Peng, > > Subject: [PATCH v2 05/11] imx: tpc70: cosmetic: Replace magic > > numbers when setting ENET clock > > > > This is a cosmetic change, just to use proper define instead of > > magic numbers. > > > > Signed-off-by: Lukasz Majewski > > --- > > > > board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c > > b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c > > index 7bdc64b1be..1dbd03efd8 100644 > > --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c > > +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c > > @@ -118,7 +118,8 @@ static int setup_fec_clock(void) > > struct iomuxc *iomuxc_regs = (struct iomuxc > > *)IOMUXC_BASE_ADDR; > > > > /* set gpr1[21] to select anatop clock */ > > - clrsetbits_le32(&iomuxc_regs->gpr[1], 0x1 << 21, 0x1 << > > 21); > > + clrsetbits_le32(&iomuxc_regs->gpr[1], > > IOMUXC_GPR1_ENET_CLK_SEL_MASK, > > + IOMUXC_GPR1_ENET_CLK_SEL_MASK); > > Would setbits_le32 work here? Good point. It shall be possible to use setbits_le32. I will try to use it. > > Regards, > Peng. > > > > > return enable_fec_anatop_clock(0, ENET_50MHZ); } > > -- > > 2.11.0 > Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de pgpVtGtz5WOwO.pgp Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 05/11] imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
> Subject: [PATCH v2 05/11] imx: tpc70: cosmetic: Replace magic numbers > when setting ENET clock > > This is a cosmetic change, just to use proper define instead of magic numbers. > > Signed-off-by: Lukasz Majewski > --- > > board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c > b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c > index 7bdc64b1be..1dbd03efd8 100644 > --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c > +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c > @@ -118,7 +118,8 @@ static int setup_fec_clock(void) > struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; > > /* set gpr1[21] to select anatop clock */ > - clrsetbits_le32(&iomuxc_regs->gpr[1], 0x1 << 21, 0x1 << 21); > + clrsetbits_le32(&iomuxc_regs->gpr[1], > IOMUXC_GPR1_ENET_CLK_SEL_MASK, > + IOMUXC_GPR1_ENET_CLK_SEL_MASK); Would setbits_le32 work here? Regards, Peng. > > return enable_fec_anatop_clock(0, ENET_50MHZ); } > -- > 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 05/11] imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
This is a cosmetic change, just to use proper define instead of magic numbers. Signed-off-by: Lukasz Majewski --- board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c index 7bdc64b1be..1dbd03efd8 100644 --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c @@ -118,7 +118,8 @@ static int setup_fec_clock(void) struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; /* set gpr1[21] to select anatop clock */ - clrsetbits_le32(&iomuxc_regs->gpr[1], 0x1 << 21, 0x1 << 21); + clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUXC_GPR1_ENET_CLK_SEL_MASK, + IOMUXC_GPR1_ENET_CLK_SEL_MASK); return enable_fec_anatop_clock(0, ENET_50MHZ); } -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot