From mboxrd@z Thu Jan 1 00:00:00 1970 From: Beniamino Galvani Date: Sun, 10 Apr 2016 17:35:17 +0200 Subject: [U-Boot] [PATCH v2 9/9] board: odroid-c2: add Ethernet support In-Reply-To: References: <1459667897-2824-1-git-send-email-b.galvani@gmail.com> <1459667897-2824-10-git-send-email-b.galvani@gmail.com> Message-ID: <20160410153434.GA16480@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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