From patchwork Fri Jan 23 07:48:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 5691361 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 55D43C058D for ; Fri, 23 Jan 2015 07:51:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88D662028D for ; Fri, 23 Jan 2015 07:51:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AEE2320274 for ; Fri, 23 Jan 2015 07:51:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YEYzh-0001BH-2F; Fri, 23 Jan 2015 07:49:29 +0000 Received: from mail-qa0-f41.google.com ([209.85.216.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YEYzZ-0000zx-FI for linux-arm-kernel@lists.infradead.org; Fri, 23 Jan 2015 07:49:22 +0000 Received: by mail-qa0-f41.google.com with SMTP id bm13so4794959qab.0 for ; Thu, 22 Jan 2015 23:48:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EJMsBFf4uMGMJYA2VtJyKQNhN3xkPUB54Z1NQ+TvAQI=; b=WSTVNXyUW8FcDOAHlMAE4nCE6VTuQtoejTcRxqJg18k5L0HsPwGHfx2xMPvihYFWlq 3lP7NAUsaJAOx06zkZ1vC0AS88JSa8v1XAV9oyGQXdLYslgwmaQ0ocrmhNCRF5Nr93sr BLAwxSyO+tY39x4+Dt7aOXqELtFR0+wltHwd6gp05rVeUwbYFYrj9bjRPpqSWCpm2A4p G3JOG//LHHmG/BdWE+ad7nBPntNc+CDgmI7QcvVWeIkY2QCnF1fJacZe5nIwkhcq1aIK 0XaJ1BqLfsjRWWmTrAfGM1K3muqzVFghQSsSexGs1WmLg5x5ETrzCVL4ZiAbfd1snTyB AbkA== X-Received: by 10.140.96.132 with SMTP id k4mr10793666qge.102.1421999339740; Thu, 22 Jan 2015 23:48:59 -0800 (PST) Received: from localhost ([162.213.34.56]) by mx.google.com with ESMTPSA id p49sm814633qgp.30.2015.01.22.23.48.58 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 23:48:59 -0800 (PST) From: Ming Lei To: linux-arm-kernel@lists.infradead.org, "David S. Miller" Subject: [PATCH 2/2] net: stmmac: add fixed_phy support via fixed-link DT binding Date: Fri, 23 Jan 2015 15:48:25 +0800 Message-Id: <1421999305-19267-3-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1421999305-19267-1-git-send-email-ming.lei@canonical.com> References: <1421999305-19267-1-git-send-email-ming.lei@canonical.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150122_234921_636275_6827C95C X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Florian Fainelli , Byungho An , netdev@vger.kernel.org, Ming Lei , linux-samsung-soc@vger.kernel.org, Kukjin Kim X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- .../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 #include #include +#include #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;