Netdev List
 help / color / mirror / Atom feed
From: Alexandre TORGUE <alexandre.torgue@st.com>
To: <netdev@vger.kernel.org>, <peppe.cavallaro@st.com>
Cc: Lars Persson <lars.persson@axis.com>
Subject: [PATCH 09/13] stmmac: add new DT platform entries for GMAC4
Date: Fri, 25 Mar 2016 10:14:16 +0100	[thread overview]
Message-ID: <1458897260-14104-10-git-send-email-alexandre.torgue@st.com> (raw)
In-Reply-To: <1458897260-14104-1-git-send-email-alexandre.torgue@st.com>

This is to support the snps,dwmac-4.00 and snps,dwmac-4.10a
and related features on the platform driver.
See binding doc for further details.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>

diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
index 6605d19..4d302db 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -59,6 +59,8 @@ Optional properties:
 	- snps,fb: fixed-burst
 	- snps,mb: mixed-burst
 	- snps,rb: rebuild INCRx Burst
+	- snps,tso: this enables the TSO feature otherwise it will be managed by
+	    MAC HW capability register.
 - mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus.
 
 Examples:
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index dcbd2a1..6ca32f7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -243,6 +243,13 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
 		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;
+		plat->pmt = 1;
+		plat->tso_en = of_property_read_bool(np, "snps,tso");
+	}
+
 	if (of_device_is_compatible(np, "snps,dwmac-3.610") ||
 		of_device_is_compatible(np, "snps,dwmac-3.710")) {
 		plat->enh_desc = 1;
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 4bcf5a6..3aa1870 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -138,5 +138,7 @@ struct plat_stmmacenet_data {
 	void (*exit)(struct platform_device *pdev, void *priv);
 	void *bsp_priv;
 	struct stmmac_axi *axi;
+	int has_gmac4;
+	bool tso_en;
 };
 #endif
-- 
1.9.1

  parent reply	other threads:[~2016-03-25  9:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25  9:14 [PATCH 00/13] Enhance stmmac driver to support GMAC4.x IP Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 01/13] stmmac: rework get_hw_feature function Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 02/13] stmmac: rework the routines to show the ring status Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 03/13] stmmac: rework synopsys id read, moved to dwmac setup Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 04/13] stmmac: add descriptors function for GMAC 4.xx Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 05/13] stmmac: add GMAC4 DMA/CORE Header File Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 06/13] stmmac: add DMA support for GMAC 4.xx Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 07/13] stmmac: add GMAC4 core support Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 08/13] stmmac: enhance mmc counter management Alexandre TORGUE
2016-03-25  9:14 ` Alexandre TORGUE [this message]
2016-03-25  9:14 ` [PATCH 10/13] stmmac: support new GMAC4 Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 11/13] Documentation: networking: update stmmac Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 12/13] stmmac: update version to Jan_2016 Alexandre TORGUE
2016-03-25  9:14 ` [PATCH 13/13] stmmac: update MAINTAINERS Alexandre TORGUE
2016-03-25 15:11 ` [PATCH 00/13] Enhance stmmac driver to support GMAC4.x IP David Miller
2016-03-25 15:21   ` Alexandre Torgue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458897260-14104-10-git-send-email-alexandre.torgue@st.com \
    --to=alexandre.torgue@st.com \
    --cc=lars.persson@axis.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox