[U-Boot] [PATCH v2 9/9] board: odroid-c2: add Ethernet support

Beniamino Galvani b.galvani at gmail.com
Sun Apr 10 17:35:17 CEST 2016


On Sun, Apr 03, 2016 at 07:20:10PM -0500, Joe Hershberger wrote:
> > +#ifdef CONFIG_MISC_INIT_R
> > +int misc_init_r(void)
> > +{
> > +       /* Select Ethernet function */
> > +       setbits_le32(GXBB_PINMUX_6, 0x3fff);
> > +
> > +       /* Set RGMII mode */
> > +       setbits_le32(GXBB_ETH_REG_0, 0x1621);
> 
> It would be good to have constants for all these magic numbers.
> 
> > +
> > +       /* Enable clocks */
> > +       setbits_le32(GXBB_GCLK_MPEG_1, 1 << 3);
> 
> Use the BIT() macro for this type of thing. Probably use the BIT()
> macro in another named macro for the meaning of the magic bit.

I updated known values with macros in v3 (but left 0x3fff as is
because its meaning is not documented). Thanks!

Beniamino


More information about the U-Boot mailing list