From: Wolfgang Denk Date: Thu, 18 Mar 2010 09:38:14 +0100 Subject: [U-Boot] [PATCH] Marvell GuruPlug Board Support In-Reply-To: <1268890125.23313.27.camel@pe-dt434> References: <1268659617.23313.3.camel@pe-dt434> <1268660568-23022-1-git-send-email-gores@marvell.com> <20100315160816.7443C5086C@gemini.denx.de> <1268890125.23313.27.camel@pe-dt434> Message-ID: <20100318083814.5D9FB5086C@gemini.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 Dear Siddarth Gore, In message <1268890125.23313.27.camel@pe-dt434> you wrote: > ... > > We have pretty much identical code already in mv_phy_88e1116_init() > > [in "board/Marvell/rd6281a/rd6281a.c"], in reset_phy() [in > > "board/Marvell/openrd_base/openrd_base.c"], in reset_phy(0 [in > > "board/Marvell/sheevaplug/sheevaplug.c"] and I don't know where else. > > > > I object against adding more and more copies of the same code. Please > > factor out the common part into a single implementation, and call this > > everwhere where such code is used. Thanks. > > > i can create a new file ethphy.c in board/Marvell/common and put this > code there. but if we are going to move to a phy driver (as Prafulla > suggested) then that wont be necessary. Please advise. Is there any actual development for a generic PHY support layer going on anywhere? I must have missed this, then. If there is such a thing, it should be used, obviously. > Also i think we should maintain different init functions for 1116 and > 1121 as they represent different phy families, even though the code is > pretty much the same right now. If the code is the same, then duplication makes no sense to me. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Space is big. You just won't believe how vastly, hugely, mind- bogglingly big it is. I mean, you may think it's a long way down the road to the drug store, but that's just peanuts to space. -- The Hitchhiker's Guide to the Galaxy