On Sat, Nov 25, 2017 at 10:45:30AM +0100, Neil Armstrong wrote: > > > >> + if (use_internal_phy) { > >> + /* Use Internal PHY */ > >> + out_le32(GXBB_ETH_REG_2, 0x10110181); > >> + out_le32(GXBB_ETH_REG_3, 0xe40908ff); > >> + } > >> +#endif > >> + > >> + break; > >> + > >> + default: > >> + printf("Invalid Ethernet interface mode\n"); > >> + return; > >> + } > >> + > >> + /* Enable power and clock gate */ > >> + setbits_le32(GXBB_GCLK_MPEG_1, GXBB_GCLK_MPEG_1_ETH); > >> + clrbits_le32(GXBB_MEM_PD_REG_0, GXBB_MEM_PD_REG_0_ETH_MASK); > > > > Seems like this should be in a clock driver. > > It should, in next release ? Beniamino's I2C driver also used this, > but yes a proper clock driver becomes necessary here.
I have written a basic clock driver that allows to enable/disable gates and get their frequency. Do you think this is enough? I will submit it soon (hopefully later today). Beniamino _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot