From: John Rigby Date: Mon, 18 Jan 2010 10:02:19 -0700 Subject: [U-Boot] [PATCH 6/9] fec_mxc: add support for MX51 processor In-Reply-To: <4B5451BA.9030605@denx.de> References: <1263212760-27272-1-git-send-email-sbabic@denx.de> <1263212760-27272-3-git-send-email-sbabic@denx.de> <1263212760-27272-4-git-send-email-sbabic@denx.de> <1263212760-27272-5-git-send-email-sbabic@denx.de> <1263212760-27272-6-git-send-email-sbabic@denx.de> <1263212760-27272-7-git-send-email-sbabic@denx.de> <20100117123400.9A006C88AE@gemini.denx.de> <4B542B4E.4000108@denx.de> <20100118112443.67B9D3F6C0@gemini.denx.de> <4B5451BA.9030605@denx.de> Message-ID: <4b73d43f1001180902g24ec8b62mfee39a8c3370d24d@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Stefano, There is a patch in my mx25 series that factors out a lot of SOC specifics from the fec driver including clocks. It might be useful here. John On Mon, Jan 18, 2010 at 5:19 AM, Stefano Babic wrote: > Wolfgang Denk wrote: >> Dear Stefano Babic, > > Hi Wolfgang, > >> >> I'm not sure. Here is where we enable the FEC because we want to use >> it in a network command, right? > > No, the fec_probe() function is called as part of the cpu_eth_init() and > sets the callbacks, among the other things. It is called always, > independently if we are ready to use a network command or not, it > depends only on CONFIG_FEC_MXC. > > I do not find very correct that the MAC address is set in this function > (and not set anymore). What happens if I set the ethaddr variable ? > Changes will be not effective until next reset of the system. It is a > different issue, I know, but related to the same function. I had move > setting to fec_init(), but this is already implemented (and I can test > only on a i.MX51 board). > >> Then this is the place to enable the >> needed clocks, too. These should not be globally enabled and running >> even if no network access is ever made - this would only increase the >> power dissipation, which is bad on battery operated devices. > > However, I think it is the actual status in the driver, because the > fec_probe is always called. The clock initialization should be moved as > part of the fec_init() (that is, edev->init) to reach what you propose. > > Best regards, > Stefano Babic > > -- > ===================================================================== > DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de > ===================================================================== > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot >