From: Ming Lei <ming.lei@canonical.com>
To: linux-arm-kernel@lists.infradead.org,
"David S. Miller" <davem@davemloft.net>
Cc: linux-samsung-soc@vger.kernel.org, Kukjin Kim <kgene@kernel.org>,
netdev@vger.kernel.org, Byungho An <bh74.an@samsung.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Ming Lei <ming.lei@canonical.com>
Subject: [PATCH 2/2] net: stmmac: add fixed_phy support via fixed-link DT binding
Date: Fri, 23 Jan 2015 15:48:25 +0800 [thread overview]
Message-ID: <1421999305-19267-3-git-send-email-ming.lei@canonical.com> (raw)
In-Reply-To: <1421999305-19267-1-git-send-email-ming.lei@canonical.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
.../net/ethernet/stmicro/stmmac/stmmac_platform.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 3039de2..73a3ced 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -27,6 +27,7 @@
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/of_device.h>
+#include <linux/of_mdio.h>
#include "stmmac.h"
#include "stmmac_platform.h"
@@ -216,6 +217,15 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
plat->pmt = 1;
}
+ if (of_phy_is_fixed_link(np)) {
+ int ret = of_phy_register_fixed_link(np);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to register fixed PHY\n");
+ return ret;
+ }
+ plat->phy_bus_name = "fixed";
+ }
+
if (of_device_is_compatible(np, "snps,dwmac-3.610") ||
of_device_is_compatible(np, "snps,dwmac-3.710")) {
plat->enh_desc = 1;
--
1.7.9.5
next prev parent reply other threads:[~2015-01-23 7:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 7:48 [PATCH 0/2] ARM EXYNOS5 & net: add fixed phy support Ming Lei
2015-01-23 7:48 ` [PATCH 1/2] ARM: exynos5440-sd5v1: switch to fixed-link DT binding Ming Lei
2015-01-23 7:48 ` Ming Lei [this message]
2015-01-23 8:28 ` [PATCH 2/2] net: stmmac: add fixed_phy support via " Ming Lei
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=1421999305-19267-3-git-send-email-ming.lei@canonical.com \
--to=ming.lei@canonical.com \
--cc=bh74.an@samsung.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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