Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation (fwd)

2013-01-26 Thread Edgar E. Iglesias
On Fri, Jan 25, 2013 at 06:00:36PM +, Paul Brook wrote: > > To be able to create generic GPIO devices or other devices that have GPIO > > like pins (e.g MDIO), and hook those up to external buses through common > > frameworks, we need agreement on how to model tristate pins. > > A tristate pin

Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation (fwd)

2013-01-26 Thread Andreas Färber
Am 25.01.2013 19:00, schrieb Paul Brook: >> 1. It's not point-to-point, has an arbitrary nr of connection points. > > QoM currently only does asymmetric 1-1 connections between objects. However > I > don't think this is a fatal problem. We can still retain an asymmetric API > (effectively equ

Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation (fwd)

2013-01-25 Thread Paul Brook
> To be able to create generic GPIO devices or other devices that have GPIO > like pins (e.g MDIO), and hook those up to external buses through common > frameworks, we need agreement on how to model tristate pins. > A tristate pin model, or at least agreement on how to model these with > multiple q

Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation (fwd)

2013-01-24 Thread Edgar E. Iglesias
On Thu, Jan 24, 2013 at 02:21:09PM +, Paul Brook wrote: > > > > It also worries me that there isn't a clean separation between the MDIO > > > > bus and the bitbang interface. IMO the bitbang interface should be a > > > > separate device, and if we're wiring up bitbang interfaces then it > > >

Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation (fwd)

2013-01-24 Thread Paul Brook
> > > It also worries me that there isn't a clean separation between the MDIO > > > bus and the bitbang interface. IMO the bitbang interface should be a > > > separate device, and if we're wiring up bitbang interfaces then it > > > really should be via standard GPIO pins (aka qemu_irq). > > > > O

Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation (fwd)

2013-01-24 Thread Edgar E. Iglesias
Sorry for reposting, My email client freaked out when posting the first reply... - Forwarded message from "Edgar E. Iglesias" - Return-Path: Received: from localhost (rocksteady.se.axis.com. [195.60.68.156]) by mx.google.com with ESMTPS id s9sm9668542lbc.12.2013.01.24.05.24.07

Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation

2013-01-24 Thread Grant Likely
On Wed, 23 Jan 2013 23:45:13 +, Paul Brook wrote: > > +#ifdef USE_THIS_DEAD_CODE > > +void mdio_detach(struct qemu_mdio *bus, struct qemu_phy *phy, unsigned int > > addr) +{ > > +bus->devs[addr & 0x1f] = NULL; > > +} > > +#endif > > This is clearly wrong. It's in both versions of the ori

Re: [Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation

2013-01-23 Thread Paul Brook
> +#ifdef USE_THIS_DEAD_CODE > +void mdio_detach(struct qemu_mdio *bus, struct qemu_phy *phy, unsigned int > addr) +{ > +bus->devs[addr & 0x1f] = NULL; > +} > +#endif This is clearly wrong. It also worries me that there isn't a clean separation between the MDIO bus and the bitbang interface

[Qemu-devel] [PATCH V2 2/6] hw/mdio: Generalize etraxfs MDIO bitbanging emulation

2013-01-23 Thread Grant Likely
The etraxfs and Xilinx axienet Ethernet models implement quite a nice MDIO core that supports both bitbanging and direct register access. This change factors the common code out into a separate file. There are no functional changes here, just movement of code. The etraxfs and axienet are slightly