From patchwork Fri Nov 1 01:43:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13858601 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6AA9E67492 for ; Fri, 1 Nov 2024 01:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U7IuQrRR0dWmmb1H5frR7qVYsHMYMGBd5+1f/tCF5+o=; b=u+rLGwDQt+qCWD kHb/nCfcyMU6Fc7WY7HaTuo0Alo41iF2nsnzvF+B403HRBiqkX750njvHeh4GQ/3gRoLqdl5eknmU ePVG6w+jvWRbK9EHufVrXThkgtcWzYUQmyykkYN3hGz7qvc0tpZvieu85faRrtlhSkcMNL/sf2y2g kAEeEy2bdbL4YS0Ez5MUa8pGDN8LLKGSueoa2a1XxJ4upQMZPEZAJ6dX3Y+roWgQfvqkQxUD/D+NI 47DTNoo3Z5cSBmlcecwTXcTr//Jfc2gVOz7dfUvItvSie6rEWIleeS1ku86LTiRifU1/bb4S7p8Xq QDgDbDqNGWnXWPqRp5UA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6gmi-00000005TP4-0Yof; Fri, 01 Nov 2024 01:49:08 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6gho-00000005SMV-3p6h; Fri, 01 Nov 2024 01:44:06 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-72097a5ca74so1280098b3a.3; Thu, 31 Oct 2024 18:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730425444; x=1731030244; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AxfricRE7uBgf4L4U+T/hPqm/Ex2rRvslCVlqeVs1RU=; b=l/y4dqQxm59FudQYaq0OeXxN+LSYWzAVrsg8liZmbQku9RmLjgEWLz0I35BjJNNyH0 BSDft8gUsTqgi2qynNUgK6s6L/9xfFQg38dv8BMuPMnfkBFydNvedm5B9RPr0P4nfwfy BJHTSL3O6HC02cIppdwlNYI7qhCCPbOk16FlYEFmxEcxFGcKO5Xvdpa+t111tlFtPmJl hX/8mKpLPo3KSpOpVXg+oSIaEWtgXr4+h3a98lf9/MaMIJzFhU8BlM5l5ZMscSUW7LUX vPUf310f7jCdDqXQ5OsC9gr9D6eiDjveUEnUUgNTA/ogKTLmBcJQqArpNqni6IynfVbj iVrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730425444; x=1731030244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AxfricRE7uBgf4L4U+T/hPqm/Ex2rRvslCVlqeVs1RU=; b=wNOJIWDSgmqEsWMTdaGkpr6Wf3evw2Oq+ojeKgSchjgoa+Lm1e1vgVGxpr+gNvAbGE g2A6mzPhRR+dTOM+qj2AEjM2NrH2LAFNAfX8GTNm98oAix+hsZgssCs7NZ5HOAAfmyKe d2LqRM5+YKKNrN0UG7cQ320EdBEv7EbuVwSczWNAlryWCWU3+U7v/rcwoD1wzCeTofJl aQlLSsgGJSDsUEPB5JGMqJ9fIthGQ1V2XYAyO6Sp9OF9ztY7aIVE51xu+zsPvcje0fF1 fyHb5h3p2h6jBC2lGw3i6xonlDKiHAPYDUGS/cA6gBED9tq75N+FCTezZ+MqcA7ljJu/ D9bQ== X-Forwarded-Encrypted: i=1; AJvYcCUr79rv4QtbrfAGQavaHgmr2fwjnzzX/W6+Wt97LzxbJJA1+TdbU7AImEDHh2/+bqdhINbo70ne32fNJU4=@lists.infradead.org, AJvYcCXLmUKiLiUazBMx1+a+lTRCoJ4l4mxSGFn/oTKLjbubBD3YOjFVYhIT0IesDpepd69++IqHwoCqYs97YpmchDSf@lists.infradead.org X-Gm-Message-State: AOJu0Yw+sUpXSiAjr4+YzkEDH8hUGqnidPeXDWb7wuDq6j9DRdK8chjK xjua2nux18JrApX468F4NkX7qIeQ0MX23/dvUbM2rlCSlivSHZhIbhAylA== X-Google-Smtp-Source: AGHT+IHZtCCUDX7mDEeuB8aZyi3qRWI1DKZU0sOe1chkb3X/72NCuBzDYpNglTWXoR6Evrq69uLEFQ== X-Received: by 2002:a05:6a00:a93:b0:71e:f83:5c00 with SMTP id d2e1a72fcca58-720c98a19d4mr2723785b3a.2.1730425442887; Thu, 31 Oct 2024 18:44:02 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-720bc2e95a6sm1834390b3a.145.2024.10.31.18.44.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 18:44:02 -0700 (PDT) From: Inochi Amaoto To: Chen Wang , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Inochi Amaoto , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Paul Walmsley , Palmer Dabbelt , Albert Ou , Giuseppe Cavallaro Cc: Yixun Lan , Longbin Li , Inochi Amaoto , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org Subject: [PATCH RFC net-next 2/3] net: stmmac: platform: Add snps,dwmac-5.30a IP compatible string Date: Fri, 1 Nov 2024 09:43:26 +0800 Message-ID: <20241101014327.513732-3-inochiama@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241101014327.513732-1-inochiama@gmail.com> References: <20241101014327.513732-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_184404_970628_7808C995 X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add "snps,dwmac-5.30a" compatible string for 5.30a version that can avoid to define some platform data in the glue layer. Signed-off-by: Inochi Amaoto --- .../ethernet/stmicro/stmmac/stmmac_platform.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index ad868e8d195d..86ca39f89447 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -421,6 +421,17 @@ static void stmmac_remove_config_dt(struct platform_device *pdev, of_node_put(plat->mdio_node); } +/* Compatible string array for all gmac4 devices */ +static const char * const stmmac_gmac4_compats[] = { + "snps,dwmac-4.00", + "snps,dwmac-4.10a", + "snps,dwmac-4.20a", + "snps,dwmac-5.10a", + "snps,dwmac-5.20", + "snps,dwmac-5.30a", + NULL +}; + /** * stmmac_probe_config_dt - parse device-tree driver parameters * @pdev: platform_device structure @@ -551,11 +562,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) plat->pmt = 1; } - if (of_device_is_compatible(np, "snps,dwmac-4.00") || - of_device_is_compatible(np, "snps,dwmac-4.10a") || - of_device_is_compatible(np, "snps,dwmac-4.20a") || - of_device_is_compatible(np, "snps,dwmac-5.10a") || - of_device_is_compatible(np, "snps,dwmac-5.20")) { + if (of_device_compatible_match(np, stmmac_gmac4_compats)) { plat->has_gmac4 = 1; plat->has_gmac = 0; plat->pmt = 1;