Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753041AbdHTO0B (ORCPT ); Sun, 20 Aug 2017 10:26:01 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:36230 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752079AbdHTOZ7 (ORCPT ); Sun, 20 Aug 2017 10:25:59 -0400 Date: Sun, 20 Aug 2017 16:25:45 +0200 From: Andrew Lunn To: Corentin Labbe Cc: Chen-Yu Tsai , Rob Herring , Mark Rutland , Russell King , Maxime Ripard , Giuseppe Cavallaro , Alexandre Torgue , devicetree , linux-arm-kernel , linux-kernel , netdev Subject: Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac Message-ID: <20170820142545.GB24150@lunn.ch> References: <20170818122118.4925-1-clabbe.montjoie@gmail.com> <20170818122118.4925-4-clabbe.montjoie@gmail.com> <20170819185025.GB13266@Red> <20170819203836.GA21567@lunn.ch> <20170820065757.GA6081@Red> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170820065757.GA6081@Red> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 664 Lines: 18 > I think we cannot use mdio-mux-mmioreg since the register for doing > the switch is in middle of the "System Control" and shared with > other functions. This is why we use a sycon/regmap for selecting > the MDIO. You could add a mdio-mux-regmap.c. However, it probably need restructuring of the stmmac mdio code, to make the mdio bus usable as a separate driver. You need stmmac mdio to probe first, then mdio-mux-remap should probe, and then lastly stmmmac mac driver. With stmmac mdio and stmmac mac being in one driver, there is no time in the middle to allow the mux driver to probe. It is some effort, but a nice cleanup and generalization. Andrew