[U-Boot] [PATCH v2 1/5] ARM: arch-meson: add ethernet common init function
Beniamino Galvani
b.galvani at gmail.com
Sun Nov 26 10:14:59 UTC 2017
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
More information about the U-Boot
mailing list