
10 Apr
2016
10 Apr
'16
5:35 p.m.
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