From patchwork Wed Dec 9 22:47:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wong, Vee Khee" X-Patchwork-Id: 11962839 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 D52D9C433FE for ; Wed, 9 Dec 2020 23:34:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B44D2343F for ; Wed, 9 Dec 2020 23:34:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B44D2343F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=WQOZIJJqMLUNf5uRirthez/KthXQEV6zMN1vL+zJBPc=; b=Xtgz/ubKhFFcJxeCM2ZOf9/1bD uiOTd1GQpLx6rqkmZk0oOgJqvda5XPVv/WYWulDdjRwJP/DLZ2DTB8EdKDRZh9n8roDgMVxC+yOUi /gmOpgeBSk2rxBwvwZf/mT/1z2pZlBkxFjWJjQne7JwBlHVTJEf3Q2TcYVziN5vlD4cPcSc1DC+Rv 7zJIHAzE/5k89hv4/qun2ZOIfJcZxUivQD2ea65LQHaJOZ3BbVx7bxOt2v+EuErT3b8tGaKZBvjER urAonMnDwTBuqR2dI8n6cnrihPTgKG13gYBaDN0TYBql3qHPk43CjuyfcRqji+ZKyUPB5Ohk0FgBV 7snMKNXg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn8Bb-00053Y-Jv; Wed, 09 Dec 2020 22:43:51 +0000 Received: from mga09.intel.com ([134.134.136.24]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn8BX-000539-Qx for linux-arm-kernel@lists.infradead.org; Wed, 09 Dec 2020 22:43:48 +0000 IronPort-SDR: 0zCetZl5q164F7UrUUQmdfC5t8r70SIUnLLajis5NffBGSO7y+e9NldyljJPD5g1KhOugfkbbc WkXG9hUP/Ruw== X-IronPort-AV: E=McAfee;i="6000,8403,9830"; a="174307113" X-IronPort-AV: E=Sophos;i="5.78,407,1599548400"; d="scan'208";a="174307113" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2020 14:43:42 -0800 IronPort-SDR: CvYUj1NyjNZmuLu6KhWt70IfCjm+TvOwdSLHpjCAh8vwPJux9UaI0JDKbQtf8RqfdQpQFZoW4+ cxQHwu3hNmdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,407,1599548400"; d="scan'208";a="484179333" Received: from unknown (HELO glass.png.intel.com) ([10.158.65.144]) by orsmga004.jf.intel.com with ESMTP; 09 Dec 2020 14:43:39 -0800 From: Wong Vee Khee To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin Subject: [PATCH v2 net-next 1/1] net: stmmac: allow stmmac to probe for C45 PHY devices Date: Thu, 10 Dec 2020 06:47:00 +0800 Message-Id: <20201209224700.30295-1-vee.khee.wong@intel.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_174348_029734_3C864A8E X-CRM114-Status: GOOD ( 10.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Voon Wei Feng , Wong Vee Khee , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ong Boon Leong , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Assign stmmac's mdio_bus probe capabilities to MDIOBUS_C22_C45. This extended the probing of C45 PHY devices on the MDIO bus. Signed-off-by: Wong Vee Khee Reviewed-by: Andrew Lunn --- v2 changelog: - Added conditional check for gmac4. --- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index b2a707e2ef43..d64116e0543e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -365,6 +365,9 @@ int stmmac_mdio_register(struct net_device *ndev) new_bus->name = "stmmac"; + if (priv->plat->has_gmac4) + new_bus->probe_capabilities = MDIOBUS_C22_C45; + if (priv->plat->has_xgmac) { new_bus->read = &stmmac_xgmac2_mdio_read; new_bus->write = &stmmac_xgmac2_mdio_write;