From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 28 Jul 2015 21:26:36 +0200 Subject: [U-Boot] [PATCH 011/172] arm: socfpga: reset: Replace ad-hoc reset functions In-Reply-To: <55B7D432.7060609@opensource.altera.com> References: <1438030335-10631-1-git-send-email-marex@denx.de> <1438030335-10631-12-git-send-email-marex@denx.de> <55B7D432.7060609@opensource.altera.com> Message-ID: <201507282126.36187.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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