[U-Boot] [PATCH 011/172] arm: socfpga: reset: Replace ad-hoc reset functions

Marek Vasut
2015-07-28T19:26:36Z

On Tuesday, July 28, 2015 at 09:12:50 PM, Dinh Nguyen wrote:

Hi!

> > @@ -66,7 +68,8 @@ int cpu_eth_init(bd_t *bis)
> >
> > * Putting the EMAC controller to reset when configuring the PHY
> > * interface select at System Manager
> > */
> >
> > - socfpga_emac_reset(1);
> > + socfpga_per_reset(SOCFPGA_RESET(EMAC0), 1);
> > + socfpga_per_reset(SOCFPGA_RESET(EMAC1), 1);
>
> Couldn't you just use the 'reset' variable here?

Actually, the answer is no. The logic here is such, that you put both GMAC into
reset state, but release from reset only the GMAC which is useful to you. The
rest remains in reset indefinitelly, so it doesn't consume power etc.

Best regards,
Marek Vasut