From patchwork Tue Mar 7 16:19:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13164107 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 E0A73C6FD1A for ; Tue, 7 Mar 2023 16:20:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjCGQUF (ORCPT ); Tue, 7 Mar 2023 11:20:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbjCGQTi (ORCPT ); Tue, 7 Mar 2023 11:19:38 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F20AC30D2 for ; Tue, 7 Mar 2023 08:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ajJcOlWzx/VD/YVzxlqdpGWy4Ty21l5WTKrD64qnBUE=; b=ss5koH86A5fyLvKwygzr/Yh3ir jt5mPztVyk14RQl/Yp3gkJL29sViBmotS1nf7LWQVTsAon3/1JT2TALsO+CS+yXu5ZfMqslhBU792 slTv1488OAE3vcJXe6Ywq1uK0gbsY9bILhCnEdsSxJ8t6j7nFJtxL4tfx/AjNJqXazGVH2UlQTXq5 y9i/ZzKrEgqoUkNawA89atbqmmQvOQcPMg+WS/r1tOi5GGk+04/Hp3iNRbB2pu6gD6dcexkfLRdom chMtMw5DUwqSk2MczjZR1+m0Ro/EdW8OcWH1EnhkgO5YzPIEU3aBe6GwWY7XjOUzsVfMfeM4+tob6 pWk07xEQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:58336) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pZa1r-0000ma-2A; Tue, 07 Mar 2023 16:19:07 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pZa1m-0001fg-3S; Tue, 07 Mar 2023 16:19:02 +0000 Date: Tue, 7 Mar 2023 16:19:02 +0000 From: "Russell King (Oracle)" To: Daniel Golle , Felix Fietkau , John Crispin , Mark Lee , Matthias Brugger , Sean Wang Cc: AngeloGioacchino Del Regno , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Lorenzo Bianconi , netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH net-next 0/4] Various mtk_eth_soc cleanups Message-ID: MIME-Version: 1.0 Content-Disposition: inline Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Here are a number of patches that do a bit of cleanup to mtk_eth_soc. The first patch cleans up mtk_gmac0_rgmii_adjust(), which is the troublesome function preventing the driver becoming a post-March2020 phylink driver. It doesn't solve that problem, merely makes the code easier to follow by getting rid of repeated tenary operators. The second patch moves the check for DDR2 memory to the initialisation of phylink's supported_interfaces - if TRGMII is not possible for some reason, we should not be erroring out in phylink MAC operations when that can be determined prior to phylink creation. The third patch removes checks from mtk_mac_config() that are done when initialising supported_interfaces - phylink will not call mtk_mac_config() with an interface that was not marked as supported, so these checks are redundant. The last patch removes the remaining vestiges of REVMII and RMII support, which appears to be entirely unused. These shouldn't conflict with Daniel's patch set, but if they do I will rework as appropriate. Thanks. drivers/net/ethernet/mediatek/mtk_eth_soc.c | 81 ++++++++++++----------------- 1 file changed, 33 insertions(+), 48 deletions(-)