From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B31AC07E95 for ; Sat, 10 Jul 2021 20:02:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 709A361353 for ; Sat, 10 Jul 2021 20:02:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbhGJUFa (ORCPT ); Sat, 10 Jul 2021 16:05:30 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:37455 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231753AbhGJUF3 (ORCPT ); Sat, 10 Jul 2021 16:05:29 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 8E70CFF805; Sat, 10 Jul 2021 20:02:40 +0000 (UTC) Date: Sat, 10 Jul 2021 22:02:40 +0200 From: Alexandre Belloni To: Vladimir Oltean Cc: Colin Foster , andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, claudiu.manoil@nxp.com, UNGLinuxDriver@microchip.com, linux@armlinux.org.uk, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 net-next 2/8] net: dsa: ocelot: felix: move MDIO access to a common location Message-ID: References: <20210710192602.2186370-1-colin.foster@in-advantage.com> <20210710192602.2186370-3-colin.foster@in-advantage.com> <20210710195913.owqvc7llnya74axl@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210710195913.owqvc7llnya74axl@skbuf> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 10/07/2021 22:59:13+0300, Vladimir Oltean wrote: > On Sat, Jul 10, 2021 at 12:25:56PM -0700, Colin Foster wrote: > > Indirect MDIO access is a feature that doesn't need to be specific to the > > Seville driver. Separate the feature to a common file so it can be shared. > > > > Signed-off-by: Colin Foster > > --- > > In fact, this same piece of hardware has a dedicated driver inside > drivers/net/mdio/mdio-mscc-miim.c. The only problem is that it doesn't > work with regmap, and especially not with a caller-supplied regmap. I > was too lazy to do that, but it is probably what should have been done. > > By comparison, felix_vsc9959.c was coded up to work with an internal > MDIO bus whose ops are implemented by another driver (enetc_mdio). Maybe > you could take that as an example and have mdio-mscc-miim.c drive both > seville and ocelot. That was indeed going to be my comment. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com