RFC: miiphy changes
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · --- Andy Fleming
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:
Quoted 8 lines
miiphy_read_reg(tsec1_ptr, addr, reg);What I don't understand is how the board code is
supposed to get
access totsec1_ptr. Is there already a global
pointer to themii_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 ofmiiphy_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