[Qemu-devel] [PATCH v5 0/7] Generalize MDIO framework

Philippe Mathieu-Daudé posted 7 patches 6 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170922171323.10348-1-f4bug@amsat.org
Test checkpatch passed
Test docker passed
Test s390x passed
include/hw/net/mdio.h   | 124 +++++++++++++++++++++
hw/net/etraxfs_eth.c    | 291 +-----------------------------------------------
hw/net/mdio.c           | 280 ++++++++++++++++++++++++++++++++++++++++++++++
hw/net/smc91c111.c      |  27 ++++-
hw/net/xilinx_axienet.c | 189 +------------------------------
hw/net/Makefile.objs    |   2 +
6 files changed, 438 insertions(+), 475 deletions(-)
create mode 100644 include/hw/net/mdio.h
create mode 100644 hw/net/mdio.c
[Qemu-devel] [PATCH v5 0/7] Generalize MDIO framework
Posted by Philippe Mathieu-Daudé 6 years, 6 months ago
Hi,

I have a follow up series using multiples PHY on the MDIO bus based on this
series.

Regards,

Phil.

Grant's previous work:
http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg00257.html

"There is more work to be done, particularly in moving to the common GPIO api,
 but that work can be done as a follow on patch series."

Grant Likely (7):
  hw/mdio: Generalize etraxfs MDIO bitbanging emulation
  hw/mdio: Add PHY register definition
  hw/mdio: Generalize phy initialization routine
  hw/mdio: Mask out read-only bits.
  hw/mdio: Refactor bitbanging state machine
  hw/mdio: Add VMState support
  hw/mdio: Use bitbang core for smc91c111 network device

 include/hw/net/mdio.h   | 124 +++++++++++++++++++++
 hw/net/etraxfs_eth.c    | 291 +-----------------------------------------------
 hw/net/mdio.c           | 280 ++++++++++++++++++++++++++++++++++++++++++++++
 hw/net/smc91c111.c      |  27 ++++-
 hw/net/xilinx_axienet.c | 189 +------------------------------
 hw/net/Makefile.objs    |   2 +
 6 files changed, 438 insertions(+), 475 deletions(-)
 create mode 100644 include/hw/net/mdio.h
 create mode 100644 hw/net/mdio.c

-- 
2.14.1


Re: [Qemu-devel] [PATCH v5 0/7] Generalize MDIO framework
Posted by Alistair Francis 6 years, 6 months ago
On Fri, Sep 22, 2017 at 10:13 AM, Philippe Mathieu-Daudé
<f4bug@amsat.org> wrote:
> Hi,
>
> I have a follow up series using multiples PHY on the MDIO bus based on this
> series.

I haven't looked at this yet, but it looks interesting.

We actually have this concept merged in our tree and it works pretty
well. You can see it here:
https://github.com/Xilinx/qemu/tree/master/hw/mdio

Thanks,
Alistair

>
> Regards,
>
> Phil.
>
> Grant's previous work:
> http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg00257.html
>
> "There is more work to be done, particularly in moving to the common GPIO api,
>  but that work can be done as a follow on patch series."
>
> Grant Likely (7):
>   hw/mdio: Generalize etraxfs MDIO bitbanging emulation
>   hw/mdio: Add PHY register definition
>   hw/mdio: Generalize phy initialization routine
>   hw/mdio: Mask out read-only bits.
>   hw/mdio: Refactor bitbanging state machine
>   hw/mdio: Add VMState support
>   hw/mdio: Use bitbang core for smc91c111 network device
>
>  include/hw/net/mdio.h   | 124 +++++++++++++++++++++
>  hw/net/etraxfs_eth.c    | 291 +-----------------------------------------------
>  hw/net/mdio.c           | 280 ++++++++++++++++++++++++++++++++++++++++++++++
>  hw/net/smc91c111.c      |  27 ++++-
>  hw/net/xilinx_axienet.c | 189 +------------------------------
>  hw/net/Makefile.objs    |   2 +
>  6 files changed, 438 insertions(+), 475 deletions(-)
>  create mode 100644 include/hw/net/mdio.h
>  create mode 100644 hw/net/mdio.c
>
> --
> 2.14.1
>
>

