From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Oltean Date: Sat, 13 Mar 2021 14:29:13 +0200 Subject: [PATCH v2 02/21] of: extra: Introduce ofnode_phy_is_fixed_link() API In-Reply-To: <20210313121436.divmbdwz4d7dgy6d@skbuf> References: <20210312133602.31105-1-bmeng.cn@gmail.com> <20210312133602.31105-3-bmeng.cn@gmail.com> <20210313121436.divmbdwz4d7dgy6d@skbuf> Message-ID: <20210313122913.chcdun2sbwmh6emb@skbuf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Mar 13, 2021 at 02:14:36PM +0200, Vladimir Oltean wrote: > On Fri, Mar 12, 2021 at 09:35:43PM +0800, Bin Meng wrote: > > Introduce a helper API ofnode_phy_is_fixed_link() to detect whether > > the ethernet controller connects to a fixed-link pseudo-PHY device. > > > > Note there are two ways to describe a fixed PHY attached to an > > Ethernet device: > > > > - the new DT binding, where 'fixed-link' is a sub-node of the > > Ethernet device > > - the old DT binding, where 'fixed-link' is a property with 5 > > cells encoding various information about the fixed PHY > > > > Signed-off-by: Bin Meng > > Reviewed-by: Simon Glass > > --- > > I ran a 'grep -r "ofnode_get_property.*fixed-link" .' and saw no in-tree > users of the old binding. Why do we bother to be compatible with > something which isn't used? Ah, I see what's going on. QEMU fixes up the device tree here: https://github.com/qemu/qemu/blob/master/hw/ppc/e500.c#L239 and adds an old-style fixed-link binding. Can't you modify it to add a new-style fixed-link property? It's not like you didn't have to modify it for the "ranges" property too :) https://github.com/qemu/qemu/commit/e5943b00d35efc68ca72ed304cfca98a9f3a647c