Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D3DFC61DA4 for ; Fri, 27 Jan 2023 14:08:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233498AbjA0OIJ (ORCPT ); Fri, 27 Jan 2023 09:08:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbjA0OII (ORCPT ); Fri, 27 Jan 2023 09:08:08 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4269A113C0; Fri, 27 Jan 2023 06:08:06 -0800 (PST) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 2AD6724001A; Fri, 27 Jan 2023 14:07:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1674828484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1G+fWgGxlEZqWqeYZloKEVDa2fkGlNLxIKDLUbzeuiw=; b=lpzK7+cixsBqVsaIWnXw6ZMgR2O+FnYuuCfcrjvAj8aPUewkhpuUvnD2gMqc31AY43UEf2 KttgGUqT/gNlOIdrwx47pNunh2CLXqIcK54wqmsfN97X1Zebu+nBv2rJHIgfQv69n8dofJ 6joB/E2rrwBNybFBWINKvoUqrDDFOKMo3nEgDlNTbM/eI8b2YEb0KnwNRtbuyUHVM6/Zlm dRiBS0YXeAEh2TnIFUa9EXev1ICL5JerE0v/xjLXY2qiY2HZ0HYJZpWkxOcxcB19iiDLr9 jy8iAJQ5J7+ZPtCv+jFb5UpMu3gT3Bpy3H/IjXy6SmpVi2JApbKuhiKOESFJvw== Date: Fri, 27 Jan 2023 15:07:58 +0100 From: Maxime Chevallier To: Vladimir Oltean Cc: "David S . Miller" , Jakub Kicinski , Eric Dumazet , Florian Fainelli , Andrew Lunn , Alexandre Belloni , Claudiu Manoil , Paolo Abeni , Ioana Ciornei , Madalin Bucur , Heiner Kallweit , Russell King , UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com Subject: Re: [PATCH net-next] net: pcs: pcs-lynx: remove lynx_get_mdio_device() and refactor cleanup Message-ID: <20230127150758.68eb1d29@pc-7.home> In-Reply-To: <20230127134351.xlz4wqrubfnvmecd@skbuf> References: <20230127134031.156143-1-maxime.chevallier@bootlin.com> <20230127134351.xlz4wqrubfnvmecd@skbuf> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vlad, On Fri, 27 Jan 2023 15:43:51 +0200 Vladimir Oltean wrote: > On Fri, Jan 27, 2023 at 02:40:30PM +0100, Maxime Chevallier wrote: > > One of the main difference is that the TSE pcs is memory-mapped, and > > the merge into pcs-lynx would first require a conversion of pcs-lynx > > to regmap. > > I suppose sooner or later you'll want to convert stuff like > phylink_mii_c22_pcs_get_state() to regmap too? Well that was my next part to tackle indeed... > Can't you create an MDIO bus for the TSE PCS which translates MDIO > reads/writes to MMIO accesses? TBH I haven't considered that, I guess this would definitely make thing much easier. Since the register layout of the TSE PCS is very very similar to the C22 layout, that could be indeed justified, as it's basically a set of standard mdio registers exposed through mmio. Thanks for the tip. However this current patch still makes sense though right ? Maxime