Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp676397pxb; Mon, 25 Oct 2021 16:27:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1BQ4ulcjxmEpK30pTZmp+YhKA9Hq2aIuOiYbFFZ7PlcNsvDadkMq7URgbzFAj7bNsfRC4 X-Received: by 2002:aa7:d597:: with SMTP id r23mr21673615edq.173.1635204472115; Mon, 25 Oct 2021 16:27:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635204472; cv=none; d=google.com; s=arc-20160816; b=L+Mu1bIvpwmxqHY85iWs6bdarFbqayqxnqpRjuMqjDQD/fSWyNBhfUyUv52qq4GgsE ltHELPqCVJY/9ZGX+wmsO5TKb2LlErDueIQyTjVWJQz2c/x4dAX48xbMUCiUimm3Uo35 Et/JFEjP1zm6cWUK4xOIvZh4Hkx7ZRAZMntPsP7nCIt10vRsy0EDJKRcA5Qznp0z/yit ZAdr+EetHHefj+OdvZKd1e90uEDmGEqlAo1oGND8SqmYzwClNYS4Gt1yjpqymFt0w1EW PC530418wRRv7VnZGVq5WMTT1HY1vQL90tPuoF6oPQMjshIhS/x/uA/CIgPLaqgOv6Fr i1xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ho0WbgRXNLGj7NffqJDU3AfoZCpCxAgNcRtJrN6uIcU=; b=wPorVA+05CbJrQ7BH498YRuEd8NZWNzgozZ58lIZXTaBImMkTW4pxprkdpw7wbWoIP swb0xzQ5md01V0u+/DssC3qX5/2iOYdK7GrGHjKgHDIBW99RNmvbjDXiqrdwHrQI1wos 8Vecu7W8aRBAQjSkukfld/bH5SW2vD2EJ82peruIg9TTcUDHMprektI04yEPqQWvgMnA +bq/ApKrN1s+1upjgfx3LIS7rf3ECCv9ogi+4XF3evjmfVJGOXzou4gj0yH/iFcKNpv6 NTseMh2nAzMoH5sb39ni1/IC6bnG87ZZ8f5mm/nLqwlfS4rVOzg3+8TyBtT2UWacb1VK F7sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WFU1ADnR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si17550324eds.267.2021.10.25.16.27.28; Mon, 25 Oct 2021 16:27:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WFU1ADnR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234986AbhJYT0U (ORCPT + 99 others); Mon, 25 Oct 2021 15:26:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:40072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234826AbhJYTYa (ORCPT ); Mon, 25 Oct 2021 15:24:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 584E4610C7; Mon, 25 Oct 2021 19:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635189715; bh=uWSMRQp8x7z7WCWUEVqeCoL1GrYntoAvijG7iS+iWfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WFU1ADnROQPO2JqwXS8q+7To/zydxHPEqslRCPcmpX2iTsUnGPhLQeThulUqzilAn IlQE9NCJQWbpXacApzNgJ9BKw9EIIW0pIZQSJd8TAvWPjGcvF55oyLMe6sZawqWnVZ censFWlPTMTn4A+aPBh8JUgRbmY5HrIYT/mi5oHQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Herve Codina , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 21/30] net: stmmac: add support for dwmac 3.40a Date: Mon, 25 Oct 2021 21:14:41 +0200 Message-Id: <20211025190927.865910556@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211025190922.089277904@linuxfoundation.org> References: <20211025190922.089277904@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Herve Codina [ Upstream commit 9cb1d19f47fafad7dcf7c8564e633440c946cfd7 ] dwmac 3.40a is an old ip version that can be found on SPEAr3xx soc. Signed-off-by: Herve Codina Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c index 3304095c934c..47842a796c3b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c @@ -71,6 +71,7 @@ err_remove_config_dt: static const struct of_device_id dwmac_generic_match[] = { { .compatible = "st,spear600-gmac"}, + { .compatible = "snps,dwmac-3.40a"}, { .compatible = "snps,dwmac-3.50a"}, { .compatible = "snps,dwmac-3.610"}, { .compatible = "snps,dwmac-3.70a"}, diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index d48cc32dc507..d008e9d1518b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -458,6 +458,14 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) plat->pmt = 1; } + if (of_device_is_compatible(np, "snps,dwmac-3.40a")) { + plat->has_gmac = 1; + plat->enh_desc = 1; + plat->tx_coe = 1; + plat->bugged_jumbo = 1; + plat->pmt = 1; + } + if (of_device_is_compatible(np, "snps,dwmac-4.00") || of_device_is_compatible(np, "snps,dwmac-4.10a")) { plat->has_gmac4 = 1; -- 2.33.0