From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlo Caione Date: Wed, 6 Feb 2019 09:35:45 +0000 Subject: [U-Boot] [PATCH v4 3/3] cmd: mdio: Add new parameter to access MMD PHY registers In-Reply-To: References: <20190124085600.18886-1-ccaione@baylibre.com> <7aba15b6-087c-5216-a985-32b160d83a0d@baylibre.com> <867bd6cc-7e78-d0d3-f399-e4ada8ff45c9@baylibre.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/02/2019 03:31, Joe Hershberger wrote: /cut > Perhaps the default can be to attempt to auto select, but if it is > ambiguous, require the explicit specification. It could follow a > similar approach to the "md" command. We can add the ability to add > ".22" and ".45" to the mdio command to explicitly select. What about we go back to have a generic phy_{r|w}_mmd() and (in this order): 1) If the PHY driver is defining a generic {r|w}_mmd() hook we use that. 2) We do direct C45 access if (phy_driver->features & PHY_10G_FEATURES) 3) We do direct C22 access if (devad == MDIO_DEVAD_NONE) 4) We do indirect C22 access to C45 in all the other cases Se we can have one single "mdio" command for all the cases. -- Carlo Caione