Re: [Qemu-devel] [PATCH v5 0/7] Generalize MDIO framework
Posted by Edgar E. Iglesias 6 years, 6 months ago
On Fri, Sep 22, 2017 at 02:13:16PM -0300, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> I have a follow up series using multiples PHY on the MDIO bus based on this
> series.

Hi Philippe!

I think this is a good improvement compared to todays state.
It may make sense to have the generic mdio bus functions in mdio.c
and specific phy models in separate files, thoughts?

Cheers,
Edgar


> 
> Regards,
> 
> Phil.
> 
> Grant's previous work:
> http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg00257.html
> 
> "There is more work to be done, particularly in moving to the common GPIO api,
>  but that work can be done as a follow on patch series."
> 
> Grant Likely (7):
>   hw/mdio: Generalize etraxfs MDIO bitbanging emulation
>   hw/mdio: Add PHY register definition
>   hw/mdio: Generalize phy initialization routine
>   hw/mdio: Mask out read-only bits.
>   hw/mdio: Refactor bitbanging state machine
>   hw/mdio: Add VMState support
>   hw/mdio: Use bitbang core for smc91c111 network device
> 
>  include/hw/net/mdio.h   | 124 +++++++++++++++++++++
>  hw/net/etraxfs_eth.c    | 291 +-----------------------------------------------
>  hw/net/mdio.c           | 280 ++++++++++++++++++++++++++++++++++++++++++++++
>  hw/net/smc91c111.c      |  27 ++++-
>  hw/net/xilinx_axienet.c | 189 +------------------------------
>  hw/net/Makefile.objs    |   2 +
>  6 files changed, 438 insertions(+), 475 deletions(-)
>  create mode 100644 include/hw/net/mdio.h
>  create mode 100644 hw/net/mdio.c
> 
> -- 
> 2.14.1
> 

Re: [Qemu-devel] [PATCH v5 0/7] Generalize MDIO framework
Posted by Philippe Mathieu-Daudé 6 years, 1 month ago
Hi Edgar,

On 10/09/2017 10:21 AM, Edgar E. Iglesias wrote:
> On Fri, Sep 22, 2017 at 02:13:16PM -0300, Philippe Mathieu-Daudé wrote:
>> Hi,
>>
>> I have a follow up series using multiples PHY on the MDIO bus based on this
>> series.
> 
> Hi Philippe!
> 
> I think this is a good improvement compared to todays state.
> It may make sense to have the generic mdio bus functions in mdio.c
> and specific phy models in separate files, thoughts?

I'm sorry I missed your mail and noticed it today since this thread got
awakened with Alistair's reviews.

I'll raise this series priority in my TODO and respin with Grant correct
S-o-b, Alistair comments addressed and split MDIO/PHY as you suggested.

After spending 2 months with the SD bus, I now fill more confident to
rework the MDIO bus and think of unit testing and tracing.

Regards,

Phil.

>>
>> Grant's previous work:
>> http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg00257.html
>>
>> "There is more work to be done, particularly in moving to the common GPIO api,
>>  but that work can be done as a follow on patch series."
>>
>> Grant Likely (7):
>>   hw/mdio: Generalize etraxfs MDIO bitbanging emulation
>>   hw/mdio: Add PHY register definition
>>   hw/mdio: Generalize phy initialization routine
>>   hw/mdio: Mask out read-only bits.
>>   hw/mdio: Refactor bitbanging state machine
>>   hw/mdio: Add VMState support
>>   hw/mdio: Use bitbang core for smc91c111 network device
>>
>>  include/hw/net/mdio.h   | 124 +++++++++++++++++++++
>>  hw/net/etraxfs_eth.c    | 291 +-----------------------------------------------
>>  hw/net/mdio.c           | 280 ++++++++++++++++++++++++++++++++++++++++++++++
>>  hw/net/smc91c111.c      |  27 ++++-
>>  hw/net/xilinx_axienet.c | 189 +------------------------------
>>  hw/net/Makefile.objs    |   2 +
>>  6 files changed, 438 insertions(+), 475 deletions(-)
>>  create mode 100644 include/hw/net/mdio.h
>>  create mode 100644 hw/net/mdio.c
>>
>> -- 
>> 2.14.1
>>