From: Ben Warren Date: Sat, 20 Jan 2007 15:10:22 -0800 (PST) Subject: [U-Boot-Users] RFC: miiphy changes In-Reply-To: <2acbd3e40701201044h1fc51dbfl8d156fb729876627@mail.gmail.com> Message-ID: <756930.71348.qm@web302.biz.mail.mud.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de --- Andy Fleming wrote: > > Sorry, I asked my question a little unclearly. > > Right now, my board's code has something like: > > miiphy_read_reg(TSEC1_NAME, addr, reg); > > I understand under your suggested system that it > would become: > > miiphy_read_reg(tsec1_ptr, addr, reg); > > What I don't understand is how the board code is > supposed to get > access to tsec1_ptr. Is there already a global > pointer to the mii_dev > list that anyone can scan through? > I don't have access to the code right now, so forgive me if some of the names aren't quite right. Currently, the list is built by a series of miiphy_register("name", read_fn(), write_fn()) calls in board (or driver, I guess) code. I'll change this to: miiphy_register(miidev) which will also be called from board (or driver) code. So your board will have all the structs already. Do you think this makes sense? Ben